rescueStreamFault

open override val rescueStreamFault: suspend (item: String?, mediaItem: MediaItem?, Exception, repository: MediaRepository) -> StreamExceptionResponse

This callback allows to recover from errors that happened during stream playback. When this callback is called the user has a chance to recover from that error. By returning a StreamExceptionResponse the user can decide how NewPlayer should continue. The default implementation by NewPlayerImpl will always return NoResponse. This will cause the exception to be directly forwarded to errorFlow.

Return

an implementation of StreamExceptionResponse. This tells NewPlayer how to deal with the exception.

Parameters

item

the item of the stream during which playback failed.

mediaItem

the MediaItem of the stream during which playback failed.

excpetion

the exception that occurred in ExoPlayer.

repository

the MediaRepository that NewPlayer utilizes.