Has anyone tried to play YouTube videos in a regular HTML5 player? (native)

The question is probably on the headlines, here’s a link to a YouTube video, let's say - “youtube.com/watch?v=naleynXS7yo" downloadmaster sends a specific request for what it wants to download the file? Well, like "Accept: application / json" I think: can it somehow be done with YouTube in PHP as well? I just don’t want to place on the server, and the IFrame and the YouTube player in general are not suitable - you need to insert your own custom subtitles.

    1 answer 1

    There is no native way to do this, but it is possible to add a video using JavaScript. For your purposes, for example, the library MediaElement.js will do.

    With it, you can embed video as usual

    <video width="640" height="360" id="player1" preload="none"> <source type="video/youtube" src="http://www.youtube.com/watch?v=naleynXS7yo" /> </video> 

    If the browser does not support the video tag, Flash will be used.