A very strange thing. In recent days, I noticed that on my Firefox v22 youtube iframe api im, using on several sites, began to give errors such as: "TypeError: Value not a object" and "Error: Bad NPObject as personal data!". both in the file: http://s.ytimg.com/yts/jsbin/www-embed-player-vflX1WAR4.js and my youtube player is not working stably now. Has anyone else noticed this question in the past days and what could cause this problem? In all other browsers, thia youtube api works fine for me as it was befoe (I did not make any changes on my sites)
If a playerβs element is hidden when you call player.loadVideoById(vid) , it gives the error "Error: Bad NPObject as personal data" in firefox
player.loadVideoById(vid)
See the difference at http://jsfiddle.net/eyx4M/7/ This will work in chrome with the warning "JavaScript is unsafe attempt to access the frame with the URL", but in firefox it will throw "Error: Bad NPObject as personal data "
The iframe source must contain an ORIGIN domain. The domain must be accessible from a local or local area network.
http://www.youtube.com/embed/<VIDEO_ID>?origin=http://DOMAIN
Solved the problem for me.
I had the same problem.
This script fixed it:
<object width="640" height="390"> <param name="movie" value="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"></param> <param name="allowScriptAccess" value="always"></param> <embed src="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" width="640" height="390"></embed> </object>
source https://developers.google.com/youtube/player_parameters