How to find out the name of a video file from a video hosting (for example, youtube or vimeo.com )?

It is necessary that the video from youtube be played in my html5-video-player . One link is not enough, you must specify the exact name of the video file, otherwise the player refuses to play it.

  • For example: I can not understand why this code does not work here? What's wrong with it? <video id="video2" width="640" height="360" controls> <source src="https://www.youtube.com/watch?v=eRsGyueVLvQ" type="video/youtube"> </video> - Ford
  • 2
    You should look at youtibe api . - Visman

1 answer 1

https://www.youtube.com/watch?v=eRsGyueVLvQ is not a link to the video file. This is a link to the html file, in which, using JavaScript, the video is loaded by fragments. If you want to insert a video from youtube on your website, you need to use iframe with the link embed-version of the video. For example:

 <iframe src="https://www.youtube.com/embed/eRsGyueVLvQ"></iframe>