0

Exist any posibily to put to video player HTML5 as source a video from youtube?

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

I want to embed videos from youtube using HTML5 player. I've tried this solution but it's not working.

Community
  • 1
  • 1
Uppas1975
  • 47
  • 1
  • 2
  • do you have these resources in your computer? – neophyte Jan 25 '17 at 15:49
  • no, that's what I'm talking..I don't need with resources from computer...I want to use videos from youtube. – Uppas1975 Jan 25 '17 at 15:53
  • Possible duplicate of [Show Youtube video source into HTML5 video tag?](http://stackoverflow.com/questions/5157377/show-youtube-video-source-into-html5-video-tag) – neophyte Jan 25 '17 at 16:00
  • @neophyte dude..look on my subject...I saw the answer from that page but won't work for me. – Uppas1975 Jan 25 '17 at 16:05
  • *but it's not working.* is not enough to help you. If you want help implementing a particular solution, you need to provide details about how you actually tried to implement it and how it didn't work. – Grisha Levit Jan 25 '17 at 17:57

2 Answers2

0

TRY USING IFRAMES instead of <video>. I'ts not possible to embed youtube videos using HTMl5 video tag.

Try this it will work

       <iframe type="text/html" 
       width="320" height="240"
       src="http://www.youtube.com/embed/VIDEO_ID"
       frameborder="0">
       </iframe>
neophyte
  • 6,540
  • 2
  • 28
  • 43
0

Your options are outlined in the Developer API for youTube here: https://developers.google.com/youtube/player_parameters

There are restrictions on what you can/can't do with the content they are hosting (they are, after all, paying for storage, bandwidth, transcoding etc), so if you need more flexibility you will need to find your own video hosting solution

Offbeatmammal
  • 7,970
  • 2
  • 33
  • 52