0

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
         }
     });
 }
Community
  • 1
  • 1
Alon Lavi
  • 329
  • 2
  • 10

1 Answers1

0

As it seems pyqt4 doesnt support html5 video.
I tried to load this site htmlTest with pyqt4 built in browser.

QWebView().setUrl(QUrl('http://html5test.com/'))

The results were that the browser running with pyqt4 is not supporting html5 video.

Probably i need a higher version of pyqt.

As for onStateChange events not firing ... it was probably a temporary bug with flash player or something like that and it was fixed alone.

Alon Lavi
  • 329
  • 2
  • 10