Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 MediaElement.js HTML 5 视频播放器,我想在播放时间之间在我的视频上添加一个广告(如 Youtube 添加)(如:在 0:20 秒添加淡入和在 0:30 秒淡出 - 添加可见:10 秒)。
有人做过这样的事情吗?谢谢!
一种方法是在视频的当前时间 20 秒时更改视频源,播放 10 秒添加,然后改回视频的原始源。
这里的问题是任何人都可以移动到添加的末尾并跳过它,因为人们只能使用视频标签的控件。
除非您知道阻止控件的方法,否则这不是最佳解决方案。
(删除 controls="controls" 也不是解决方案,因为您可以通过检查器将其添加回。)