Skip to content

Commit

Permalink
Release v3.0.12 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mb.jquery.components committed Mar 1, 2017
1 parent 48af346 commit 8bd8341
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 37 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.mb.ytplayer",
"version": "3.0.11",
"version": "3.0.12",
"homepage": "http://pupunzi.open-lab.com/mb-jquery-components/jquery-mb-ytplayer",
"authors": [
"pupunzi <[email protected]>"
Expand All @@ -22,5 +22,5 @@
"test",
"tests"
],
"buildnum": "6112"
"buildnum": "6132"
}
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<meta charset="UTF-8">
<title>youtube Chromeless Player - mb.YTPlayer</title>
<link href='http://fonts.googleapis.com/css?family=Lekton|Lobster' rel='stylesheet' type='text/css'>
<link href="css/jquery.mb.ytplayer.min.css?_bn=6112" media="all" rel="stylesheet" type="text/css">
<link href="css/jquery.mb.ytplayer.min.css?_bn=6132" media="all" rel="stylesheet" type="text/css">
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.js"></script>-->
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script src="jquery.mb.YTPlayer.js?_bn=6112"></script>
<script src="jquery.mb.YTPlayer.js?_bn=6132"></script>
<script src="../examples/assets/apikey.js"></script>
<style>
*:focus {
Expand Down
34 changes: 21 additions & 13 deletions dist/jquery.mb.YTPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ var getYTPVideoID = function( url ) {

jQuery.mbYTPlayer = {
name: "jquery.mb.YTPlayer",
version: "3.0.11",
build: "6112",
version: "3.0.12",
build: "6132",
author: "Matteo Bicocchi (pupunzi)",
apiKey: "",
defaults: {
Expand Down Expand Up @@ -579,11 +579,14 @@ var getYTPVideoID = function( url ) {
}, 50 );
if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
var bgndURL = jQuery.mbYTPlayer.locationProtocol + "//i.ytimg.com/vi/" + YTPlayer.videoID + "/hqdefault.jpg";
YTPlayer.opt.containment.css( {
background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
backgroundSize: "cover"
} );

if( bgndURL )
YTPlayer.opt.containment.css( {
background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
backgroundSize: "cover"
} );
YTPlayer.opt.backgroundUrl = bgndURL;

}
YTPlayer.videoData = null;
YTPlayer.opt.ratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
Expand Down Expand Up @@ -948,8 +951,9 @@ var getYTPVideoID = function( url ) {
var playBtn = controls.find( ".mb_YTPPlaypause" );
playBtn.html( jQuery.mbYTPlayer.controls.pause );
YTPlayer.state = 1;
YTPlayer.orig_background = jQuery( YTPlayer ).css( "background-image" );
//jQuery( YTPlayer ).css( "background-image", "none" );

jQuery( YTPlayer ).css( "background-image", "none" );
return this;
},
/**
Expand Down Expand Up @@ -1563,11 +1567,16 @@ var getYTPVideoID = function( url ) {

YTPlayer.player.seekTo( startAt, true );
if( !YTPlayer.isBackground ) {

YTPlayer.opt.containment.css( {
background: "rgba(0,0,0,0.5) url(" + YTPlayer.opt.backgroundUrl + ") center center",
backgroundSize: "cover"
} );
if( YTPlayer.opt.backgroundUrl && YTPlayer.isPlayer ) {
YTPlayer.opt.backgroundUrl = YTPlayer.opt.backgroundUrl || YTPlayer.orig_background;
YTPlayer.opt.containment.css( {
background: "url(" + YTPlayer.opt.backgroundUrl + ") center center",
backgroundSize: "cover"
} );
}
} else {
if( YTPlayer.orig_background )
jQuery( YTPlayer ).css( "background-image", YTPlayer.orig_background );
}
} );

Expand Down Expand Up @@ -1699,7 +1708,6 @@ var getYTPVideoID = function( url ) {
YTPStart.time = YTPlayer.currentTime;
jQuery( YTPlayer ).trigger( YTPStart );

$YTPlayer.css( "background-image", "none" );
jQuery( YTPlayer.playerEl ).CSSAnimate( {
opacity: 1
}, 1000 );
Expand Down
6 changes: 3 additions & 3 deletions dist/jquery.mb.YTPlayer.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions examples/demo_domElement.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<link href="../dist/css/jquery.mb.ytplayer.min.css" media="all" rel="stylesheet" type="text/css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script src="../dist/jquery.mb.YTPlayer.min.js"></script>
<script src="../dist/jquery.mb.YTPlayer.js"></script>
<script src="assets/apikey.js"></script>
<style>
body {
Expand Down Expand Up @@ -86,13 +86,15 @@
var myPlayer;
jQuery(function () {
var isIframe=function(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a};if(!isIframe()){var logo=$("<a href='http://pupunzi.com/#mb.components/components.html' style='position:absolute;top:0;z-index:1000'><img id='logo' border='0' src='http://pupunzi.com/images/logo.png' alt='mb.ideas.repository'></a>");$("#wrapper").prepend(logo),$("#logo").fadeIn()}
myPlayer = jQuery("#video").YTPlayer();
myPlayer = jQuery(".player").YTPlayer();
});
</script>
</head>
<body>
<div id="wrapper">
<div id="customElement">
<div id="customElement" style="background: #ddd url('assets/mask-1.png') no-repeat center center; background-size: cover"
class="player" data-property="{videoURL:'qvuILbcXlg8',containment:'#customElement', showControls:true, autoPlay:true, loop:false, mute:true, startAt:0, opacity:1, addRaster:true, quality:'default'}"
>
<div id="testText">
<h1>jQuery.mb.YTPlayer</h1>
<h2>An HTML5 Background player <br>for YouTube videos</h2>
Expand All @@ -108,7 +110,7 @@ <h2>An HTML5 Background player <br>for YouTube videos</h2>

</div>
<!--qvuILbcXlg8 , https://www.youtube.com/watch?v=FYXMghecCNg-->
<div id="video" class="player" data-property="{videoURL:'qvuILbcXlg8',containment:'#customElement', showControls:false, autoPlay:true, loop:true, mute:true, startAt:0, opacity:1, addRaster:true, quality:'default'}">My video</div> <!--BsekcY04xvQ-->
<!--<div id="video" class="player" data-property="{videoURL:'qvuILbcXlg8',containment:'#customElement', showControls:true, autoPlay:true, loop:false, mute:true, startAt:0, opacity:1, addRaster:true, quality:'default'}">My video</div> &lt;!&ndash;BsekcY04xvQ&ndash;&gt;-->


<a style="position: fixed;bottom:40px;right: 30px;" href="http://pupunzi.open-lab.com/consider-a-donation/" target="_blank">
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"player",
"custom"
],
"version": "3.0.11",
"version": "3.0.12",
"author": "Pupunzi <[email protected]> (Matteo Bicocchi)",
"maintainers": [
"Pupunzi <[email protected]> (Matteo Bicocchi)"
Expand Down Expand Up @@ -50,5 +50,5 @@
"directories": {
"example": "examples"
},
"buildnum": "6112"
"buildnum": "6132"
}
30 changes: 19 additions & 11 deletions src/jquery.mb.YTPlayer.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,14 @@ var getYTPVideoID = function( url ) {
}, 50 );
if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
var bgndURL = jQuery.mbYTPlayer.locationProtocol + "//i.ytimg.com/vi/" + YTPlayer.videoID + "/hqdefault.jpg";
YTPlayer.opt.containment.css( {
background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
backgroundSize: "cover"
} );

if( bgndURL )
YTPlayer.opt.containment.css( {
background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
backgroundSize: "cover"
} );
YTPlayer.opt.backgroundUrl = bgndURL;

}
YTPlayer.videoData = null;
YTPlayer.opt.ratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
Expand Down Expand Up @@ -948,8 +951,9 @@ var getYTPVideoID = function( url ) {
var playBtn = controls.find( ".mb_YTPPlaypause" );
playBtn.html( jQuery.mbYTPlayer.controls.pause );
YTPlayer.state = 1;
YTPlayer.orig_background = jQuery( YTPlayer ).css( "background-image" );
//jQuery( YTPlayer ).css( "background-image", "none" );

jQuery( YTPlayer ).css( "background-image", "none" );
return this;
},
/**
Expand Down Expand Up @@ -1563,11 +1567,16 @@ var getYTPVideoID = function( url ) {

YTPlayer.player.seekTo( startAt, true );
if( !YTPlayer.isBackground ) {

YTPlayer.opt.containment.css( {
background: "rgba(0,0,0,0.5) url(" + YTPlayer.opt.backgroundUrl + ") center center",
backgroundSize: "cover"
} );
if( YTPlayer.opt.backgroundUrl && YTPlayer.isPlayer ) {
YTPlayer.opt.backgroundUrl = YTPlayer.opt.backgroundUrl || YTPlayer.orig_background;
YTPlayer.opt.containment.css( {
background: "url(" + YTPlayer.opt.backgroundUrl + ") center center",
backgroundSize: "cover"
} );
}
} else {
if( YTPlayer.orig_background )
jQuery( YTPlayer ).css( "background-image", YTPlayer.orig_background );
}
} );

Expand Down Expand Up @@ -1699,7 +1708,6 @@ var getYTPVideoID = function( url ) {
YTPStart.time = YTPlayer.currentTime;
jQuery( YTPlayer ).trigger( YTPStart );

$YTPlayer.css( "background-image", "none" );
jQuery( YTPlayer.playerEl ).CSSAnimate( {
opacity: 1
}, 1000 );
Expand Down

0 comments on commit 8bd8341

Please sign in to comment.