<bdo id='ghlZq'></bdo><ul id='ghlZq'></ul>
  1. <legend id='ghlZq'><style id='ghlZq'><dir id='ghlZq'><q id='ghlZq'></q></dir></style></legend>
  2. <small id='ghlZq'></small><noframes id='ghlZq'>

    1. <i id='ghlZq'><tr id='ghlZq'><dt id='ghlZq'><q id='ghlZq'><span id='ghlZq'><b id='ghlZq'><form id='ghlZq'><ins id='ghlZq'></ins><ul id='ghlZq'></ul><sub id='ghlZq'></sub></form><legend id='ghlZq'></legend><bdo id='ghlZq'><pre id='ghlZq'><center id='ghlZq'></center></pre></bdo></b><th id='ghlZq'></th></span></q></dt></tr></i><div id='ghlZq'><tfoot id='ghlZq'></tfoot><dl id='ghlZq'><fieldset id='ghlZq'></fieldset></dl></div>
      <tfoot id='ghlZq'></tfoot>

      Kivy VideoPlayer 全屏、循环和隐藏控件

      时间:2023-06-07
      <tfoot id='wUlsS'></tfoot>
      <i id='wUlsS'><tr id='wUlsS'><dt id='wUlsS'><q id='wUlsS'><span id='wUlsS'><b id='wUlsS'><form id='wUlsS'><ins id='wUlsS'></ins><ul id='wUlsS'></ul><sub id='wUlsS'></sub></form><legend id='wUlsS'></legend><bdo id='wUlsS'><pre id='wUlsS'><center id='wUlsS'></center></pre></bdo></b><th id='wUlsS'></th></span></q></dt></tr></i><div id='wUlsS'><tfoot id='wUlsS'></tfoot><dl id='wUlsS'><fieldset id='wUlsS'></fieldset></dl></div>
        <bdo id='wUlsS'></bdo><ul id='wUlsS'></ul>

          <small id='wUlsS'></small><noframes id='wUlsS'>

              <legend id='wUlsS'><style id='wUlsS'><dir id='wUlsS'><q id='wUlsS'></q></dir></style></legend>
                <tbody id='wUlsS'></tbody>
                本文介绍了Kivy VideoPlayer 全屏、循环和隐藏控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我刚开始使用 Kivy,如果我做错了什么,请指出.我正在尝试使用视频播放器.也就是说,我似乎无法让它识别任何选项",我真的很想要一种隐藏控件的方法(以防止用户在电影播放时停止/暂停/更改音量/交互等)运行).

                I'm just starting out with Kivy, so please point out if I'm doing something wrong.. I'm trying to work with the video player. Namely, I can't seem to get it to recognize any "options", and I'd really like a way to hide the controls (to prevent the user from stopping/pausing/changing volume/interacting etc.. while the movie is running).

                这是我目前所得到的:

                import kivy
                kivy.require('1.9.0')
                
                from kivy.app import App
                from kivy.uix.videoplayer import VideoPlayer
                
                class MyApp(App):
                    def build(self):
                        self.player = VideoPlayer(fullscreen=True, allow_fullscreen=True, source='mymovie.mp4', state='play', options={'allow_stretch': True, 'eos': 'loop', 'fullscreen': True})
                        return(self.player)
                
                
                if __name__ == '__main__':
                    MyApp().run()
                

                eos: 上面的循环",似乎完全被忽略了.就像全屏"一样.双击播放器不会使其全屏运行.

                eos: 'loop' above, seems to be completely ignored. As does 'fullscreen'. Double clicking the player doesn't cause it to run in full screen.

                我正在 Windows 上进行测试(但希望移植到 android),在后台的控制台"窗口中,我有 2 个警告应该对我有所帮助,但我想我知道的不够多,不知道如何照顾它:

                I'm testing on Windows (but hoping to port to android), and in the "console" window in the background I have 2 warnings that should help me, but I guess I don't know enough to know how to take care of it:

                [WARNING           ] [VideoPlayer ] Cannot switch to fullscreen, window not found.
                [WARNING           ] [VideoPlayer ] Cannot switch to fullscreen, window not found.
                

                理想情况下,我会让它全屏运行,并且能够禁用控件(因此用户可以使用键盘/触摸/计时器事件等与事物进行交互),但我找不到任何有关如何操作的文档禁用它们.有什么指点吗?

                Ideally, I would get it running in fullscreen and would be able to disable the controls (so the user can interact with things using keyboard/touch/timer events/etc.) but I can't find any documentation on how to disable them. Any pointers?

                我已经设法让窗口本身以全屏模式运行,但我认为这不是一回事.谢谢!

                I've managed to get the window itself to run in fullscreen, but that's not the same thing, I don't think. Thanks!

                推荐答案

                我通过使用 kivy.uix.video.Video 而不是 kivy.uix.videoplayer.VideoPlayer.我不知道这是否是我最初应该做的事情(刚刚开始!),但以防万一其他人遇到这个问题,这对我有用:

                I solved my issues by using kivy.uix.video.Video instead of kivy.uix.videoplayer.VideoPlayer. I don't know if that's what I was expected to do in the first place (just starting out!), but just in case someone else has this problem, here's what worked for me:

                import kivy
                kivy.require('1.9.0')
                
                from kivy.app import App
                from kivy.uix.video import Video
                
                class MyApp(App):
                    def build(self):
                        video = Video(source='mymovie.mp4')
                        video.state='play'
                        video.options = {'eos': 'loop'}
                        video.allow_stretch=True
                        return video
                
                if __name__ == '__main__':
                    MyApp().run()
                

                这篇关于Kivy VideoPlayer 全屏、循环和隐藏控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  <tbody id='xL9ia'></tbody>

                      <legend id='xL9ia'><style id='xL9ia'><dir id='xL9ia'><q id='xL9ia'></q></dir></style></legend>

                    1. <small id='xL9ia'></small><noframes id='xL9ia'>

                      <i id='xL9ia'><tr id='xL9ia'><dt id='xL9ia'><q id='xL9ia'><span id='xL9ia'><b id='xL9ia'><form id='xL9ia'><ins id='xL9ia'></ins><ul id='xL9ia'></ul><sub id='xL9ia'></sub></form><legend id='xL9ia'></legend><bdo id='xL9ia'><pre id='xL9ia'><center id='xL9ia'></center></pre></bdo></b><th id='xL9ia'></th></span></q></dt></tr></i><div id='xL9ia'><tfoot id='xL9ia'></tfoot><dl id='xL9ia'><fieldset id='xL9ia'></fieldset></dl></div>
                      <tfoot id='xL9ia'></tfoot>
                      • <bdo id='xL9ia'></bdo><ul id='xL9ia'></ul>