Skip to content
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] Casting seems to be broken on Android #27

Closed
jmurth1234 opened this issue May 16, 2024 · 5 comments
Closed

[BUG] Casting seems to be broken on Android #27

jmurth1234 opened this issue May 16, 2024 · 5 comments
Assignees
Labels
bug Something isn't working resolved Work has been completed

Comments

@jmurth1234
Copy link

Describe the bug
Unable to cast with the example project on two android devices I have. (one samsung, one redmi)

Behaviour seems a bit strange, i was able to cast for about a second with the samsung before the display went blank

To Reproduce
Uses the Example application, complete the steps to setup casting in the README

Steps to reproduce the behavior:

  1. Go to one of the videos
  2. Attempt to cast to a display

Expected behavior
Video would cast

Screenshots / Visual evidence
If applicable, add screenshots or recordings to help explain your problem. (Required if reproduction is not 100% reliable)

Desktop (please complete the following information):
If you are having a build issue, we would like to know about your machine.

  • Result of npx react-native info

System:
OS: macOS 14.4.1
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 1.60 GB / 32.00 GB
Shell: 3.6.0 - /usr/local/bin/fish
Binaries:
Node: 21.6.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.4 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11709847
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
Languages:
Java: 17.0.10 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.14 => 0.70.14
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Device(s) affected

  • Device: Samsung S21 Ultra, Redmi Note 11
  • OS: Android 14

Additional context
Add any other context about the problem here.

@jmurth1234 jmurth1234 added the needs-grooming Has not been reviewed by codeowners for scope/validation label May 16, 2024
@Jmilham21
Copy link
Collaborator

Confirmed this is a bug. This feels like a once-resolved issue after the Android 4.18.0 release.

I will take this on.

@Jmilham21 Jmilham21 added bug Something isn't working Groomed JWP team has reviewed the ticket and deemed it necessary and removed needs-grooming Has not been reviewed by codeowners for scope/validation labels May 16, 2024
@Jmilham21 Jmilham21 self-assigned this May 16, 2024
@Jmilham21 Jmilham21 added in-progress Actively being worked on by the asignee and removed Groomed JWP team has reviewed the ticket and deemed it necessary labels May 16, 2024
@Jmilham21
Copy link
Collaborator

@rymate1234, what Android version are both of your devices running? I have found there is no issue on Android 8.0 but the casting session breaks on Android 14.0.

Looking into why, but this info could help determine scope of the issue.

@jmurth1234
Copy link
Author

I believe both devices are on Android 14

@Jmilham21
Copy link
Collaborator

Thank you for bringing this to my attention. It appears that there is a significant issue with the native Android SDK regarding how the com.jwplayer.pub.api.background.MediaService interacts with casting. It seems that there is a mismatch of IDs being sent to the cast receiver.

For the time being, if you disable backgroundAudioEnabled, casting should function as expected. I will provide further updates once I have more information. However, since this issue may necessitate a change in the native SDK, a solution may be slightly delayed.

@Jmilham21
Copy link
Collaborator

This was an issue with the background audio service on Android interfering with the cast service on Android 13/14 (at least).

The resolution was to ensure the service is only bound when we are not casting. PR has been merged and the update will be pushed to NPM in the next release.

@Jmilham21 Jmilham21 added resolved Work has been completed and removed in-progress Actively being worked on by the asignee labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Work has been completed
Projects
None yet
Development

No branches or pull requests

2 participants