Esempio n. 1
0
    def __init__(self, media_path, initial_volume=0, *args, **kwargs):
        VolumeFaderMixin.__init__(self, initial_volume=initial_volume)
        MediaPlayerMixin.__init__(self)

        self.player = None
        self.track = vlc.Media(media_path)
        self.track.parse()
Esempio n. 2
0
    def __init__(self, media_path, args=None):
        MediaPlayerMixin.__init__(self)

        self.args = args
        self.video_path = media_path
        self.omx_cmd = '/usr/bin/omxplayer -s {}'.format(media_path)
        if args:
            self.omx_cmd += ' {}'.format(args)
        self.player = None

        reactor.addSystemEventTrigger('before', 'shutdown', self.quit)
Esempio n. 3
0
 def _stop(self):
     MediaPlayerMixin._stop(self)
     self.quit()
Esempio n. 4
0
 def _pause(self):
     MediaPlayerMixin._pause(self)
     self.player.send('p')
Esempio n. 5
0
 def _resume(self):
     MediaPlayerMixin._resume(self)
     self.player.send('p')
Esempio n. 6
0
 def _play(self):
     MediaPlayerMixin._play(self)
     self.player = self.get_new_player()
Esempio n. 7
0
 def _stop(self):
     MediaPlayerMixin._stop(self)
     self.new_player()
Esempio n. 8
0
 def _pause(self):
     MediaPlayerMixin._pause(self)
     self.player.pause()
Esempio n. 9
0
 def _resume(self):
     MediaPlayerMixin._resume(self)
     self.player.play()
Esempio n. 10
0
 def _play(self):
     MediaPlayerMixin._play(self)
     self.player.play()
Esempio n. 11
0
    def __init__(self, media_path, initial_volume=100, *args, **kwargs):
        VolumeFaderMixin.__init__(self, initial_volume=initial_volume)
        MediaPlayerMixin.__init__(self)

        self.track = pyglet.media.load(media_path, streaming=False)
        self.new_player()
Esempio n. 12
0
    def __init__(self, media_path, *args, **kwargs):
        MediaPlayerMixin.__init__(self)

        self.player = None
        self.video = vlc.Media(media_path)
        self.video.parse()
Esempio n. 13
0
 def _stop(self):
     MediaPlayerMixin._stop(self)
     self.player.stop()
     self.release_player()
Esempio n. 14
0
 def _pause(self):
     MediaPlayerMixin._pause(self)
Esempio n. 15
0
 def _play(self):
     self.new_player()
     MediaPlayerMixin._play(self)
     self.player.play()