I am trying to get Google Cast to work with Apache Cordova but I am having a hard time getting it working. Most guides and plugins are out of date and have not been updated in awhile. I found a plugin that was updated 3 months ago but I keep getting this error:
Uncaught ReferenceError: chrome is not defined
at CastPlayer.initializeCastPlayer (CastVideos.js:138)
at new CastPlayer (CastVideos.js:118)
at index.js:57
at HTMLScriptElement.script.onload (index.js:74)
cordova.js and index.js are both defined in my HTML file but index.js still cannot find the google cast plugin.
This is the repo for the plugin I have been trying to use
https://github.com/nbabanov/cordova-chromecast
And this is the sample project I was trying because I have been unsuccessful at getting the plugin to work while writing my own projects.
https://github.com/Vaporexpress/Cordova-CastVideos-chrome
I am using Cordova android 6.3.0 & and the target SDK version for my project is 26. I have node.js 8.8.1 installed as well. I have been testing the app on my S7 Edge running Android 7.0
Any help would be appreciated.