Skip to content

Commit 2d91b9b

Browse files
committed
fix(player): Adjust the player initialization delay
1 parent 762abf1 commit 2d91b9b

File tree

1 file changed

+2
-6
lines changed
  • composeApp/src/commonMain/kotlin/com/jankinwu/fntv/client/ui/screen

1 file changed

+2
-6
lines changed

composeApp/src/commonMain/kotlin/com/jankinwu/fntv/client/ui/screen/PlayerScreen.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,7 @@ private suspend fun startPlayback(
18821882
extraFiles: MediaExtraFiles,
18831883
isM3u8: Boolean = false
18841884
) {
1885-
val isDirectLink = playLink.contains("/v/api/v1/media/range/")
1885+
// val isDirectLink = playLink.contains("/v/api/v1/media/range/")
18861886
var baseUrl = if (AccountDataCache.cookieState.isNotBlank()) {
18871887
AccountDataCache.getProxyBaseUrl()
18881888
} else {
@@ -1913,11 +1913,7 @@ private suspend fun startPlayback(
19131913
)
19141914
}
19151915
}
1916-
if (!isDirectLink) {
1917-
delay(1000) // 等待播放器初始化
1918-
} else {
1919-
delay(200)
1920-
}
1916+
delay(300)
19211917
player.features[PlaybackSpeed]?.set(1.0f)
19221918
// 恢复音量
19231919
val savedVolume = PlayingSettingsStore.getVolume()

0 commit comments

Comments
 (0)