Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube iframe api started to give errors in Firefox

Tags:

youtube-api

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)

like image 647
abiku Avatar asked Jul 04 '13 04:07

abiku


Video Answer


1 Answers

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".

like image 187
Nish Avatar answered Oct 07 '22 14:10

Nish