-
-
Notifications
You must be signed in to change notification settings - Fork 407
Description
Bug information
Describe the bug
The native video player loads display preferences (skip forward/back length) once in PlayerViewModel.init {} and caches them for the entire app session. When a user changes these settings in the WebView-based settings UI, the native player continues using the old cached values. There is no bridge between the WebView and native player to communicate settings changes.
Affected code:
PlayerViewModel.kt (lines 169-189) loads preferences once at init:
viewModelScope.launch {
val displayPreferencesDto = withContext(Dispatchers.IO) {
displayPreferencesApi.getDisplayPreferences(
displayPreferencesId = Constants.DISPLAY_PREFERENCES_ID_USER_SETTINGS,
client = Constants.DISPLAY_PREFERENCES_CLIENT_EMBY,
).content
}
displayPreferences = DisplayPreferences(
skipBackLength = customPrefs?.get(Constants.DISPLAY_PREFERENCES_SKIP_BACK_LENGTH)?.toLongOrNull()
?: Constants.DEFAULT_SEEK_TIME_MS,
skipForwardLength = customPrefs?.get(Constants.DISPLAY_PREFERENCES_SKIP_FORWARD_LENGTH)?.toLongOrNull()
?: Constants.DEFAULT_SEEK_TIME_MS,
)
}fastForward() and rewind() (lines 551-557) read exclusively from this cached object:
fun fastForward() {
playerOrNull?.seekToOffset(displayPreferences.skipForwardLength)
}There is no @JavascriptInterface method in NativeInterface.kt to receive display preference updates from the WebView, and no mechanism to refresh the cache after settings change.
Steps to reproduce:
- Open the Jellyfin Android app
- Play a video and note the skip forward duration (default 30s)
- Go to Settings > Playback and change Skip Forward Length to 10s, tap Save
- Play a video again and use the skip forward button — it still skips 30s
- Force-close the app and reopen — now it correctly skips 10s
Expected behavior: Changed skip duration should take effect immediately without requiring an app restart.