Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
html5视频标签-更改默认视图_Html_Video - Fatal编程技术网

html5视频标签-更改默认视图

html5视频标签-更改默认视图,html,video,Html,Video,我不知道该怎么解释。它是关于html5视频标签的。除了一个,我把它定得很完美。当我的视频加载时(不播放。仅在html上显示),它会显示白色背景。这是因为视频00:00是白色背景。我可以设置为05.23(显示更有趣的视图)吗 我需要帮助。非常感谢。您可以在视频标签中添加“海报”,这与视频开始前的默认背景相似,请参见: <video controls poster="/images/w3html5.gif"> <source src="movie.mp4" type="vi


我不知道该怎么解释。它是关于html5视频标签的。除了一个,我把它定得很完美。当我的视频加载时(不播放。仅在html上显示),它会显示白色背景。这是因为视频00:00是白色背景。我可以设置为05.23(显示更有趣的视图)吗

我需要帮助。非常感谢。

您可以在视频标签中添加“海报”,这与视频开始前的默认背景相似,请参见:

<video controls poster="/images/w3html5.gif">
    <source src="movie.mp4" type="video/mp4">
    <source src="movie.ogg" type="video/ogg">
    Your browser does not support the video tag.
</video>

您的浏览器不支持视频标记。
然后你可以将视频中的截图保存为图像,并将其添加为海报

也许可以考虑使用像Vo.js这样的库,它给了你很多额外的功能。

您可以在
标记本身中指定起始位置

<video controls>
  <source src="blah.mp4#t=323" type="video/mp4">
  <source src="blah.ogg#t=323" type="video/ogg">
</video>


#t=323将在几秒钟内为html视频播放器提供起点。

然后根据@Carla的回答使用
poster
属性。:)