-
Notifications
You must be signed in to change notification settings - Fork 9
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] App crashes when attempting to play a second video while another is playing #77
Comments
Hey @MantasMikal, I have confirmed this does crash on Android 14 devices (tested on a Samsung Galaxy S24 Ultra). The issue is related to the background audio service and how it registers to players. For a quick solution, I'd recommend only having one player on screen while using the background audio service whenever possible. I understand you may want the audio session to swap between players, but right now this seems problematic. We will look into this and follow up with findings/solutions. To be clear, could your explain the use case of having multiple players on screen and them all using background audio? What would you expect from the SDK / React Native wrapper? |
Hi @Jmilham21, the app I'm working has a persistent mini-player which sits at the root level and is managed via context. The issue was happening when opening a screen with another video in it and playing it. On other devices the video in the mini-player would pause automatically or start playing at the same time which I think should be the expected behaviour. Destroying the mini-player in Thanks for looking into this! |
Hey @MantasMikal I made a PR around this but it won't solve the underlying issue of attempting to play content across multiple players with background audio on Android. The service wasn't designed for this use case and like you found, there are ways around this by either recreating players or passing a player from view to view with a different approach. The PR will stop the crash from happening with a warning logged stating why. So it's less of a fix and more of a way to avoid fatal crashes with better in-code documentation. |
Closing this as we don't expect multiple players attempting to use background audio, and now we have crash protection when it's attempted. |
Describe the bug
When playing video while another one is playing causes the app to crash.
It seems that this issue only happens with release builds, specifically on Samsung Galaxy devices with Android 14.
Google Pixel with Android 14 works fine.
All the devices I've tested with Android 13 works fine.
To Reproduce
Clone https://github.com/MantasMikal/jwplayer-react-native-ios-issues
Steps to reproduce the behavior:
Screenshots / Visual evidence
Screen.Recording.2024-08-19.at.15.28.12.mov
Device(s) affected
Additional context
Crash log:
Full crash log
JWP Ticketing
https://support.jwplayer.com/hc/en-us/requests/160147
The text was updated successfully, but these errors were encountered: