Video not playing | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Video not playing

My video is not playing. Help me It's a YouTube video https://code.sololearn.com/Wo57Ni7HcoEG/?ref=app

1st Oct 2021, 12:38 PM
Rishi
Rishi - avatar
6 Answers
+ 4
Video tag supports only video formats (like mp4 etc). Youtube does not expose its raw video files - it only exposes the unique id of the video. Since that id does not correspond to the actual file, video tag cannot be used https://stackoverflow.com/questions/19836015/youtube-url-in-video-tag
2nd Oct 2021, 7:11 AM
Simba
Simba - avatar
+ 6
Rishi After the body tag you added video controls while closing you wrote </audio> Also check the link
1st Oct 2021, 12:56 PM
R💠🇮🇳
R💠🇮🇳 - avatar
+ 3
You can't just add a YouTube video in video tag like other videos. So, it's better to use iframe tag instead. <iframe width="340" height="250" src="https://www.youtube.com/embed/2ZrWHtvSog4"></iframe>
1st Oct 2021, 1:56 PM
Simba
Simba - avatar
+ 3
If you would like to play the videos from platforms such as vimeo and youtube. You should use the iframe. Please check the below link, i have added your video link to iframe. https://code.sololearn.com/W0wL8CdXzOUU/?ref=app
1st Oct 2021, 3:16 PM
Mohamed Shafnas
+ 1
Simba tnx tnx tnx =)
2nd Oct 2021, 12:26 PM
Rishi
Rishi - avatar
0
What video can I play with <video> tag?
1st Oct 2021, 3:45 PM
Rishi
Rishi - avatar