+ 5

can we play a youtube video in our html? can we do it offline with videos stored from our device?

10th Aug 2016, 8:34 AM
Mahdi
Mahdi - avatar
4 Réponses
+ 8
Yes, you can. That is the script. <body> <iframe width="332" height="252" src="https://www.youtube.com/embed/X-lXxy6bDBk" frameborder="0" allowfullscreen></iframe> </body> You can change the width and the height, but i'm not sure it will work every time. Only few numbers work, I know that the width 560 and height 315 works. To put your video you will need to copy the script from youtube.com. Click on the share button below the video and select Embed, there will be all the script. You can copy it and paste in your .html file. ! The script will be shown only in the desktop (PC) version of the youtube.com website. Or, easier, copy from the URL the characters after /watch?v= and add them after /embed/. In my script they are X-lXxy6bDBk. For example, your youtube link is https://www.youtube.com/watch?v=4YKpBYo61Cs , you copy 4YKpBYo61Cs and add it after the /embed/. So, in your script the link will be https://www.youtube.com/embed/4YKpBYo61Cs - Dumitru If this answer has helped you, give it a upvote by pressing the button that looks like an thumbs up (like).
10th Aug 2016, 10:45 AM
Dumitru Comarnitchi
Dumitru Comarnitchi - avatar
+ 2
Yes, you can play in HTML a video file that is in your computer. More information you can find at http://www.w3schools.com/html/html5_video.asp
10th Aug 2016, 12:00 PM
Dumitru Comarnitchi
Dumitru Comarnitchi - avatar
+ 2
yes You Can
15th Aug 2016, 9:15 AM
Karanveer Shukla
Karanveer Shukla - avatar
+ 2
<video src="your video path" controls> type here what you want to show those people whose browser not supported html5 video </video> its Done! So Simple And Short
15th Aug 2016, 9:17 AM
Karanveer Shukla
Karanveer Shukla - avatar