youtube embed video style

Solutions on MaxInterview for youtube embed video style by the best coders in the world

showing results for - "youtube embed video style"
Zack
11 Jan 2019
1<div id="muteYouTubeVideoPlayer"></div>
2
3<script async src="https://www.youtube.com/iframe_api"></script>
4<script>
5 function onYouTubeIframeAPIReady() {
6  var player;
7  player = new YT.Player('muteYouTubeVideoPlayer', {
8    videoId: 'YOUR_VIDEO_ID', // YouTube Video ID
9    width: 560,               // Player width (in px)
10    height: 316,              // Player height (in px)
11    playerVars: {
12      autoplay: 1,        // Auto-play the video on load
13      controls: 1,        // Show pause/play buttons in player
14      showinfo: 0,        // Hide the video title
15      modestbranding: 1,  // Hide the Youtube Logo
16      loop: 1,            // Run the video in a loop
17      fs: 0,              // Hide the full screen button
18      cc_load_policy: 0, // Hide closed captions
19      iv_load_policy: 3,  // Hide the Video Annotations
20      autohide: 0         // Hide video controls when playing
21    },
22    events: {
23      onReady: function(e) {
24        e.target.mute();
25      }
26    }
27  });
28 }
29
30 // Written by @labnol
31</script>