Embedded Vimeo Video Callbacks
This post is kind of a follow up to a post I made earlier in regards to HTML5 video callbacks. In that thread, I was given a great piece of code that would allow for the browser to be informed of when the video stops playing and then fire off an action (with jQuery). This is the code I'm currently using:
$('video.normal').bind('ended', function(){
$(this).fadeOut().queue(function(){
开发者_StackOverflow中文版 $(this).siblings('.post-video').fadeIn();
$(this).dequeue();
});
});
Which basically fades the video out when it's completed and brings a poster frame of the video (or similar image) back into view.
Well, the scope of the project has changed and now the client is asking for true full screen video and different size videos to be delivered based on user connection speed, something that's a little over my head and a lot over budget. So I've been researching and a Vimeo Plus player seems like a great alternative for visitors using a desktop browser (HD embeds, true full screen, and more). Thing is, I need that above code to continue working in some capacity or another, so does the embedded Vimeo player offer a similar callback that I can utilize? Or am I SOL here?
Thanks in advance!
Vimeo's "Universal Embed Code" fires lots of useful events, among them finish
.
They've changed their API quite a lot recently, so there are lots of outdated docs out there.
Here's their up-to-date API Documentation, playground and GitHub Repository. SWFObject or MooTools are not needed.
精彩评论