<track> 使用 URL () 从框架加载 URL () 的不安全尝试
<track> Unsafe attempt to load URL () from frame with URL ()
watch.html:1 Unsafe attempt to load URL file:///C:/subtitle.vtt from frame with URL file:///C:/watch.html. 'file:' URLs are treated as unique security origins.
这是我在尝试向视频添加字幕时在 Chrome 的控制台中遇到的错误。字幕在 Internet Explorer 上运行,没有任何错误消息。我的代码是 运行:
<video controls>
<source src="C:\video.mp4" type="video/mp4">
<track src="C:\subtitle.vtt" kind="subtitles" srclang="en" label="English">
</video>
解决方法:视频和字幕文件要在同一个路径下!
watch.html:1 Unsafe attempt to load URL file:///C:/subtitle.vtt from frame with URL file:///C:/watch.html. 'file:' URLs are treated as unique security origins.
这是我在尝试向视频添加字幕时在 Chrome 的控制台中遇到的错误。字幕在 Internet Explorer 上运行,没有任何错误消息。我的代码是 运行:
<video controls>
<source src="C:\video.mp4" type="video/mp4">
<track src="C:\subtitle.vtt" kind="subtitles" srclang="en" label="English">
</video>
解决方法:视频和字幕文件要在同一个路径下!