0
当使用相对位置的相当简单的将在网站上的视频:HTML5视频源标记语法
<source src="videos/video.mp4" type="video/mp4"/>
不过,我需要从一个完全不同的目录中插入视频文件。 像 “C:\一些\文件夹\ onthedrive \视频”
但该项目是在: “C:\ XAMPP \ htdocs中\项目名称”
我也曾尝试这些东西:
<source src="file://C:\Some\Folder\onthedrive\videos\video.mp4" type="video/mp4"/>
<source src="file://C:/Some/Folder/onthedrive/videos/video.mp4" type="video/mp4"/>
我能做些什么来解决这个问题?
编辑:
<source src="file://C:\Some\Folder\onthedrive\videos\video.mp4" type="video/mp4"/>
实际工作中,网络服务器和浏览器的认可,但由于安全其中的一个决定不加载该文件。
Chrome:'不允许加载本地资源'。
尝试'src =“file:/// C:/etc/video.mp4”',它不起作用。 – KoenG
试试这个:'src =“file:/// C:\ Some \ Folder \ onthedrive \ videos \ video.mp4”' 或试试这个'src =“file:/// C:/ Some/Folder/onthedrive /videos/video.mp4“' – NiekF
(出于某种原因,我无法编辑我以前的评论),但是您必须在”file:/// C:\“ 或”文件:/// C:/” – NiekF