ExoPlayer.AudioOffloadListener


@UnstableApi
interface ExoPlayer.AudioOffloadListener


A listener for audio offload events.

Summary

Public functions

Unit
onOffloadedPlayback(isOffloadedPlayback: Boolean)

Called when the value of isOffloadedPlayback changes.

Unit
onSleepingForOffloadChanged(isSleepingForOffload: Boolean)

Called when the value of isSleepingForOffload changes.

Public functions

onOffloadedPlayback

fun onOffloadedPlayback(isOffloadedPlayback: Boolean): Unit

Called when the value of isOffloadedPlayback changes.

This should not be generally required to be acted upon. But when offload is critical for efficiency, or audio features (gapless, playback speed), this will let the app know.

onSleepingForOffloadChanged

fun onSleepingForOffloadChanged(isSleepingForOffload: Boolean): Unit

Called when the value of isSleepingForOffload changes.

When isSleepingForOffload is true then, the player has paused its main loop to save power in offload scheduling mode.