diff --git a/player/src/main/java/video/api/player/ApiVideoPlayerController.kt b/player/src/main/java/video/api/player/ApiVideoPlayerController.kt index 0114458..ee8b7aa 100644 --- a/player/src/main/java/video/api/player/ApiVideoPlayerController.kt +++ b/player/src/main/java/video/api/player/ApiVideoPlayerController.kt @@ -229,6 +229,11 @@ internal constructor( eventTime: AnalyticsListener.EventTime, error: PlaybackException ) { + if (error.errorCode == PlaybackException.ERROR_CODE_BEHIND_LIVE_WINDOW) { + // Re-initialize player at the current live window default position. + exoplayer.seekToDefaultPosition() + exoplayer.prepare() + } listeners.forEach { listener -> listener.onError(error) } }