Video Tag using youtube Stream

0

Would there be any way to include the youtube video without using the iframe provided by the API in the Incoporation method?

I'd like to insert into a tag, for example.

I have the following code below:

<video id="meuVideo" controls autoplay constrolsList="nodownlaod">
        <source src="https://www.youtube.com/watch?v=IsPf1ZzNG9A&list=RDIsPf1ZzNG9A&start_radio=1"type="video/mp4">
    </video>
    
asked by anonymous 31.05.2018 / 02:46

1 answer

0

Use the api for developers:

<div id="ytplayer"></div>

<script>
  // Load the IFrame Player API code asynchronously.
  var tag = document.createElement('script');
  tag.src = "https://www.youtube.com/player_api";
  var firstScriptTag = document.getElementsByTagName('script')[0];
  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

  // Replace the 'ytplayer' element with an <iframe> and
  // YouTube player after the API code downloads.
  var player;
  function onYouTubePlayerAPIReady() {
    player = new YT.Player('ytplayer', {
      height: '360',
      width: '640',
      videoId: 'M7lc1UVf-VE'
    });
  }
</script>

Read on at: link

    
31.05.2018 / 04:37