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