我有一个名为“C:\folder\movie.mp4”的文件。我如何在 Chrome 中玩这个?我尝试使用 html5 video 标签,但没有成功。我看到了播放器,但无法点击播放。
<video width="320" height="240" controls><source src="file:///C:/folder/movie.mp4" type="video/mp4">Your browser does not support the video tag.</video>
最佳答案
看起来您的代码没问题,请尝试将视频放在 html 文档的同一文件夹中,假设您这样做了:
<video width="320" height="240" controls><source src="movie.mp4" type="video/mp4">Your browser does not support the video tag.</video>
或者,将其放在 html 文件夹的子文件夹中,如下所示:
<video width="320" height="240" controls><source src="folder/movie.mp4" type="video/mp4">Your browser does not support the video tag.</video>
它应该有效,因为它对我有用。
关于javascript - 如何在chrome浏览器中播放本地视频文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39195365/