Ejemplo 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()
Ejemplo 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)
Ejemplo n.º 3
0
 def _stop(self):
     MediaPlayerMixin._stop(self)
     self.quit()
Ejemplo n.º 4
0
 def _pause(self):
     MediaPlayerMixin._pause(self)
     self.player.send('p')
Ejemplo n.º 5
0
 def _resume(self):
     MediaPlayerMixin._resume(self)
     self.player.send('p')
Ejemplo n.º 6
0
 def _play(self):
     MediaPlayerMixin._play(self)
     self.player = self.get_new_player()
Ejemplo n.º 7
0
 def _stop(self):
     MediaPlayerMixin._stop(self)
     self.new_player()
Ejemplo n.º 8
0
 def _pause(self):
     MediaPlayerMixin._pause(self)
     self.player.pause()
Ejemplo n.º 9
0
 def _resume(self):
     MediaPlayerMixin._resume(self)
     self.player.play()
Ejemplo n.º 10
0
 def _play(self):
     MediaPlayerMixin._play(self)
     self.player.play()
Ejemplo 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()
Ejemplo 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()
Ejemplo n.º 13
0
 def _stop(self):
     MediaPlayerMixin._stop(self)
     self.player.stop()
     self.release_player()
Ejemplo n.º 14
0
 def _pause(self):
     MediaPlayerMixin._pause(self)
Ejemplo n.º 15
0
 def _play(self):
     self.new_player()
     MediaPlayerMixin._play(self)
     self.player.play()