cordova - Youtube Player API doesn't work in android phonegap -
in normal html file, use below code , it's working great.
var youtube; var params = { allowscriptaccess: "always" }; var atts = { id: "youtube" }; swfobject.embedswf("http://www.youtube.com/apiplayer?enablejsapi=1&version=3", "ytpc", "1", "1", "8", "expressinstall.swf", null, params, atts); . . youtube.loadvideobyid(link);
but when moved html android phonegap environment, gives 'cannot call loadvideobyid method of undefined!'
what exact problem? can success?
flash not supported , not working on android , ios (in case plan deploy on ios later on)
when mentioned gives cannot call loadvideobyid method of undefined!, because using flash api https://developers.google.com/youtube/flash_api_reference
try using iframe api use html5 instead https://developers.google.com/youtube/iframe_api_reference
Comments
Post a Comment