How to play you tube videos directly in htm5 video element ?

3/15/2019 8:25:36 AM

Gokul S

9 Answers

New Answer


Like This: <h1>My Media</h1> <iframe height="150" width="300" src="https://www.youtube.com/embed/Q6_5InVJZ88" allowfullscreen frameborder="0"></iframe> <!--The src is up to you!!!-->😊✌


1:Take a note of the video id. 2:Define an <iframe> element in your web page. 3:Let the src attribute point to the video URL. // i think it may help you bro😉


You may find this helpful: https://stackoverflow.com/questions/5157377/show-youtube-video-source-into-html5-video-tag However, I was not able to get the solution to work in the Code Playground (video won't play). I would recommend an iframe instead. https://www.sololearn.com/learn/338/?ref=app You may also find this helpful: https://code.sololearn.com/W2dQpsafNWav/?ref=app


The only (legitimate) way to show a youtube video on another page is use the embed link than youtube give you


insert the videos direct uniform resource location (URL) in the src to point directly to the video


Insert the video url in the video src Or you an iframe tag and and Paste the url in the iframe src


you have to use YouTube API