react-native-jw-media-player
react-native-jw-media-player copied to clipboard
Fix/android chromecast
This PR does:
- Fixes / implements a workaround for Android Chromecast issues.
- Fixes a session bug after initial reconfiguration.
-- Removes
MediaButtonReceiver
from manifest as it's legacy code
Why this is necessary:
Intended to address this #314 issue
Additional information:
See my comment on the above issue for more context.
@Jmilham21 There is no Chromecast icon visible on the player to cast the video.
@Jmilham21 There is no Chromecast icon visible on the player to cast the video.
@tara-singh-danu there has been a change in implementation of the cast module before the creation of this PR. By default, the bridge won't import the cast SDK. Follow the instructions in the updated README found on this PR to enable casting.
@Jmilham21 Followed each and every step mentioned in the readme still not getting cast icon.
The Example app in the project should work out of the box. Are you sure you are using the right branch? It works for me with no issues and multiple devices.
The device you are testing with may be incompatible with casting. You can check with the following Java code
boolean isCastApiAvailable = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS;
@Jmilham21 I tried to run the android app on this branch(fix/android-chromecast) the app is not crashing and the icon is there but after casting the video, video is not playing on Chromecast device. I tested Youtube Chromecast is working on the phone and the Chromecast device.
@tara-singh-danu This commit fixed the issue you are describing. If this change is implemented, the mismatch session IDs between sender and receiver should be resolved.
If it continues, check the logcat for anything interesting. Also, when testing with Chromecast, I highly recommend creating your own custom/styled receiver so you can inspect the web console.
Could this be reviewed? @chaimPaneth
Is there any idea when a release may have this incorporated?
Is there any way to hide the cast icon completely for Android?
hideUiGroup: 'casting_menu'
, or hideUiGroups[ 'casting_menu']
or RNJWPlayerUseGoogleCast = false
in gradle file do not seem to work for Android.
removing the Android dependencies for casting entirely is not a solution for me because they are used by another player...
Any response will be greatly appreciated.