Skip to main content

AudioContextFocus

How the audio player requests and handles audio focus on mobile platforms.

Inherits: enum.Enum

Properties

  • DUCK_OTHERS - Lowers the volume of other audio apps while this audio plays.
  • GAIN - Requests permanent audio focus, pausing other background audio apps.
  • MIX_WITH_OTHERS - Mixes with other background audio apps without pausing or ducking them.

Properties​

DUCK_OTHERSclass-attributeinstance-attribute​

Lowers the volume of other audio apps while this audio plays.

Warning

Due to iOS platform limitations, cannot be combined with respect_silence set to True.

GAINclass-attributeinstance-attribute​

Requests permanent audio focus, pausing other background audio apps.

MIX_WITH_OTHERSclass-attributeinstance-attribute​

Mixes with other background audio apps without pausing or ducking them.

Warning

Due to iOS platform limitations, cannot be combined with respect_silence set to True.