Skip to content

Commit

Permalink
Release v3.0.5 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mb.jquery.components committed Jun 18, 2016
1 parent cd8f7ba commit 747e298
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 15 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.4",
"version": "3.0.5",
"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": "6007"
"buildnum": "6011"
}
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=5843" media="all" rel="stylesheet" type="text/css">
<link href="css/jquery.mb.YTPlayer.min.css?_bn=5847" media="all" rel="stylesheet" type="text/css">
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script>-->
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script src="jquery.mb.YTPlayer.min.js?_bn=5843"></script>
<script src="jquery.mb.YTPlayer.min.js?_bn=5847"></script>
<script src="../examples/assets/apikey.js"></script>
<style>
*:focus {
Expand Down
20 changes: 16 additions & 4 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.4",
build: "5843",
version: "3.0.5",
build: "5847",
author: "Matteo Bicocchi",
apiKey: "",
defaults: {
Expand All @@ -74,7 +74,7 @@ var getYTPVideoID = function( url ) {
showYTLogo: true,
stopMovieOnBlur: true,
realfullscreen: true,
fallbackImage: null,
mobileFallbackImage: null,
gaTrack: true,
optimizeDisplay: true,
align: "center,center", // top,bottom,left,right
Expand Down Expand Up @@ -204,7 +204,7 @@ var getYTPVideoID = function( url ) {

YTPlayer.isSelf = YTPlayer.opt.containment == "self";
YTPlayer.defaultOpt.containment = YTPlayer.opt.containment = YTPlayer.opt.containment == "self" ? jQuery( this ) : jQuery( YTPlayer.opt.containment );
YTPlayer.isBackground = YTPlayer.opt.containment.get( 0 ).tagName.toLowerCase() == "body";
YTPlayer.isBackground = YTPlayer.opt.containment.is( "body" );

if( YTPlayer.isBackground && ytp.backgroundIsInited )
return;
Expand Down Expand Up @@ -317,6 +317,16 @@ var getYTPVideoID = function( url ) {
}

if( jQuery.browser.mobile && !YTPlayer.canPlayOnMobile ) {

if( YTPlayer.opt.mobileFallbackImage ) {
YTPlayer.opt.containment.css( {
backgroundImage: "url(" + YTPlayer.opt.mobileFallbackImage + ")",
backgroundPosition: "center center",
backgroundSize: "cover",
backgroundRepeat: "no-repeat"
} )
};

$YTPlayer.remove();
jQuery( document ).trigger( "YTPUnavailable" );
return;
Expand Down Expand Up @@ -1536,6 +1546,8 @@ var getYTPVideoID = function( url ) {
jQuery( YTPlayer ).muteYTPVolume();
jQuery( "#controlBar_" + YTPlayer.id ).remove();

YTPlayer.controlBar = false;

if( YTPlayer.opt.showControls )
jQuery.mbYTPlayer.buildControls( YTPlayer );

Expand Down
6 changes: 3 additions & 3 deletions dist/jquery.mb.YTPlayer.min.js

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions examples/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,33 @@
</style>

<script>

// UPDATED -> NOW WORKS WITH jQuery 1.3.1
$.fn.listHandlers = function(events, outputFunction) {
return this.each(function(i){
var elem = this,
dEvents = $(this).data('events');
if (!dEvents) {return;}
$.each(dEvents, function(name, handler){
if((new RegExp('^(' + (events === '*' ? '.+' : events.replace(',','|').replace(/^on/i,'')) + ')$' ,'i')).test(name)) {
$.each(handler, function(i,handler){
outputFunction(elem, 'n' + i + ': [' + name + '] : ' + handler );
});
}
});
});
};


var myPlayer;
jQuery(function () {

setTimeout(function(){
$('*').listHandlers('*', console.info);

},5000);


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("#bgndVideo").YTPlayer({align:"center,left"});
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.4",
"version": "3.0.5",
"author": "Pupunzi <[email protected]> (Matteo Bicocchi)",
"maintainers": [
"Pupunzi <[email protected]> (Matteo Bicocchi)"
Expand Down Expand Up @@ -50,5 +50,5 @@
"directories": {
"example": "examples"
},
"buildnum": "5843"
"buildnum": "5847"
}
16 changes: 14 additions & 2 deletions src/jquery.mb.YTPlayer.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var getYTPVideoID = function( url ) {
showYTLogo: true,
stopMovieOnBlur: true,
realfullscreen: true,
fallbackImage: null,
mobileFallbackImage: null,
gaTrack: true,
optimizeDisplay: true,
align: "center,center", // top,bottom,left,right
Expand Down Expand Up @@ -204,7 +204,7 @@ var getYTPVideoID = function( url ) {

YTPlayer.isSelf = YTPlayer.opt.containment == "self";
YTPlayer.defaultOpt.containment = YTPlayer.opt.containment = YTPlayer.opt.containment == "self" ? jQuery( this ) : jQuery( YTPlayer.opt.containment );
YTPlayer.isBackground = YTPlayer.opt.containment.get( 0 ).tagName.toLowerCase() == "body";
YTPlayer.isBackground = YTPlayer.opt.containment.is( "body" );

if( YTPlayer.isBackground && ytp.backgroundIsInited )
return;
Expand Down Expand Up @@ -317,6 +317,16 @@ var getYTPVideoID = function( url ) {
}

if( jQuery.browser.mobile && !YTPlayer.canPlayOnMobile ) {

if( YTPlayer.opt.mobileFallbackImage ) {
YTPlayer.opt.containment.css( {
backgroundImage: "url(" + YTPlayer.opt.mobileFallbackImage + ")",
backgroundPosition: "center center",
backgroundSize: "cover",
backgroundRepeat: "no-repeat"
} )
};

$YTPlayer.remove();
jQuery( document ).trigger( "YTPUnavailable" );
return;
Expand Down Expand Up @@ -1536,6 +1546,8 @@ var getYTPVideoID = function( url ) {
jQuery( YTPlayer ).muteYTPVolume();
jQuery( "#controlBar_" + YTPlayer.id ).remove();

YTPlayer.controlBar = false;

if( YTPlayer.opt.showControls )
jQuery.mbYTPlayer.buildControls( YTPlayer );

Expand Down

0 comments on commit 747e298

Please sign in to comment.