Skip to content

Commit

Permalink
Release v3.1.6 stable
Browse files Browse the repository at this point in the history
  • Loading branch information
pupunzi committed Jan 16, 2018
1 parent a18093f commit 5101bbf
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 41 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.1.5",
"version": "3.1.6",
"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": "6799"
"buildnum": "6801"
}
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<meta charset="UTF-8">
<title>youtube Chromeless Player - mb.YTPlayer</title>
<link href='//fonts.googleapis.com/css?family=Lekton|Lobster' rel='stylesheet' type='text/css'>
<link href="css/jquery.mb.YTPlayer.min.css?_bn=6799" media="all" rel="stylesheet" type="text/css">
<link href="css/jquery.mb.YTPlayer.min.css?_bn=6801" 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="jquery.mb.YTPlayer.js?_bn=6799"></script>
<script src="jquery.mb.YTPlayer.js?_bn=6801"></script>
<script src="../examples/assets/apikey.js"></script>
<style>
*:focus {
Expand Down
60 changes: 29 additions & 31 deletions dist/jquery.mb.YTPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
file: jquery.mb.YTPlayer.src.js
last modified: 21/11/17 19.55
Version: 3.1.5
Build: 6799
Version: 3.1.6
Build: 6801
Open Lab s.r.l., Florence - Italy
email: [email protected]
Expand Down Expand Up @@ -51,8 +51,8 @@ var getYTPVideoID = function( url ) {

jQuery.mbYTPlayer = {
name: "jquery.mb.YTPlayer",
version: "3.1.5",
build: "6799",
version: "3.1.6",
build: "6801",
author: "Matteo Bicocchi (pupunzi)",
apiKey: "",

Expand Down Expand Up @@ -432,24 +432,24 @@ var getYTPVideoID = function( url ) {
* todo: get the list of videos in playlist
*/
/* If is a playlist */
/*
if( YTPlayer.playlistID ) {
YTPlayer.isList = true;
YTPlayer.videos = [];
YTPlayer.player.cuePlaylist( {
listType: 'playlist',
list: YTPlayer.playlistID.toString(),
startSeconds: YTPlayer.opt.startAt,
endSeconds: YTPlayer.opt.stopAt,
suggestedQuality: YTPlayer.opt.quality
} );
console.debug("playlistID ",YTPlayer.playlistID.toString())
/!* If is a single video *!/
} else
*/
{
/*
if( YTPlayer.playlistID ) {
YTPlayer.isList = true;
YTPlayer.videos = [];
YTPlayer.player.cuePlaylist( {
listType: 'playlist',
list: YTPlayer.playlistID.toString(),
startSeconds: YTPlayer.opt.startAt,
endSeconds: YTPlayer.opt.stopAt,
suggestedQuality: YTPlayer.opt.quality
} );
console.debug("playlistID ",YTPlayer.playlistID.toString())
/!* If is a single video *!/
} else
*/
{
YTPlayer.player.loadVideoById( {
videoId: YTPlayer.videoID.toString(),
startSeconds: YTPlayer.opt.startAt,
Expand Down Expand Up @@ -796,7 +796,7 @@ var getYTPVideoID = function( url ) {
YTPlayer.videoCounter = 1;
YTPlayer.videoLength = videos.length;
jQuery( YTPlayer ).data( "property", videos[ 0 ] );
jQuery( YTPlayer ).mb_YTPlayer();
jQuery( YTPlayer ).YTPlayer();
}

if( typeof callback == "function" )
Expand Down Expand Up @@ -1792,8 +1792,7 @@ var getYTPVideoID = function( url ) {
backgroundSize: "cover"
} );
}
} else {
if( YTPlayer.orig_background )
} else if( YTPlayer.orig_background ) {
jQuery( YTPlayer ).css( "background-image", YTPlayer.orig_background );
}
} );
Expand All @@ -1805,8 +1804,8 @@ var getYTPVideoID = function( url ) {

YTPlayer.preventTrigger = true;
YTPlayer.state = 2;

jQuery( YTPlayer ).YTPPause();
//jQuery( YTPlayer ).YTPPause();
YTPlayer.player.pauseVideo()
YTPlayer.player.seekTo( startAt, true );
YTPlayer.player.playVideo();
}
Expand All @@ -1824,9 +1823,10 @@ var getYTPVideoID = function( url ) {
/* If the player has been removed from scene destroy it */
if( !jQuery.contains( document, YTPlayer ) ) {
jQuery( YTPlayer ).YTPPlayerDestroy();
return
return;
}

/* CREATE CONTROL BAR */
jQuery.mbYTPlayer.buildControls( YTPlayer );

if( YTPlayer.overlay )
Expand Down Expand Up @@ -1869,7 +1869,6 @@ var getYTPVideoID = function( url ) {
jQuery( YTPlayer ).YTPMute();

YTPlayer.checkForStartAt = setInterval( function() {

var canPlayVideo = YTPlayer.player.getVideoLoadedFraction() >= startAt / YTPlayer.player.getDuration();

if( YTPlayer.player.getDuration() > 0 && YTPlayer.player.getCurrentTime() >= startAt && canPlayVideo ) {
Expand Down Expand Up @@ -1926,7 +1925,6 @@ var getYTPVideoID = function( url ) {
clearInterval( YTPlayer.safariPlay )
}, 10 )
}

} else {
setTimeout( function() {
YTPlayer.player.pauseVideo();
Expand Down Expand Up @@ -1994,7 +1992,7 @@ var getYTPVideoID = function( url ) {
return( min <= 9 ? "0" + min : min ) + " : " + ( sec <= 9 ? "0" + sec : sec );
},

/* PLAYER POSITION -------------------------------------------------------------------------------------------*/
/* PLAYER POSITION AND SIZE OPTIMIZATION-------------------------------------------------------------------------------------------*/

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

Large diffs are not rendered by default.

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.1.5",
"version": "3.1.6",
"author": "Pupunzi <[email protected]> (Matteo Bicocchi)",
"maintainers": [
"Pupunzi <[email protected]> (Matteo Bicocchi)"
Expand Down Expand Up @@ -50,5 +50,5 @@
"directories": {
"example": "examples"
},
"buildnum": "6799"
"buildnum": "6801"
}
2 changes: 1 addition & 1 deletion src/jquery.mb.YTPlayer.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ var getYTPVideoID = function( url ) {
YTPlayer.videoCounter = 1;
YTPlayer.videoLength = videos.length;
jQuery( YTPlayer ).data( "property", videos[ 0 ] );
jQuery( YTPlayer ).mb_YTPlayer();
jQuery( YTPlayer ).YTPlayer();
}

if( typeof callback == "function" )
Expand Down

0 comments on commit 5101bbf

Please sign in to comment.