Vimeo Player SDK-播放'事件过早开火?

发布于 2025-02-10 01:44:00 字数 240 浏览 2 评论 0 原文

我遇到了一个问题,即在项目中使用Vimeo Player SDK,并且我不希望用户在播放前查看缩略图。我正在通过代码触发播放,并在视频实际播放后尝试显示。我正在听“播放”活动,并且一旦视频实际播放,它才能触发它。但是我仍然得到缩略图。我在这里错过了什么吗?

为了清楚起见,我正在听 player.on('Play',..)事件,而不是 player.on('Play',..)

示例:

I'm having an issue where I'm using Vimeo Player SDK in a project and I don't want the user to see the thumbnail before playback. I'm triggering playback via code and attempting to display the video once it actually starts playing. I'm listening to the 'playing' event and would expect it to only trigger, once the video is actually playing. But I'm still getting the thumbnail. Am I missing something here?

For clarity, I'm listening to the player.on('playing', ..) event, not player.on('play', ..)

Example: https://jsfiddle.net/avt_pj/hqgtram0/31/

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

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

发布评论

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

评论(1

暮光沉寂 2025-02-17 01:44:00

Vimeo replied with this:

The playing event is fired by the <video> element itself, so
we don't control the timing of that in our player.

If it's critical to know the precise moment when the first frames of a
video are being played, I'd suggest wrapping this in a
setTimeout or listening to the timeupdate event.

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