offline

Play local (hard-drive) video file with HTML5 video tag?

眉间皱痕 提交于 2019-11-25 20:31:51
I want to achieve the following. <video src="file:///Users/username/folder/video.webm"> </video> The intent is that the user will be able to select a file from his/her hard drive. And the reason for not uploading is of course transmission costs and storage quota. There will be no reason to save the file. Is it possible? It is possible to play a local video file. <input type="file" accept="video/*"/> <video controls autoplay></video> When a file is selected via the input element: 'change' event is fired Get the first File object from the input.files FileList Make an object URL that points to