Media3 Exoplayer Is not pausing during Incoming Call or Other State
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.