UNPKG

jquery.mb.ytplayer

Version:

This plugin let you play any public YouTube video as background of your page. It can also be used as a customized player in page.

231 lines (187 loc) 6.08 kB
<!--:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: jquery.mb.components file: test-loop.html last modified: 10/29/18 7:33 PM Version: {{ version }} Build: {{ buildnum }} Open Lab s.r.l., Florence - Italy email: matteo@open-lab.com blog: http://pupunzi.open-lab.com site: http://pupunzi.com http://open-lab.com Licences: MIT, GPL http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html Copyright (c) 2001-2018. Matteo Bicocchi (Pupunzi) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::--> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>youtube Chromeless Player - mb.YTPlayer</title> <link href='https://fonts.googleapis.com/css?family=Lekton|Lobster' rel='stylesheet' type='text/css'> <link href="../dist/css/jquery.mb.YTPlayer.min.css" media="all" rel="stylesheet" type="text/css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="../dist/jquery.mb.YTPlayer.js"></script> <script src="assets/apikey.js"></script> <style> *:focus{ outline: none; } body { border: none; margin: 0; padding: 30px; background: #003e50; font: normal 16px/20px Lekton, sans-serif; } input, textarea, select, button { font-family: "helvetica neue", sans-serif !important; } h1{ font-family: 'Lobster', cursive; text-shadow: 10px 10px 20px rgba(0, 0, 0, 0.30); color: #000000; font-weight: 200; text-align: center; font-size: 50px; } h2{ font-family: sans-serif; font-size: 32px; font-weight: 100; text-align: left; line-height: 1.5; } #wrapper{ position: relative; min-width: 1280px; } .console{ margin-top: 70px; text-align: center; } button, .button { transition: all .4s; display: inline-block; padding: 0px 10px; font-size: 12px; font-weight: bold; text-transform: uppercase; cursor: pointer; background-color: rgba(248, 248, 248, 0.4); box-shadow: 0 0 4px rgba(0,0,0,0.4); color:#000; border: 1px solid transparent; text-decoration: none; line-height: 30px; margin: 3px; border-radius: 10px; } button:hover, .button:hover { background-color: rgb(0, 0, 0); color: #FFF; } #togglePlay{ margin-top: 20px; font-size: 20px; width: 100px; height: 100px; line-height: 70px; border-radius: 100%; } #togglePlay.pause{ background-color: rgb(0, 0, 0); color: #fff; } #togglePlay.pause:after{ content:"pause" } #togglePlay.play:after{ content:"play" } #togglePlay.pause:hover{ background-color: #fff; color: #333; } #togglePlay.play{ background-color: #fff; color: #333; } #togglePlay.play:hover{ background-color: rgb(0, 0, 0); color: #fff; } .goto { position: absolute; left:0; top: 360px; right: 0; margin: auto; text-align: center; width: 100%; height: 50px; } .goto .button{ font-size: 30px; font-family: 'Lobster', cursive; padding: 10px; text-transform: none; } #wp { position: absolute; z-index: 10; min-width: 300px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 24px; line-height: 24px; padding: 20px; bottom:60px; cursor: pointer; text-align: left; border-radius: 10px; font-family: 'Lobster', cursive; } #wp:hover { background: #000000; } #wp img { width: 60px; margin-right: 20px; } </style> <script> var myPlayer; jQuery(function () { myPlayer = jQuery("#bgndVideo").YTPlayer({useOnMobile:true, mobileFallbackImage:"assets/mask-4.png"}); }); </script> </head> <body> <div id="wrapper" style="position:relative; padding:10px 0;z-index:10"> <a href='https://pupunzi.com/#mb.components/components.html' style='position:absolute;top:0;z-index:1000'><img id='logo' border='0' src='https://pupunzi.com/images/logo.png' alt='mb.ideas.repository'></a> <div class="console"> <button onclick="jQuery('#bgndVideo').YTPToggleVolume()">Mute/Unmute</button> <button onclick="jQuery('#bgndVideo').YTPFullscreen()">Fullscreen</button> </div> <br> <br> <h1 style="color:white">jQuery.mb.YTPlayer</h1> <h2 style="color:white; text-align: center">An HTML5 Background player<br>for YouTube videos</h2> <a style="position: fixed;bottom:40px;right: 30px;" href="http://pupunzi.open-lab.com/consider-a-donation/" target="_blank"> <img border="0" alt="PayPal" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG_global.gif" class="alignright"> </a> <div id="bgndVideo" class="player" data-property="{videoURL:'Fk9EBOOAYiU',containment:'#wrapper', showControls:true, autoPlay:true, loop:true, vol:50, mute:true, startAt:50, stopAt:54, stopMovieOnBlur: true, opacity:1, addRaster:true, quality:'default', optimizeDisplay:true, addFilters: {grayscale: 50,sepia: 80,opacity: 30}}">My video</div> </div> <div style="color: #fff; padding: 10px"> <span>&lt;div</span>&nbsp;id= "bgndVideo"&nbsp;&nbsp;class= "player"&nbsp; data-property= "{videoURL:'Fk9EBOOAYiU', containment:'#wrapper', showControls:true, autoPlay:true, <b>loop:true,</b> vol:50, mute:true, <b>startAt:50, stopAt:54,</b> stopMovieOnBlur: true, opacity:1, addRaster:true, quality:'default', optimizeDisplay:true, addFilters: {grayscale: 50,sepia: 80,opacity: 30}}" &gt; My video &lt;/div&gt; </div> <div id="wp" onclick="self.location.href='https://pupunzi.com/wpPlus/go-plus.php?plugin_prefix=YTPL'"> <img src="https://pupunzi.com/wpPlus/images/YTPL.svg" style="float: left"> <span>Get the <br><b>Wordpress</b> Plug-in!</span> </div> </body> </html>