Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>YouTube Player API</title>
- <style>
- .embed-responsive-16by9 {
- padding-top: 56.25%; /* 16:9 Aspect Ratio */
- }
- </style>
- </head>
- <body>
- <div class="container mt-4">
- <h2>YouTube Player API Example</h2>
- <div class="embed-responsive embed-responsive-16by9">
- <div id="player"></div>
- </div>
- </div>
- <script src="https://www.youtube.com/iframe_api"></script>
- <script>
- function onYouTubeIframeAPIReady() {
- new YT.Player('player', {
- height: '1080',
- width: '1920',
- videoId: 'VIDEO_ID',
- events: {
- 'onReady': function(event) {
- event.target.setPlaybackQuality('hd1080');
- }
- }
- });
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement