This commit is contained in:
yumoqing 2022-09-05 16:32:59 +08:00
parent ce2d56016f
commit 3b13d6c630
2 changed files with 8 additions and 3 deletions

View File

@ -39,6 +39,8 @@ from .android_rotation import get_rotation
def signal_handler(signal, frame): def signal_handler(signal, frame):
app = App.get_running_app() app = App.get_running_app()
if app is None:
return
app.workers.running = False app.workers.running = False
app.stop() app.stop()
print('Singal handled .........') print('Singal handled .........')

View File

@ -162,17 +162,20 @@ class FFVideo(WidgetReady, Image):
return return
if self.status != 'play': if self.status != 'play':
return return
self._player.seek(pts) self._player.seek(pts, relative=False)
self.last_frame, self.timepass = self._player.get_frame()
self._position = self._player.get_pts() self._position = self._player.get_pts()
def mute(self, flag): def mute(self, flag=None):
if self.play_mode == 'preview': if self.play_mode == 'preview':
return return
if self._player is None: if self._player is None:
return return
if self.status != 'play': if self.status != 'play':
return return
self._player.set_mute(flag) x = self._player.get_mute()
print('Video(), mute=', x)
self._player.set_mute(not x)
def switch_audio(self): def switch_audio(self):
if self.play_mode == 'preview': if self.play_mode == 'preview':