NickAndNick

Video YouTube

May 4th, 2018
121
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!doctype html>
  2. <html lang="ru">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <title>Документ</title>
  6.   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  7.   <script>
  8.     const main = () => {
  9.       window.Video || ( window.Video = {} );
  10.       Video.playYouTube = function(container, video) {
  11.         video = "https://www.youtube.com/v/" + video + "?autoplay=1&start=0";
  12.         $(container).parent().html(`
  13.       <object width="100%" height="720px">
  14.         <param name="movie" value="` + video + `">
  15.         <param name="allowFullScreen" value="true">
  16.         <param name="wmode" value="transparent">
  17.         <param name="allowscriptaccess" value="always">
  18.         <embed src="` + video + `" type="application/x-shockwave-flash" allowscriptaccess="always" width="98%" height="720px">
  19.       </object>
  20.     `);
  21.       };
  22.       const iframe = document.querySelector('iframe');
  23.       Video.playYouTube(iframe,'RppBrNQOPYU');
  24.     };
  25.     window.addEventListener('load', main);
  26.   </script>
  27. </head>
  28. <body>
  29.   <iframe width="1280" height="720">
  30.   </iframe>
  31. </body>
  32. </html>
RAW Paste Data