mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
4bb09ec92e
The 'error is BehindLiveWindowException' check in onPlayerError was always false (Kotlin compiler had been warning about it). The actual exception is wrapped as the *cause* of an ExoPlaybackException, with errorCode 1002 (ERROR_CODE_BEHIND_LIVE_WINDOW). This made the existing recovery branch dead code, so when the live window slipped past the player it would silently drop into STATE_IDLE and the user had to back out of the video and reopen it. Test the cause and the error code so the branch actually fires, and snap to the live edge with seekToDefaultPosition() after both the BehindLiveWindow and PlaylistStuckException reloads so the user lands where the player would naturally play.