onPlaybackFailure

fun onPlaybackFailure(message: String? = null)(source)

Called by the playback surface when the live player errors mid-play (network drop, falling behind the live window, stale segment URLs). Mirrors the iOS player's recovery: re-poll the status and refresh play-data immediately; if the stream is still live afterwards, bump playerRebuildToken so the surface rebuilds the player from the live edge even when the URL didn't change. If the status flipped (offline/ended), state re-routes the UI instead.

Throttled to one recovery per poll interval so a persistently failing stream doesn't spin in a tight rebuild loop. A failure inside the throttle window is NOT dropped: it schedules one deferred recovery for when the window closes — an errored ExoPlayer never re-raises, so without this a rebuild that fails immediately (segments still missing) would strand the viewer on a frozen frame forever. The result is one recovery attempt per interval until playback sticks or the stream stops being live.