/******************************************** * REVOLUTION 5.4.6.5 EXTENSION - VIDEO FUNCTIONS * @version: 2.2.2 (04.06.2018) * @requires jquery.themepunch.revolution.js * @author ThemePunch *********************************************/ ;!function(e){"use strict";var I=jQuery.fn.revolution,_=I.is_mobile(),S=(I.is_android(),{alias:"Video Min JS",name:"revolution.extensions.video.min.js",min_core:"5.4.8",version:"2.2.2"});function j(e){return null==e?-1:jQuery.isNumeric(e)?e:1a.vd?punchgs.TweenLite.set(a.ifr,{height:d+"%",width:"100%",top:-(d-100)/2+"%",left:"0px",position:"absolute"}):punchgs.TweenLite.set(a.ifr,{width:n+"%",height:"100%",left:-(n-100)/2+"%",top:"0px",position:"absolute"}),a.ifr.hasClass("resizelistener")||(a.ifr.addClass("resizelistener"),jQuery(window).resize(function(){I.prepareCoveredVideo(e,t),clearTimeout(a.ifr.data("resizelistener")),a.ifr.data("resizelistener",setTimeout(function(){I.prepareCoveredVideo(e,t)},90))}))}},checkVideoApis:function(e,t,a){location.protocol;if((null!=e.data("ytid")||0';"auto"==l&&(o.mediapreload=!0),"video"===f?(null!=u&&"firefox"==I.get_browser().toLowerCase()&&(w=w+''),null!=s&&(w=w+''),null!=p&&(w=w+'')):"audio"===f&&(null!=s&&(w=w+''),null!=p&&(w=w+'')),w=w+"";var T="";"true"!==v&&!0!==v||(T='
'),"controls"==c&&(w=w+'
'+T+"
"),i.data("videomarkup",w),i.append(w),(_&&1==i.data("disablevideoonmobile")||I.isIE(8))&&i.find(f).remove(),i.find(f).each(function(e){var t,a=jQuery(this);a.parent().hasClass("html5vid")||a.wrap('
'),1!=a.parent().data("metaloaded")&&A(this,"loadedmetadata",(Q(t=i,o),void I.resetVideo(t,o)))});break;case"youtube":m="https","none"==c&&-1==(d=d.replace("controls=1","controls=0")).toLowerCase().indexOf("controls")&&(d+="&controls=0"),(!0===a.videoinline||"true"===a.videoinline||1===a.videoinline||i.hasClass("rs-background-video-layer")||"on"===i.data("autoplay"))&&(d+="&playsinline=1");var k=j(i.data("videostartat")),x=j(i.data("videoendat"));-1!=k&&(d=d+"&start="+k),-1!=x&&(d=d+"&end="+x);var V=d.split("origin="+m+"://"),L="";1');break;case"vimeo":m="https",i.data("videomarkup",'')}var P=_&&"on"==i.data("noposteronmobile");if(null!=a.videoposter&&2'),0==i.find("iframe").length&&i.find(".tp-videoposter").click(function(){if(I.playVideo(i,o),_){if(1==i.data("disablevideoonmobile"))return!1;punchgs.TweenLite.to(i.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(i.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut})}});else{if(_&&1==i.data("disablevideoonmobile"))return!1;0!=i.find("iframe").length||"youtube"!=y&&"vimeo"!=y||(i.removeData("vimeoplayer"),i.append(i.data("videomarkup")),O(i,o,!1))}"none"!=i.data("dottedoverlay")&&null!=i.data("dottedoverlay")&&1!=i.find(".tp-dottedoverlay").length&&i.append('
'),i.addClass("HasListener"),1==i.data("bgvideo")&&(i.data("ytid")?punchgs.TweenLite.set(i.find("iframe"),{opacity:0}):punchgs.TweenLite.set(i.find("video, iframe"),{autoAlpha:0}))}});var A=function(e,t,a){e.addEventListener?e.addEventListener(t,a,{capture:!1,passive:!0}):e.attachEvent(t,a,{capture:!1,passive:!0})},b=function(e,t,a){var i={};return i.video=e,i.videotype=t,i.settings=a,i},w=function(e,t){if(1==t.data("bgvideo")||1==t.data("forcecover")){1===t.data("forcecover")&&t.removeClass("fullscreenvideo").addClass("coverscreenvideo");var a=t.data("aspectratio");void 0===a&&a.split(":").length<=1&&t.data("aspectratio","16:9"),I.prepareCoveredVideo(e,t)}},O=function(r,o,e){var l=r.data(),t=r.find("iframe"),a="iframe"+Math.round(1e5*Math.random()+1),d=l.videoloop,n="loopandnoslidestop"!=d;if(d="loop"==d||"loopandnoslidestop"==d,w(o,r),t.attr("id",a),e&&r.data("startvideonow",!0),1!==r.data("videolistenerexist"))switch(l.videotype){case"youtube":var s=new YT.Player(a,{events:{onStateChange:function(e){var t=r.closest(".tp-simpleresponsive"),a=(l.videorate,r.data("videostart"),k());if(e.data==YT.PlayerState.PLAYING)punchgs.TweenLite.to(r.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(r.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),"mute"==r.data("volume")||I.lastToggleState(r.data("videomutetoggledby"))||!0===o.globalmute?s.mute():(s.unMute(),s.setVolume(parseInt(r.data("volume"),0)||75)),o.videoplaying=!0,x(r,o),n?o.c.trigger("stoptimer"):o.videoplaying=!1,o.c.trigger("revolution.slide.onvideoplay",b(s,"youtube",r.data())),I.toggleState(l.videotoggledby);else{if(0==e.data&&d){var i=j(r.data("videostartat"));-1!=i&&s.seekTo(i),s.playVideo(),I.toggleState(l.videotoggledby)}a||0!=e.data&&2!=e.data||!("on"==r.data("showcoveronpause")&&0e.seconds&&1!=r.data("nextslidecalled"))if(d){h.play();var a=j(r.data("videostartat"));-1!=a&&h.setCurrentTime(a)}else 1==r.data("nextslideatend")&&(r.data("nextslideatend-triggered",1),r.data("nextslidecalled",1),o.c.revnext()),h.pause()}),h.on("ended",function(e){V(r,o),o.videoplaying=!1,o.c.trigger("starttimer"),o.c.trigger("revolution.slide.onvideostop",b(h,"vimeo",r.data())),1==r.data("nextslideatend")&&(r.data("nextslideatend-triggered",1),o.c.revnext()),null!=o.currentLayerVideoIsPlaying&&o.currentLayerVideoIsPlaying.attr("id")!=r.attr("id")||I.unToggleState(l.videotoggledby)}),h.on("pause",function(e){("on"==r.data("showcoveronpause")&&0 '),o.find("video, .tp-poster, .tp-video-play-button").click(function(){o.hasClass("videoisplaying")?r.pause():r.play()})),1==o.data("forcecover")||o.hasClass("fullscreenvideo")||1==o.data("bgvideo"))if(1==o.data("forcecover")||1==o.data("bgvideo")){i.addClass("fullcoveredvideo");var u=o.data("aspectratio");void 0!==u&&1!=u.split(":").length||o.data("aspectratio","16:9"),I.prepareCoveredVideo(d,o)}else i.addClass("fullscreenvideo");var p=o.find(".tp-vid-play-pause")[0],v=o.find(".tp-vid-mute")[0],c=o.find(".tp-vid-full-screen")[0],m=o.find(".tp-seek-bar")[0],g=o.find(".tp-volume-bar")[0];null!=p&&A(p,"click",function(){1==r.paused?r.play():r.pause()}),null!=v&&A(v,"click",function(){0==r.muted?(r.muted=!0,v.innerHTML="Unmute"):(r.muted=!1,v.innerHTML="Mute")}),null!=c&&c&&A(c,"click",function(){r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}),null!=m&&(A(m,"change",function(){var e=r.duration*(m.value/100);r.currentTime=e}),A(m,"mousedown",function(){o.addClass("seekbardragged"),r.pause()}),A(m,"mouseup",function(){o.removeClass("seekbardragged"),r.play()})),A(r,"canplaythrough",function(){I.preLoadAudioDone(o,d,"canplaythrough")}),A(r,"canplay",function(){I.preLoadAudioDone(o,d,"canplay")}),A(r,"progress",function(){I.preLoadAudioDone(o,d,"progress")}),A(r,"timeupdate",function(){var e=100/r.duration*r.currentTime,t=j(o.data("videoendat")),a=r.currentTime;if(null!=m&&(m.value=e),0!=t&&-1!=t&&Math.abs(t-a)<=.3&&a