Youtube iframe player JS API with jQuery - player object has no method 'getPlayerState'

后端 未结 1 1715
孤城傲影
孤城傲影 2020-12-20 10:26

I\'ve got following code, that is suppose to pause Slidedeck\'s autoscroll whenever there is a mouseover event. For mouseout event, the autoscroll should resume working unle

相关标签:
1条回答
  • 2020-12-20 11:06

    Ok I got it resolved, it was worth reading the Youtube manual. Problem was in HTML definition of id for the iframe element of the embedded video. When creating the player object, there's first parameter 'myYTPlayer' - this must be the id of the iframe

    <iframe id="myYTPlayer" width="729" height="410" src="http://www.youtube.com/embed/xxxxxxxxxxx?wmode=opaque&version=3&enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>
    
    0 讨论(0)
提交回复
热议问题