-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>" | ||
|
@@ -22,5 +22,5 @@ | |
"test", | ||
"tests" | ||
], | ||
"buildnum": "6799" | ||
"buildnum": "6801" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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: "", | ||
|
||
|
@@ -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, | ||
|
@@ -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" ) | ||
|
@@ -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 ); | ||
} | ||
} ); | ||
|
@@ -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(); | ||
} | ||
|
@@ -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 ) | ||
|
@@ -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 ) { | ||
|
@@ -1926,7 +1925,6 @@ var getYTPVideoID = function( url ) { | |
clearInterval( YTPlayer.safariPlay ) | ||
}, 10 ) | ||
} | ||
|
||
} else { | ||
setTimeout( function() { | ||
YTPlayer.player.pauseVideo(); | ||
|
@@ -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 | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)" | ||
|
@@ -50,5 +50,5 @@ | |
"directories": { | ||
"example": "examples" | ||
}, | ||
"buildnum": "6799" | ||
"buildnum": "6801" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters