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,16 +339,19 @@ 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
|
||||||
btn.source = blockImage('volume.jpg')
|
if self.menubar:
|
||||||
|
btn.source = blockImage('volume.jpg')
|
||||||
else:
|
else:
|
||||||
self._video.volume = self.old_volume
|
self._video.volume = self.old_volume
|
||||||
btn.source = blockImage('mute.jpg')
|
if self.menubar:
|
||||||
|
btn.source = blockImage('mute.jpg')
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
try:
|
try:
|
||||||
@ -364,10 +367,12 @@ 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'
|
||||||
self.btn_pause.source = blockImage('play.jpg')
|
if self.menubar:
|
||||||
|
self.btn_pause.source = blockImage('play.jpg')
|
||||||
else:
|
else:
|
||||||
self._video.state = 'play'
|
self._video.state = 'play'
|
||||||
self.btn_pause.source = blockImage('pause.jpg')
|
if self.menubar:
|
||||||
|
self.btn_pause.source = blockImage('pause.jpg')
|
||||||
|
|
||||||
def openfile(self,t):
|
def openfile(self,t):
|
||||||
if self._popup is None:
|
if self._popup is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user