-2

I tried to add a video to a webpage. But I think there is an error. can anyone help me to solve this error

<Video width="1000" height="1050" autoplay>
<source src="file:///F:/Yohani/Works/Audio%20and%20video%20editing/Programming.mp4" type="video/filetype">
</Video>
  • https://stackoverflow.com/questions/8885701/play-local-hard-drive-video-file-with-html5-video-tag – OMi Shah Jul 13 '22 at 13:29
  • _"But it doesn't work"_ is the most useless **technical info** to give to fellow programmers. How about telling us if there is an error message (in the **console** of your browser's Developer Tools)? Does it say any error about the file path? How about telling us the video codec which is inside the MP4 and what browser is refusing to play the video file? For example some MP4 have H.265 video codec and Chrome browser does not support that type of MP4. – VC.One Jul 14 '22 at 09:43
  • _"I think there is an error"_ is equally useless. – Mark Rotteveel Jul 17 '22 at 06:17

1 Answers1

2

I would suggest adding the video in the same directory as your file. Then all you have to do is add it's name in the src and change type to "video/mp4"

Your code should look like this:

<Video width="1000" height="1050" autoplay>
<source src="Programming.mp4" type="video/mp4">
</Video>
bachar97
  • 66
  • 7