public interface

ExoPlayer.AudioOffloadListener

 androidx.media3.exoplayer.ExoPlayer.AudioOffloadListener

Overview

A listener for audio offload events.

Summary

Methods
public voidonOffloadedPlayback(boolean isOffloadedPlayback)

Called when the value of AudioTrack changes.

public voidonSleepingForOffloadChanged(boolean isSleepingForOffload)

Called when the value of ExoPlayer.isSleepingForOffload() changes.

Methods

public void onSleepingForOffloadChanged(boolean isSleepingForOffload)

Called when the value of ExoPlayer.isSleepingForOffload() changes.

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

public void onOffloadedPlayback(boolean isOffloadedPlayback)

Called when the value of AudioTrack 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.