androidx / androidx/media

Media3 Exoplayer Is not pausing during Incoming Call or Other State

Open
#2,131 3 comments 0 reactions 1 assignee View on GitHub

@tianyif is already working on this.

Since Feb 12, 2025.

needs triage question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version
Media3 main branch

More version details
media3 version : 1.5.0

Code :

@Singleton
@Provides
fun provideExoPlayer(
@ApplicationContext context: Context,
trackSelector: DefaultTrackSelector,
audioAttributes: AudioAttributes,
): ExoPlayer {
return ExoPlayer.Builder(context).setTrackSelector(trackSelector)
.setWakeMode(C.WAKE_MODE_NETWORK)
.setAudioAttributes(audioAttributes, true)
.setHandleAudioBecomingNoisy(true)
.build()
}

@Singleton
@Provides
fun providesAudioAttribute(): AudioAttributes {
    return AudioAttributes.Builder().setUsage(C.USAGE_MEDIA)
        .setContentType(C.AUDIO_CONTENT_TYPE_MOVIE)
        .build()
}

I can listen Video Audio and Ringtone both, How to handle this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.