-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Android: Notification play control does not request audio focus or pay attention to other audio after one interruption #4209
Comments
Previous bot comment (click to expand)Previous bot comment (click to expand)Previous bot comment (click to expand)Thank you for your bug report. We will review it and get back to you if we need more information. |
Looks like we could call setPlayWhenReady(true) in order to request audio focus (see similar |
The implementation is more difficult than this. Additionally if RNV continues playing after the scenario above, it does not pause when other audio starts playing. After implementing an audio manager and listener in the VideoPlayerService, I still reproduced these bugs. This makes me think of abstracting the service. Will continue to implement a first fix. This leads me The audio listening must even |
@paulrinaldi Thank you for sharing you investigations 🙏 |
Previous bot comment (click to expand)Previous bot comment (click to expand)Thank you for your bug report. We will review it and get back to you if we need more information. |
Previous bot comment (click to expand)Thank you for your bug report. We will review it and get back to you if we need more information. There is a newer version of the library available. You are using version 6.6.3, while the latest stable version is 6.6.4. Please update to the latest version and check if the issue still exists.
|
Thank you for your bug report. We will review it and get back to you if we need more information. There is a newer version of the library available. You are using version 6.6.3, while the latest stable version is 6.6.4. Please update to the latest version and check if the issue still exists.
|
On android 14+ I realized that handleCommand is not receiving the toggle play event because notifications are build automatically on anything Tiramisu and higher so I need to look into what happens on android 14+. |
For android 12-, For android 14+, So still not working on either. Thesis for both is that both do not call requestAudioFocus, biggest struggle I'm facing is implementing that call given my unfamiliarity with Kotlin and Android. |
Version
6.6.3
What platforms are you having the problem on?
Android
System Version
14
On what device are you experiencing the issue?
Real device, Simulator
Architecture
Old architecture
What happened?"
Original issue title: Tapping UnPause in Notification Media Controls does not pause external media
Notification Controls do not pause non-RNV media that is currently playing (e.g. YouTube). Additionally, if RNV continues playing after the scenario above, it does not pause when other audio starts playing.
Reproduction Link
https://github.com/TheWidlarzGroup/react-native-video/tree/master/examples/basic
Reproduction
Step to reproduce this bug are:
0. Edit
examples/basic/src/VideoPlayer.tsx
's rnv videoplayer component's propplayInBackground={false}
toplayInBackground={true}
yarn run android
with a simulator open (video player app opens)Actual Result:
8. RNV's AV continues while YouTube's AV continues
Expected Result:
8. RNV's AV continues but YouTube's AV is interrupted and pauses
The text was updated successfully, but these errors were encountered: