'how should we link videos and audios on our html file?
<video width="500" height="500" controls="contrlos">
<source src="hope.mp4" type="video/mp4">
</video>
this is the code I tried on vscode, the video file is stored in my drive c, but I don't know why when I run it, it doesn't work, and I cannot play the video. by the way I open it in Chrome. and when I google a video and copy the link address in src="" the same problem repeat. does the audio and video files we want to put in html need to be stored in a special place in my computer?? plz help me! I'm beginner.
Solution 1:[1]
You can also use the iframe tag to display videos, use
<iframe width="465" height="315" src="path-to-your-video.mp4"></iframe>
Solution 2:[2]
There are 2 solutions of this problem:
- Keep the video file in same folder where you have stored your html file or
- Wrrite the full path of the video file where you have stored.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Tovape |
Solution 2 | Pranjal S Choubey |