问题
This topic has been brought up in the past, but figured it's time to bring it to the forefront again. Are there any stable plugins out there to bring Chromecast support to PhoneGap / Cordova? Is a plugin still needed? Would love to get the discussion going again since multi-screen experiences are so huge right now. Thanks everyone.
回答1:
There are a few plugins available, try them
https://github.com/GetVideostream/cordova-chromecast // Android
https://github.com/AVGP/cordova-chromecast // Android
https://github.com/SesamTV/ChromecastCordova // Android
https://github.com/rbackhouse/chromecast_cordova_plugin // Android
https://github.com/noppolp/wondex-chromecast-cordova // iOS
回答2:
ConnectSDK finally updated their plugin for Cordova, and I can confirm very easy setup and use, and it supports other devices than Chromecast. I can confirm I have streaming support to Chromecast and Amazon Fire TV.
I'm even using Ionic with Cordova, and it worked out of the box. This is my choice, BY FAR, for app to smart tv device. LG and Roku may be working as well, but I have not been able to test yet.
Now I have an excuse to get an Xbox One... another device ConnectSDK claims to support... for "testing."
http://connectsdk.com/docs/1-6-0/cordova/setup-instructions/
回答3:
I have been using https://github.com/GetVideostream/cordova-chromecast for a couple of months now on an android project and it seems to work pretty well. The only thing I have found missing is the requestSessionById method.
来源:https://stackoverflow.com/questions/29421609/chromecast-support-in-phonegap-cordova