This commit is contained in:
yumoqing 2020-03-16 10:47:27 +08:00
parent 683add23ce
commit 2bf1a26cad

View File

@ -85,6 +85,8 @@ class BaseVPlayer(FloatLayout):
def on_state(self,o,v):
if self._video.state == 'play':
Window.allow_screensaver = False
if hasattr(self._video._video, '_ffplayer'):
self.ffplayer = self._video._video._ffplayer
else:
Window.allow_screensaver = True
print('onstate()',o,v,self._video.state)
@ -157,8 +159,8 @@ class BaseVPlayer(FloatLayout):
def audioswitch(self,btn):
print('*********AUDIOSwitch 1**************', self.ffplayer)
if self.ffplayer is not None:
print('*********AUDIOSwitch 2**************')
self.ffplayer.request_channel('audio')
x = self.ffplayer.request_channel('audio')
print('*********AUDIOSwitch 2**************',x)
def setVolume(self,obj,v):
self._video.volume = v