Exemplo n.º 1
0
 def seek(self, offset):
     """
     Seek to ``offset`` seconds
     """
     if self._player:
         osd.hide()
         self._player.seek(offset)
Exemplo n.º 2
0
    def stop(self):
        if not self._video or not self._player:
            return

        log.debug("PlayerManager::stop stopping playback of %s" % self._video)

        osd.hide()

        self._player.stop()

        self._player = None
        self._video  = None
Exemplo n.º 3
0
 def toggle_pause(self):
     if self._player:
         self._player.toggle_pause()
         if self.is_paused() and self._video:
             log.debug("PlayerManager::toggle_pause showing OSD")
             try:
                 duration = int(int(self._video.get_duration())*1e-3)
             except:
                 duration = 0
             osd.show(int(self._player.position), duration, self._video.get_proper_title())
         else:
             log.debug("PlayerManager::toggle_pause hiding OSD")
             osd.hide()