public final class

Action.SetAudioAttributes

extends Action

 java.lang.Object

androidx.media3.test.utils.Action

↳androidx.media3.test.utils.Action.SetAudioAttributes

Overview

Calls Player.setAudioAttributes(AudioAttributes, boolean).

Summary

Constructors
publicSetAudioAttributes(java.lang.String tag, AudioAttributes audioAttributes, boolean handleAudioFocus)

Methods
protected abstract voiddoActionImpl(ExoPlayer player, DefaultTrackSelector trackSelector, Surface surface)

Called by Action to perform the action.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public SetAudioAttributes(java.lang.String tag, AudioAttributes audioAttributes, boolean handleAudioFocus)

Parameters:

tag: A tag to use for logging.
audioAttributes: The attributes to use for audio playback.
handleAudioFocus: True if the player should handle audio focus, false otherwise.

Methods

protected abstract void doActionImpl(ExoPlayer player, DefaultTrackSelector trackSelector, Surface surface)

Called by Action to perform the action.

Parameters:

player: The player to which the action should be applied.
trackSelector: The track selector to which the action should be applied.
surface: The surface to use when applying actions, or null if no surface is needed.