使用< video>的HTML5标记插入目录中的每个.mp4 [英] HTML5 using <video> tag to insert every .mp4 from a directory
问题描述
我正在尝试制作一个非常基本的图像/视频分享网站。为了让自己更容易,我想知道是否可以从目录中大量包含所有.mp4,而不是单独添加它们。这是我目前的文档:
< html>
< body>正在建设中。< br>
<影片自动播放>
< source src =away.mp4type =video / mp4>
< / video>
< / body>
< / html>
我不想手动添加< video>
标签为每个文件,有没有办法一次添加它们?或者像YouTube一样,它会显示缩略图,但会打开另一个页面进行播放。如果有一种方法可以集中添加视频源,那么它是否包含新添加的文件? 我认为你的意思是创建视频播放列表
检查这些链接
http://thenewcode.com/909/Create-An-Automatic-HTML5-Video-Playlist
http://thenewcode.com/792/Create-A-Simple-HTML5-Video-播放列表
I'm trying to make a very basic image/video sharing website. To make things easier on myself, I was wondering if it was possible to mass-include ALL .mp4's from a directory instead of individually adding them. Here is my current doc:
<html>
<body>Under construction.<br>
<video autoplay>
<source src="away.mp4" type="video/mp4">
</video>
</body>
</html>
I don't want to have to manually add a <video>
tag for every file, is there a way to add them all at once? Or something like YouTube does, where it shows a thumbnail but opens another page to play it. If there is a way to add the video sources en masse, does it include newly added files?
I think you mean creating video playlist check these links
http://thenewcode.com/909/Create-An-Automatic-HTML5-Video-Playlist
http://thenewcode.com/792/Create-A-Simple-HTML5-Video-Playlist
这篇关于使用< video>的HTML5标记插入目录中的每个.mp4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!