AdAudioFocusCallbacks

What the renderer does when the system moves audio focus around during a break. Split from the platform calls so unit tests can drive focus transitions directly.

Functions

Link copied to clipboard
abstract fun onFocusDucked()

Another app wants to be heard over us briefly — duck the ad's volume.

Link copied to clipboard
abstract fun onFocusGained()

Focus came back after a transient loss/duck — restore volume and resume.

Link copied to clipboard
abstract fun onFocusLost(transient: Boolean)

Focus was lost (permanently or transiently) — pause the ad.