mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +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,
|
enableDirectStream = !forceTranscoding,
|
||||||
)
|
)
|
||||||
player.prepare()
|
player.prepare()
|
||||||
|
player.play()
|
||||||
|
|
||||||
this@PlaybackViewModel.chapters.value = Chapter.fromDto(base, api)
|
this@PlaybackViewModel.chapters.value = Chapter.fromDto(base, api)
|
||||||
Timber.v("chapters=${this@PlaybackViewModel.chapters.value?.size}")
|
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("demuxer-max-back-bytes", "${cacheMegs * 1024 * 1024}")
|
||||||
|
|
||||||
MPVLib.setOptionString("force-window", "no")
|
MPVLib.setOptionString("force-window", "no")
|
||||||
// need to idle at least once for playFile() logic to work
|
MPVLib.setOptionString("idle", "yes")
|
||||||
MPVLib.setOptionString("idle", "once")
|
|
||||||
MPVLib.addObserver(this)
|
MPVLib.addObserver(this)
|
||||||
MPVProperty.observedProperties.forEach(MPVLib::observeProperty)
|
MPVProperty.observedProperties.forEach(MPVLib::observeProperty)
|
||||||
|
|
||||||
|
|
@ -201,6 +200,7 @@ class MpvPlayer(
|
||||||
if (DEBUG) Timber.v("prepare")
|
if (DEBUG) Timber.v("prepare")
|
||||||
durationMs = 0L
|
durationMs = 0L
|
||||||
positionMs = -1L
|
positionMs = -1L
|
||||||
|
playbackState = STATE_READY
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getPlaybackState(): Int {
|
override fun getPlaybackState(): Int {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue