HTML5视频/视频海报的结尾 [英] HTML5 Video / End of a Video Poster

查看:103
本文介绍了HTML5视频/视频海报的结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < video controls =controlsposter =http://gifs.gifbin.com/1233925271_8be9acc.gifstyle =width:800px;> 

以上;在HTML5 < video> 标记内,我可以添加海报;一个图像或动画.gif只是罚款和播放/运行之前,实际的视频'播放'。



现在,我如何添加图像;特别是一个.gif(动画的.gif与海报一起工作),它将在视频播放完之后运行? 简而言之:你需要添加 video.addEventListener('ended',function(){})并在你的自定义JavaScript中执行。 p>

播放视频后重定向的相关帖子,您可以相应修改它 - 播放后重定向html5视频



引用查找详细信息:


<video controls="controls" poster="http://gifs.gifbin.com/1233925271_8be9acc.gif" style="width:800px;">

With the above; within the HTML5 <video> tag, I can add a poster; of an image or animated .gif just fine and plays / runs before the actual video is 'played'.

NOW, how can I add an image; specifically a .gif (animated .gif works with poster) that will run AFTER the video has played through?

解决方案

In short: what you need is to add video.addEventListener('ended',function() {}) and do it in your custom JavaScript.

Here is a related post that redirects after video is played, you may modify it accordingly - Redirect html5 video after play.

References to look for detailed information:

这篇关于HTML5视频/视频海报的结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆