mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Don't idle mpv
This commit is contained in:
parent
e781276046
commit
fb9f84a7a6
2 changed files with 3 additions and 2 deletions
|
|
@ -405,6 +405,7 @@ class PlaybackViewModel
|
|||
enableDirectStream = !forceTranscoding,
|
||||
)
|
||||
player.prepare()
|
||||
player.play()
|
||||
|
||||
this@PlaybackViewModel.chapters.value = Chapter.fromDto(base, api)
|
||||
Timber.v("chapters=${this@PlaybackViewModel.chapters.value?.size}")
|
||||
|
|
|
|||
|
|
@ -103,8 +103,7 @@ class MpvPlayer(
|
|||
MPVLib.setOptionString("demuxer-max-back-bytes", "${cacheMegs * 1024 * 1024}")
|
||||
|
||||
MPVLib.setOptionString("force-window", "no")
|
||||
// need to idle at least once for playFile() logic to work
|
||||
MPVLib.setOptionString("idle", "once")
|
||||
MPVLib.setOptionString("idle", "yes")
|
||||
MPVLib.addObserver(this)
|
||||
MPVProperty.observedProperties.forEach(MPVLib::observeProperty)
|
||||
|
||||
|
|
@ -201,6 +200,7 @@ class MpvPlayer(
|
|||
if (DEBUG) Timber.v("prepare")
|
||||
durationMs = 0L
|
||||
positionMs = -1L
|
||||
playbackState = STATE_READY
|
||||
}
|
||||
|
||||
override fun getPlaybackState(): Int {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue