From 3c018f9b5904f25cd77cff3da2aca00cc7270b69 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 24 Dec 2019 13:18:31 +0800 Subject: [PATCH] bugfix --- kivyblocks/vplayer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kivyblocks/vplayer.py b/kivyblocks/vplayer.py index 497a74d..f57a4f6 100644 --- a/kivyblocks/vplayer.py +++ b/kivyblocks/vplayer.py @@ -89,6 +89,7 @@ class VPlayer(FloatLayout): self._video.bind(eos=self.video_end) self._video.bind(state=self.on_state) self._video.bind(loaded=self.createProgressbar) + self._video.bind(on_touch_down=self.on_touch_down) self.register_event_type('on_playend') def play(self,o=None,v=None): @@ -246,7 +247,7 @@ class VPlayer(FloatLayout): if platform in desktopOSs: Window.restore() - def buildMenu(self,obj,touch): + def on_touch_down(self,obj=None,touch=None): if not self.collide_point(*touch.pos): print('not inside the player') return @@ -266,6 +267,7 @@ class VPlayer(FloatLayout): self.remove_widget(self.menubar) return + def buildMenu(self): self.menubar = BoxLayout(orientation='horizontal', size_hint_y=None,height=CSize(1.4)) self.btn_pause = PressableImage(source=blockImage('pause.jpg'),