Open ppark-jwp opened 1 year ago
same issue, any one version that work properly ?
I'm also getting this -- seems to be related to upgrading the chromecast library but unsure how to resolve
anyone managed to find a solution? maybe created a patch to remove JWPlayer's chromecasting so google cast can be implemented?
I've recently being getting this same issue :( has anyone been able to resolve yet?
I am using react-native-google-cast for the chromecast functionality in the app I'm currently working on.
To disable the Chromecasting functionality of this library, I use one of the patches (I'm the author of these patches). Please pick the one that uses the same version you've installed.
I encountered this issue with Chromecast for which I had to move to the google-cast library. Nonetheless, the developer of this JW Player library has been a great help to the community, always working to resolve bugs and keeping the library up to date.
This issue is related to how the module is wrapped inside the application. This is causing bad package signatures to be registered with the casting framework, as seen from the top of the provided stack trace ComponentInfo{com.samg.media.EmotionCastleCinema/com.appgoalz.rnjwplayer.RNJWPlayerView}
Notice the component is referencing your application/the module's signature. This is no longer valid in the casting framework and newer versions of Android. I can't determine which version, but the current version of this wrapper works on Android 7, but does not work on Android 11+.
My proposed solution is seen in this branch. The approach is to move the casting framework registration to your application, and don't have the module do it for you any longer. This will also give you a more hands-on approach to controlling the CastOptionsProvider
class, which determines the receiver ID, notification styling, and many more options. This is more in line with how the JW Android SDK works.
It is an option to eject the JW cast module and use the react-native-google-cast
as described by @SufianBabri. It will come down to what works best for you.
For note, I am a JW Android SDK engineer, but I am not a master of React Native. Please take my suggestion with salt.
Updated the above PR to resolve a session ID issue between the sender and receiver.
Facing the same issue on 0.2.39 as well as on the latest 0.2.44 @chaimPaneth
Any update? @chaimPaneth
The app is not crashing but Chromecast is not casting video in version 0.2.35 also. @chaimPaneth
@tara-singh-danu in case of Android, please make sure you've made these changes:
implementation 'com.google.android.gms:play-services-cast-framework:21.0.1'
@SufianBabri I passed hideUIGroups: ['casting_menu'] in the jwplayer config and the chromecast icon got removed. But the chromecast is not working smoothly on android, sometimes it hangs the phone.
@tara-singh-danu to disable chromecast on Android, you need to apply relevant patch of the library (it will remove chromecast dependencies and disable it for Android). For iOS it has an additional step which it appears you've already followed.
These are hopefully all the steps you need to take:
"create-patch": "npx --yes patch-package --exclude 'build/|xcodeproj'",
"postinstall": "npx --yes patch-package"
jwPlayer.current?.setVisibility(false, ['chromecast']);
has to be added which you say you've already donenpm install
or yarn install
The solution is not working properly, it hangs the device
Android app crashes when user connects to a Chromecast device when I upgraded the bride from 0.2.34. Tested all versions after 0.2.35 and they all have the same issue regardless of JWP SDK versions and Exoplayer versions.
The app crashes with the following error :
java.lang.IllegalArgumentException: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.samg.media.EmotionCastleCinema/com.appgoalz.rnjwplayer.RNJWPlayerView} at androidx.core.app.TaskStackBuilder.addParentStack(TaskStackBuilder.java:210) at androidx.core.app.TaskStackBuilder.addNextIntentWithParentStack(TaskStackBuilder.java:144) at com.google.android.gms.cast.framework.media.internal.zzo.zzg(com.google.android.gms:play-services-cast-framework@@21.3.0:16) at com.google.android.gms.cast.framework.media.internal.zzo.zzd(com.google.android.gms:play-services-cast-framework@@21.3.0:14) at com.google.android.gms.cast.framework.media.internal.zzv.zzl(com.google.android.gms:play-services-cast-framework@@21.3.0:12) at com.google.android.gms.cast.framework.media.internal.zzu.onStatusUpdated(com.google.android.gms:play-services-cast-framework@@21.3.0:1) at com.google.android.gms.cast.framework.media.zzbn.zzm(com.google.android.gms:play-services-cast-framework@@21.3.0:6) at com.google.android.gms.cast.internal.zzaq.zzY(com.google.android.gms:play-services-cast@@21.3.0:1) at com.google.android.gms.cast.internal.zzaq.zzO(com.google.android.gms:play-services-cast@@21.3.0:61) at com.google.android.gms.cast.framework.media.RemoteMediaClient.onMessageReceived(com.google.android.gms:play-services-cast-framework@@21.3.0:1) at com.google.android.gms.cast.zzbq.run(com.google.android.gms:play-services-cast@@21.3.0:4) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Caused by: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{com.samg.media.EmotionCastleCinema/com.appgoalz.rnjwplayer.RNJWPlayerView} at android.app.ApplicationPackageManager.getActivityInfo(ApplicationPackageManager.java:616) at android.app.ApplicationPackageManager.getActivityInfo(ApplicationPackageManager.java:599) at androidx.core.app.NavUtils.getParentActivityName(NavUtils.java:261) at androidx.core.app.NavUtils.getParentActivityIntent(NavUtils.java:195) at androidx.core.app.TaskStackBuilder.addParentStack(TaskStackBuilder.java:203) at androidx.core.app.TaskStackBuilder.addNextIntentWithParentStack(TaskStackBuilder.java:144) at com.google.android.gms.cast.framework.media.internal.zzo.zzg(com.google.android.gms:play-services-cast-framework@@21.3.0:16) at com.google.android.gms.cast.framework.media.internal.zzo.zzd(com.google.android.gms:play-services-cast-framework@@21.3.0:14) at com.google.android.gms.cast.framework.media.internal.zzv.zzl(com.google.android.gms:play-services-cast-framework@@21.3.0:12) at com.google.android.gms.cast.framework.media.internal.zzu.onStatusUpdated(com.google.android.gms:play-services-cast-framework@@21.3.0:1) at com.google.android.gms.cast.framework.media.zzbn.zzm(com.google.android.gms:play-services-cast-framework@@21.3.0:6) at com.google.android.gms.cast.internal.zzaq.zzY(com.google.android.gms:play-services-cast@@21.3.0:1) at com.google.android.gms.cast.internal.zzaq.zzO(com.google.android.gms:play-services-cast@@21.3.0:61) at com.google.android.gms.cast.framework.media.RemoteMediaClient.onMessageReceived(com.google.android.gms:play-services-cast-framework@@21.3.0:1) at com.google.android.gms.cast.zzbq.run(com.google.android.gms:play-services-cast@@21.3.0:4) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)