/********************************************** * @File Name: jquery.mb.YTPlayer.min.js * @Author: Matteo Bicocchi * @Date: 2020-03-16 * @Email: matbicoc@gmail.com * * @Last Modified by: LIQUID THEMES * @Last Modified time: 2020-01-13 * @Copyright: 2020. Matteo Bicocchi * * Open Lab s.r.l., Florence - Italy * @blog: http://pupunzi.open-lab.com * @site: http://pupunzi.com ****************************************************/ "use strict";function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}function isTouchSupported(){var e=nAgt.msMaxTouchPoints,r="ontouchstart"in document.createElement("div");return!(!e&&!r)}function uncamel(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}function setUnit(e,r){return"string"!=typeof e||e.match(/^[\-0-9\.]+jQuery/)?""+e+r:e}function setFilter(e,r,t){var a=uncamel(r),o=jQuery.browser.mozilla?"":jQuery.CSS.sfx;e[o+"filter"]=e[o+"filter"]||"",t=setUnit(t>jQuery.CSS.filters[r].max?jQuery.CSS.filters[r].max:t,jQuery.CSS.filters[r].unit),e[o+"filter"]+=a+"("+t+") ",delete e[r]}var ytp=ytp||{};let YTPRndSuffix=(new Date).getTime(),YTPTimerLabels={init:"YTPlayerInit_"+YTPRndSuffix,startPlaying:"YTPlayerStartPlay_"+YTPRndSuffix},getYTPVideoID=function e(r){let t,a;return r.indexOf("youtu.be")>0||r.indexOf("youtube.com/embed")>0?(t=r.substr(r.lastIndexOf("/")+1,r.length),a=t.indexOf("?list=")>0?t.substr(t.lastIndexOf("="),t.length):null,t=a?t.substr(0,t.lastIndexOf("?")):t):r.indexOf("http")>-1?(t=r.match(/[\\?&]v=([^&#]*)/)[1],a=r.indexOf("list=")>0?r.match(/[\\?&]list=([^&#]*)/)[1]:null):(t=r.length>15?null:r,a=t?null:r),{videoID:t,playlistID:a}};(function(jQuery,ytp){jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"3.3.8",build:"7566",author:"Matteo Bicocchi (pupunzi)",apiKey:"",defaults:{videoURL:null,containment:"body",ratio:"auto",fadeOnStartTime:1e3,startAt:0,stopAt:0,autoPlay:!0,delayAtStart:1e3,coverImage:!1,loop:!0,addRaster:!1,mask:!1,opacity:1,quality:"hd1080",vol:50,mute:!1,showControls:!0,anchor:"center,center",showAnnotations:!1,cc_load_policy:!1,showYTLogo:!0,useOnMobile:!0,playOnlyIfVisible:!1,onScreenPercentage:30,goFullScreenOnPlay:!1,stopMovieOnBlur:!0,realFullscreen:!0,optimizeDisplay:!0,abundance:.3,gaTrack:!0,remember_last_time:!1,addFilters:!1,useNoCookie:!0,onReady:function e(r){},onError:function e(r,t){},onEnd:function e(){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},controlBar:null,locationProtocol:"https:",defaultFilters:{grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},buildPlayer:function buildPlayer(options){function isIframe(){let e=!1;try{self.location.href!==top.location.href&&(e=!0)}catch(r){e=!0}return e}if(ytp.YTAPIReady||void 0!==window.YT)setTimeout((function(){jQuery(document).trigger("YTAPIReady"),ytp.YTAPIReady=!0}),100);else{jQuery("#YTAPI").remove();let e=jQuery("