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

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

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

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

        时间:2023-10-09

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

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

              • <bdo id='WIlwj'></bdo><ul id='WIlwj'></ul>

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

                • 本文介绍了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 全屏、循环和隐藏控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                    <tbody id='xRsjr'></tbody>

                    <tfoot id='xRsjr'></tfoot>

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

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

                      <bdo id='xRsjr'></bdo><ul id='xRsjr'></ul>

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