chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
190 stars 91 forks source link

Fix/android chromecast #340

Closed Jmilham21 closed 3 months ago

Jmilham21 commented 6 months ago

This PR does:

Why this is necessary:

Intended to address this #314 issue

Additional information:

See my comment on the above issue for more context.

tara-singh-danu commented 5 months ago

@Jmilham21 There is no Chromecast icon visible on the player to cast the video.

Jmilham21 commented 5 months ago

@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.

tara-singh-danu commented 5 months ago

@Jmilham21 Followed each and every step mentioned in the readme still not getting cast icon.

Screenshot 2024-02-08 at 10 43 04 PM
Jmilham21 commented 5 months ago

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;

tara-singh-danu commented 5 months ago

@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.

Jmilham21 commented 5 months ago

@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.

paulrinaldi commented 4 months ago

Could this be reviewed? @chaimPaneth

Is there any idea when a release may have this incorporated?

fdobre commented 2 months ago

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.