自定义 YouTube 播放器尺寸 +自定义的脱落叠加海报图像?
到目前为止,我一直很好地使用灯箱,只需一个图像“按钮”即可关闭视频,但是最近在一个特定场景中,一些要求发生了变化。
我在页面上有一个自定义区域,该区域包含在新闻轮播区域内。我已经消除了旋转,现在它实际上只是一个菜单,但是我需要为 YouTube 视频播放器定义自定义尺寸(两个默认尺寸,无全屏,不合适)。因此,我必须弄清楚如何定义介于两者之间的自定义尺寸,最好是 HTML5,然后回到 Flash。
接下来,我需要一个覆盖图像,一旦单击该图像,该图像就会掉下来以发现 YouTube 播放器并激活播放功能,而无需交互。
这里遵循的最佳流程是什么?出于多种原因,我更喜欢使用 YouTube,而不是自定义 HTML5 播放器(尽管我使用过一些不错的选项)。
如果我可以在视频播放完毕后利用 js 显示另一个覆盖图像,那将是一个很大的好处。
I have been fine hitherto working with lightboxes and just simply having an image "button" to fire videos off, however some requirements have recently changed in one particular scenario.
I have a custom area on a page that has is contained within a news rotator area. I've eliminated the rotation and it is now effectively just a menu, however I need to both define a custom size for a YouTube video player (the two default sizes, sans full screen, are not appropriate). Consequently I have to figure out how to define a custom size in between and preferably HTML5, falling back to Flash.
Next, I need to have an overlay image that will fall out of the way to uncover the YouTube player once clicked and activate the play function without interaction.
What's the best process to follow here? I would prefer to use YouTube for several reasons over a custom HTML5 player (although there are nice options I've used).
A big bonus would be if I could leverage js to display another overlay image once the video has completed playing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最终我放弃了 YouTube,转向了另一个解决方案。它不是免费的,但它是一个出色的解决方案。
不过,@PaulIrish 有一个值得审查的建议:http:// /www.blogseye.com/i-make-plugins/youtube-poster-plugin/
我最终利用的解决方案是 Wistia。他们拥有扎实的玩家+经验,而且指标也非常好。我很感谢支持人员的及时回复,因此您完全怀念 YouTube 上的个人人情味,仅此一点就值得我付费。
In the end I moved away from YouTube towards another solution. It's not free, but it is a superior solution.
However, saying that @PaulIrish had a suggestion that merits review: http://www.blogseye.com/i-make-plugins/youtube-poster-plugin/
The solution I ended up leveraging in the end is Wistia. They have a solid player + experience and the metrics are really nice. I appreciate the prompt reply from support so there's that personal human touch you completely miss from YouTube, and that alone is worth paying for to me.