ExoPlayer Audio Features - devrath/MediaAlchemySuite GitHub Wiki

Audio focus

  • Exo-player can Coordinate audio focus with other apps.
  • Say there is audio playing from other apps, When your app starts playing, the other app's audio slowly disappears.
player = ExoPlayer.Builder(context).setAudioAttributes(
  AudioAttributes.DEFAULT, /** Audio Focus **/ true
).build()

Handling audio becoming noisy

  • It involves pausing the playback when there is sudden noise from the device on re-connection/dis-connection to an external source.
player = ExoPlayer.Builder(context).setHandleAudioBecomingNoisy(true).build()

Handling background playback

  • When playing the playback in the background the exo-player prevents the device from going to full sleep mode.
player = ExoPlayer.Builder(context).setWakeMode(C.WAKE_MODE_LOCAL).build()