-
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
7 changed files
with
3,542 additions
and
54 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 |
---|---|---|
|
@@ -22,5 +22,5 @@ | |
"test", | ||
"tests" | ||
], | ||
"buildnum": "7562" | ||
"buildnum": "7566" | ||
} |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
file: index.tmpl | ||
last modified: 10/25/18 8:00 PM | ||
Version: 3.3.8 | ||
Build: 7562 | ||
Build: 7566 | ||
Open Lab s.r.l., Florence - Italy | ||
email: [email protected] | ||
|
@@ -27,9 +27,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=7562" media="all" rel="stylesheet" type="text/css"> | ||
<link href="css/jquery.mb.YTPlayer.min.css?_bn=7566" 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=7562"></script> | ||
<script src="jquery.mb.YTPlayer.js?_bn=7566"></script> | ||
<script src="../examples/assets/apikey.js"></script> | ||
<style> | ||
*:focus { | ||
|
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 |
---|---|---|
|
@@ -55,7 +55,7 @@ let getYTPVideoID = function (url) { | |
jQuery.mbYTPlayer = { | ||
name : 'jquery.mb.YTPlayer', | ||
version: '3.3.8', | ||
build : '7562', | ||
build : '7566', | ||
author : 'Matteo Bicocchi (pupunzi)', | ||
apiKey : '', | ||
|
||
|
@@ -364,8 +364,8 @@ let getYTPVideoID = function (url) { | |
Set properties | ||
*/ | ||
let property = $YTPlayer.data('property') && typeof $YTPlayer.data('property') == 'string' ? | ||
eval('(' + $YTPlayer.data('property') + ')') : | ||
$YTPlayer.data('property'); | ||
eval('(' + $YTPlayer.data('property') + ')') : | ||
$YTPlayer.data('property'); | ||
|
||
if (typeof property !== 'object') | ||
property = {}; | ||
|
@@ -444,17 +444,17 @@ let getYTPVideoID = function (url) { | |
YTPlayer.isAlone = false; | ||
YTPlayer.hasFocus = true; | ||
YTPlayer.videoID = YTPlayer.opt.videoURL ? | ||
getYTPVideoID(YTPlayer.opt.videoURL).videoID : $YTPlayer.attr('href') ? | ||
getYTPVideoID($YTPlayer.attr('href')).videoID : | ||
false; | ||
getYTPVideoID(YTPlayer.opt.videoURL).videoID : $YTPlayer.attr('href') ? | ||
getYTPVideoID($YTPlayer.attr('href')).videoID : | ||
false; | ||
|
||
/** | ||
Check if it is a video list | ||
*/ | ||
YTPlayer.playlistID = YTPlayer.opt.videoURL ? | ||
getYTPVideoID(YTPlayer.opt.videoURL).playlistID : $YTPlayer.attr('href') ? | ||
getYTPVideoID($YTPlayer.attr('href')).playlistID : | ||
false; | ||
getYTPVideoID(YTPlayer.opt.videoURL).playlistID : $YTPlayer.attr('href') ? | ||
getYTPVideoID($YTPlayer.attr('href')).playlistID : | ||
false; | ||
|
||
let start_from_last = 0; | ||
if (jQuery.mbCookie.get('YTPlayer_start_from' + YTPlayer.videoID)) | ||
|
@@ -697,10 +697,10 @@ let getYTPVideoID = function (url) { | |
|
||
new YT.Player(YTPlayer.playerID, { | ||
//videoId: YTPlayer.videoID.toString(), | ||
host : YTPlayer.opt.useNoCookie? 'https://www.youtube-nocookie.com' : 'https://www.youtube.com', | ||
host : YTPlayer.opt.useNoCookie ? 'https://www.youtube-nocookie.com' : 'https://www.youtube.com', | ||
playerVars: playerVars, | ||
events : { | ||
'onReady' : function (event) { | ||
'onReady' : function (event) { | ||
YTPlayer.player = event.target; | ||
YTPlayer.player.loadVideoById({ | ||
videoId : YTPlayer.videoID.toString(), | ||
|
@@ -720,7 +720,7 @@ let getYTPVideoID = function (url) { | |
* 3 (buffering) | ||
* 5 (video cued) | ||
*/ | ||
'onStateChange' : function (event) { | ||
'onStateChange': function (event) { | ||
|
||
if (typeof event.target.getPlayerState != 'function') | ||
return; | ||
|
@@ -735,25 +735,24 @@ let getYTPVideoID = function (url) { | |
YTPlayer.state = state; | ||
// console.debug(YTPlayer.state); | ||
|
||
|
||
if (event.data === YT.PlayerState.PLAYING) { | ||
event.target.setPlaybackQuality(YTPlayer.opt.quality) | ||
} | ||
|
||
let eventType; | ||
switch (state) { | ||
|
||
/** unstarted */ | ||
/** unstarted */ | ||
case -1: | ||
eventType = 'YTPUnstarted'; | ||
break; | ||
|
||
/** unstarted */ | ||
/** unstarted */ | ||
case 0: | ||
eventType = 'YTPRealEnd'; | ||
break; | ||
|
||
/** play */ | ||
/** play */ | ||
case 1: | ||
eventType = 'YTPPlay'; | ||
if (YTPlayer.controlBar.length) | ||
|
@@ -765,7 +764,7 @@ let getYTPVideoID = function (url) { | |
jQuery(document).off('mousedown.YTPstart'); | ||
break; | ||
|
||
/** pause */ | ||
/** pause */ | ||
case 2: | ||
eventType = 'YTPPause'; | ||
if (YTPlayer.controlBar.length) | ||
|
@@ -775,7 +774,7 @@ let getYTPVideoID = function (url) { | |
YTPlayer.inlinePlayButton.show(); | ||
break; | ||
|
||
/** buffer */ | ||
/** buffer */ | ||
case 3: | ||
// YTPlayer.player.setPlaybackQuality('default'); | ||
YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality); | ||
|
@@ -784,7 +783,7 @@ let getYTPVideoID = function (url) { | |
YTPlayer.controlBar.find('.mb_YTPPlayPause').html(jQuery.mbYTPlayer.controls.play); | ||
break; | ||
|
||
/** cued */ | ||
/** cued */ | ||
case 5: | ||
eventType = 'YTPCued'; | ||
break; | ||
|
@@ -800,6 +799,7 @@ let getYTPVideoID = function (url) { | |
YTPEvent.time = YTPlayer.currentTime; | ||
jQuery(YTPlayer).trigger(YTPEvent) | ||
}, | ||
|
||
/** | ||
* onPlaybackQualityChange | ||
* @param e | ||
|
@@ -810,6 +810,7 @@ let getYTPVideoID = function (url) { | |
YTPQualityChange.quality = quality; | ||
jQuery(YTPlayer).trigger(YTPQualityChange) | ||
}, | ||
|
||
/** | ||
* onError | ||
* @param err | ||
|
@@ -820,7 +821,7 @@ let getYTPVideoID = function (url) { | |
101 – The owner of the requested video does not allow it to be played in embedded players. | ||
150 – This error is the same as 101. It's just a 101 error in disguise! | ||
*/ | ||
'onError' : function (err) { | ||
'onError': function (err) { | ||
|
||
if (typeof YTPlayer.opt.onError == 'function') | ||
YTPlayer.opt.onError($YTPlayer, err); | ||
|
@@ -845,7 +846,6 @@ let getYTPVideoID = function (url) { | |
|
||
if (YTPlayer.isList) | ||
jQuery(YTPlayer).YTPPlayNext() | ||
|
||
} | ||
} | ||
}); | ||
|
@@ -898,11 +898,9 @@ let getYTPVideoID = function (url) { | |
if (!ytp.YTAPIReady && typeof window.YT == "object") { | ||
jQuery(document).trigger('YTAPIReady'); | ||
ytp.YTAPIReady = true; | ||
|
||
console.error("YTPlayer: More then a call to the YT API has been detected") | ||
} | ||
}, YTPlayer.opt.delayAtStart) | ||
|
||
}) | ||
}, | ||
|
||
|
@@ -998,15 +996,15 @@ let getYTPVideoID = function (url) { | |
for (let x in YTPlayer.videoData) YTPData.prop[x] = YTPlayer.videoData[x]; | ||
jQuery(YTPlayer).trigger(YTPData) | ||
}) | ||
.fail(function (jqxhr) { | ||
console.error("YT data error:: ", jqxhr); | ||
YTPlayer.hasData = false; | ||
|
||
let YTPChanged = jQuery.Event('YTPChanged'); | ||
YTPChanged.time = YTPlayer.currentTime; | ||
YTPChanged.videoId = YTPlayer.videoID; | ||
jQuery(YTPlayer).trigger(YTPChanged) | ||
}) | ||
.fail(function (jqxhr) { | ||
console.error("YT data error:: ", jqxhr); | ||
YTPlayer.hasData = false; | ||
|
||
let YTPChanged = jQuery.Event('YTPChanged'); | ||
YTPChanged.time = YTPlayer.currentTime; | ||
YTPChanged.videoId = YTPlayer.videoID; | ||
jQuery(YTPlayer).trigger(YTPChanged) | ||
}) | ||
} else { | ||
|
||
setTimeout(function () { | ||
|
@@ -1383,10 +1381,10 @@ let getYTPVideoID = function (url) { | |
function RunPrefixMethod(obj, method) { | ||
let pfx = ['webkit', 'moz', 'ms', 'o', '']; | ||
let p = 0, | ||
m, t; | ||
m, t; | ||
while (p < pfx.length && !obj[m]) { | ||
m = method; | ||
if (pfx[p] == '') { | ||
if (pfx[p] === '') { | ||
m = m.substr(0, 1).toLowerCase() + m.substr(1) | ||
} | ||
m = pfx[p] + m; | ||
|
@@ -1480,7 +1478,7 @@ let getYTPVideoID = function (url) { | |
if (!YTPlayer.isReady) | ||
return this; | ||
|
||
if (YTPlayer.state == 1) | ||
if (YTPlayer.state === 1) | ||
this.YTPPause(); | ||
else | ||
this.YTPPlay(); | ||
|
@@ -1956,8 +1954,7 @@ let getYTPVideoID = function (url) { | |
for (let time in YTPlayer.opt.mask) { | ||
|
||
if (YTPlayer.opt.mask[time]) | ||
img = jQuery('<img/>').attr('src', YTPlayer.opt.mask[time]) | ||
|
||
let img = jQuery('<img/>').attr('src', YTPlayer.opt.mask[time]) | ||
} | ||
|
||
if (YTPlayer.opt.mask[0]) | ||
|
@@ -1966,7 +1963,7 @@ let getYTPVideoID = function (url) { | |
$YTPlayer.on('YTPTime.mask', function (e) { | ||
|
||
for (let time in YTPlayer.opt.mask) { | ||
if (e.time == time) | ||
if (e.time === time) | ||
if (!YTPlayer.opt.mask[time]) { | ||
$YTPlayer.YTPRemoveMask() | ||
} else { | ||
|
@@ -2338,8 +2335,8 @@ let getYTPVideoID = function (url) { | |
YTPlayer.overlay.removeClass(function (index, classNames) { | ||
// change the list into an array | ||
let current_classes = classNames.split(' '), | ||
// array of classes which are to be removed | ||
classes_to_remove = []; | ||
// array of classes which are to be removed | ||
classes_to_remove = []; | ||
jQuery.each(current_classes, function (index, class_name) { | ||
// if the classname begins with bg add it to the classes_to_remove array | ||
if (/raster.*/.test(class_name)) { | ||
|
@@ -2404,7 +2401,7 @@ let getYTPVideoID = function (url) { | |
|
||
if (YTPlayer.opt.autoPlay) { | ||
console.debug('We muted the audio to make the video \'auto-play\' according with the latest vendor policy. ' + | ||
'The audio will unmute at the first user interaction with the page'); | ||
'The audio will unmute at the first user interaction with the page'); | ||
YTPlayer.player.mute(); | ||
YTPlayer.forcedMuted = true; | ||
/** | ||
|
@@ -2413,15 +2410,15 @@ let getYTPVideoID = function (url) { | |
* Start playing audio after the first click | ||
*/ | ||
jQuery(document).on('mousedown.YTPstartAudio', function () { | ||
if (YTPlayer.forcedMuted){ | ||
if (YTPlayer.forcedMuted) { | ||
console.debug("AAAAAAA"); | ||
YTPlayer.player.unMute(); | ||
YTPlayer.forcedMuted=false; | ||
YTPlayer.forcedMuted = false; | ||
jQuery(document).off('mousedown.YTPstartAudio') | ||
} | ||
}); | ||
|
||
jQuery(window).on("scroll", function(){ | ||
jQuery(window).on("scroll", function () { | ||
console.debug("AAAAA") | ||
}) | ||
|
||
|
@@ -2858,7 +2855,7 @@ jQuery.fn.css3=function(d){return this.each(function(){var a=jQuery(this),b=jQue | |
file: jquery.mb.simpleSlider.js | ||
last modified: 11/18/17 7:19 PM | ||
Version: 3.3.8 | ||
Build: 7562 | ||
Build: 7566 | ||
Open Lab s.r.l., Florence - Italy | ||
email: [email protected] | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.