Very strange thing. Last few days i noticed that on my Firefox v22 the youtube iframe api im using on few sites started to give errors like: "TypeError: Value not an object" and "Error: Bad NPObject as private data!". both in file: http://s.ytimg.com/yts/jsbin/www-embed-player-vflX1WAR4.js and my youtube player is not working stable now. Have someone else noticed this issue last days and what can cause this problem? On all other browsers thia youtube api works fine for me as it was befoe (i didn't do any changes to my sites)
7
votes
3 Answers
1
votes
If the player element is hidden when you call player.loadVideoById(vid), it will throw error "Error: Bad NPObject as private data" in firefox
See the difference in http://jsfiddle.net/eyx4M/7/ This will work in chrome with a warning "Unsafe JavaScript attempt to access frame with Url", but in firefox it will throw "Error: Bad NPObject as private data".
0
votes
-1
votes
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>
the source https://developers.google.com/youtube/player_parameters
TypeError: Value not an object.inhttp://s.ytimg.com/yts/jsbin/www-embed-player-vfl7jE1l_.js. Video plays for 6 seconds, then stops. - showdev"// the player should play for six seconds and then stop."- showdev