I have written a project using youtube player with IFrame API.
Until now it was working well but today it stopped firing onStateChange events.
I googled for that and saw that its reported alot in the last day. One solution that is suggested is to add to playerVars option the item - html:1 so youtube player will be an html5 and not Flash.
But even when i add it, its not working.
Besides in youtube player parameters there is no parameter - html:1.
https://developers.google.com/youtube/player_parameters
Since its not supposed to happen on Html5 player as it is said here:
YouTube iFrame API 'onStateChange' not firing in Firefox
Then how i make youtube player be an html5 on my project which is what i prefer anyway ?
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '390',
width: '640',
playerVars: {rel:0, html5: 1 },
events: {
'onReady': onPlayerReady,
'onStateChange':onPlayerStateChange
}
});
}