MCPcopy Create free account
hub / github.com/Syncplay/syncplay / _determinePlayerStateChange

Method _determinePlayerStateChange

syncplay/client.py:197–202  ·  view source on GitHub ↗
(self, paused, position)

Source from the content-addressed store, hash-verified

195 return True
196
197 def _determinePlayerStateChange(self, paused, position):
198 pauseChange = self.getPlayerPaused() != paused and self.getGlobalPaused() != paused
199 _playerDiff = abs(self.getPlayerPosition() - position)
200 _globalDiff = abs(self.getGlobalPosition() - position)
201 seeked = _playerDiff > constants.SEEK_THRESHOLD and _globalDiff > constants.SEEK_THRESHOLD
202 return pauseChange, seeked
203
204 def rewindFile(self):
205 self.setPosition(0)

Callers 2

updatePlayerStatusMethod · 0.95
getLocalStateMethod · 0.95

Calls 4

getPlayerPausedMethod · 0.95
getGlobalPausedMethod · 0.95
getPlayerPositionMethod · 0.95
getGlobalPositionMethod · 0.95

Tested by

no test coverage detected