播放时自动展开嵌入的 Youtube 视频
如何在用户按下播放键时自动展开嵌入的 YouTube 视频?
情况:
- 由于各种原因,网页的理想布局要求当用户到达页面时视频播放器最初必须以小尺寸显示(假设为 480x385)
- 所显示的视频包含一些细节,难以在 480x385 分辨率下观看
- 现在,用户必须单击每个 YouTube 视频播放器中标配的“全屏”图标。这让很多人感到恼火。
所需的解决方案:
- 当用户点击视频进行播放时,播放器会自动扩展到更合理的尺寸(例如,640x385或853x505)并以该尺寸播放
- 视频可以在模式叠加中播放,但也欢迎其他解决方案
- 视频播放完毕后,展开的视图应自动消失,视频应以其原始大小显示在页面上
How do I automatically expand an embedded youtube video when the user presses play?
The situation:
- For various reasons the ideal layout of the webpage mans that the video player must appear initially at a small size (let's say 480x385) when the user arrives on the page
- The video being shown contains some detail and is difficult to watch at 480x385
- Right now the user must click on the "full-screen" icon which comes standard in every youtube video player. This is irritating to many people.
The desired solution:
- When users click on the video to play it, the player automatically expands to a more reasonable size (e.g., 640x385 or 853x505) and plays at that size
- The video could be played in a modal overlay, but other solutions would be welcome as well
- Upon completion of the video, the expanded view should automatically disappear and the video should appear in it's original size on the page
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您基本上需要两件事:
You basically need two things: