嵌入式 Vimeo 视频回调

发布于 2024-09-05 11:54:25 字数 653 浏览 1 评论 0原文

这篇文章是我之前发布的关于 HTML5 视频回调 的文章的后续。在那个线程中,我得到了一段很棒的代码,它可以让浏览器知道视频何时停止播放,然后触发一个操作(使用 jQuery)。这是我当前正在使用的代码:

$('video.normal').bind('ended', function(){
    $(this).fadeOut().queue(function(){ 
        $(this).siblings('.post-video').fadeIn();
        $(this).dequeue();
    });
});

基本上,视频完成后会淡出,并将视频的海报框架(或类似图像)带回到视图中。

嗯,项目的范围已经改变,现在客户要求根据用户连接速度提供真正的全屏视频和不同尺寸的视频,这有点超出了我的能力范围,而且超出了预算。因此,我一直在研究,对于使用桌面浏览器(高清嵌入、真正的全屏等)的访问者来说,Vimeo Plus 播放器似乎是一个很好的选择。问题是,我需要上述代码才能继续以某种身份工作,那么嵌入式 Vimeo 播放器是否提供了我可以利用的类似回调?或者我在这里 SOL 吗?

提前致谢!

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(){ 
        $(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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

〃安静 2024-09-12 11:54:25

Vimeo 的“通用嵌入代码”会触发许多有用的事件,其中包括 finish
他们最近对 API 进行了很大的更改,因此有很多过时的文档。

这是他们的最新 API 文档游乐场GitHub 存储库。不需要 SWFObject 或 MooTools。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文