本文介绍了我需要隐藏一个 div,直到 Vimeo 视频完成.我怎么做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 Vimeo 视频的网站,客户希望在其中隐藏包含表单链接的 div,直到视频播放完毕.我在 Vimeo API Playground 上看到有一个Finish"事件监听器,但我以前从未接触过 Vimeo.我有一个 jquery 调用来隐藏或显示在声明 Vimeo 完成事件后我将运行的 Div.但是如何设置 JQuery/Javascript 来侦听该事件?

I have site that has a Vimeo video where the client wants to hide a div, which contains a form link, until the video has finished. I saw on the Vimeo API Playground that there is a "Finish" event listener, but I have never messed with Vimeo before. I have a jquery call to hide or show the Div which I would run once the Vimeo finish event is declared. But how do I setup JQuery/Javascript to listen for that event?

抱歉,我确定这很简单,但我是 Vimeo 新手.我目前将 Vimeo 视频作为 div 中的 iframe 硬编码到 HTML 中.

Sorry, I am sure this is simple but I am a Vimeo novice. I currently have the Vimeo video hard coded into the HTML as an iframe within a div.

感谢您提供的任何示例.

Thanks for any examples you can provide.

推荐答案

http:/下载 froogaloop 框架/vimeo.com/api/docs/downloads.在您的页面中包含缩小的 javascript 库,并将完成事件与您的播放器挂钩,并在完成"事件处理程序中运行 jQuery 显示/隐藏代码.

Download the froogaloop framework from http://vimeo.com/api/docs/downloads.Include the minified javascript library in your page and hook the finish events with you player and run the jQuery show/hide code inside the 'finish' event handler.

在此处查看示例http://player.vimeo.com/playground

这篇关于我需要隐藏一个 div,直到 Vimeo 视频完成.我怎么做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 06:11