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()
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)
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()
def __init__(self, media_path, *args, **kwargs): MediaPlayerMixin.__init__(self) self.player = None self.video = vlc.Media(media_path) self.video.parse()