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):
app = App.get_running_app()
if app is None:
return
app.workers.running = False
app.stop()
print('Singal handled .........')

View File

@ -162,17 +162,20 @@ class FFVideo(WidgetReady, Image):
return
if self.status != 'play':
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()
def mute(self, flag):
def mute(self, flag=None):
if self.play_mode == 'preview':
return
if self._player is None:
return
if self.status != 'play':
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):
if self.play_mode == 'preview':