Python 停止kivy视频

Python 停止kivy视频,python,kivy,kivy-language,Python,Kivy,Kivy Language,我想停止这个kivy视频点击事件(默认播放)。我正在用树莓皮做这个。这是我的kv和python代码 <VideoScreen>: name: 'Video' BoxLayout: Video: id: 'video1' source: './media/Sequence_#1.mp4' state: root.current_video_state volume: 1 options: {'eos

我想停止这个kivy视频点击事件(默认播放)。我正在用树莓皮做这个。这是我的kv和python代码

<VideoScreen>:
name: 'Video'
BoxLayout:
    Video:
        id: 'video1'
        source: './media/Sequence_#1.mp4'
        state: root.current_video_state
        volume: 1
        options: {'eos': 'loop'}
        allow_stretch: True
此部分将视频小部件的状态绑定到属性
当前视频状态
:每次
当前视频状态
更改时,视频的状态都会以相同的方式更改。您应在(触摸)事件上更改此变量以暂停视频:

def on_stop(self,  *args):
    self.current_video_state = 'pause'  # this will change video state to 'pause'
    self.parent.current = 'Login'

在raspberry pi上,视频小部件对您有用吗?我不能让它工作,我想很多其他人也有同样的问题。我们使用了这样的解决方法。你有没有做什么特别的事情让它在树莓皮上工作?
Video:
    # ...
    state: root.current_video_state
def on_stop(self,  *args):
    self.current_video_state = 'pause'  # this will change video state to 'pause'
    self.parent.current = 'Login'