bugfix
This commit is contained in:
parent
d895703a31
commit
12b4490500
@ -314,7 +314,7 @@ class VPlayer(FloatLayout):
|
|||||||
orientation='horizontal',
|
orientation='horizontal',
|
||||||
size_hint=(None,None),
|
size_hint=(None,None),
|
||||||
height = CSize(2),
|
height = CSize(2),
|
||||||
width = CSize(6),
|
width = CSize(10),
|
||||||
step=0.07)
|
step=0.07)
|
||||||
slider.bind(on_value=self.setVolume)
|
slider.bind(on_value=self.setVolume)
|
||||||
self.menubar.add_widget(slider)
|
self.menubar.add_widget(slider)
|
||||||
@ -339,15 +339,18 @@ class VPlayer(FloatLayout):
|
|||||||
self.ffplayer.request_channel('audio')
|
self.ffplayer.request_channel('audio')
|
||||||
|
|
||||||
def setVolume(self,obj,v):
|
def setVolume(self,obj,v):
|
||||||
|
print('setVolume() called .....',v)
|
||||||
self._video.volume = v
|
self._video.volume = v
|
||||||
|
|
||||||
def mute(self,btn):
|
def mute(self,btn):
|
||||||
if self._video.volume > 0.001:
|
if self._video.volume > 0.001:
|
||||||
self.old_volume = self._video.volume
|
self.old_volume = self._video.volume
|
||||||
self._video.volume = 0.0
|
self._video.volume = 0.0
|
||||||
|
if self.menubar:
|
||||||
btn.source = blockImage('volume.jpg')
|
btn.source = blockImage('volume.jpg')
|
||||||
else:
|
else:
|
||||||
self._video.volume = self.old_volume
|
self._video.volume = self.old_volume
|
||||||
|
if self.menubar:
|
||||||
btn.source = blockImage('mute.jpg')
|
btn.source = blockImage('mute.jpg')
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
@ -364,9 +367,11 @@ class VPlayer(FloatLayout):
|
|||||||
def pause(self,t=None):
|
def pause(self,t=None):
|
||||||
if self._video.state == 'play':
|
if self._video.state == 'play':
|
||||||
self._video.state = 'pause'
|
self._video.state = 'pause'
|
||||||
|
if self.menubar:
|
||||||
self.btn_pause.source = blockImage('play.jpg')
|
self.btn_pause.source = blockImage('play.jpg')
|
||||||
else:
|
else:
|
||||||
self._video.state = 'play'
|
self._video.state = 'play'
|
||||||
|
if self.menubar:
|
||||||
self.btn_pause.source = blockImage('pause.jpg')
|
self.btn_pause.source = blockImage('pause.jpg')
|
||||||
|
|
||||||
def openfile(self,t):
|
def openfile(self,t):
|
||||||
|
Loading…
Reference in New Issue
Block a user