Vimeo Froogaloop API not recognizing an event

前端 未结 5 1709
生来不讨喜
生来不讨喜 2020-12-25 14:20

I\'m trying to recognize the onPlay, onPause, and onFinish event for vimeo using the froogaloop API. I\'ve tried everything I could imagine with this thing, and no luck.

5条回答
  •  隐瞒了意图╮
    2020-12-25 14:29

    Got an error creating the player element when selecting the iframe with jQuery.

    var iframe = $('#player1');
    var player = $f(iframe);
    

    Results in

    TypeError: d[f] is undefined
    

    Solution for me was to select the first element in the jQuery ID selector

    var iframe = $('#player1')[0];
    var player = $f(iframe);
    

提交回复
热议问题