-
Notifications
You must be signed in to change notification settings - Fork 46
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
Chromecast + Cordova - problem with playing movie #52
Comments
I have already fixed it. In this case the chromecast was discovered always only as a DIAL device and the solution written by @jamescahall resolved my problem. jamescahall commented on 22 Jan: Just add this:
above the if (!isNew) in the CastDiscoveryProvider and all should be solved. |
Where do you found the CastDiscoveryProvider, he is not part of the Cordova SDK, he comes from the native SDKs? Can you explain me how to apply these fix? |
@Sprotte , this file is a part of native SDK In this file you have to find method
Remember that when you remove the connectsdk plugin and install it one more time, you have to change this piece of code everytime. |
@jasmin89 Thank you so much for your solution. I've been pulling my hair out for the last hour wondering why the service would only work sometimes. |
This worked for me as well. Was having the same issue when trying to invoke .launchWebApp(). Thanks for the fix. |
Also worked for me. Thank you so much, @jasmin89 |
Hi, I am trying to run ConnectSDK in Cordova. I can connect with my Chromecast device, but when I try to call device.getMediaPlayer().playMedia(("http://media.w3.org/2010/05/sintel/trailer.mp4", "video/mp4");, I get error:
com.connectsdk.cordova.JSCommandDispatcher$DispatcherException: Exception calling playMedia: java.lang.NullPointerException: Attempt to invoke interface method 'void com.connectsdk.service.capability.MediaPlayer.playMedia(com.connectsdk.core.MediaInfo, boolean, com.connectsdk.service.capability.MediaPlayer$LaunchListener)' on a null object reference
Do you know how to resolve this problem?
Cordova: 6.1.1
Plugins:
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-connectsdk 1.6.0 "Connect SDK"
cordova-plugin-dialogs 1.2.1 "Notification"
cordova-plugin-file 4.2.0 "File"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-whitelist 1.2.2 "Whitelist"
cordova-plugin-x-toast 2.5.1 "Toast"
The text was updated successfully, but these errors were encountered: