quldude
quldude

Reputation: 539

How can i play local video files within chrome browser?

I have a file called "C:\folder\movie.mp4". How can I play this in chrome? I tried using html5 video tag, but no luck. I see the player but cannot click play.

<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>

Upvotes: 3

Views: 9208

Answers (1)

Djaouad
Djaouad

Reputation: 22776

It looks like your code is okay, try using a relative path of the video file instead, for instance, if the video is in the same folder as the HTML document:

<video width="320" height="240" controls><source src="movie.mp4" type="video/mp4">Your browser does not support the video tag.</video>

Or, if it's in a subfolder (e.g. "folder") of the HTML root folder:

<video width="320" height="240" controls><source src="folder/movie.mp4" type="video/mp4">Your browser does not support the video tag.</video>

Upvotes: 2

Related Questions