froogaloop

Pause all Vimeo videos with API?

与世无争的帅哥 提交于 2019-12-06 08:17:28
I have hit a wall and cannot figure out how to make this work. With Vimeo's Advanced API I am pulling in all videos from an account with thumbnails. When clicking on a thumbnail the video is shown above and clicking on a different thumbnail hides the currently shown video. The problem is that the video continues to play even when it is hidden. I have spent a few hours looking at the API and I cannot get it to pause when hidden. var iframe = $('.video')[0]; $('.thumbnail a').click(function(e) { $f(iframe).api('pause'); }); The above code pauses only the first video. If I change the number [0]

Pause Vimeo universal embed when hidden using jQuery

亡梦爱人 提交于 2019-12-05 03:07:21
I have a Vimeo video (via universal embed iframe) hidden on my page. Clicking a link fades it in, and clicking outside of the video (lightbox-style) fades it out and hides it - but the video keeps playing. I read on Vimeo's API that you can use JSON objects to pause the video, but I don't understand what they're saying. HTML: <img id="show_tide" class="vid" src"#"> <i<iframe id="tide" class="vim" src="http://player.vimeo.com/video/1747304?portrait=0&color=ffffffapi=1" width="726" height="409" frameborder="0"></iframe> JavaScript: $('#underlay').click(function() { //pause VISIBLE (there are

jQuery and Vimeo Froogaloop API

家住魔仙堡 提交于 2019-12-03 00:32:36
I'm building a plugin to WordPress and so far so good with the PHP library. But I am having some issues with the JavaScript API. I'm trying to use it with jQuery, and I think the WordPress version of jQuery is messing with the $f shortcut. Why wouldn't this work? var vimeoPlayer = { init: function() { var vimeoPlayers = document.querySelectorAll('iframe'), player; jQuery('iframe.vimeo-player').each(function(index, iframe){ player = vimeoPlayers[index]; $f(player).vimeoPlayer.addEvent('ready', vimeoPlayer.ready); }); }, addEvent: function(element, eventName, callback) { if (element

Vimeo Froogaloop API not recognizing an event

天涯浪子 提交于 2019-11-30 01:40:59
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. I get this error on Firefox: And in Chrome: Importing froogaloop from the CDN: <script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script> My JS: $(function(){ var vimeoPlayer = document.querySelector('iframe'); $f(vimeoPlayer).addEvent('ready', ready); function ready(player_id) { froogaloop = $f(player_id); function setupEventListeners() { function onPlay() { froogaloop.addEvent('play', function(data) { console.log(

Vimeo Froogaloop API not recognizing an event

本秂侑毒 提交于 2019-11-28 22:29:22
问题 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. I get this error on Firefox: And in Chrome: Importing froogaloop from the CDN: <script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script> My JS: $(function(){ var vimeoPlayer = document.querySelector('iframe'); $f(vimeoPlayer).addEvent('ready', ready); function ready(player_id) { froogaloop = $f(player_id); function