mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-13 03:40:15 +01:00
adding pause toggle
This commit is contained in:
@@ -174,8 +174,19 @@ class video_player(object):
|
||||
self.omx.stop()
|
||||
self.omx = OMXDriver(self.widget, '')
|
||||
|
||||
def pause_content(self):
|
||||
self.status = 'PAUSED'
|
||||
def toggle_pause(self):
|
||||
is_paused = self.omx.omxplayer_is_paused()
|
||||
print is_paused
|
||||
if is_paused == 'RUNNING':
|
||||
if self.omx.send_pause():
|
||||
self.status = 'PAUSED'
|
||||
return
|
||||
elif is_paused == 'PAUSED':
|
||||
if self.omx.send_unpause():
|
||||
self.status = 'PLAYING'
|
||||
return
|
||||
print 'failed to toggle pause (this needs to be in message)'
|
||||
|
||||
|
||||
# tk = Tk()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user