Vimeo API:简单的播放按钮
Vimeo API 文档让我手足无措,完全不知道该怎么做。
我想创建一个简单的按钮来播放我的视频。有人可以提供一个简单的例子吗?它可能会帮助我更好地理解这个 API 是如何工作的。
谢谢你!
The Vimeo API documentation has me running in circles and I can't quite figure out what to do.
I want to create a simple button that plays my video. Could someone provide a bare-bones example of this? It might help me better understand how this API works.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它甚至可以更简单:这对我有用(页面上只有一个视频)
并且在调用
api=1
或player_id
时似乎不需要api=1
或player_id
代码>player.vimeo.com。我在 IE8、IE11、Fx、Chrome、Safari、Opera 上进行了测试。
(稍后编辑):Android 似乎是另一个故事;我一直无法找到 Android 下的编程控制的任何工作示例。我已将此事通知 Vimeo。
It can be even simpler: this works for me (only one video on the page)
And it doesn't seem to need
api=1
orplayer_id
in the call toplayer.vimeo.com
.I tested it on IE8, IE11, Fx, Chrome, Safari, Opera.
(edit later): Android seems to be another story; I have been unable to find any working example of programmatic control under Android. I have notified Vimeo of this.
我认为 Vimeo API 文档也非常令人困惑,这就是我这样做的原因:
http://labs.funkhausdesign.com/examples/vimeo/froogaloop2-api -basics.html
它尽可能简单。
I think the Vimeo API docs are super confusing as well, that's why I made this:
http://labs.funkhausdesign.com/examples/vimeo/froogaloop2-api-basics.html
It's as bare bones as possible.
我想添加一个像这样的播放/暂停按钮,而不使用 jquery 或 froogaloop。我不知道为什么,但是,我讨厌在不必要的时候包含一个图书馆。尤其是对于像这样简单的事情。
这是我想到的(我只是将其发布给其他正在搜索的人):
I wanted to add a play/pause button like this without using jquery or froogaloop. I don't know why but, I hate including a library when I don't have to. Especially for simple things like this.
Here's what I came up with (I'm just posting this for other people who are searching) :