Fixed mplayer/mpv not pausing at the startup
This commit is contained in:
parent
1cca98cc59
commit
02d6bb96af
@ -186,7 +186,7 @@ class SyncplayClient(object):
|
||||
|
||||
def _serverPaused(self, setBy):
|
||||
hideFromOSD = not constants.SHOW_SAME_ROOM_OSD
|
||||
if constants.SYNC_ON_PAUSE == True:
|
||||
if constants.SYNC_ON_PAUSE:
|
||||
self.setPosition(self.getGlobalPosition())
|
||||
self._player.setPaused(True)
|
||||
madeChangeOnPlayer = True
|
||||
|
||||
@ -60,6 +60,7 @@ class MplayerPlayer(BasePlayer):
|
||||
self._client.updateFile(self._filename, self._duration, self._filepath)
|
||||
|
||||
def _preparePlayer(self):
|
||||
self.setPaused(True)
|
||||
self.reactor.callLater(0, self._client.initPlayer, self)
|
||||
self._onFileUpdate()
|
||||
|
||||
@ -97,6 +98,7 @@ class MplayerPlayer(BasePlayer):
|
||||
|
||||
def setPaused(self, value):
|
||||
if self._paused <> value:
|
||||
self._paused = not self._paused
|
||||
self._listener.sendLine('pause')
|
||||
|
||||
def _getFilename(self):
|
||||
|
||||
@ -12,6 +12,7 @@ class MpvPlayer(MplayerPlayer):
|
||||
|
||||
def setPaused(self, value):
|
||||
if self._paused <> value:
|
||||
self._paused = not self._paused
|
||||
self._listener.sendLine('cycle pause')
|
||||
|
||||
@staticmethod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user