berarr
This commit is contained in:
@@ -92,6 +92,12 @@ class Player:
|
||||
log.info("mpv load: %s", path)
|
||||
self._player.loadfile(str(path), mode="replace")
|
||||
|
||||
def load_at(self, path, seconds, pause=True):
|
||||
"""Load a file and seek to position atomically. Avoids async seek race."""
|
||||
log.info("mpv load_at: %s at %.1fs pause=%s", path, seconds, pause)
|
||||
self._player["pause"] = pause
|
||||
self._player.loadfile(str(path), mode="replace", start=str(seconds))
|
||||
|
||||
def load_live(self, url):
|
||||
"""Load a live stream URL with low-latency options."""
|
||||
self._player["cache"] = "no"
|
||||
|
||||
Reference in New Issue
Block a user