diff --git a/README.md b/README.md index 698f06772..bb921449f 100644 --- a/README.md +++ b/README.md @@ -98,4 +98,4 @@ If you have any problem, please let us know. ### Join Us -We welcome anyone with an interest in web media technology to join! Please contact us at yinguohui@bytedance.com +We welcome anyone with an interest in web media technology to join! Please contact us at infra-fe@bytedance.com diff --git a/README.zh-CN.md b/README.zh-CN.md index 608bb3002..620240700 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -102,6 +102,6 @@ $ npm run dev 岗位类型:社招、校招、实习 -发送简历:yinguohui@bytedance.com +发送简历:infra-fe@bytedance.com 邮件标题格式:【简历】+ 姓名 + 前端开发工程师 + 来源:xgplayer github diff --git a/packages/xgplayer-hls.js/package.json b/packages/xgplayer-hls.js/package.json index ca3997bdd..305af82eb 100755 --- a/packages/xgplayer-hls.js/package.json +++ b/packages/xgplayer-hls.js/package.json @@ -1,6 +1,6 @@ { "name": "xgplayer-hls.js", - "version": "2.6.0", + "version": "2.6.1", "description": "xgplayer plugin for hls", "main": "./dist/index.js", "scripts": { diff --git a/packages/xgplayer/browser/core_player.js b/packages/xgplayer/browser/core_player.js index 83a1aea78..a97870059 100644 --- a/packages/xgplayer/browser/core_player.js +++ b/packages/xgplayer/browser/core_player.js @@ -1,2 +1,2 @@ -window.Player=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=175)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=a,t.hasClass=s,t.addClass=l,t.removeClass=c,t.toggleClass=u,t.findDom=f,t.padStart=d,t.format=p,t.event=h,t.typeOf=v,t.deepCopy=y,t.getBgImage=g,t.copyDom=m,t._setInterval=x,t._clearInterval=E,t.createImgBtn=b,t.isWeiXin=T,t.isUc=_,t.computeWatchDur=k,t.offInDestroy=O,t.on=S,t.once=w,t.getBuffered2=R,t.checkIsBrowser=A,t.setStyle=P,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var i,o=n(7),r=(i=o)&&i.__esModule?i:{default:i};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=t,Object.keys(n).forEach((function(t){var i=t,r=n[t];"video"===e||"audio"===e?r&&o.setAttribute(i,r):o.setAttribute(i,r)})),o}function s(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function l(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):s(e,t)||(e.className+=" "+t))}function c(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):s(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function u(e,t){e&&t.split(/\s+/g).forEach((function(t){s(e,t)?c(e,t):l(e,t)}))}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(i){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function d(e,t,n){for(var i=String(n),o=t>>0,r=Math.ceil(o/i.length),a=[],s=String(e);r--;)a.push(i);return a.join("").substring(0,o-s.length)+s}function p(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),n=d(Math.floor((e-3600*t)/60),2,0),i=d(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")}function h(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function v(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===v(t)&&"Object"===v(e))return Object.keys(t).forEach((function(n){"Object"!==v(t[n])||t[n]instanceof Node?"Array"===v(t[n])?e[n]="Array"===v(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function g(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function m(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function x(e,t,n,i){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),i))}function E(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function b(e,t,n,i){var o=a("xg-"+e,"",{},"xgplayer-"+e+"-img");if(o.style.backgroundImage='url("'+t+'")',n&&i){var r=void 0,s=void 0,l=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&i.indexOf(e)>-1)||(r=Number(n.slice(0,n.indexOf(e)).trim()),s=Number(i.slice(0,i.indexOf(e)).trim()),l=e,!1)})),o.style.width=""+r+l,o.style.height=""+s+l,o.style.backgroundSize=""+r+l+" "+s+l,o.style.margin="start"===e?"-"+s/2+l+" auto auto -"+r/2+l:"auto 5px auto 5px"}return o}function T(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function k(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;nt[i].end)){var a=t[i].begin,s=t[i].end;t[i].begin=Math.min(o,a),t[i].end=Math.max(r,s);break}if(i>t.length-2){t.push({begin:o,end:r});break}}for(var l=0,c=0;c1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;il&&(o[s-1].end=n[a].end):o.push(n[a])}else o.push(n[a])}else o=n;return new r.default(o)}function A(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function P(e,t,n){var i=e.style;try{i[t]=n}catch(e){i.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:a,hasClass:s,addClass:l,removeClass:c,toggleClass:u,findDom:f,padStart:d,format:p,event:h,typeOf:v,deepCopy:y,getBgImage:g,copyDom:m,setInterval:x,clearInterval:E,createImgBtn:b,isWeiXin:T,isUc:_,computeWatchDur:k,offInDestroy:O,on:S,once:w,getBuffered2:R,checkIsBrowser:A,setStyle:P}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(r).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o=0&&f.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",m(t,e.attrs),v(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var a=u++;n=c||(c=g(t)),i=T.bind(null,n,a,!1),o=T.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",m(t,e.attrs),v(e,t),t}(t),i=k.bind(null,n,t),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),i=_.bind(null,n),o=function(){y(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return p(n,t),function(e){for(var i=[],o=0;o8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},p=arguments[9],h=arguments[10];o(this,e);var v={};if(arguments.length>1)v.playerVersion=i.version,v.errorType=t,v.domain=document.domain,v.duration=a,v.currentTime=n,v.networkState=s,v.readyState=l,v.currentSrc=u,v.src=c,v.ended=f,v.errd=d,v.ex=(r[t]||{}).msg,v.errorCode=p,v.mediaError=h;else{var y=arguments[0];Object.keys(y).map((function(e){v[e]=y[e]})),v.ex=(y.type&&r[y.type]||{}).msg}return v},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={};Object.defineProperty(i,"device",{get:function(){return i.os.isPc?"pc":"mobile"}}),Object.defineProperty(i,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(n){return t[n].test(e)})))[0]||""}}),Object.defineProperty(i,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),r=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!r;return{isTablet:r,isPhone:a,isAndroid:i,isPc:!(a||i||n||r),isSymbian:n,isWindowsPhone:t,isFireFox:o}}}),t.default=i,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.video.videoWidth/this.video.videoHeight?r.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":r.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===r.config.fitVideoSize?r.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===r.config.fitVideoSize&&(r.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},r.once("loadeddata",n.getVideoSize),setTimeout((function(){n.emit("ready"),n.isReady=!0}),0),n.config.videoInit&&(0,a.hasClass)(n.root,"xgplayer-nostart")&&n.start(),r.config.rotate&&(r.on("requestFullscreen",n.updateRotateDeg),r.on("exitFullscreen",n.updateRotateDeg)),r.once("destroy",(function e(){r.root.removeEventListener("mousemove",r.mousemoveFunc),r.off("destroy",e)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var n=this;t&&""!==t?(this.canPlayFunc=function(){n.off("canplay",n.canPlayFunc);var e=n.video.play();void 0!==e&&e&&e.then((function(){n.emit("autoplay started")})).catch((function(){n.emit("autoplay was prevented"),(0,a.addClass)(n.root,"xgplayer-is-autoplay")}))},"Array"!==(0,a.typeOf)(t)?"String"===(0,a.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,a.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(s.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=this;for(var r in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[r]),this._interval[r]=null;function a(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),n){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,u.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var n=Object.keys(t)[0],i=e[t[n]];i&&e.off(n,i)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){i.onKeydown(e,i)}))})),this.paused?a.call(this):(this.pause(),this.once("pause",a)),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,a.removeClass)(this.root,"xgplayer-ended"),s.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var n=this,i=function(e,t){n.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,i):i.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var n=this;if(t.plugins){var i=this.config.ignores;Object.keys(t.plugins).forEach((function(o){var r=t.plugins[o];r&&"function"==typeof r?i.some((function(e){return o===e||o==="s_"+e}))||"s_i18n"===o||(["pc","tablet","mobile"].some((function(e){return e===o}))?o===s.default.device&&setTimeout((function(){n.video&&r.call(n,n)}),0):r.call(e,e)):console.warn("plugin name",o,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,a.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,a.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,a.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,a.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,a.addClass)(this.root,"xgplayer-isloading"),(0,a.addClass)(this.root,"xgplayer-playing"),(0,a.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,a.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,a.addClass)(this.root,"xgplayer-ended"),(0,a.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,a.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,a.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,a.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,n){(0,a.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n))}},{key:"installAll",value:function(e){for(var n=0;n0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return i+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var a=document.createElement("style");this.textTrackStyle=a,document.head.appendChild(a);var s="";for(var l in t.textTrackStyle)s+=l+": "+t.textTrackStyle[l]+";";var c=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;a.sheet.insertRule?a.sheet.insertRule(c+" video::cue { "+s+" }",0):a.sheet.addRule&&a.sheet.addRule(c+" video::cue",s)}var u=t.el?t.el:(0,r.findDom)(document,"#"+t.id),f=this.constructor.XgVideoProxy;(f&&this.videoConfig.mediaType===f.mediaType?this.video=new f(u,t):this.video=(0,r.createDom)(this.videoConfig.mediaType,i,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,r.setStyle)(n.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&i)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},n=e,i="on"+e.charAt(0).toUpperCase()+e.slice(1),n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t;var t,n,i})),(0,o.default)(this),this._interval={};var d="0,0",p=this,h=function(e){n&&("play"===e?n.hasStart=!0:"canplay"===e?(0,r.removeClass)(n.root,"xgplayer-is-enter"):"waiting"===e?n.inWaitingStart=(new Date).getTime():"playing"===e&&((0,r.removeClass)(n.root,"xgplayer-is-enter"),n.inWaitingStart&&(n.inWaitingStart=void 0)),"error"===e?n._onError(e):n.emit(e,n),n.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,r._clearInterval)(n,"bufferedChange"),(0,r._setInterval)(n,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,n=this.video.buffered.length;t-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var i=n(32),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)o.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=o.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";var i=n(33);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(3),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[typeof e]||!1}},function(e,t,n){var i=n(35);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,r=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,n=0,o=void 0,r={first:"",second:""};function a(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,a){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var s=this;if((0,i.hasClass)(t,"xgplayer-inactive")?s.emit("focus"):s.emit("blur"),!s.config.closeVideoTouch&&!s.isTouchMove){var l=function(){o=setTimeout((function(){if((0,i.hasClass)(s.root,"xgplayer-nostart"))return!1;if(!s.ended)if(s.paused){var e=s.play();void 0!==e&&e&&e.catch((function(e){}))}else s.pause();n=0}),200)};s.config.closeVideoClick||(n++,o&&clearTimeout(o),1===n?s.config.enableVideoDbltouch?r.first=new Date:l():2===n&&s.config.enableVideoDbltouch?(r.second=new Date,Math.abs(r.first-r.second)<400?l():(r.first=new Date,n=1)):n=0)}},e.once("ready",a),e.once("destroy",(function t(){e.off("ready",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,n=e.root,o=0,r=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var n=this;n.config.closeVideoClick||(o++,r&&clearTimeout(r),1===o?r=setTimeout((function(){if((0,i.hasClass)(n.root,"xgplayer-nostart"))return!1;if(!n.ended)if(n.paused){var e=n.play();void 0!==e&&e&&e.catch((function(e){}))}else n.pause();o=0}),200):o=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,n){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var i=t.querySelector(".xgplayer-fullscreen");if(i){var o=void 0;document.createEvent?(o=document.createEvent("Event")).initEvent("click",!0,!0):o=new Event("click"),i.dispatchEvent(o)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",s),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",l),e.once("destroy",(function t(){n.removeEventListener("mouseenter",a),n.removeEventListener("mouseleave",s),e.off("ready",l),e.off("destroy",t)}))}function a(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function s(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function l(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"start",method:function(){var e=this,t=e.root;function n(){e.off("canplay",n);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function o(){(0,i.hasClass)(t,"xgplayer-nostart")?((0,i.removeClass)(t,"xgplayer-nostart"),(0,i.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n()):e.paused&&((0,i.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",o),e.once("destroy",(function t(){e.off("startBtnClick",o),e.off("canplay",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=a(n(41)),r=a(n(42));function a(e){return e&&e.__esModule?e:{default:e}}n(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,n=(0,i.createDom)("xg-start",'
'+o.default+'
\n
'+r.default+"
",{},"xgplayer-start");function a(e){(0,i.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,i.isWeiXin)()&&!(0,i.isUc)()&&(0,i.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,i.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,i.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,i.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(n),a(e)):e.once("ready",(function(){t.appendChild(n),a(e)})),e.once("autoplay was prevented",(function(){(0,i.removeClass)(e.root,"xgplayer-is-enter"),(0,i.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,i.removeClass)(e.root,"xgplayer-is-enter")})),n.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var i=n(44);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(176)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(9)),o=l(n(37)),r=l(n(38)),a=l(n(39)),s=l(n(40));function l(e){return e&&e.__esModule?e:{default:e}}[o.default,r.default,a.default,s.default].forEach((function(e){i.default.install(e.name,e.method)})),t.default=i.default,e.exports=t.default}]); +window.Player=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=175)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=a,t.hasClass=s,t.addClass=l,t.removeClass=c,t.toggleClass=u,t.findDom=f,t.padStart=d,t.format=p,t.event=h,t.typeOf=v,t.deepCopy=y,t.getBgImage=g,t.copyDom=m,t._setInterval=x,t._clearInterval=E,t.createImgBtn=b,t.isWeiXin=T,t.isUc=_,t.computeWatchDur=k,t.offInDestroy=O,t.on=S,t.once=w,t.getBuffered2=R,t.checkIsBrowser=A,t.setStyle=P,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var i,o=n(7),r=(i=o)&&i.__esModule?i:{default:i};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=t,Object.keys(n).forEach((function(t){var i=t,r=n[t];"video"===e||"audio"===e?r&&o.setAttribute(i,r):o.setAttribute(i,r)})),o}function s(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function l(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):s(e,t)||(e.className+=" "+t))}function c(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):s(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function u(e,t){e&&t.split(/\s+/g).forEach((function(t){s(e,t)?c(e,t):l(e,t)}))}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(i){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function d(e,t,n){for(var i=String(n),o=t>>0,r=Math.ceil(o/i.length),a=[],s=String(e);r--;)a.push(i);return a.join("").substring(0,o-s.length)+s}function p(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),n=d(Math.floor((e-3600*t)/60),2,0),i=d(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")}function h(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function v(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===v(t)&&"Object"===v(e))return Object.keys(t).forEach((function(n){"Object"!==v(t[n])||t[n]instanceof Node?"Array"===v(t[n])?e[n]="Array"===v(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function g(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function m(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function x(e,t,n,i){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),i))}function E(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function b(e,t,n,i){var o=a("xg-"+e,"",{},"xgplayer-"+e+"-img");if(o.style.backgroundImage='url("'+t+'")',n&&i){var r=void 0,s=void 0,l=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&i.indexOf(e)>-1)||(r=Number(n.slice(0,n.indexOf(e)).trim()),s=Number(i.slice(0,i.indexOf(e)).trim()),l=e,!1)})),o.style.width=""+r+l,o.style.height=""+s+l,o.style.backgroundSize=""+r+l+" "+s+l,o.style.margin="start"===e?"-"+s/2+l+" auto auto -"+r/2+l:"auto 5px auto 5px"}return o}function T(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function k(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;nt[i].end)){var a=t[i].begin,s=t[i].end;t[i].begin=Math.min(o,a),t[i].end=Math.max(r,s);break}if(i>t.length-2){t.push({begin:o,end:r});break}}for(var l=0,c=0;c1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;il&&(o[s-1].end=n[a].end):o.push(n[a])}else o.push(n[a])}else o=n;return new r.default(o)}function A(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function P(e,t,n){var i=e.style;try{i[t]=n}catch(e){i.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:a,hasClass:s,addClass:l,removeClass:c,toggleClass:u,findDom:f,padStart:d,format:p,event:h,typeOf:v,deepCopy:y,getBgImage:g,copyDom:m,setInterval:x,clearInterval:E,createImgBtn:b,isWeiXin:T,isUc:_,computeWatchDur:k,offInDestroy:O,on:S,once:w,getBuffered2:R,checkIsBrowser:A,setStyle:P}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(r).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o=0&&f.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",m(t,e.attrs),v(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var a=u++;n=c||(c=g(t)),i=T.bind(null,n,a,!1),o=T.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",m(t,e.attrs),v(e,t),t}(t),i=k.bind(null,n,t),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),i=_.bind(null,n),o=function(){y(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return p(n,t),function(e){for(var i=[],o=0;o8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},p=arguments[9],h=arguments[10];o(this,e);var v={};if(arguments.length>1)v.playerVersion=i.version,v.errorType=t,v.domain=document.domain,v.duration=a,v.currentTime=n,v.networkState=s,v.readyState=l,v.currentSrc=u,v.src=c,v.ended=f,v.errd=d,v.ex=(r[t]||{}).msg,v.errorCode=p,v.mediaError=h;else{var y=arguments[0];Object.keys(y).map((function(e){v[e]=y[e]})),v.ex=(y.type&&r[y.type]||{}).msg}return v},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={};Object.defineProperty(i,"device",{get:function(){return i.os.isPc?"pc":"mobile"}}),Object.defineProperty(i,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(n){return t[n].test(e)})))[0]||""}}),Object.defineProperty(i,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),r=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!r;return{isTablet:r,isPhone:a,isAndroid:i,isPc:!(a||i||n||r),isSymbian:n,isWindowsPhone:t,isFireFox:o}}}),t.default=i,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.video.videoWidth/this.video.videoHeight?r.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":r.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===r.config.fitVideoSize?r.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===r.config.fitVideoSize&&(r.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},r.once("loadeddata",n.getVideoSize),setTimeout((function(){n.emit("ready"),n.isReady=!0}),0),n.config.videoInit&&(0,a.hasClass)(n.root,"xgplayer-nostart")&&n.start(),r.config.rotate&&(r.on("requestFullscreen",n.updateRotateDeg),r.on("exitFullscreen",n.updateRotateDeg)),r.once("destroy",(function e(){r.root.removeEventListener("mousemove",r.mousemoveFunc),r.off("destroy",e)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var n=this;t&&""!==t?(this.canPlayFunc=function(){n.off("canplay",n.canPlayFunc);var e=n.video.play();void 0!==e&&e&&e.then((function(){n.emit("autoplay started")})).catch((function(){n.emit("autoplay was prevented"),(0,a.addClass)(n.root,"xgplayer-is-autoplay")}))},"Array"!==(0,a.typeOf)(t)?"String"===(0,a.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,a.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(s.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=this;for(var r in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[r]),this._interval[r]=null;function a(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),n){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,u.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var n=Object.keys(t)[0],i=e[t[n]];i&&e.off(n,i)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){i.onKeydown(e,i)}))})),this.paused?a.call(this):(this.pause(),this.once("pause",a)),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,a.removeClass)(this.root,"xgplayer-ended"),s.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var n=this,i=function(e,t){n.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,i):i.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var n=this;if(t.plugins){var i=this.config.ignores;Object.keys(t.plugins).forEach((function(o){var r=t.plugins[o];r&&"function"==typeof r?i.some((function(e){return o===e||o==="s_"+e}))||"s_i18n"===o||(["pc","tablet","mobile"].some((function(e){return e===o}))?o===s.default.device&&setTimeout((function(){n.video&&r.call(n,n)}),0):r.call(e,e)):console.warn("plugin name",o,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,a.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,a.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,a.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,a.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,a.addClass)(this.root,"xgplayer-isloading"),(0,a.addClass)(this.root,"xgplayer-playing"),(0,a.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,a.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,a.addClass)(this.root,"xgplayer-ended"),(0,a.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,a.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,a.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,a.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,n){(0,a.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n))}},{key:"installAll",value:function(e){for(var n=0;n0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return i+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var a=document.createElement("style");this.textTrackStyle=a,document.head.appendChild(a);var s="";for(var l in t.textTrackStyle)s+=l+": "+t.textTrackStyle[l]+";";var c=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;a.sheet.insertRule?a.sheet.insertRule(c+" video::cue { "+s+" }",0):a.sheet.addRule&&a.sheet.addRule(c+" video::cue",s)}var u=t.el?t.el:(0,r.findDom)(document,"#"+t.id),f=this.constructor.XgVideoProxy;(f&&this.videoConfig.mediaType===f.mediaType?this.video=new f(u,t):this.video=(0,r.createDom)(this.videoConfig.mediaType,i,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,r.setStyle)(n.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&i)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},n=e,i="on"+e.charAt(0).toUpperCase()+e.slice(1),n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t;var t,n,i})),(0,o.default)(this),this._interval={};var d="0,0",p=this,h=function(e){n&&("play"===e?n.hasStart=!0:"canplay"===e?(0,r.removeClass)(n.root,"xgplayer-is-enter"):"waiting"===e?n.inWaitingStart=(new Date).getTime():"playing"===e&&((0,r.removeClass)(n.root,"xgplayer-is-enter"),n.inWaitingStart&&(n.inWaitingStart=void 0)),"error"===e?n._onError(e):n.emit(e,n),n.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,r._clearInterval)(n,"bufferedChange"),(0,r._setInterval)(n,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,n=this.video.buffered.length;t-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var i=n(32),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)o.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=o.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";var i=n(33);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(3),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[typeof e]||!1}},function(e,t,n){var i=n(35);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,r=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,n=0,o=void 0,r={first:"",second:""};function a(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,a){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var s=this;if((0,i.hasClass)(t,"xgplayer-inactive")?s.emit("focus"):s.emit("blur"),!s.config.closeVideoTouch&&!s.isTouchMove){var l=function(){o=setTimeout((function(){if((0,i.hasClass)(s.root,"xgplayer-nostart"))return!1;if(!s.ended)if(s.paused){var e=s.play();void 0!==e&&e&&e.catch((function(e){}))}else s.pause();n=0}),200)};s.config.closeVideoClick||(n++,o&&clearTimeout(o),1===n?s.config.enableVideoDbltouch?r.first=new Date:l():2===n&&s.config.enableVideoDbltouch?(r.second=new Date,Math.abs(r.first-r.second)<400?l():(r.first=new Date,n=1)):n=0)}},e.once("ready",a),e.once("destroy",(function t(){e.off("ready",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,n=e.root,o=0,r=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var n=this;n.config.closeVideoClick||(o++,r&&clearTimeout(r),1===o?r=setTimeout((function(){if((0,i.hasClass)(n.root,"xgplayer-nostart"))return!1;if(!n.ended)if(n.paused){var e=n.play();void 0!==e&&e&&e.catch((function(e){}))}else n.pause();o=0}),200):o=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,n){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var i=t.querySelector(".xgplayer-fullscreen");if(i){var o=void 0;document.createEvent?(o=document.createEvent("Event")).initEvent("click",!0,!0):o=new Event("click"),i.dispatchEvent(o)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",s),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",l),e.once("destroy",(function t(){n.removeEventListener("mouseenter",a),n.removeEventListener("mouseleave",s),e.off("ready",l),e.off("destroy",t)}))}function a(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function s(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function l(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"start",method:function(){var e=this,t=e.root;function n(){e.off("canplay",n);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function o(){(0,i.hasClass)(t,"xgplayer-nostart")?((0,i.removeClass)(t,"xgplayer-nostart"),(0,i.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n()):e.paused&&((0,i.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",o),e.once("destroy",(function t(){e.off("startBtnClick",o),e.off("canplay",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=a(n(41)),r=a(n(42));function a(e){return e&&e.__esModule?e:{default:e}}n(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,n=(0,i.createDom)("xg-start",'
'+o.default+'
\n
'+r.default+"
",{},"xgplayer-start");function a(e){(0,i.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,i.isWeiXin)()&&!(0,i.isUc)()&&(0,i.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,i.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,i.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,i.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(n),a(e)):e.once("ready",(function(){t.appendChild(n),a(e)})),e.once("autoplay was prevented",(function(){(0,i.removeClass)(e.root,"xgplayer-is-enter"),(0,i.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,i.removeClass)(e.root,"xgplayer-is-enter")})),n.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var i=n(44);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(176)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(9)),o=l(n(37)),r=l(n(38)),a=l(n(39)),s=l(n(40));function l(e){return e&&e.__esModule?e:{default:e}}[o.default,r.default,a.default,s.default].forEach((function(e){i.default.install(e.name,e.method)})),t.default=i.default,e.exports=t.default}]); //# sourceMappingURL=core_player.js.map \ No newline at end of file diff --git a/packages/xgplayer/browser/index.js b/packages/xgplayer/browser/index.js index a5bfd3639..56ba8f1ff 100644 --- a/packages/xgplayer/browser/index.js +++ b/packages/xgplayer/browser/index.js @@ -1,4 +1,4 @@ -window.Player=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=79)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=o,t.hasClass=l,t.addClass=s,t.removeClass=u,t.toggleClass=c,t.findDom=p,t.padStart=d,t.format=f,t.event=g,t.typeOf=h,t.deepCopy=y,t.getBgImage=v,t.copyDom=x,t._setInterval=m,t._clearInterval=b,t.createImgBtn=k,t.isWeiXin=w,t.isUc=_,t.computeWatchDur=E,t.offInDestroy=T,t.on=C,t.once=S,t.getBuffered2=P,t.checkIsBrowser=O,t.setStyle=L,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var r,i=n(7),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,a=n[t];"video"===e||"audio"===e?a&&i.setAttribute(r,a):i.setAttribute(r,a)})),i}function l(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function s(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):l(e,t)||(e.className+=" "+t))}function u(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):l(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function c(e,t){e&&t.split(/\s+/g).forEach((function(t){l(e,t)?u(e,t):s(e,t)}))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function d(e,t,n){for(var r=String(n),i=t>>0,a=Math.ceil(i/r.length),o=[],l=String(e);a--;)o.push(r);return o.join("").substring(0,i-l.length)+l}function f(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),n=d(Math.floor((e-3600*t)/60),2,0),r=d(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")}function g(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function h(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===h(t)&&"Object"===h(e))return Object.keys(t).forEach((function(n){"Object"!==h(t[n])||t[n]instanceof Node?"Array"===h(t[n])?e[n]="Array"===h(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function v(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function x(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function m(e,t,n,r){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),r))}function b(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function k(e,t,n,r){var i=o("xg-"+e,"",{},"xgplayer-"+e+"-img");if(i.style.backgroundImage='url("'+t+'")',n&&r){var a=void 0,l=void 0,s=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&r.indexOf(e)>-1)||(a=Number(n.slice(0,n.indexOf(e)).trim()),l=Number(r.slice(0,r.indexOf(e)).trim()),s=e,!1)})),i.style.width=""+a+s,i.style.height=""+l+s,i.style.backgroundSize=""+a+s+" "+l+s,i.style.margin="start"===e?"-"+l/2+s+" auto auto -"+a/2+s:"auto 5px auto 5px"}return i}function w(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function E(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;nt[r].end)){var o=t[r].begin,l=t[r].end;t[r].begin=Math.min(i,o),t[r].end=Math.max(a,l);break}if(r>t.length-2){t.push({begin:i,end:a});break}}for(var s=0,u=0;u1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;rs&&(i[l-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new a.default(i)}function O(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function L(e,t,n){var r=e.style;try{r[t]=n}catch(e){r.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:o,hasClass:l,addClass:s,removeClass:u,toggleClass:c,findDom:p,padStart:d,format:f,event:g,typeOf:h,deepCopy:y,getBgImage:v,copyDom:x,setInterval:m,clearInterval:b,createImgBtn:k,isWeiXin:w,isUc:_,computeWatchDur:E,offInDestroy:T,on:C,once:S,getBuffered2:P,checkIsBrowser:O,setStyle:L}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(a).concat([i]).join("\n")}var o;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&p.splice(t,1)}function v(e){var t=document.createElement("style");return e.attrs.type="text/css",x(t,e.attrs),h(e,t),t}function x(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function m(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var o=c++;n=u||(u=v(t)),r=w.bind(null,n,o,!1),i=w.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",x(t,e.attrs),h(e,t),t}(t),r=E.bind(null,n,t),i=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=_.bind(null,n),i=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=g(e,t);return f(n,t),function(e){for(var r=[],i=0;i8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},f=arguments[9],g=arguments[10];i(this,e);var h={};if(arguments.length>1)h.playerVersion=r.version,h.errorType=t,h.domain=document.domain,h.duration=o,h.currentTime=n,h.networkState=l,h.readyState=s,h.currentSrc=c,h.src=u,h.ended=p,h.errd=d,h.ex=(a[t]||{}).msg,h.errorCode=f,h.mediaError=g;else{var y=arguments[0];Object.keys(y).map((function(e){h[e]=y[e]})),h.ex=(y.type&&a[y.type]||{}).msg}return h},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={};Object.defineProperty(r,"device",{get:function(){return r.os.isPc?"pc":"mobile"}}),Object.defineProperty(r,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(n){return t[n].test(e)})))[0]||""}}),Object.defineProperty(r,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),o=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:o,isAndroid:r,isPc:!(o||r||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:i}}}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nthis.video.videoWidth/this.video.videoHeight?a.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":a.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===a.config.fitVideoSize?a.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===a.config.fitVideoSize&&(a.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},a.once("loadeddata",n.getVideoSize),setTimeout((function(){n.emit("ready"),n.isReady=!0}),0),n.config.videoInit&&(0,o.hasClass)(n.root,"xgplayer-nostart")&&n.start(),a.config.rotate&&(a.on("requestFullscreen",n.updateRotateDeg),a.on("exitFullscreen",n.updateRotateDeg)),a.once("destroy",(function e(){a.root.removeEventListener("mousemove",a.mousemoveFunc),a.off("destroy",e)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var n=this;t&&""!==t?(this.canPlayFunc=function(){n.off("canplay",n.canPlayFunc);var e=n.video.play();void 0!==e&&e&&e.then((function(){n.emit("autoplay started")})).catch((function(){n.emit("autoplay was prevented"),(0,o.addClass)(n.root,"xgplayer-is-autoplay")}))},"Array"!==(0,o.typeOf)(t)?"String"===(0,o.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,o.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(l.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this;for(var a in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[a]),this._interval[a]=null;function o(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),n){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,c.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var n=Object.keys(t)[0],r=e[t[n]];r&&e.off(n,r)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){r.onKeydown(e,r)}))})),this.paused?o.call(this):(this.pause(),this.once("pause",o)),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,o.removeClass)(this.root,"xgplayer-ended"),l.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var n=this,r=function(e,t){n.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,r):r.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var n=this;if(t.plugins){var r=this.config.ignores;Object.keys(t.plugins).forEach((function(i){var a=t.plugins[i];a&&"function"==typeof a?r.some((function(e){return i===e||i==="s_"+e}))||"s_i18n"===i||(["pc","tablet","mobile"].some((function(e){return e===i}))?i===l.default.device&&setTimeout((function(){n.video&&a.call(n,n)}),0):a.call(e,e)):console.warn("plugin name",i,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,o.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,o.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,o.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,o.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,o.addClass)(this.root,"xgplayer-isloading"),(0,o.addClass)(this.root,"xgplayer-playing"),(0,o.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,o.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,o.addClass)(this.root,"xgplayer-ended"),(0,o.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,o.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,o.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,o.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,o.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,o.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,n){(0,o.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n))}},{key:"installAll",value:function(e){for(var n=0;n0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return r+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var o=document.createElement("style");this.textTrackStyle=o,document.head.appendChild(o);var l="";for(var s in t.textTrackStyle)l+=s+": "+t.textTrackStyle[s]+";";var u=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;o.sheet.insertRule?o.sheet.insertRule(u+" video::cue { "+l+" }",0):o.sheet.addRule&&o.sheet.addRule(u+" video::cue",l)}var c=t.el?t.el:(0,a.findDom)(document,"#"+t.id),p=this.constructor.XgVideoProxy;(p&&this.videoConfig.mediaType===p.mediaType?this.video=new p(c,t):this.video=(0,a.createDom)(this.videoConfig.mediaType,r,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,a.setStyle)(n.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&r)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},n=e,r="on"+e.charAt(0).toUpperCase()+e.slice(1),n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t;var t,n,r})),(0,i.default)(this),this._interval={};var d="0,0",f=this,g=function(e){n&&("play"===e?n.hasStart=!0:"canplay"===e?(0,a.removeClass)(n.root,"xgplayer-is-enter"):"waiting"===e?n.inWaitingStart=(new Date).getTime():"playing"===e&&((0,a.removeClass)(n.root,"xgplayer-is-enter"),n.inWaitingStart&&(n.inWaitingStart=void 0)),"error"===e?n._onError(e):n.emit(e,n),n.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,a._clearInterval)(n,"bufferedChange"),(0,a._setInterval)(n,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,n=this.video.buffered.length;t-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=n(32),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(r(e),void 0===n)i.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=i.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";var r=n(33);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var r=n(3),i={function:!0,object:!0};e.exports=function(e){return r(e)&&i[typeof e]||!1}},function(e,t,n){var r=n(35);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,a=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,n=0,i=void 0,a={first:"",second:""};function o(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,o){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var l=this;if((0,r.hasClass)(t,"xgplayer-inactive")?l.emit("focus"):l.emit("blur"),!l.config.closeVideoTouch&&!l.isTouchMove){var s=function(){i=setTimeout((function(){if((0,r.hasClass)(l.root,"xgplayer-nostart"))return!1;if(!l.ended)if(l.paused){var e=l.play();void 0!==e&&e&&e.catch((function(e){}))}else l.pause();n=0}),200)};l.config.closeVideoClick||(n++,i&&clearTimeout(i),1===n?l.config.enableVideoDbltouch?a.first=new Date:s():2===n&&l.config.enableVideoDbltouch?(a.second=new Date,Math.abs(a.first-a.second)<400?s():(a.first=new Date,n=1)):n=0)}},e.once("ready",o),e.once("destroy",(function t(){e.off("ready",o),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,n=e.root,i=0,a=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var n=this;n.config.closeVideoClick||(i++,a&&clearTimeout(a),1===i?a=setTimeout((function(){if((0,r.hasClass)(n.root,"xgplayer-nostart"))return!1;if(!n.ended)if(n.paused){var e=n.play();void 0!==e&&e&&e.catch((function(e){}))}else n.pause();i=0}),200):i=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,n){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var r=t.querySelector(".xgplayer-fullscreen");if(r){var i=void 0;document.createEvent?(i=document.createEvent("Event")).initEvent("click",!0,!0):i=new Event("click"),r.dispatchEvent(i)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",l),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",s),e.once("destroy",(function t(){n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",l),e.off("ready",s),e.off("destroy",t)}))}function o(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function l(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function s(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"start",method:function(){var e=this,t=e.root;function n(){e.off("canplay",n);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function i(){(0,r.hasClass)(t,"xgplayer-nostart")?((0,r.removeClass)(t,"xgplayer-nostart"),(0,r.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n()):e.paused&&((0,r.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",i),e.once("destroy",(function t(){e.off("startBtnClick",i),e.off("canplay",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(n(41)),a=o(n(42));function o(e){return e&&e.__esModule?e:{default:e}}n(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,n=(0,r.createDom)("xg-start",'
'+i.default+'
\n
'+a.default+"
",{},"xgplayer-start");function o(e){(0,r.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,r.isWeiXin)()&&!(0,r.isUc)()&&(0,r.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,r.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,r.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,r.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(n),o(e)):e.once("ready",(function(){t.appendChild(n),o(e)})),e.once("autoplay was prevented",(function(){(0,r.removeClass)(e.root,"xgplayer-is-enter"),(0,r.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,r.removeClass)(e.root,"xgplayer-is-enter")})),n.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(44);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"fullscreen",method:function(){var e=this,t=e.root;function n(){e.config.rotateFullscreen?(0,r.hasClass)(t,"xgplayer-rotate-fullscreen")?e.exitRotateFullscreen():e.getRotateFullscreen():(0,r.hasClass)(t,"xgplayer-is-fullscreen")?e.exitFullscreen(t):e.getFullscreen(t)}function i(){var n=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;n&&n===t?((0,r.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")):(0,r.hasClass)(t,"xgplayer-is-fullscreen")&&((0,r.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}function a(n){e.video.webkitPresentationMode!==r.PresentationMode.FULLSCREEN&&((0,r.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen"))}e.on("fullscreenBtnClick",n),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.addEventListener(e,i)})),e.video.addEventListener("webkitbeginfullscreen",(function(){(0,r.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")})),e.video.addEventListener("webkitendfullscreen",(function(){(0,r.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")})),(0,r.checkWebkitSetPresentationMode)(e.video)&&e.video.addEventListener("webkitpresentationmodechanged",a),e.once("destroy",(function t(){e.off("fullscreenBtnClick",n),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.removeEventListener(e,i)})),(0,r.checkWebkitSetPresentationMode)(e.video)&&e.video.removeEventListener("webkitpresentationmodechanged",a),e.off("destroy",t)})),e.getFullscreen=function(e){var t=this;if(e.requestFullscreen){var n=e.requestFullscreen();n&&n.catch((function(){t.emit("fullscreen error")}))}else e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):t.video.webkitSupportsFullscreen?t.video.webkitEnterFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():(0,r.addClass)(e,"xgplayer-is-cssfullscreen")},e.exitFullscreen=function(e){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),(0,r.removeClass)(e,"xgplayer-is-cssfullscreen")},e.getRotateFullscreen=function(){document.documentElement.style.width="100%",document.documentElement.style.height="100%",this.config.fluid&&(this.root.style["padding-top"]="",this.root.style["max-width"]="unset"),this.root&&!(0,r.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,r.addClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("getRotateFullscreen")},e.exitRotateFullscreen=function(){document.documentElement.style.width="unset",document.documentElement.style.height="unset",this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%",this.root.style["max-width"]="100%"),this.root&&(0,r.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,r.removeClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("exitRotateFullscreen")}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"play",method:function(){var e=this;function t(){if(e.config.allowPlayAfterEnded||!e.ended)if((0,r.hasClass)(e.root,"xgplayer-nostart")&&e.start(),e.paused){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}else e.pause()}e.on("playBtnClick",t),e.once("destroy",(function n(){e.off("playBtnClick",t),e.off("destroy",n)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"replay",method:function(){var e=this,t=e.root;function n(){(0,r.removeClass)(t,"xgplayer-is-replay"),e.replay()}e.on("replayBtnClick",n),e.on("ended",(function(){e.config.loop||(0,r.addClass)(t,"xgplayer-is-replay")})),e.once("destroy",(function t(){e.off("replayBtnClick",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(n(49)),a=o(n(50));function o(e){return e&&e.__esModule?e:{default:e}}n(51);t.default={name:"s_play",method:function(){var e=this,t=e.config.playBtn?e.config.playBtn:{},n=void 0;n="img"===t.type?(0,r.createImgBtn)("play",t.url.play,t.width,t.height):(0,r.createDom)("xg-play",'\n
'+i.default+'
\n
'+a.default+"
\n
",{},"xgplayer-play");var o={};o.play=e.lang.PLAY_TIPS,o.pause=e.lang.PAUSE_TIPS;var l=(0,r.createDom)("xg-tips",''+o.play+'\n '+o.pause+"",{},"xgplayer-tips");n.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(n)})),["click","touchend"].forEach((function(t){n.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("playBtnClick")}))}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(52);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-play,.xgplayer-skin-default .xgplayer-play-img{width:40px;position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block;cursor:pointer;margin-left:3px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-play .xgplayer-icon{margin-top:3px;width:32px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-play .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}.xgplayer-skin-default .xgplayer-play-img:hover,.xgplayer-skin-default .xgplayer-play:hover{opacity:.85}.xgplayer-skin-default .xgplayer-play-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(54);t.default={name:"s_poster",method:function(){var e=this.root;if(this.config.poster){var t=(0,r.createDom)("xg-poster","",{},"xgplayer-poster");t.style.backgroundImage="url("+this.config.poster+")",e.appendChild(t)}}},e.exports=t.default},function(e,t,n){var r=n(55);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-poster{display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover;background-position:50%}.xgplayer-skin-default.xgplayer-nostart .xgplayer-poster{display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(57);t.default={name:"s_flex",method:function(){var e=(0,r.createDom)("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)}},e.exports=t.default},function(e,t,n){var r=n(58);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(n(60)),a=o(n(61));function o(e){return e&&e.__esModule?e:{default:e}}n(62);t.default={name:"s_fullscreen",method:function(){var e=this,t=e.config.fullscreenBtn?e.config.fullscreenBtn:{},n=void 0;n="img"===t.type?(0,r.createImgBtn)("fullscreen",t.url.request,t.width,t.height):(0,r.createDom)("xg-fullscreen",'\n
'+i.default+'
\n
'+a.default+"
\n
",{},"xgplayer-fullscreen");var o={};o.requestfull=e.lang.FULLSCREEN_TIPS,o.exitfull=e.lang.EXITFULLSCREEN_TIPS;var l=(0,r.createDom)("xg-tips",''+o.requestfull+'\n '+o.exitfull+"",{},"xgplayer-tips");n.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(n)})),["click","touchend"].forEach((function(t){n.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("fullscreenBtnClick")}))}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(63);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-fullscreen,.xgplayer-skin-default .xgplayer-fullscreen-img{position:relative;-webkit-order:13;-moz-box-ordinal-group:14;order:13;display:block;cursor:pointer;margin-left:5px;margin-right:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon{margin-top:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips{position:absolute;right:0;left:auto}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img:hover,.xgplayer-skin-default .xgplayer-fullscreen:hover{opacity:.85}.xgplayer-skin-default .xgplayer-fullscreen-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(65),o=(r=a)&&r.__esModule?r:{default:r};n(66);t.default={name:"s_loading",method:function(){var e=this.root,t=(0,i.createDom)("xg-loading",""+o.default,{},"xgplayer-loading");this.once("ready",(function(){e.appendChild(t)}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(67);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-50px auto auto -50px}.xgplayer-skin-default .xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-skin-default .xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-skin-default.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-loading{display:none!important}.xgplayer-skin-default.xgplayer-isloading .xgplayer-loading{display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(5),o=(r=a)&&r.__esModule?r:{default:r};n(69);var l=function(e){return(0,i.hasClass)(e.root,"xgplayer-rotate-fullscreen")};t.default={name:"s_progress",method:function(){var e=this,t=(0,i.createDom)("xg-progress",'\n \n \n \n \n \n \n ',{tabindex:1},"xgplayer-progress"),n=void 0;e.controls.appendChild(t);var r=t.querySelector(".xgplayer-progress-played"),a=t.querySelector(".xgplayer-progress-outer"),s=t.querySelector(".xgplayer-progress-cache"),u=t.querySelector(".xgplayer-progress-point"),c=t.querySelector(".xgplayer-progress-thumbnail");function p(n,r){n.addEventListener("mouseenter",(function(e){r&&((0,i.addClass)(n,"xgplayer-progress-dot-show"),(0,i.addClass)(t,"xgplayer-progress-dot-active"))})),n.addEventListener("mouseleave",(function(e){r&&((0,i.removeClass)(n,"xgplayer-progress-dot-show"),(0,i.removeClass)(t,"xgplayer-progress-dot-active"))})),n.addEventListener("touchend",(function(a){a.stopPropagation(),r&&((0,i.hasClass)(n,"xgplayer-progress-dot-show")||Object.keys(e.dotArr).forEach((function(t){e.dotArr[t]&&(0,i.removeClass)(e.dotArr[t],"xgplayer-progress-dot-show")})),(0,i.toggleClass)(n,"xgplayer-progress-dot-show"),(0,i.toggleClass)(t,"xgplayer-progress-dot-active"))}))}function d(){e.config.progressDot&&"Array"===(0,i.typeOf)(e.config.progressDot)&&e.config.progressDot.forEach((function(t){if(t.time>=0&&t.time<=e.duration){var n=(0,i.createDom)("xg-progress-dot",t.text?''+t.text+"":"",{},"xgplayer-progress-dot");if(n.style.left=t.time/e.duration*100+"%",t.duration>=0&&(n.style.width=Math.min(t.duration,e.duration-t.time)/e.duration*100+"%"),t.style)for(var r in t.style)n.style[r]=t.style[r];a.appendChild(n),e.dotArr[t.time]=n,p(n,t.text)}}))}e.dotArr={},e.once("canplay",d),e.addProgressDot=function(t,n,r,o){if(!e.dotArr[t]&&t>=0&&t<=e.duration){var l=(0,i.createDom)("xg-progress-dot",n?''+n+"":"",{},"xgplayer-progress-dot");if(l.style.left=t/e.duration*100+"%",r>=0&&(l.style.width=Math.min(r,e.duration-t)/e.duration*100+"%"),o)for(var s in o)l.style[s]=o[s];a.appendChild(l),e.dotArr[t]=l,p(l,n)}},e.removeProgressDot=function(t){if(t>=0&&t<=e.duration&&e.dotArr[t]){var n=e.dotArr[t];n.parentNode.removeChild(n),n=null,e.dotArr[t]=null}},e.removeAllProgressDot=function(){Object.keys(e.dotArr).forEach((function(t){if(e.dotArr[t]){var n=e.dotArr[t];n.parentNode.removeChild(n),n=null,e.dotArr[t]=null}}))};var f=0,g=0,h=0,y=0,v=0,x=0,m=[],b=void 0,k=void 0,w=function(){e.config.thumbnail&&(e.config.thumbnail.isShowCoverPreview&&!b&&(r.removeChild(c),b=(0,i.createDom)("xg-coverpreview",'\n \n \n ',{tabindex:1},"xgplayer-coverpreview"),b.querySelector(".xgplayer-coverpreview-outer"),k=b.querySelector(".xgplayer-coverpreview-point"),c=b.querySelector(".xgplayer-coverpreview-thumbnail"),e.root.appendChild(b)),f=e.config.thumbnail.pic_num,g=e.config.thumbnail.width,h=e.config.thumbnail.height,y=e.config.thumbnail.col,v=e.config.thumbnail.row,m=e.config.thumbnail.urls,c.style.width=g+"px",c.style.height=h+"px")};e.on("loadedmetadata",w),"function"==typeof e.config.disableSwipeHandler&&"function"==typeof e.config.enableSwipeHandler&&(e.root.addEventListener("touchmove",(function(t){t.preventDefault(),e.disableSwipe||(e.disableSwipe=!0,e.config.disableSwipeHandler.call(e))})),e.root.addEventListener("touchstart",(function(t){e.disableSwipe=!0,e.config.disableSwipeHandler.call(e)})),e.root.addEventListener("touchend",(function(t){e.disableSwipe=!1,e.config.enableSwipeHandler.call(e)}))),["touchstart","mousedown"].forEach((function(a){t.addEventListener(a,(function(a){if(!e.config.disableProgress){if(a.stopPropagation(),(0,i.event)(a),a._target===u||!e.config.allowSeekAfterEnded&&e.ended)return!0;t.focus();var s=r.getBoundingClientRect().left,p=l(e);p?(s=r.getBoundingClientRect().top,n=t.getBoundingClientRect().height):(n=t.getBoundingClientRect().width,s=r.getBoundingClientRect().left);var d=function(t){t.stopPropagation(),(0,i.event)(t),e.isProgressMoving=!0;var a=(p?t.clientY:t.clientX)-s;a>n&&(a=n);var o=a/n*e.duration;if(o<0&&(o=0),e.config.allowSeekPlayed&&Number(o).toFixed(1)>e.maxPlayedTime);else if(r.style.width=100*a/n+"%","video"!==e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var l=(0,i.findDom)(e.controls,".xgplayer-time");l&&(l.innerHTML=''+(0,i.format)(o||0)+""+(0,i.format)(e.duration)+"")}else e.currentTime=Number(o).toFixed(1);if(e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview){k.innerHTML=""+(0,i.format)(o)+" / "+(0,i.format)(e.duration||0),x=e.duration/f;var u=Math.floor(o/x);c.style.backgroundImage="url("+m[Math.ceil((u+1)/(y*v))-1]+")";var d=u+1-y*v*(Math.ceil((u+1)/(y*v))-1),w=Math.ceil(d/v)-1,_=d-w*v-1;c.style["background-position"]="-"+_*g+"px -"+w*h+"px",b.style.display="block"}e.emit("focus")},w=function a(l){if(l.stopPropagation(),(0,i.event)(l),window.removeEventListener("mousemove",d),window.removeEventListener("touchmove",d,{passive:!1}),window.removeEventListener("mouseup",a),window.removeEventListener("touchend",a),o.default.browser.indexOf("ie")<0&&t.blur(),!e.isProgressMoving||e.videoConfig&&"audio"===e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var u=(p?l.clientY:l.clientX)-s;u>n&&(u=n);var c=u/n*e.duration;c<0&&(c=0),e.config.allowSeekPlayed&&Number(c).toFixed(1)>e.maxPlayedTime||(r.style.width=100*u/n+"%",e.currentTime=Number(c).toFixed(1))}e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview&&(b.style.display="none"),e.emit("focus"),e.isProgressMoving=!1};return window.addEventListener("mousemove",d),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("mouseup",w),window.addEventListener("touchend",w),!0}}))})),t.addEventListener("mouseenter",(function(n){if(!e.config.allowSeekAfterEnded&&e.ended)return!0;var r=l(e),a=r?t.getBoundingClientRect().top:t.getBoundingClientRect().left,o=r?t.getBoundingClientRect().height:t.getBoundingClientRect().width,s=function(n){var l=((r?n.clientY:n.clientX)-a)/o*e.duration;l=l<0?0:l,u.textContent=(0,i.format)(l);var s=u.getBoundingClientRect().width;if(e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview){x=e.duration/f;var p=Math.floor(l/x);c.style.backgroundImage="url("+m[Math.ceil((p+1)/(y*v))-1]+")";var d=p+1-y*v*(Math.ceil((p+1)/(y*v))-1),b=Math.ceil(d/v)-1,k=d-b*v-1;c.style["background-position"]="-"+k*g+"px -"+b*h+"px";var w=(r?n.clientY:n.clientX)-a-g/2;w=(w=w>0?w:0)0?_:0)>o-s?o-s:_,u.style.left=_+"px"}(0,i.hasClass)(t,"xgplayer-progress-dot-active")?u.style.display="none":u.style.display="block"},p=function(e){s(e)};t.addEventListener("mousemove",p,!1),t.addEventListener("mouseleave",(function n(r){t.removeEventListener("mousemove",p,!1),t.removeEventListener("mouseleave",n,!1),s(r),u.style.display="none",e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview&&(c.style.display="none")}),!1),s(n)}),!1);var _=function(){if(void 0===e.maxPlayedTime&&(e.maxPlayedTime=0),e.maxPlayedTime0){for(var n=t.end(t.length-1),r=0,i=t.length;r=t.start(r)&&e.currentTime<=t.end(r)){n=t.end(r);for(var a=r+1;a=2){n=t.end(a-1);break}break}s.style.width=n/e.duration*100+"%"}},S=["bufferedChange","cacheupdate","ended","timeupdate"];S.forEach((function(t){e.on(t,C)})),e.once("destroy",(function t(){e.removeAllProgressDot(),e.off("canplay",d),e.off("timeupdate",_),e.off("currentTimeChange",E),e.off("srcChange",T),e.off("loadedmetadata",w),S.forEach((function(t){e.off(t,C)})),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){var r=n(70);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:12px;right:12px;outline:none;top:-15px;z-index:35}.xgplayer-skin-default .xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative;cursor:pointer}.xgplayer-skin-default .xgplayer-progress-cache,.xgplayer-skin-default .xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-skin-default .xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-skin-default .xgplayer-progress-btn{display:none;position:absolute;left:0;top:-5px;width:13px;height:13px;border-radius:30px;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26);left:100%;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);z-index:36}.xgplayer-skin-default .xgplayer-progress-point{position:absolute}.xgplayer-skin-default .xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none;z-index:100}.xgplayer-skin-default .xgplayer-progress-dot{display:inline-block;position:absolute;height:3px;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer-skin-default .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;bottom:200%;right:50%;-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);height:auto;line-height:30px;width:auto;background:rgba(0,0,0,.3);border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer-skin-default .xgplayer-progress-dot-show .xgplayer-progress-tip{display:block}.xgplayer-skin-default .xgplayer-progress-thumbnail{position:absolute;-moz-box-sizing:border-box;box-sizing:border-box}.xgplayer-skin-default .xgplayer-progress-thumbnail.xgplayer-tips{margin-left:0;display:none;z-index:99}.xgplayer-skin-default .xgplayer-coverpreview{position:absolute;width:100%;height:100%;top:0;left:0;display:none}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer{position:absolute;display:block;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-thumbnail{display:block}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point{display:block;text-align:center;font-family:PingFangSC-Regular;font-size:11px;color:#ccc;padding:2px 4px}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point span{color:#fff}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-dot,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-dot{height:6px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-btn{display:block;top:-3px}.xgplayer-skin-default.xgplayer-definition-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-playbackrate-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-texttrack-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-volume-active .xgplayer-progress{z-index:15}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress-btn{display:block!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-outer{height:3px!important;margin-top:8.5px!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-btn{display:block!important;top:-5px!important}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(72);t.default={name:"s_time",method:function(){var e=this,t=(0,r.createDom)("xg-time",''+(e.currentTime||(0,r.format)(0))+"\n "+(e.duration||(0,r.format)(0))+"",{},"xgplayer-time");e.once("ready",(function(){e.controls&&e.controls.appendChild(t)}));var n=function(){"audio"===e.videoConfig.mediaType&&e.isProgressMoving&&e.dash||(t.innerHTML=''+(0,r.format)(e.currentTime||0)+""+(0,r.format)(e.duration)+"")};e.on("durationchange",n),e.on("timeupdate",n),e.once("destroy",(function t(){e.off("durationchange",n),e.off("timeupdate",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){var r=n(73);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'.xgplayer-skin-default .xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;height:40px;text-align:center;display:inline-block;margin:auto 8px}.xgplayer-skin-default .xgplayer-time span{color:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current{color:#fff}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current:after{content:"/";display:inline-block;padding:0 3px}',""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(75),o=(r=a)&&r.__esModule?r:{default:r};n(76);t.default={name:"s_replay",method:function(){var e=this,t=e.root,n=e.lang.REPLAY,r=(0,i.createDom)("xg-replay",o.default+'\n '+n+"\n ",{},"xgplayer-replay");function a(){var e=r.querySelector("path");if(e){var t=window.getComputedStyle(e).getPropertyValue("transform");if("string"==typeof t&&t.indexOf("none")>-1)return;e.setAttribute("transform",t)}}e.once("ready",(function(){t.appendChild(r)})),e.on("ended",a),r.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}));var l=r.querySelector("svg");["click","touchend"].forEach((function(t){l.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("replayBtnClick")}))})),e.once("destroy",(function t(){e.off("ended",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(77);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:105;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-skin-default .xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-skin-default .xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-skin-default .xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-skin-default .xgplayer-replay svg:hover path{fill:#fff}.xgplayer-skin-default .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}",""])},function(e,t,n){var r=n(161);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){e.exports=n(80)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=P(n(9)),i=P(n(81)),a=P(n(82)),o=P(n(83)),l=P(n(84)),s=P(n(85)),u=P(n(88)),c=P(n(45)),p=P(n(89)),d=P(n(90)),f=P(n(91)),g=P(n(92)),h=P(n(37)),y=P(n(38)),v=P(n(98)),x=P(n(46)),m=P(n(99)),b=P(n(100)),k=P(n(47)),w=P(n(101)),_=P(n(102)),E=P(n(103)),T=P(n(39)),C=P(n(104)),S=P(n(105));function P(e){return e&&e.__esModule?e:{default:e}}n(107),r.default.installAll([i.default,a.default,o.default,l.default,s.default,u.default,c.default,p.default,d.default,f.default,g.default,h.default,y.default,v.default,x.default,m.default,b.default,k.default,w.default,_.default,E.default,T.default,C.default,S.default]),t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"airplay",method:function(){var e=this;function t(){e.video.webkitShowPlaybackTargetPicker()}e.config.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&(e.on("airplayBtnClick",t),e.once("destroy",(function n(){e.off("airplayBtnClick",t),e.off("destroy",n)})))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"cssFullscreen",method:function(){var e=this,t=e.root;function n(){(0,r.hasClass)(t,"xgplayer-is-cssfullscreen")?e.exitCssFullscreen():e.getCssFullscreen()}e.on("cssFullscreenBtnClick",n),e.on("exitFullscreen",(function(){(0,r.removeClass)(t,"xgplayer-is-cssfullscreen")})),e.once("destroy",(function t(){e.off("cssFullscreenBtnClick",n),e.off("destroy",t)})),e.getCssFullscreen=function(){this.config.fluid&&(this.root.style["padding-top"]=""),(0,r.addClass)(this.root,"xgplayer-is-cssfullscreen"),this.emit("requestCssFullscreen")},e.exitCssFullscreen=function(){this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%"),(0,r.removeClass)(this.root,"xgplayer-is-cssfullscreen"),this.emit("exitCssFullscreen")}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"danmu",method:function(){var e=this;e.on("initDefaultDanmu",(function(t){var n=e.root.querySelector("xg-danmu");if((0,r.addClass)(n,"xgplayer-has-danmu"),!e.config.danmu.closeDefaultBtn){var i=function(){t.start()},a=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.pause()},o=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.play()},l=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&(t.stop(),t.start())};e.danmuBtn=(0,r.copyDom)(t.bulletBtn.createSwitch(!0)),e.controls.appendChild(e.danmuBtn),["click","touchend"].forEach((function(a){e.danmuBtn.addEventListener(a,(function(a){a.preventDefault(),a.stopPropagation(),(0,r.toggleClass)(e.danmuBtn,"danmu-switch-active"),(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")?(e.emit("danmuBtnOn"),(0,r.addClass)(n,"xgplayer-has-danmu"),e.once("timeupdate",i)):(e.emit("danmuBtnOff"),(0,r.removeClass)(n,"xgplayer-has-danmu"),t.stop())}))})),e.onElementClick&&n.addEventListener("click",(function(t){e.onElementClick(t,n)}),!1),e.onElementDblclick&&n.addEventListener("dblclick",(function(t){e.onElementDblclick(t,n)}),!1),e.on("pause",a),e.on("play",o),e.on("seeked",l),e.once("destroy",(function t(){e.off("timeupdate",i),e.off("pause",a),e.off("play",o),e.off("seeked",l),e.off("destroy",t)}))}}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"definition",method:function(){var e=this;e.once("destroy",(function t(){e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(86),a=(r=i)&&r.__esModule?r:{default:r},o=n(87);t.default={name:"download",method:function(){var e=this;function t(){e.download()}e.on("downloadBtnClick",t),e.once("destroy",(function n(){e.off("downloadBtnClick",t),e.off("destroy",n)})),e.download=function(){var e=(0,o.getAbsoluteURL)(this.config.url);(0,a.default)(e)}}},e.exports=t.default},function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function e(t,n,r){var i,a,o=window,l="application/octet-stream",s=r||l,u=t,c=!n&&!r&&u,p=document.createElement("a"),d=function(e){return String(e)},f=o.Blob||o.MozBlob||o.WebKitBlob||d,g=n||"download";if(f=f.call?f.bind(o):Blob,"true"===String(this)&&(s=(u=[u,s])[0],u=u[1]),c&&c.length<2048&&(g=c.split("/").pop().split("?")[0],p.href=c,-1!==p.href.indexOf(c))){var h=new XMLHttpRequest;return h.open("GET",c,!0),h.responseType="blob",h.onload=function(t){e(t.target.response,g,l)},setTimeout((function(){h.send()}),0),h}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&f!==d))return navigator.msSaveBlob?navigator.msSaveBlob(m(u),g):b(u);s=(u=m(u)).type||l}else if(/([\x80-\xff])/.test(u)){for(var y=0,v=new Uint8Array(u.length),x=v.length;yx',e=t.firstChild.href}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4),a=(r=i)&&r.__esModule?r:{default:r};var o={maxCount:3,backupUrl:"",isFetch:!0,fetchTimeout:100};t.default={name:"errorretry",method:function(){var e=this,t=this;if(t.config.errorConfig&&!(t.src.indexOf("blob:")>-1)){var n={},r=t.config.errorConfig;for(var i in o)void 0===r[i]?n[i]=o[i]:n[i]=r[i];t.retryData={count:0,errfTimer:null,isFetchReturn:!1,currentTime:0};var l=t._onError;t._onError=function(r){var i=e.retryData.count;if(i>n.maxCount)n.isFetch?function(e,t,n){var r=function(t,n){e.retryData.isFetchReturn||(e.retryData.isFetchReturn=!0,t(n))};return new Promise((function(i,a){try{var o=new window.XMLHttpRequest;o.open("get",t),o.onload=function(){r(i,{status:o.status,statusText:o.statusText,xhr:o})},o.onerror=function(){r(i,{status:o.status,statusText:o.statusText||"The network environment is disconnected or the address is invalid",xhr:o})},o.onabort=function(){},e.retryData.errfTimer=window.setTimeout((function(){var t=e.retryData.errfTimer;window.clearTimeout(t),e.retryData.errfTimer=null,r(i,{status:-1,statusText:"request timeout"})}),n),o.send()}catch(t){e.retryData.isFetchReturn=!0,r(i,{status:-2,statusText:"request error"})}}))}(e,e.currentSrc,n.fetchTimeout).then((function(t){e.emit("error",new a.default({type:"network",currentTime:e.currentTime,duration:e.duration||0,networkState:e.networkState,readyState:e.readyState,currentSrc:e.currentSrc,src:e.src,ended:e.ended,httpCode:t.status,httpMsg:t.statusText,errd:{line:101,msg:e.error,handle:"plugin errorRetry"},errorCode:e.video&&e.video.error.code,mediaError:e.video&&e.video.error})),l.call(e,t)})):l.call(e,r);else{0===i&&(e.retryData.currentTime=e.currentTime,e.once("canplay",s.bind(e)));var o="";o=n.count<2?n.backupUrl?n.backupUrl:t.currentSrc:n.backupUrl&&i>1?n.backupUrl:t.currentSrc,e.retryData.count++,e.src=o}}}function s(){this.currentTime=this.retryData.currentTime,this.play(),this.retryData.retryCode=0,this.retryData.isFetchReturn=!1,this.retryData.currentTime=0}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0||(e?n.currentTime-r>=0?n.currentTime-=r:n.currentTime=0:n.maxPlayedTime&&n.config.allowSeekPlayed&&n.currentTime+r>n.maxPlayedTime?n.currentTime=n.maxPlayedTime:n.currentTime+r<=n.duration?n.currentTime+=r:n.currentTime=n.duration+1)}},{key:"changeRate",value:function(){this.state.playbackRate=this.player.playbackRate,this.player.playbackRate=this.player.config.keyboardRate||5}},{key:"changeVolumeSlide",value:function(e){var t=this.player;t.controls&&(e?(t.emit("focus"),(0,i.hasClass)(t.root,"xgplayer-volume-active")||(0,i.addClass)(t.root,"xgplayer-volume-active")):(clearTimeout(this.timer),this.timer=setTimeout((function(){(0,i.removeClass)(t.root,"xgplayer-volume-active")}),1e3)))}},{key:"changeVolume",value:function(e){var t=this.player,n=(t.config.keyShortcutStep||{}).volume||.1;this.changeVolumeSlide(!0);var r=t.volume;e&&r+n<=1?t.volume=r+n:!e&&r-n>=0&&(t.volume=r-n)}}]),e}();t.default={name:"keyboard",method:function(){this.keyboard=new a(this)}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"localPreview",method:function(){var e=this,t=e.root;function n(n){e.uploadFile=n.files[0];var i=URL.createObjectURL(e.uploadFile);if((0,r.hasClass)(t,"xgplayer-nostart"))e.config.url=i,e.start();else{e.src=i;var a=e.play();void 0!==a&&a&&a.catch((function(e){}))}}e.on("upload",n),e.once("destroy",(function t(){e.off("upload",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"memoryPlay",method:function(){var e=this;e.on("memoryPlayStart",(function(t){e.currentTime=t}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(93),o=(r=a)&&r.__esModule?r:{default:r};t.default={name:"miniplayer",method:function(){var e=this,t=e.root;function n(){(0,i.hasClass)(t,"xgplayer-miniplayer-active")?e.exitMiniplayer():e.getMiniplayer()}e.on("miniplayerBtnClick",n),e.once("destroy",(function t(){e.off("miniplayerBtnClick",n),e.off("destroy",t)})),e.getMiniplayer=function(){(0,i.hasClass)(t,"xgplayer-is-fullscreen")&&this.exitFullscreen(t),(0,i.hasClass)(t,"xgplayer-is-cssfullscreen")&&this.exitCssFullscreen(),(0,i.hasClass)(t,"xgplayer-rotate-fullscreen")&&this.exitRotateFullscreen();var e=(0,i.createDom)("xg-miniplayer-lay","
",{},"xgplayer-miniplayer-lay");this.root.appendChild(e);var n=(0,i.createDom)("xg-miniplayer-drag",'
'+this.lang.MINIPLAYER_DRAG+"
",{tabindex:9},"xgplayer-miniplayer-drag");this.root.appendChild(n);new o.default(".xgplayer",{handle:".drag-handle"});(0,i.addClass)(this.root,"xgplayer-miniplayer-active"),this.root.style.right=0,this.root.style.bottom="200px",this.root.style.top="",this.root.style.left="",this.root.style.width="320px",this.root.style.height="180px",this.config.miniplayerConfig&&(void 0!==this.config.miniplayerConfig.top&&(this.root.style.top=this.config.miniplayerConfig.top+"px",this.root.style.bottom=""),void 0!==this.config.miniplayerConfig.bottom&&(this.root.style.bottom=this.config.miniplayerConfig.bottom+"px"),void 0!==this.config.miniplayerConfig.left&&(this.root.style.left=this.config.miniplayerConfig.left+"px",this.root.style.right=""),void 0!==this.config.miniplayerConfig.right&&(this.root.style.right=this.config.miniplayerConfig.right+"px"),void 0!==this.config.miniplayerConfig.width&&(this.root.style.width=this.config.miniplayerConfig.width+"px"),void 0!==this.config.miniplayerConfig.height&&(this.root.style.height=this.config.miniplayerConfig.height+"px")),this.config.fluid&&(this.root.style["padding-top"]="");var r=this;["click","touchend"].forEach((function(t){e.addEventListener(t,(function(e){e.preventDefault(),e.stopPropagation(),r.exitMiniplayer()}))}))},e.exitMiniplayer=function(){(0,i.removeClass)(this.root,"xgplayer-miniplayer-active"),this.root.style.right="",this.root.style.bottom="",this.root.style.top="",this.root.style.left="",this.config.fluid?(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%"):(this.config.width&&("number"!=typeof this.config.width?this.root.style.width=this.config.width:this.root.style.width=this.config.width+"px"),this.config.height&&("number"!=typeof this.config.height?this.root.style.height=this.config.height:this.root.style.height=this.config.height+"px"));var e=(0,i.findDom)(this.root,".xgplayer-miniplayer-lay");e&&e.parentNode&&e.parentNode.removeChild(e);var t=(0,i.findDom)(this.root,".xgplayer-miniplayer-drag");t&&t.parentNode&&t.parentNode.removeChild(t)}}},e.exports=t.default},function(e,t,n){var r,i; +window.Player=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=79)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=o,t.hasClass=l,t.addClass=s,t.removeClass=u,t.toggleClass=c,t.findDom=p,t.padStart=d,t.format=f,t.event=g,t.typeOf=h,t.deepCopy=y,t.getBgImage=v,t.copyDom=x,t._setInterval=m,t._clearInterval=b,t.createImgBtn=k,t.isWeiXin=w,t.isUc=_,t.computeWatchDur=E,t.offInDestroy=T,t.on=C,t.once=S,t.getBuffered2=P,t.checkIsBrowser=O,t.setStyle=L,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var r,i=n(7),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,a=n[t];"video"===e||"audio"===e?a&&i.setAttribute(r,a):i.setAttribute(r,a)})),i}function l(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function s(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):l(e,t)||(e.className+=" "+t))}function u(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):l(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function c(e,t){e&&t.split(/\s+/g).forEach((function(t){l(e,t)?u(e,t):s(e,t)}))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function d(e,t,n){for(var r=String(n),i=t>>0,a=Math.ceil(i/r.length),o=[],l=String(e);a--;)o.push(r);return o.join("").substring(0,i-l.length)+l}function f(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),n=d(Math.floor((e-3600*t)/60),2,0),r=d(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")}function g(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function h(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===h(t)&&"Object"===h(e))return Object.keys(t).forEach((function(n){"Object"!==h(t[n])||t[n]instanceof Node?"Array"===h(t[n])?e[n]="Array"===h(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function v(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function x(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function m(e,t,n,r){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),r))}function b(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function k(e,t,n,r){var i=o("xg-"+e,"",{},"xgplayer-"+e+"-img");if(i.style.backgroundImage='url("'+t+'")',n&&r){var a=void 0,l=void 0,s=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&r.indexOf(e)>-1)||(a=Number(n.slice(0,n.indexOf(e)).trim()),l=Number(r.slice(0,r.indexOf(e)).trim()),s=e,!1)})),i.style.width=""+a+s,i.style.height=""+l+s,i.style.backgroundSize=""+a+s+" "+l+s,i.style.margin="start"===e?"-"+l/2+s+" auto auto -"+a/2+s:"auto 5px auto 5px"}return i}function w(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function E(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;nt[r].end)){var o=t[r].begin,l=t[r].end;t[r].begin=Math.min(i,o),t[r].end=Math.max(a,l);break}if(r>t.length-2){t.push({begin:i,end:a});break}}for(var s=0,u=0;u1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;rs&&(i[l-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new a.default(i)}function O(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function L(e,t,n){var r=e.style;try{r[t]=n}catch(e){r.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:o,hasClass:l,addClass:s,removeClass:u,toggleClass:c,findDom:p,padStart:d,format:f,event:g,typeOf:h,deepCopy:y,getBgImage:v,copyDom:x,setInterval:m,clearInterval:b,createImgBtn:k,isWeiXin:w,isUc:_,computeWatchDur:E,offInDestroy:T,on:C,once:S,getBuffered2:P,checkIsBrowser:O,setStyle:L}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(a).concat([i]).join("\n")}var o;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&p.splice(t,1)}function v(e){var t=document.createElement("style");return e.attrs.type="text/css",x(t,e.attrs),h(e,t),t}function x(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function m(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var o=c++;n=u||(u=v(t)),r=w.bind(null,n,o,!1),i=w.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",x(t,e.attrs),h(e,t),t}(t),r=E.bind(null,n,t),i=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=_.bind(null,n),i=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=g(e,t);return f(n,t),function(e){for(var r=[],i=0;i8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},f=arguments[9],g=arguments[10];i(this,e);var h={};if(arguments.length>1)h.playerVersion=r.version,h.errorType=t,h.domain=document.domain,h.duration=o,h.currentTime=n,h.networkState=l,h.readyState=s,h.currentSrc=c,h.src=u,h.ended=p,h.errd=d,h.ex=(a[t]||{}).msg,h.errorCode=f,h.mediaError=g;else{var y=arguments[0];Object.keys(y).map((function(e){h[e]=y[e]})),h.ex=(y.type&&a[y.type]||{}).msg}return h},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={};Object.defineProperty(r,"device",{get:function(){return r.os.isPc?"pc":"mobile"}}),Object.defineProperty(r,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(n){return t[n].test(e)})))[0]||""}}),Object.defineProperty(r,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),o=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:o,isAndroid:r,isPc:!(o||r||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:i}}}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nthis.video.videoWidth/this.video.videoHeight?a.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":a.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===a.config.fitVideoSize?a.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===a.config.fitVideoSize&&(a.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},a.once("loadeddata",n.getVideoSize),setTimeout((function(){n.emit("ready"),n.isReady=!0}),0),n.config.videoInit&&(0,o.hasClass)(n.root,"xgplayer-nostart")&&n.start(),a.config.rotate&&(a.on("requestFullscreen",n.updateRotateDeg),a.on("exitFullscreen",n.updateRotateDeg)),a.once("destroy",(function e(){a.root.removeEventListener("mousemove",a.mousemoveFunc),a.off("destroy",e)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var n=this;t&&""!==t?(this.canPlayFunc=function(){n.off("canplay",n.canPlayFunc);var e=n.video.play();void 0!==e&&e&&e.then((function(){n.emit("autoplay started")})).catch((function(){n.emit("autoplay was prevented"),(0,o.addClass)(n.root,"xgplayer-is-autoplay")}))},"Array"!==(0,o.typeOf)(t)?"String"===(0,o.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,o.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(l.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this;for(var a in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[a]),this._interval[a]=null;function o(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),n){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,c.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var n=Object.keys(t)[0],r=e[t[n]];r&&e.off(n,r)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){r.onKeydown(e,r)}))})),this.paused?o.call(this):(this.pause(),this.once("pause",o)),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,o.removeClass)(this.root,"xgplayer-ended"),l.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var n=this,r=function(e,t){n.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,r):r.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var n=this;if(t.plugins){var r=this.config.ignores;Object.keys(t.plugins).forEach((function(i){var a=t.plugins[i];a&&"function"==typeof a?r.some((function(e){return i===e||i==="s_"+e}))||"s_i18n"===i||(["pc","tablet","mobile"].some((function(e){return e===i}))?i===l.default.device&&setTimeout((function(){n.video&&a.call(n,n)}),0):a.call(e,e)):console.warn("plugin name",i,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,o.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,o.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,o.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,o.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,o.addClass)(this.root,"xgplayer-isloading"),(0,o.addClass)(this.root,"xgplayer-playing"),(0,o.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,o.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,o.addClass)(this.root,"xgplayer-ended"),(0,o.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,o.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,o.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,o.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,o.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,o.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,n){(0,o.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n))}},{key:"installAll",value:function(e){for(var n=0;n0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return r+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var o=document.createElement("style");this.textTrackStyle=o,document.head.appendChild(o);var l="";for(var s in t.textTrackStyle)l+=s+": "+t.textTrackStyle[s]+";";var u=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;o.sheet.insertRule?o.sheet.insertRule(u+" video::cue { "+l+" }",0):o.sheet.addRule&&o.sheet.addRule(u+" video::cue",l)}var c=t.el?t.el:(0,a.findDom)(document,"#"+t.id),p=this.constructor.XgVideoProxy;(p&&this.videoConfig.mediaType===p.mediaType?this.video=new p(c,t):this.video=(0,a.createDom)(this.videoConfig.mediaType,r,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,a.setStyle)(n.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&r)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},n=e,r="on"+e.charAt(0).toUpperCase()+e.slice(1),n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t;var t,n,r})),(0,i.default)(this),this._interval={};var d="0,0",f=this,g=function(e){n&&("play"===e?n.hasStart=!0:"canplay"===e?(0,a.removeClass)(n.root,"xgplayer-is-enter"):"waiting"===e?n.inWaitingStart=(new Date).getTime():"playing"===e&&((0,a.removeClass)(n.root,"xgplayer-is-enter"),n.inWaitingStart&&(n.inWaitingStart=void 0)),"error"===e?n._onError(e):n.emit(e,n),n.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,a._clearInterval)(n,"bufferedChange"),(0,a._setInterval)(n,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,n=this.video.buffered.length;t-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=n(32),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(r(e),void 0===n)i.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=i.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";var r=n(33);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var r=n(3),i={function:!0,object:!0};e.exports=function(e){return r(e)&&i[typeof e]||!1}},function(e,t,n){var r=n(35);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,a=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,n=0,i=void 0,a={first:"",second:""};function o(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,o){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var l=this;if((0,r.hasClass)(t,"xgplayer-inactive")?l.emit("focus"):l.emit("blur"),!l.config.closeVideoTouch&&!l.isTouchMove){var s=function(){i=setTimeout((function(){if((0,r.hasClass)(l.root,"xgplayer-nostart"))return!1;if(!l.ended)if(l.paused){var e=l.play();void 0!==e&&e&&e.catch((function(e){}))}else l.pause();n=0}),200)};l.config.closeVideoClick||(n++,i&&clearTimeout(i),1===n?l.config.enableVideoDbltouch?a.first=new Date:s():2===n&&l.config.enableVideoDbltouch?(a.second=new Date,Math.abs(a.first-a.second)<400?s():(a.first=new Date,n=1)):n=0)}},e.once("ready",o),e.once("destroy",(function t(){e.off("ready",o),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,n=e.root,i=0,a=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var n=this;n.config.closeVideoClick||(i++,a&&clearTimeout(a),1===i?a=setTimeout((function(){if((0,r.hasClass)(n.root,"xgplayer-nostart"))return!1;if(!n.ended)if(n.paused){var e=n.play();void 0!==e&&e&&e.catch((function(e){}))}else n.pause();i=0}),200):i=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,n){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var r=t.querySelector(".xgplayer-fullscreen");if(r){var i=void 0;document.createEvent?(i=document.createEvent("Event")).initEvent("click",!0,!0):i=new Event("click"),r.dispatchEvent(i)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",l),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",s),e.once("destroy",(function t(){n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",l),e.off("ready",s),e.off("destroy",t)}))}function o(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function l(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function s(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"start",method:function(){var e=this,t=e.root;function n(){e.off("canplay",n);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function i(){(0,r.hasClass)(t,"xgplayer-nostart")?((0,r.removeClass)(t,"xgplayer-nostart"),(0,r.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n()):e.paused&&((0,r.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",i),e.once("destroy",(function t(){e.off("startBtnClick",i),e.off("canplay",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(n(41)),a=o(n(42));function o(e){return e&&e.__esModule?e:{default:e}}n(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,n=(0,r.createDom)("xg-start",'
'+i.default+'
\n
'+a.default+"
",{},"xgplayer-start");function o(e){(0,r.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,r.isWeiXin)()&&!(0,r.isUc)()&&(0,r.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,r.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,r.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,r.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(n),o(e)):e.once("ready",(function(){t.appendChild(n),o(e)})),e.once("autoplay was prevented",(function(){(0,r.removeClass)(e.root,"xgplayer-is-enter"),(0,r.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,r.removeClass)(e.root,"xgplayer-is-enter")})),n.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(44);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"fullscreen",method:function(){var e=this,t=e.root;function n(){e.config.rotateFullscreen?(0,r.hasClass)(t,"xgplayer-rotate-fullscreen")?e.exitRotateFullscreen():e.getRotateFullscreen():(0,r.hasClass)(t,"xgplayer-is-fullscreen")?e.exitFullscreen(t):e.getFullscreen(t)}function i(){var n=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;n&&n===t?((0,r.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")):(0,r.hasClass)(t,"xgplayer-is-fullscreen")&&((0,r.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}function a(n){e.video.webkitPresentationMode!==r.PresentationMode.FULLSCREEN&&((0,r.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen"))}e.on("fullscreenBtnClick",n),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.addEventListener(e,i)})),e.video.addEventListener("webkitbeginfullscreen",(function(){(0,r.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")})),e.video.addEventListener("webkitendfullscreen",(function(){(0,r.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")})),(0,r.checkWebkitSetPresentationMode)(e.video)&&e.video.addEventListener("webkitpresentationmodechanged",a),e.once("destroy",(function t(){e.off("fullscreenBtnClick",n),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.removeEventListener(e,i)})),(0,r.checkWebkitSetPresentationMode)(e.video)&&e.video.removeEventListener("webkitpresentationmodechanged",a),e.off("destroy",t)})),e.getFullscreen=function(e){var t=this;if(e.requestFullscreen){var n=e.requestFullscreen();n&&n.catch((function(){t.emit("fullscreen error")}))}else e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):t.video.webkitSupportsFullscreen?t.video.webkitEnterFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():(0,r.addClass)(e,"xgplayer-is-cssfullscreen")},e.exitFullscreen=function(e){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),(0,r.removeClass)(e,"xgplayer-is-cssfullscreen")},e.getRotateFullscreen=function(){document.documentElement.style.width="100%",document.documentElement.style.height="100%",this.config.fluid&&(this.root.style["padding-top"]="",this.root.style["max-width"]="unset"),this.root&&!(0,r.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,r.addClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("getRotateFullscreen")},e.exitRotateFullscreen=function(){document.documentElement.style.width="unset",document.documentElement.style.height="unset",this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%",this.root.style["max-width"]="100%"),this.root&&(0,r.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,r.removeClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("exitRotateFullscreen")}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"play",method:function(){var e=this;function t(){if(e.config.allowPlayAfterEnded||!e.ended)if((0,r.hasClass)(e.root,"xgplayer-nostart")&&e.start(),e.paused){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}else e.pause()}e.on("playBtnClick",t),e.once("destroy",(function n(){e.off("playBtnClick",t),e.off("destroy",n)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"replay",method:function(){var e=this,t=e.root;function n(){(0,r.removeClass)(t,"xgplayer-is-replay"),e.replay()}e.on("replayBtnClick",n),e.on("ended",(function(){e.config.loop||(0,r.addClass)(t,"xgplayer-is-replay")})),e.once("destroy",(function t(){e.off("replayBtnClick",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(n(49)),a=o(n(50));function o(e){return e&&e.__esModule?e:{default:e}}n(51);t.default={name:"s_play",method:function(){var e=this,t=e.config.playBtn?e.config.playBtn:{},n=void 0;n="img"===t.type?(0,r.createImgBtn)("play",t.url.play,t.width,t.height):(0,r.createDom)("xg-play",'\n
'+i.default+'
\n
'+a.default+"
\n
",{},"xgplayer-play");var o={};o.play=e.lang.PLAY_TIPS,o.pause=e.lang.PAUSE_TIPS;var l=(0,r.createDom)("xg-tips",''+o.play+'\n '+o.pause+"",{},"xgplayer-tips");n.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(n)})),["click","touchend"].forEach((function(t){n.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("playBtnClick")}))}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(52);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-play,.xgplayer-skin-default .xgplayer-play-img{width:40px;position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block;cursor:pointer;margin-left:3px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-play .xgplayer-icon{margin-top:3px;width:32px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-play .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}.xgplayer-skin-default .xgplayer-play-img:hover,.xgplayer-skin-default .xgplayer-play:hover{opacity:.85}.xgplayer-skin-default .xgplayer-play-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(54);t.default={name:"s_poster",method:function(){var e=this.root;if(this.config.poster){var t=(0,r.createDom)("xg-poster","",{},"xgplayer-poster");t.style.backgroundImage="url("+this.config.poster+")",e.appendChild(t)}}},e.exports=t.default},function(e,t,n){var r=n(55);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-poster{display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover;background-position:50%}.xgplayer-skin-default.xgplayer-nostart .xgplayer-poster{display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(57);t.default={name:"s_flex",method:function(){var e=(0,r.createDom)("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)}},e.exports=t.default},function(e,t,n){var r=n(58);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(n(60)),a=o(n(61));function o(e){return e&&e.__esModule?e:{default:e}}n(62);t.default={name:"s_fullscreen",method:function(){var e=this,t=e.config.fullscreenBtn?e.config.fullscreenBtn:{},n=void 0;n="img"===t.type?(0,r.createImgBtn)("fullscreen",t.url.request,t.width,t.height):(0,r.createDom)("xg-fullscreen",'\n
'+i.default+'
\n
'+a.default+"
\n
",{},"xgplayer-fullscreen");var o={};o.requestfull=e.lang.FULLSCREEN_TIPS,o.exitfull=e.lang.EXITFULLSCREEN_TIPS;var l=(0,r.createDom)("xg-tips",''+o.requestfull+'\n '+o.exitfull+"",{},"xgplayer-tips");n.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(n)})),["click","touchend"].forEach((function(t){n.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("fullscreenBtnClick")}))}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(63);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-fullscreen,.xgplayer-skin-default .xgplayer-fullscreen-img{position:relative;-webkit-order:13;-moz-box-ordinal-group:14;order:13;display:block;cursor:pointer;margin-left:5px;margin-right:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon{margin-top:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips{position:absolute;right:0;left:auto}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img:hover,.xgplayer-skin-default .xgplayer-fullscreen:hover{opacity:.85}.xgplayer-skin-default .xgplayer-fullscreen-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(65),o=(r=a)&&r.__esModule?r:{default:r};n(66);t.default={name:"s_loading",method:function(){var e=this.root,t=(0,i.createDom)("xg-loading",""+o.default,{},"xgplayer-loading");this.once("ready",(function(){e.appendChild(t)}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(67);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-50px auto auto -50px}.xgplayer-skin-default .xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-skin-default .xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-skin-default.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-loading{display:none!important}.xgplayer-skin-default.xgplayer-isloading .xgplayer-loading{display:block}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(5),o=(r=a)&&r.__esModule?r:{default:r};n(69);var l=function(e){return(0,i.hasClass)(e.root,"xgplayer-rotate-fullscreen")};t.default={name:"s_progress",method:function(){var e=this,t=(0,i.createDom)("xg-progress",'\n \n \n \n \n \n \n ',{tabindex:1},"xgplayer-progress"),n=void 0;e.controls.appendChild(t);var r=t.querySelector(".xgplayer-progress-played"),a=t.querySelector(".xgplayer-progress-outer"),s=t.querySelector(".xgplayer-progress-cache"),u=t.querySelector(".xgplayer-progress-point"),c=t.querySelector(".xgplayer-progress-thumbnail");function p(n,r){n.addEventListener("mouseenter",(function(e){r&&((0,i.addClass)(n,"xgplayer-progress-dot-show"),(0,i.addClass)(t,"xgplayer-progress-dot-active"))})),n.addEventListener("mouseleave",(function(e){r&&((0,i.removeClass)(n,"xgplayer-progress-dot-show"),(0,i.removeClass)(t,"xgplayer-progress-dot-active"))})),n.addEventListener("touchend",(function(a){a.stopPropagation(),r&&((0,i.hasClass)(n,"xgplayer-progress-dot-show")||Object.keys(e.dotArr).forEach((function(t){e.dotArr[t]&&(0,i.removeClass)(e.dotArr[t],"xgplayer-progress-dot-show")})),(0,i.toggleClass)(n,"xgplayer-progress-dot-show"),(0,i.toggleClass)(t,"xgplayer-progress-dot-active"))}))}function d(){e.config.progressDot&&"Array"===(0,i.typeOf)(e.config.progressDot)&&e.config.progressDot.forEach((function(t){if(t.time>=0&&t.time<=e.duration){var n=(0,i.createDom)("xg-progress-dot",t.text?''+t.text+"":"",{},"xgplayer-progress-dot");if(n.style.left=t.time/e.duration*100+"%",t.duration>=0&&(n.style.width=Math.min(t.duration,e.duration-t.time)/e.duration*100+"%"),t.style)for(var r in t.style)n.style[r]=t.style[r];a.appendChild(n),e.dotArr[t.time]=n,p(n,t.text)}}))}e.dotArr={},e.once("canplay",d),e.addProgressDot=function(t,n,r,o){if(!e.dotArr[t]&&t>=0&&t<=e.duration){var l=(0,i.createDom)("xg-progress-dot",n?''+n+"":"",{},"xgplayer-progress-dot");if(l.style.left=t/e.duration*100+"%",r>=0&&(l.style.width=Math.min(r,e.duration-t)/e.duration*100+"%"),o)for(var s in o)l.style[s]=o[s];a.appendChild(l),e.dotArr[t]=l,p(l,n)}},e.removeProgressDot=function(t){if(t>=0&&t<=e.duration&&e.dotArr[t]){var n=e.dotArr[t];n.parentNode.removeChild(n),n=null,e.dotArr[t]=null}},e.removeAllProgressDot=function(){Object.keys(e.dotArr).forEach((function(t){if(e.dotArr[t]){var n=e.dotArr[t];n.parentNode.removeChild(n),n=null,e.dotArr[t]=null}}))};var f=0,g=0,h=0,y=0,v=0,x=0,m=[],b=void 0,k=void 0,w=function(){e.config.thumbnail&&(e.config.thumbnail.isShowCoverPreview&&!b&&(r.removeChild(c),b=(0,i.createDom)("xg-coverpreview",'\n \n \n ',{tabindex:1},"xgplayer-coverpreview"),b.querySelector(".xgplayer-coverpreview-outer"),k=b.querySelector(".xgplayer-coverpreview-point"),c=b.querySelector(".xgplayer-coverpreview-thumbnail"),e.root.appendChild(b)),f=e.config.thumbnail.pic_num,g=e.config.thumbnail.width,h=e.config.thumbnail.height,y=e.config.thumbnail.col,v=e.config.thumbnail.row,m=e.config.thumbnail.urls,c.style.width=g+"px",c.style.height=h+"px")};e.on("loadedmetadata",w),"function"==typeof e.config.disableSwipeHandler&&"function"==typeof e.config.enableSwipeHandler&&(e.root.addEventListener("touchmove",(function(t){t.preventDefault(),e.disableSwipe||(e.disableSwipe=!0,e.config.disableSwipeHandler.call(e))})),e.root.addEventListener("touchstart",(function(t){e.disableSwipe=!0,e.config.disableSwipeHandler.call(e)})),e.root.addEventListener("touchend",(function(t){e.disableSwipe=!1,e.config.enableSwipeHandler.call(e)}))),["touchstart","mousedown"].forEach((function(a){t.addEventListener(a,(function(a){if(!e.config.disableProgress){if(a.stopPropagation(),(0,i.event)(a),a._target===u||!e.config.allowSeekAfterEnded&&e.ended)return!0;t.focus();var s=r.getBoundingClientRect().left,p=l(e);p?(s=r.getBoundingClientRect().top,n=t.getBoundingClientRect().height):(n=t.getBoundingClientRect().width,s=r.getBoundingClientRect().left);var d=function(t){t.stopPropagation(),(0,i.event)(t),e.isProgressMoving=!0;var a=(p?t.clientY:t.clientX)-s;a>n&&(a=n);var o=a/n*e.duration;if(o<0&&(o=0),e.config.allowSeekPlayed&&Number(o).toFixed(1)>e.maxPlayedTime);else if(r.style.width=100*a/n+"%","video"!==e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var l=(0,i.findDom)(e.controls,".xgplayer-time");l&&(l.innerHTML=''+(0,i.format)(o||0)+""+(0,i.format)(e.duration)+"")}else e.currentTime=Number(o).toFixed(1);if(e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview){k.innerHTML=""+(0,i.format)(o)+" / "+(0,i.format)(e.duration||0),x=e.duration/f;var u=Math.floor(o/x);c.style.backgroundImage="url("+m[Math.ceil((u+1)/(y*v))-1]+")";var d=u+1-y*v*(Math.ceil((u+1)/(y*v))-1),w=Math.ceil(d/v)-1,_=d-w*v-1;c.style["background-position"]="-"+_*g+"px -"+w*h+"px",b.style.display="block"}e.emit("focus")},w=function a(l){if(l.stopPropagation(),(0,i.event)(l),window.removeEventListener("mousemove",d),window.removeEventListener("touchmove",d,{passive:!1}),window.removeEventListener("mouseup",a),window.removeEventListener("touchend",a),o.default.browser.indexOf("ie")<0&&t.blur(),!e.isProgressMoving||e.videoConfig&&"audio"===e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var u=(p?l.clientY:l.clientX)-s;u>n&&(u=n);var c=u/n*e.duration;c<0&&(c=0),e.config.allowSeekPlayed&&Number(c).toFixed(1)>e.maxPlayedTime||(r.style.width=100*u/n+"%",e.currentTime=Number(c).toFixed(1))}e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview&&(b.style.display="none"),e.emit("focus"),e.isProgressMoving=!1};return window.addEventListener("mousemove",d),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("mouseup",w),window.addEventListener("touchend",w),!0}}))})),t.addEventListener("mouseenter",(function(n){if(!e.config.allowSeekAfterEnded&&e.ended)return!0;var r=l(e),a=r?t.getBoundingClientRect().top:t.getBoundingClientRect().left,o=r?t.getBoundingClientRect().height:t.getBoundingClientRect().width,s=function(n){var l=((r?n.clientY:n.clientX)-a)/o*e.duration;l=l<0?0:l,u.textContent=(0,i.format)(l);var s=u.getBoundingClientRect().width;if(e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview){x=e.duration/f;var p=Math.floor(l/x);c.style.backgroundImage="url("+m[Math.ceil((p+1)/(y*v))-1]+")";var d=p+1-y*v*(Math.ceil((p+1)/(y*v))-1),b=Math.ceil(d/v)-1,k=d-b*v-1;c.style["background-position"]="-"+k*g+"px -"+b*h+"px";var w=(r?n.clientY:n.clientX)-a-g/2;w=(w=w>0?w:0)0?_:0)>o-s?o-s:_,u.style.left=_+"px"}(0,i.hasClass)(t,"xgplayer-progress-dot-active")?u.style.display="none":u.style.display="block"},p=function(e){s(e)};t.addEventListener("mousemove",p,!1),t.addEventListener("mouseleave",(function n(r){t.removeEventListener("mousemove",p,!1),t.removeEventListener("mouseleave",n,!1),s(r),u.style.display="none",e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview&&(c.style.display="none")}),!1),s(n)}),!1);var _=function(){if(void 0===e.maxPlayedTime&&(e.maxPlayedTime=0),e.maxPlayedTime0){for(var n=t.end(t.length-1),r=0,i=t.length;r=t.start(r)&&e.currentTime<=t.end(r)){n=t.end(r);for(var a=r+1;a=2){n=t.end(a-1);break}break}s.style.width=n/e.duration*100+"%"}},S=["bufferedChange","cacheupdate","ended","timeupdate"];S.forEach((function(t){e.on(t,C)})),e.once("destroy",(function t(){e.removeAllProgressDot(),e.off("canplay",d),e.off("timeupdate",_),e.off("currentTimeChange",E),e.off("srcChange",T),e.off("loadedmetadata",w),S.forEach((function(t){e.off(t,C)})),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){var r=n(70);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:12px;right:12px;outline:none;top:-15px;z-index:35}.xgplayer-skin-default .xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative;cursor:pointer}.xgplayer-skin-default .xgplayer-progress-cache,.xgplayer-skin-default .xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-skin-default .xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-skin-default .xgplayer-progress-btn{display:none;position:absolute;left:0;top:-5px;width:13px;height:13px;border-radius:30px;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26);left:100%;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);z-index:36}.xgplayer-skin-default .xgplayer-progress-point{position:absolute}.xgplayer-skin-default .xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none;z-index:100}.xgplayer-skin-default .xgplayer-progress-dot{display:inline-block;position:absolute;height:3px;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer-skin-default .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;bottom:200%;right:50%;-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);height:auto;line-height:30px;width:auto;background:rgba(0,0,0,.3);border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer-skin-default .xgplayer-progress-dot-show .xgplayer-progress-tip{display:block}.xgplayer-skin-default .xgplayer-progress-thumbnail{position:absolute;-moz-box-sizing:border-box;box-sizing:border-box}.xgplayer-skin-default .xgplayer-progress-thumbnail.xgplayer-tips{margin-left:0;display:none;z-index:99}.xgplayer-skin-default .xgplayer-coverpreview{position:absolute;width:100%;height:100%;top:0;left:0;display:none}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer{position:absolute;display:block;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-thumbnail{display:block}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point{display:block;text-align:center;font-family:PingFangSC-Regular;font-size:11px;color:#ccc;padding:2px 4px}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point span{color:#fff}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-dot,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-dot{height:6px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-btn{display:block;top:-3px}.xgplayer-skin-default.xgplayer-definition-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-playbackrate-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-texttrack-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-volume-active .xgplayer-progress{z-index:15}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress-btn{display:block!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-outer{height:3px!important;margin-top:8.5px!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-btn{display:block!important;top:-5px!important}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(72);t.default={name:"s_time",method:function(){var e=this,t=(0,r.createDom)("xg-time",''+(e.currentTime||(0,r.format)(0))+"\n "+(e.duration||(0,r.format)(0))+"",{},"xgplayer-time");e.once("ready",(function(){e.controls&&e.controls.appendChild(t)}));var n=function(){"audio"===e.videoConfig.mediaType&&e.isProgressMoving&&e.dash||(t.innerHTML=''+(0,r.format)(e.currentTime||0)+""+(0,r.format)(e.duration)+"")};e.on("durationchange",n),e.on("timeupdate",n),e.once("destroy",(function t(){e.off("durationchange",n),e.off("timeupdate",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){var r=n(73);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'.xgplayer-skin-default .xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;height:40px;text-align:center;display:inline-block;margin:auto 8px}.xgplayer-skin-default .xgplayer-time span{color:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current{color:#fff}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current:after{content:"/";display:inline-block;padding:0 3px}',""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(75),o=(r=a)&&r.__esModule?r:{default:r};n(76);t.default={name:"s_replay",method:function(){var e=this,t=e.root,n=e.lang.REPLAY,r=(0,i.createDom)("xg-replay",o.default+'\n '+n+"\n ",{},"xgplayer-replay");function a(){var e=r.querySelector("path");if(e){var t=window.getComputedStyle(e).getPropertyValue("transform");if("string"==typeof t&&t.indexOf("none")>-1)return;e.setAttribute("transform",t)}}e.once("ready",(function(){t.appendChild(r)})),e.on("ended",a),r.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}));var l=r.querySelector("svg");["click","touchend"].forEach((function(t){l.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("replayBtnClick")}))})),e.once("destroy",(function t(){e.off("ended",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var r=n(77);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:105;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-skin-default .xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-skin-default .xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-skin-default .xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-skin-default .xgplayer-replay svg:hover path{fill:#fff}.xgplayer-skin-default .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}",""])},function(e,t,n){var r=n(161);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){e.exports=n(80)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=P(n(9)),i=P(n(81)),a=P(n(82)),o=P(n(83)),l=P(n(84)),s=P(n(85)),u=P(n(88)),c=P(n(45)),p=P(n(89)),d=P(n(90)),f=P(n(91)),g=P(n(92)),h=P(n(37)),y=P(n(38)),v=P(n(98)),x=P(n(46)),m=P(n(99)),b=P(n(100)),k=P(n(47)),w=P(n(101)),_=P(n(102)),E=P(n(103)),T=P(n(39)),C=P(n(104)),S=P(n(105));function P(e){return e&&e.__esModule?e:{default:e}}n(107),r.default.installAll([i.default,a.default,o.default,l.default,s.default,u.default,c.default,p.default,d.default,f.default,g.default,h.default,y.default,v.default,x.default,m.default,b.default,k.default,w.default,_.default,E.default,T.default,C.default,S.default]),t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"airplay",method:function(){var e=this;function t(){e.video.webkitShowPlaybackTargetPicker()}e.config.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&(e.on("airplayBtnClick",t),e.once("destroy",(function n(){e.off("airplayBtnClick",t),e.off("destroy",n)})))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"cssFullscreen",method:function(){var e=this,t=e.root;function n(){(0,r.hasClass)(t,"xgplayer-is-cssfullscreen")?e.exitCssFullscreen():e.getCssFullscreen()}e.on("cssFullscreenBtnClick",n),e.on("exitFullscreen",(function(){(0,r.removeClass)(t,"xgplayer-is-cssfullscreen")})),e.once("destroy",(function t(){e.off("cssFullscreenBtnClick",n),e.off("destroy",t)})),e.getCssFullscreen=function(){this.config.fluid&&(this.root.style["padding-top"]=""),(0,r.addClass)(this.root,"xgplayer-is-cssfullscreen"),this.emit("requestCssFullscreen")},e.exitCssFullscreen=function(){this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%"),(0,r.removeClass)(this.root,"xgplayer-is-cssfullscreen"),this.emit("exitCssFullscreen")}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"danmu",method:function(){var e=this;e.on("initDefaultDanmu",(function(t){var n=e.root.querySelector("xg-danmu");if((0,r.addClass)(n,"xgplayer-has-danmu"),!e.config.danmu.closeDefaultBtn){var i=function(){t.start()},a=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.pause()},o=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.play()},l=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&(t.stop(),t.start())};e.danmuBtn=(0,r.copyDom)(t.bulletBtn.createSwitch(!0)),e.controls.appendChild(e.danmuBtn),["click","touchend"].forEach((function(a){e.danmuBtn.addEventListener(a,(function(a){a.preventDefault(),a.stopPropagation(),(0,r.toggleClass)(e.danmuBtn,"danmu-switch-active"),(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")?(e.emit("danmuBtnOn"),(0,r.addClass)(n,"xgplayer-has-danmu"),e.once("timeupdate",i)):(e.emit("danmuBtnOff"),(0,r.removeClass)(n,"xgplayer-has-danmu"),t.stop())}))})),e.onElementClick&&n.addEventListener("click",(function(t){e.onElementClick(t,n)}),!1),e.onElementDblclick&&n.addEventListener("dblclick",(function(t){e.onElementDblclick(t,n)}),!1),e.on("pause",a),e.on("play",o),e.on("seeked",l),e.once("destroy",(function t(){e.off("timeupdate",i),e.off("pause",a),e.off("play",o),e.off("seeked",l),e.off("destroy",t)}))}}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"definition",method:function(){var e=this;e.once("destroy",(function t(){e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(86),a=(r=i)&&r.__esModule?r:{default:r},o=n(87);t.default={name:"download",method:function(){var e=this;function t(){e.download()}e.on("downloadBtnClick",t),e.once("destroy",(function n(){e.off("downloadBtnClick",t),e.off("destroy",n)})),e.download=function(){var e=(0,o.getAbsoluteURL)(this.config.url);(0,a.default)(e)}}},e.exports=t.default},function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function e(t,n,r){var i,a,o=window,l="application/octet-stream",s=r||l,u=t,c=!n&&!r&&u,p=document.createElement("a"),d=function(e){return String(e)},f=o.Blob||o.MozBlob||o.WebKitBlob||d,g=n||"download";if(f=f.call?f.bind(o):Blob,"true"===String(this)&&(s=(u=[u,s])[0],u=u[1]),c&&c.length<2048&&(g=c.split("/").pop().split("?")[0],p.href=c,-1!==p.href.indexOf(c))){var h=new XMLHttpRequest;return h.open("GET",c,!0),h.responseType="blob",h.onload=function(t){e(t.target.response,g,l)},setTimeout((function(){h.send()}),0),h}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&f!==d))return navigator.msSaveBlob?navigator.msSaveBlob(m(u),g):b(u);s=(u=m(u)).type||l}else if(/([\x80-\xff])/.test(u)){for(var y=0,v=new Uint8Array(u.length),x=v.length;yx',e=t.firstChild.href}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4),a=(r=i)&&r.__esModule?r:{default:r};var o={maxCount:3,backupUrl:"",isFetch:!0,fetchTimeout:100};t.default={name:"errorretry",method:function(){var e=this,t=this;if(t.config.errorConfig&&!(t.src.indexOf("blob:")>-1)){var n={},r=t.config.errorConfig;for(var i in o)void 0===r[i]?n[i]=o[i]:n[i]=r[i];t.retryData={count:0,errfTimer:null,isFetchReturn:!1,currentTime:0};var l=t._onError;t._onError=function(r){var i=e.retryData.count;if(i>n.maxCount)n.isFetch?function(e,t,n){var r=function(t,n){e.retryData.isFetchReturn||(e.retryData.isFetchReturn=!0,t(n))};return new Promise((function(i,a){try{var o=new window.XMLHttpRequest;o.open("get",t),o.onload=function(){r(i,{status:o.status,statusText:o.statusText,xhr:o})},o.onerror=function(){r(i,{status:o.status,statusText:o.statusText||"The network environment is disconnected or the address is invalid",xhr:o})},o.onabort=function(){},e.retryData.errfTimer=window.setTimeout((function(){var t=e.retryData.errfTimer;window.clearTimeout(t),e.retryData.errfTimer=null,r(i,{status:-1,statusText:"request timeout"})}),n),o.send()}catch(t){e.retryData.isFetchReturn=!0,r(i,{status:-2,statusText:"request error"})}}))}(e,e.currentSrc,n.fetchTimeout).then((function(t){e.emit("error",new a.default({type:"network",currentTime:e.currentTime,duration:e.duration||0,networkState:e.networkState,readyState:e.readyState,currentSrc:e.currentSrc,src:e.src,ended:e.ended,httpCode:t.status,httpMsg:t.statusText,errd:{line:101,msg:e.error,handle:"plugin errorRetry"},errorCode:e.video&&e.video.error.code,mediaError:e.video&&e.video.error})),l.call(e,t)})):l.call(e,r);else{0===i&&(e.retryData.currentTime=e.currentTime,e.once("canplay",s.bind(e)));var o="";o=n.count<2?n.backupUrl?n.backupUrl:t.currentSrc:n.backupUrl&&i>1?n.backupUrl:t.currentSrc,e.retryData.count++,e.src=o}}}function s(){this.currentTime=this.retryData.currentTime,this.play(),this.retryData.retryCode=0,this.retryData.isFetchReturn=!1,this.retryData.currentTime=0}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0||(e?n.currentTime-r>=0?n.currentTime-=r:n.currentTime=0:n.maxPlayedTime&&n.config.allowSeekPlayed&&n.currentTime+r>n.maxPlayedTime?n.currentTime=n.maxPlayedTime:n.currentTime+r<=n.duration?n.currentTime+=r:n.currentTime=n.duration+1)}},{key:"changeRate",value:function(){this.state.playbackRate=this.player.playbackRate,this.player.playbackRate=this.player.config.keyboardRate||5}},{key:"changeVolumeSlide",value:function(e){var t=this.player;t.controls&&(e?(t.emit("focus"),(0,i.hasClass)(t.root,"xgplayer-volume-active")||(0,i.addClass)(t.root,"xgplayer-volume-active")):(clearTimeout(this.timer),this.timer=setTimeout((function(){(0,i.removeClass)(t.root,"xgplayer-volume-active")}),1e3)))}},{key:"changeVolume",value:function(e){var t=this.player,n=(t.config.keyShortcutStep||{}).volume||.1;this.changeVolumeSlide(!0);var r=t.volume;e&&r+n<=1?t.volume=r+n:!e&&r-n>=0&&(t.volume=r-n)}}]),e}();t.default={name:"keyboard",method:function(){this.keyboard=new a(this)}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"localPreview",method:function(){var e=this,t=e.root;function n(n){e.uploadFile=n.files[0];var i=URL.createObjectURL(e.uploadFile);if((0,r.hasClass)(t,"xgplayer-nostart"))e.config.url=i,e.start();else{e.src=i;var a=e.play();void 0!==a&&a&&a.catch((function(e){}))}}e.on("upload",n),e.once("destroy",(function t(){e.off("upload",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={name:"memoryPlay",method:function(){var e=this;e.on("memoryPlayStart",(function(t){e.currentTime=t}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),a=n(93),o=(r=a)&&r.__esModule?r:{default:r};t.default={name:"miniplayer",method:function(){var e=this,t=e.root;function n(){(0,i.hasClass)(t,"xgplayer-miniplayer-active")?e.exitMiniplayer():e.getMiniplayer()}e.on("miniplayerBtnClick",n),e.once("destroy",(function t(){e.off("miniplayerBtnClick",n),e.off("destroy",t)})),e.getMiniplayer=function(){(0,i.hasClass)(t,"xgplayer-is-fullscreen")&&this.exitFullscreen(t),(0,i.hasClass)(t,"xgplayer-is-cssfullscreen")&&this.exitCssFullscreen(),(0,i.hasClass)(t,"xgplayer-rotate-fullscreen")&&this.exitRotateFullscreen();var e=(0,i.createDom)("xg-miniplayer-lay","
",{},"xgplayer-miniplayer-lay");this.root.appendChild(e);var n=(0,i.createDom)("xg-miniplayer-drag",'
'+this.lang.MINIPLAYER_DRAG+"
",{tabindex:9},"xgplayer-miniplayer-drag");this.root.appendChild(n);new o.default(".xgplayer",{handle:".drag-handle"});(0,i.addClass)(this.root,"xgplayer-miniplayer-active"),this.root.style.right=0,this.root.style.bottom="200px",this.root.style.top="",this.root.style.left="",this.root.style.width="320px",this.root.style.height="180px",this.config.miniplayerConfig&&(void 0!==this.config.miniplayerConfig.top&&(this.root.style.top=this.config.miniplayerConfig.top+"px",this.root.style.bottom=""),void 0!==this.config.miniplayerConfig.bottom&&(this.root.style.bottom=this.config.miniplayerConfig.bottom+"px"),void 0!==this.config.miniplayerConfig.left&&(this.root.style.left=this.config.miniplayerConfig.left+"px",this.root.style.right=""),void 0!==this.config.miniplayerConfig.right&&(this.root.style.right=this.config.miniplayerConfig.right+"px"),void 0!==this.config.miniplayerConfig.width&&(this.root.style.width=this.config.miniplayerConfig.width+"px"),void 0!==this.config.miniplayerConfig.height&&(this.root.style.height=this.config.miniplayerConfig.height+"px")),this.config.fluid&&(this.root.style["padding-top"]="");var r=this;["click","touchend"].forEach((function(t){e.addEventListener(t,(function(e){e.preventDefault(),e.stopPropagation(),r.exitMiniplayer()}))}))},e.exitMiniplayer=function(){(0,i.removeClass)(this.root,"xgplayer-miniplayer-active"),this.root.style.right="",this.root.style.bottom="",this.root.style.top="",this.root.style.left="",this.config.fluid?(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%"):(this.config.width&&("number"!=typeof this.config.width?this.root.style.width=this.config.width:this.root.style.width=this.config.width+"px"),this.config.height&&("number"!=typeof this.config.height?this.root.style.height=this.config.height:this.root.style.height=this.config.height+"px"));var e=(0,i.findDom)(this.root,".xgplayer-miniplayer-lay");e&&e.parentNode&&e.parentNode.removeChild(e);var t=(0,i.findDom)(this.root,".xgplayer-miniplayer-drag");t&&t.parentNode&&t.parentNode.removeChild(t)}}},e.exports=t.default},function(e,t,n){var r,i; /*! * Draggabilly v2.3.0 * Make that shiz draggable diff --git a/packages/xgplayer/browser/simple_player.js b/packages/xgplayer/browser/simple_player.js index 556345e66..2f6443cb8 100644 --- a/packages/xgplayer/browser/simple_player.js +++ b/packages/xgplayer/browser/simple_player.js @@ -1,2 +1,2 @@ -window.Player=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=173)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=a,t.hasClass=l,t.addClass=s,t.removeClass=u,t.toggleClass=c,t.findDom=p,t.padStart=d,t.format=f,t.event=g,t.typeOf=y,t.deepCopy=h,t.getBgImage=x,t.copyDom=v,t._setInterval=m,t._clearInterval=b,t.createImgBtn=k,t.isWeiXin=E,t.isUc=w,t.computeWatchDur=_,t.offInDestroy=T,t.on=C,t.once=S,t.getBuffered2=P,t.checkIsBrowser=O,t.setStyle=R,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var n,i=r(7),o=(n=i)&&n.__esModule?n:{default:n};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=n,i.innerHTML=t,Object.keys(r).forEach((function(t){var n=t,o=r[t];"video"===e||"audio"===e?o&&i.setAttribute(n,o):i.setAttribute(n,o)})),i}function l(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function s(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):l(e,t)||(e.className+=" "+t))}function u(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):l(e,t)&&t.split(/\s+/g).forEach((function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")})))}function c(e,t){e&&t.split(/\s+/g).forEach((function(t){l(e,t)?u(e,t):s(e,t)}))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],r=void 0;try{r=e.querySelector(t)}catch(n){0===t.indexOf("#")&&(r=e.getElementById(t.slice(1)))}return r}function d(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],l=String(e);o--;)a.push(n);return a.join("").substring(0,i-l.length)+l}function f(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),r=d(Math.floor((e-3600*t)/60),2,0),n=d(Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")}function g(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function y(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function h(e,t){if("Object"===y(t)&&"Object"===y(e))return Object.keys(t).forEach((function(r){"Object"!==y(t[r])||t[r]instanceof Node?"Array"===y(t[r])?e[r]="Array"===y(e[r])?e[r].concat(t[r]):t[r]:e[r]=t[r]:e[r]?h(e[r],t[r]):e[r]=t[r]})),e}function x(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href}function v(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function m(e,t,r,n){e._interval[t]||(e._interval[t]=setInterval(r.bind(e),n))}function b(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function k(e,t,r,n){var i=a("xg-"+e,"",{},"xgplayer-"+e+"-img");if(i.style.backgroundImage='url("'+t+'")',r&&n){var o=void 0,l=void 0,s=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(r.indexOf(e)>-1&&n.indexOf(e)>-1)||(o=Number(r.slice(0,r.indexOf(e)).trim()),l=Number(n.slice(0,n.indexOf(e)).trim()),s=e,!1)})),i.style.width=""+o+s,i.style.height=""+l+s,i.style.backgroundSize=""+o+s+" "+l+s,i.style.margin="start"===e?"-"+l/2+s+" auto auto -"+o/2+s:"auto 5px auto 5px"}return i}function E(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function w(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function _(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],r=0;rt[n].end)){var a=t[n].begin,l=t[n].end;t[n].begin=Math.min(i,a),t[n].end=Math.max(o,l);break}if(n>t.length-2){t.push({begin:i,end:o});break}}for(var s=0,u=0;u1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;ns&&(i[l-1].end=r[a].end):i.push(r[a])}else i.push(r[a])}else i=r;return new o.default(i)}function O(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function R(e,t,r){var n=e.style;try{n[t]=r}catch(e){n.setProperty(t,r)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:a,hasClass:l,addClass:s,removeClass:u,toggleClass:c,findDom:p,padStart:d,format:f,event:g,typeOf:y,deepCopy:h,getBgImage:x,copyDom:v,setInterval:m,clearInterval:b,createImgBtn:k,isWeiXin:E,isUc:w,computeWatchDur:_,offInDestroy:T,on:C,once:S,getBuffered2:P,checkIsBrowser:O,setStyle:R}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var i=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=n.sources.map((function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"}));return[r].concat(o).concat([i]).join("\n")}var a;return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i=0&&p.splice(t,1)}function x(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),y(e,t),t}function v(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function m(e,t){var r,n,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=c++;r=u||(u=x(t)),n=E.bind(null,r,a,!1),i=E.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),y(e,t),t}(t),n=_.bind(null,r,t),i=function(){h(r),r.href&&URL.revokeObjectURL(r.href)}):(r=x(t),n=w.bind(null,r),i=function(){h(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=g(e,t);return f(r,t),function(e){for(var n=[],i=0;i8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},f=arguments[9],g=arguments[10];i(this,e);var y={};if(arguments.length>1)y.playerVersion=n.version,y.errorType=t,y.domain=document.domain,y.duration=a,y.currentTime=r,y.networkState=l,y.readyState=s,y.currentSrc=c,y.src=u,y.ended=p,y.errd=d,y.ex=(o[t]||{}).msg,y.errorCode=f,y.mediaError=g;else{var h=arguments[0];Object.keys(h).map((function(e){y[e]=h[e]})),y.ex=(h.type&&o[h.type]||{}).msg}return y},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};Object.defineProperty(n,"device",{get:function(){return n.os.isPc?"pc":"mobile"}}),Object.defineProperty(n,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(r){return t[r].test(e)})))[0]||""}}),Object.defineProperty(n,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),r=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||n&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:a,isAndroid:n,isPc:!(a||n||r||o),isSymbian:r,isWindowsPhone:t,isFireFox:i}}}),t.default=n,e.exports=t.default},function(e,t,r){"use strict";e.exports=function(e){return null!=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;rthis.video.videoWidth/this.video.videoHeight?o.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":o.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===o.config.fitVideoSize?o.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===o.config.fitVideoSize&&(o.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},o.once("loadeddata",r.getVideoSize),setTimeout((function(){r.emit("ready"),r.isReady=!0}),0),r.config.videoInit&&(0,a.hasClass)(r.root,"xgplayer-nostart")&&r.start(),o.config.rotate&&(o.on("requestFullscreen",r.updateRotateDeg),o.on("exitFullscreen",r.updateRotateDeg)),o.once("destroy",(function e(){o.root.removeEventListener("mousemove",o.mousemoveFunc),o.off("destroy",e)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var r=this;t&&""!==t?(this.canPlayFunc=function(){r.off("canplay",r.canPlayFunc);var e=r.video.play();void 0!==e&&e&&e.then((function(){r.emit("autoplay started")})).catch((function(){r.emit("autoplay was prevented"),(0,a.addClass)(r.root,"xgplayer-is-autoplay")}))},"Array"!==(0,a.typeOf)(t)?"String"===(0,a.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,a.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(l.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this;for(var o in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[o]),this._interval[o]=null;function a(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),r){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,c.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var r=Object.keys(t)[0],n=e[t[r]];n&&e.off(r,n)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){n.onKeydown(e,n)}))})),this.paused?a.call(this):(this.pause(),this.once("pause",a)),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,a.removeClass)(this.root,"xgplayer-ended"),l.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var r=this,n=function(e,t){r.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,n):n.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var r=this;if(t.plugins){var n=this.config.ignores;Object.keys(t.plugins).forEach((function(i){var o=t.plugins[i];o&&"function"==typeof o?n.some((function(e){return i===e||i==="s_"+e}))||"s_i18n"===i||(["pc","tablet","mobile"].some((function(e){return e===i}))?i===l.default.device&&setTimeout((function(){r.video&&o.call(r,r)}),0):o.call(e,e)):console.warn("plugin name",i,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,a.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,a.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,a.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,a.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,a.addClass)(this.root,"xgplayer-isloading"),(0,a.addClass)(this.root,"xgplayer-playing"),(0,a.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,a.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,a.addClass)(this.root,"xgplayer-ended"),(0,a.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,a.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,a.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,a.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,r){(0,a.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=r))}},{key:"installAll",value:function(e){for(var r=0;r0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return n+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var a=document.createElement("style");this.textTrackStyle=a,document.head.appendChild(a);var l="";for(var s in t.textTrackStyle)l+=s+": "+t.textTrackStyle[s]+";";var u=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;a.sheet.insertRule?a.sheet.insertRule(u+" video::cue { "+l+" }",0):a.sheet.addRule&&a.sheet.addRule(u+" video::cue",l)}var c=t.el?t.el:(0,o.findDom)(document,"#"+t.id),p=this.constructor.XgVideoProxy;(p&&this.videoConfig.mediaType===p.mediaType?this.video=new p(c,t):this.video=(0,o.createDom)(this.videoConfig.mediaType,n,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,o.setStyle)(r.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&n)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},r=e,n="on"+e.charAt(0).toUpperCase()+e.slice(1),r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t;var t,r,n})),(0,i.default)(this),this._interval={};var d="0,0",f=this,g=function(e){r&&("play"===e?r.hasStart=!0:"canplay"===e?(0,o.removeClass)(r.root,"xgplayer-is-enter"):"waiting"===e?r.inWaitingStart=(new Date).getTime():"playing"===e&&((0,o.removeClass)(r.root,"xgplayer-is-enter"),r.inWaitingStart&&(r.inWaitingStart=void 0)),"error"===e?r._onError(e):r.emit(e,r),r.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,o._clearInterval)(r,"bufferedChange"),(0,o._setInterval)(r,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,r=this.video.buffered.length;t-1}},function(e,t,r){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,r){"use strict";var n=r(32),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=arguments[1];if(n(e),void 0===r)i.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=i.call(e,"__ee__")&&e.__ee__))return;t[r]&&delete t[r]}}},function(e,t,r){"use strict";var n=r(33);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,r){"use strict";var n=r(3),i={function:!0,object:!0};e.exports=function(e){return n(e)&&i[typeof e]||!1}},function(e,t,r){var n=r(35);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?r+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,r=0,i=void 0,o={first:"",second:""};function a(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,a){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var l=this;if((0,n.hasClass)(t,"xgplayer-inactive")?l.emit("focus"):l.emit("blur"),!l.config.closeVideoTouch&&!l.isTouchMove){var s=function(){i=setTimeout((function(){if((0,n.hasClass)(l.root,"xgplayer-nostart"))return!1;if(!l.ended)if(l.paused){var e=l.play();void 0!==e&&e&&e.catch((function(e){}))}else l.pause();r=0}),200)};l.config.closeVideoClick||(r++,i&&clearTimeout(i),1===r?l.config.enableVideoDbltouch?o.first=new Date:s():2===r&&l.config.enableVideoDbltouch?(o.second=new Date,Math.abs(o.first-o.second)<400?s():(o.first=new Date,r=1)):r=0)}},e.once("ready",a),e.once("destroy",(function t(){e.off("ready",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,r=e.root,i=0,o=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var r=this;r.config.closeVideoClick||(i++,o&&clearTimeout(o),1===i?o=setTimeout((function(){if((0,n.hasClass)(r.root,"xgplayer-nostart"))return!1;if(!r.ended)if(r.paused){var e=r.play();void 0!==e&&e&&e.catch((function(e){}))}else r.pause();i=0}),200):i=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,r){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var n=t.querySelector(".xgplayer-fullscreen");if(n){var i=void 0;document.createEvent?(i=document.createEvent("Event")).initEvent("click",!0,!0):i=new Event("click"),n.dispatchEvent(i)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),r.addEventListener("mouseenter",a),r.addEventListener("mouseleave",l),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",s),e.once("destroy",(function t(){r.removeEventListener("mouseenter",a),r.removeEventListener("mouseleave",l),e.off("ready",s),e.off("destroy",t)}))}function a(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function l(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function s(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"start",method:function(){var e=this,t=e.root;function r(){e.off("canplay",r);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function i(){(0,n.hasClass)(t,"xgplayer-nostart")?((0,n.removeClass)(t,"xgplayer-nostart"),(0,n.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",r),e.start()):r():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",r),e.start()):r()):e.paused&&((0,n.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",i),e.once("destroy",(function t(){e.off("startBtnClick",i),e.off("canplay",r),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=a(r(41)),o=a(r(42));function a(e){return e&&e.__esModule?e:{default:e}}r(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,r=(0,n.createDom)("xg-start",'
'+i.default+'
\n
'+o.default+"
",{},"xgplayer-start");function a(e){(0,n.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,n.isWeiXin)()&&!(0,n.isUc)()&&(0,n.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,n.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,n.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,n.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(r),a(e)):e.once("ready",(function(){t.appendChild(r),a(e)})),e.once("autoplay was prevented",(function(){(0,n.removeClass)(e.root,"xgplayer-is-enter"),(0,n.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,n.removeClass)(e.root,"xgplayer-is-enter")})),r.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(44);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"fullscreen",method:function(){var e=this,t=e.root;function r(){e.config.rotateFullscreen?(0,n.hasClass)(t,"xgplayer-rotate-fullscreen")?e.exitRotateFullscreen():e.getRotateFullscreen():(0,n.hasClass)(t,"xgplayer-is-fullscreen")?e.exitFullscreen(t):e.getFullscreen(t)}function i(){var r=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;r&&r===t?((0,n.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")):(0,n.hasClass)(t,"xgplayer-is-fullscreen")&&((0,n.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}function o(r){e.video.webkitPresentationMode!==n.PresentationMode.FULLSCREEN&&((0,n.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen"))}e.on("fullscreenBtnClick",r),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.addEventListener(e,i)})),e.video.addEventListener("webkitbeginfullscreen",(function(){(0,n.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")})),e.video.addEventListener("webkitendfullscreen",(function(){(0,n.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")})),(0,n.checkWebkitSetPresentationMode)(e.video)&&e.video.addEventListener("webkitpresentationmodechanged",o),e.once("destroy",(function t(){e.off("fullscreenBtnClick",r),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.removeEventListener(e,i)})),(0,n.checkWebkitSetPresentationMode)(e.video)&&e.video.removeEventListener("webkitpresentationmodechanged",o),e.off("destroy",t)})),e.getFullscreen=function(e){var t=this;if(e.requestFullscreen){var r=e.requestFullscreen();r&&r.catch((function(){t.emit("fullscreen error")}))}else e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):t.video.webkitSupportsFullscreen?t.video.webkitEnterFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():(0,n.addClass)(e,"xgplayer-is-cssfullscreen")},e.exitFullscreen=function(e){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),(0,n.removeClass)(e,"xgplayer-is-cssfullscreen")},e.getRotateFullscreen=function(){document.documentElement.style.width="100%",document.documentElement.style.height="100%",this.config.fluid&&(this.root.style["padding-top"]="",this.root.style["max-width"]="unset"),this.root&&!(0,n.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,n.addClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("getRotateFullscreen")},e.exitRotateFullscreen=function(){document.documentElement.style.width="unset",document.documentElement.style.height="unset",this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%",this.root.style["max-width"]="100%"),this.root&&(0,n.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,n.removeClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("exitRotateFullscreen")}}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"play",method:function(){var e=this;function t(){if(e.config.allowPlayAfterEnded||!e.ended)if((0,n.hasClass)(e.root,"xgplayer-nostart")&&e.start(),e.paused){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}else e.pause()}e.on("playBtnClick",t),e.once("destroy",(function r(){e.off("playBtnClick",t),e.off("destroy",r)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"replay",method:function(){var e=this,t=e.root;function r(){(0,n.removeClass)(t,"xgplayer-is-replay"),e.replay()}e.on("replayBtnClick",r),e.on("ended",(function(){e.config.loop||(0,n.addClass)(t,"xgplayer-is-replay")})),e.once("destroy",(function t(){e.off("replayBtnClick",r),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=a(r(49)),o=a(r(50));function a(e){return e&&e.__esModule?e:{default:e}}r(51);t.default={name:"s_play",method:function(){var e=this,t=e.config.playBtn?e.config.playBtn:{},r=void 0;r="img"===t.type?(0,n.createImgBtn)("play",t.url.play,t.width,t.height):(0,n.createDom)("xg-play",'\n
'+i.default+'
\n
'+o.default+"
\n
",{},"xgplayer-play");var a={};a.play=e.lang.PLAY_TIPS,a.pause=e.lang.PAUSE_TIPS;var l=(0,n.createDom)("xg-tips",''+a.play+'\n '+a.pause+"",{},"xgplayer-tips");r.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(r)})),["click","touchend"].forEach((function(t){r.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("playBtnClick")}))}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(52);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-play,.xgplayer-skin-default .xgplayer-play-img{width:40px;position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block;cursor:pointer;margin-left:3px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-play .xgplayer-icon{margin-top:3px;width:32px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-play .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}.xgplayer-skin-default .xgplayer-play-img:hover,.xgplayer-skin-default .xgplayer-play:hover{opacity:.85}.xgplayer-skin-default .xgplayer-play-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(54);t.default={name:"s_poster",method:function(){var e=this.root;if(this.config.poster){var t=(0,n.createDom)("xg-poster","",{},"xgplayer-poster");t.style.backgroundImage="url("+this.config.poster+")",e.appendChild(t)}}},e.exports=t.default},function(e,t,r){var n=r(55);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-poster{display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover;background-position:50%}.xgplayer-skin-default.xgplayer-nostart .xgplayer-poster{display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(57);t.default={name:"s_flex",method:function(){var e=(0,n.createDom)("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)}},e.exports=t.default},function(e,t,r){var n=r(58);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=a(r(60)),o=a(r(61));function a(e){return e&&e.__esModule?e:{default:e}}r(62);t.default={name:"s_fullscreen",method:function(){var e=this,t=e.config.fullscreenBtn?e.config.fullscreenBtn:{},r=void 0;r="img"===t.type?(0,n.createImgBtn)("fullscreen",t.url.request,t.width,t.height):(0,n.createDom)("xg-fullscreen",'\n
'+i.default+'
\n
'+o.default+"
\n
",{},"xgplayer-fullscreen");var a={};a.requestfull=e.lang.FULLSCREEN_TIPS,a.exitfull=e.lang.EXITFULLSCREEN_TIPS;var l=(0,n.createDom)("xg-tips",''+a.requestfull+'\n '+a.exitfull+"",{},"xgplayer-tips");r.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(r)})),["click","touchend"].forEach((function(t){r.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("fullscreenBtnClick")}))}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(63);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-fullscreen,.xgplayer-skin-default .xgplayer-fullscreen-img{position:relative;-webkit-order:13;-moz-box-ordinal-group:14;order:13;display:block;cursor:pointer;margin-left:5px;margin-right:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon{margin-top:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips{position:absolute;right:0;left:auto}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img:hover,.xgplayer-skin-default .xgplayer-fullscreen:hover{opacity:.85}.xgplayer-skin-default .xgplayer-fullscreen-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(0),o=r(65),a=(n=o)&&n.__esModule?n:{default:n};r(66);t.default={name:"s_loading",method:function(){var e=this.root,t=(0,i.createDom)("xg-loading",""+a.default,{},"xgplayer-loading");this.once("ready",(function(){e.appendChild(t)}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(67);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-50px auto auto -50px}.xgplayer-skin-default .xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-skin-default .xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-skin-default.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-loading{display:none!important}.xgplayer-skin-default.xgplayer-isloading .xgplayer-loading{display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(0),o=r(5),a=(n=o)&&n.__esModule?n:{default:n};r(69);var l=function(e){return(0,i.hasClass)(e.root,"xgplayer-rotate-fullscreen")};t.default={name:"s_progress",method:function(){var e=this,t=(0,i.createDom)("xg-progress",'\n \n \n \n \n \n \n ',{tabindex:1},"xgplayer-progress"),r=void 0;e.controls.appendChild(t);var n=t.querySelector(".xgplayer-progress-played"),o=t.querySelector(".xgplayer-progress-outer"),s=t.querySelector(".xgplayer-progress-cache"),u=t.querySelector(".xgplayer-progress-point"),c=t.querySelector(".xgplayer-progress-thumbnail");function p(r,n){r.addEventListener("mouseenter",(function(e){n&&((0,i.addClass)(r,"xgplayer-progress-dot-show"),(0,i.addClass)(t,"xgplayer-progress-dot-active"))})),r.addEventListener("mouseleave",(function(e){n&&((0,i.removeClass)(r,"xgplayer-progress-dot-show"),(0,i.removeClass)(t,"xgplayer-progress-dot-active"))})),r.addEventListener("touchend",(function(o){o.stopPropagation(),n&&((0,i.hasClass)(r,"xgplayer-progress-dot-show")||Object.keys(e.dotArr).forEach((function(t){e.dotArr[t]&&(0,i.removeClass)(e.dotArr[t],"xgplayer-progress-dot-show")})),(0,i.toggleClass)(r,"xgplayer-progress-dot-show"),(0,i.toggleClass)(t,"xgplayer-progress-dot-active"))}))}function d(){e.config.progressDot&&"Array"===(0,i.typeOf)(e.config.progressDot)&&e.config.progressDot.forEach((function(t){if(t.time>=0&&t.time<=e.duration){var r=(0,i.createDom)("xg-progress-dot",t.text?''+t.text+"":"",{},"xgplayer-progress-dot");if(r.style.left=t.time/e.duration*100+"%",t.duration>=0&&(r.style.width=Math.min(t.duration,e.duration-t.time)/e.duration*100+"%"),t.style)for(var n in t.style)r.style[n]=t.style[n];o.appendChild(r),e.dotArr[t.time]=r,p(r,t.text)}}))}e.dotArr={},e.once("canplay",d),e.addProgressDot=function(t,r,n,a){if(!e.dotArr[t]&&t>=0&&t<=e.duration){var l=(0,i.createDom)("xg-progress-dot",r?''+r+"":"",{},"xgplayer-progress-dot");if(l.style.left=t/e.duration*100+"%",n>=0&&(l.style.width=Math.min(n,e.duration-t)/e.duration*100+"%"),a)for(var s in a)l.style[s]=a[s];o.appendChild(l),e.dotArr[t]=l,p(l,r)}},e.removeProgressDot=function(t){if(t>=0&&t<=e.duration&&e.dotArr[t]){var r=e.dotArr[t];r.parentNode.removeChild(r),r=null,e.dotArr[t]=null}},e.removeAllProgressDot=function(){Object.keys(e.dotArr).forEach((function(t){if(e.dotArr[t]){var r=e.dotArr[t];r.parentNode.removeChild(r),r=null,e.dotArr[t]=null}}))};var f=0,g=0,y=0,h=0,x=0,v=0,m=[],b=void 0,k=void 0,E=function(){e.config.thumbnail&&(e.config.thumbnail.isShowCoverPreview&&!b&&(n.removeChild(c),b=(0,i.createDom)("xg-coverpreview",'\n \n \n ',{tabindex:1},"xgplayer-coverpreview"),b.querySelector(".xgplayer-coverpreview-outer"),k=b.querySelector(".xgplayer-coverpreview-point"),c=b.querySelector(".xgplayer-coverpreview-thumbnail"),e.root.appendChild(b)),f=e.config.thumbnail.pic_num,g=e.config.thumbnail.width,y=e.config.thumbnail.height,h=e.config.thumbnail.col,x=e.config.thumbnail.row,m=e.config.thumbnail.urls,c.style.width=g+"px",c.style.height=y+"px")};e.on("loadedmetadata",E),"function"==typeof e.config.disableSwipeHandler&&"function"==typeof e.config.enableSwipeHandler&&(e.root.addEventListener("touchmove",(function(t){t.preventDefault(),e.disableSwipe||(e.disableSwipe=!0,e.config.disableSwipeHandler.call(e))})),e.root.addEventListener("touchstart",(function(t){e.disableSwipe=!0,e.config.disableSwipeHandler.call(e)})),e.root.addEventListener("touchend",(function(t){e.disableSwipe=!1,e.config.enableSwipeHandler.call(e)}))),["touchstart","mousedown"].forEach((function(o){t.addEventListener(o,(function(o){if(!e.config.disableProgress){if(o.stopPropagation(),(0,i.event)(o),o._target===u||!e.config.allowSeekAfterEnded&&e.ended)return!0;t.focus();var s=n.getBoundingClientRect().left,p=l(e);p?(s=n.getBoundingClientRect().top,r=t.getBoundingClientRect().height):(r=t.getBoundingClientRect().width,s=n.getBoundingClientRect().left);var d=function(t){t.stopPropagation(),(0,i.event)(t),e.isProgressMoving=!0;var o=(p?t.clientY:t.clientX)-s;o>r&&(o=r);var a=o/r*e.duration;if(a<0&&(a=0),e.config.allowSeekPlayed&&Number(a).toFixed(1)>e.maxPlayedTime);else if(n.style.width=100*o/r+"%","video"!==e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var l=(0,i.findDom)(e.controls,".xgplayer-time");l&&(l.innerHTML=''+(0,i.format)(a||0)+""+(0,i.format)(e.duration)+"")}else e.currentTime=Number(a).toFixed(1);if(e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview){k.innerHTML=""+(0,i.format)(a)+" / "+(0,i.format)(e.duration||0),v=e.duration/f;var u=Math.floor(a/v);c.style.backgroundImage="url("+m[Math.ceil((u+1)/(h*x))-1]+")";var d=u+1-h*x*(Math.ceil((u+1)/(h*x))-1),E=Math.ceil(d/x)-1,w=d-E*x-1;c.style["background-position"]="-"+w*g+"px -"+E*y+"px",b.style.display="block"}e.emit("focus")},E=function o(l){if(l.stopPropagation(),(0,i.event)(l),window.removeEventListener("mousemove",d),window.removeEventListener("touchmove",d,{passive:!1}),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o),a.default.browser.indexOf("ie")<0&&t.blur(),!e.isProgressMoving||e.videoConfig&&"audio"===e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var u=(p?l.clientY:l.clientX)-s;u>r&&(u=r);var c=u/r*e.duration;c<0&&(c=0),e.config.allowSeekPlayed&&Number(c).toFixed(1)>e.maxPlayedTime||(n.style.width=100*u/r+"%",e.currentTime=Number(c).toFixed(1))}e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview&&(b.style.display="none"),e.emit("focus"),e.isProgressMoving=!1};return window.addEventListener("mousemove",d),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("mouseup",E),window.addEventListener("touchend",E),!0}}))})),t.addEventListener("mouseenter",(function(r){if(!e.config.allowSeekAfterEnded&&e.ended)return!0;var n=l(e),o=n?t.getBoundingClientRect().top:t.getBoundingClientRect().left,a=n?t.getBoundingClientRect().height:t.getBoundingClientRect().width,s=function(r){var l=((n?r.clientY:r.clientX)-o)/a*e.duration;l=l<0?0:l,u.textContent=(0,i.format)(l);var s=u.getBoundingClientRect().width;if(e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview){v=e.duration/f;var p=Math.floor(l/v);c.style.backgroundImage="url("+m[Math.ceil((p+1)/(h*x))-1]+")";var d=p+1-h*x*(Math.ceil((p+1)/(h*x))-1),b=Math.ceil(d/x)-1,k=d-b*x-1;c.style["background-position"]="-"+k*g+"px -"+b*y+"px";var E=(n?r.clientY:r.clientX)-o-g/2;E=(E=E>0?E:0)0?w:0)>a-s?a-s:w,u.style.left=w+"px"}(0,i.hasClass)(t,"xgplayer-progress-dot-active")?u.style.display="none":u.style.display="block"},p=function(e){s(e)};t.addEventListener("mousemove",p,!1),t.addEventListener("mouseleave",(function r(n){t.removeEventListener("mousemove",p,!1),t.removeEventListener("mouseleave",r,!1),s(n),u.style.display="none",e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview&&(c.style.display="none")}),!1),s(r)}),!1);var w=function(){if(void 0===e.maxPlayedTime&&(e.maxPlayedTime=0),e.maxPlayedTime0){for(var r=t.end(t.length-1),n=0,i=t.length;n=t.start(n)&&e.currentTime<=t.end(n)){r=t.end(n);for(var o=n+1;o=2){r=t.end(o-1);break}break}s.style.width=r/e.duration*100+"%"}},S=["bufferedChange","cacheupdate","ended","timeupdate"];S.forEach((function(t){e.on(t,C)})),e.once("destroy",(function t(){e.removeAllProgressDot(),e.off("canplay",d),e.off("timeupdate",w),e.off("currentTimeChange",_),e.off("srcChange",T),e.off("loadedmetadata",E),S.forEach((function(t){e.off(t,C)})),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){var n=r(70);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:12px;right:12px;outline:none;top:-15px;z-index:35}.xgplayer-skin-default .xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative;cursor:pointer}.xgplayer-skin-default .xgplayer-progress-cache,.xgplayer-skin-default .xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-skin-default .xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-skin-default .xgplayer-progress-btn{display:none;position:absolute;left:0;top:-5px;width:13px;height:13px;border-radius:30px;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26);left:100%;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);z-index:36}.xgplayer-skin-default .xgplayer-progress-point{position:absolute}.xgplayer-skin-default .xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none;z-index:100}.xgplayer-skin-default .xgplayer-progress-dot{display:inline-block;position:absolute;height:3px;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer-skin-default .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;bottom:200%;right:50%;-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);height:auto;line-height:30px;width:auto;background:rgba(0,0,0,.3);border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer-skin-default .xgplayer-progress-dot-show .xgplayer-progress-tip{display:block}.xgplayer-skin-default .xgplayer-progress-thumbnail{position:absolute;-moz-box-sizing:border-box;box-sizing:border-box}.xgplayer-skin-default .xgplayer-progress-thumbnail.xgplayer-tips{margin-left:0;display:none;z-index:99}.xgplayer-skin-default .xgplayer-coverpreview{position:absolute;width:100%;height:100%;top:0;left:0;display:none}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer{position:absolute;display:block;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-thumbnail{display:block}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point{display:block;text-align:center;font-family:PingFangSC-Regular;font-size:11px;color:#ccc;padding:2px 4px}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point span{color:#fff}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-dot,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-dot{height:6px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-btn{display:block;top:-3px}.xgplayer-skin-default.xgplayer-definition-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-playbackrate-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-texttrack-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-volume-active .xgplayer-progress{z-index:15}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress-btn{display:block!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-outer{height:3px!important;margin-top:8.5px!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-btn{display:block!important;top:-5px!important}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(72);t.default={name:"s_time",method:function(){var e=this,t=(0,n.createDom)("xg-time",''+(e.currentTime||(0,n.format)(0))+"\n "+(e.duration||(0,n.format)(0))+"",{},"xgplayer-time");e.once("ready",(function(){e.controls&&e.controls.appendChild(t)}));var r=function(){"audio"===e.videoConfig.mediaType&&e.isProgressMoving&&e.dash||(t.innerHTML=''+(0,n.format)(e.currentTime||0)+""+(0,n.format)(e.duration)+"")};e.on("durationchange",r),e.on("timeupdate",r),e.once("destroy",(function t(){e.off("durationchange",r),e.off("timeupdate",r),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){var n=r(73);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,'.xgplayer-skin-default .xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;height:40px;text-align:center;display:inline-block;margin:auto 8px}.xgplayer-skin-default .xgplayer-time span{color:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current{color:#fff}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current:after{content:"/";display:inline-block;padding:0 3px}',""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(0),o=r(75),a=(n=o)&&n.__esModule?n:{default:n};r(76);t.default={name:"s_replay",method:function(){var e=this,t=e.root,r=e.lang.REPLAY,n=(0,i.createDom)("xg-replay",a.default+'\n '+r+"\n ",{},"xgplayer-replay");function o(){var e=n.querySelector("path");if(e){var t=window.getComputedStyle(e).getPropertyValue("transform");if("string"==typeof t&&t.indexOf("none")>-1)return;e.setAttribute("transform",t)}}e.once("ready",(function(){t.appendChild(n)})),e.on("ended",o),n.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}));var l=n.querySelector("svg");["click","touchend"].forEach((function(t){l.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("replayBtnClick")}))})),e.once("destroy",(function t(){e.off("ended",o),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(77);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:105;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-skin-default .xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-skin-default .xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-skin-default .xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-skin-default .xgplayer-replay svg:hover path{fill:#fff}.xgplayer-skin-default .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}",""])},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(174)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=m(r(9)),i=m(r(56)),o=m(r(45)),a=m(r(59)),l=m(r(64)),s=m(r(37)),u=m(r(38)),c=m(r(46)),p=m(r(48)),d=m(r(68)),f=m(r(53)),g=m(r(71)),y=m(r(39)),h=m(r(40)),x=m(r(47)),v=m(r(74));function m(e){return e&&e.__esModule?e:{default:e}}[i.default,o.default,a.default,l.default,s.default,u.default,c.default,p.default,d.default,f.default,g.default,y.default,h.default,x.default,v.default].forEach((function(e){n.default.install(e.name,e.method)})),t.default=n.default,e.exports=t.default}]); +window.Player=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=173)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=a,t.hasClass=l,t.addClass=s,t.removeClass=u,t.toggleClass=c,t.findDom=p,t.padStart=d,t.format=f,t.event=g,t.typeOf=y,t.deepCopy=h,t.getBgImage=x,t.copyDom=v,t._setInterval=m,t._clearInterval=b,t.createImgBtn=k,t.isWeiXin=E,t.isUc=w,t.computeWatchDur=_,t.offInDestroy=T,t.on=C,t.once=S,t.getBuffered2=P,t.checkIsBrowser=O,t.setStyle=R,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var n,i=r(7),o=(n=i)&&n.__esModule?n:{default:n};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=n,i.innerHTML=t,Object.keys(r).forEach((function(t){var n=t,o=r[t];"video"===e||"audio"===e?o&&i.setAttribute(n,o):i.setAttribute(n,o)})),i}function l(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function s(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):l(e,t)||(e.className+=" "+t))}function u(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):l(e,t)&&t.split(/\s+/g).forEach((function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")})))}function c(e,t){e&&t.split(/\s+/g).forEach((function(t){l(e,t)?u(e,t):s(e,t)}))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],r=void 0;try{r=e.querySelector(t)}catch(n){0===t.indexOf("#")&&(r=e.getElementById(t.slice(1)))}return r}function d(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],l=String(e);o--;)a.push(n);return a.join("").substring(0,i-l.length)+l}function f(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),r=d(Math.floor((e-3600*t)/60),2,0),n=d(Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")}function g(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function y(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function h(e,t){if("Object"===y(t)&&"Object"===y(e))return Object.keys(t).forEach((function(r){"Object"!==y(t[r])||t[r]instanceof Node?"Array"===y(t[r])?e[r]="Array"===y(e[r])?e[r].concat(t[r]):t[r]:e[r]=t[r]:e[r]?h(e[r],t[r]):e[r]=t[r]})),e}function x(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href}function v(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function m(e,t,r,n){e._interval[t]||(e._interval[t]=setInterval(r.bind(e),n))}function b(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function k(e,t,r,n){var i=a("xg-"+e,"",{},"xgplayer-"+e+"-img");if(i.style.backgroundImage='url("'+t+'")',r&&n){var o=void 0,l=void 0,s=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(r.indexOf(e)>-1&&n.indexOf(e)>-1)||(o=Number(r.slice(0,r.indexOf(e)).trim()),l=Number(n.slice(0,n.indexOf(e)).trim()),s=e,!1)})),i.style.width=""+o+s,i.style.height=""+l+s,i.style.backgroundSize=""+o+s+" "+l+s,i.style.margin="start"===e?"-"+l/2+s+" auto auto -"+o/2+s:"auto 5px auto 5px"}return i}function E(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function w(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function _(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],r=0;rt[n].end)){var a=t[n].begin,l=t[n].end;t[n].begin=Math.min(i,a),t[n].end=Math.max(o,l);break}if(n>t.length-2){t.push({begin:i,end:o});break}}for(var s=0,u=0;u1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;ns&&(i[l-1].end=r[a].end):i.push(r[a])}else i.push(r[a])}else i=r;return new o.default(i)}function O(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function R(e,t,r){var n=e.style;try{n[t]=r}catch(e){n.setProperty(t,r)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:a,hasClass:l,addClass:s,removeClass:u,toggleClass:c,findDom:p,padStart:d,format:f,event:g,typeOf:y,deepCopy:h,getBgImage:x,copyDom:v,setInterval:m,clearInterval:b,createImgBtn:k,isWeiXin:E,isUc:w,computeWatchDur:_,offInDestroy:T,on:C,once:S,getBuffered2:P,checkIsBrowser:O,setStyle:R}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var i=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=n.sources.map((function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"}));return[r].concat(o).concat([i]).join("\n")}var a;return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i=0&&p.splice(t,1)}function x(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),y(e,t),t}function v(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function m(e,t){var r,n,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=c++;r=u||(u=x(t)),n=E.bind(null,r,a,!1),i=E.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),y(e,t),t}(t),n=_.bind(null,r,t),i=function(){h(r),r.href&&URL.revokeObjectURL(r.href)}):(r=x(t),n=w.bind(null,r),i=function(){h(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=g(e,t);return f(r,t),function(e){for(var n=[],i=0;i8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},f=arguments[9],g=arguments[10];i(this,e);var y={};if(arguments.length>1)y.playerVersion=n.version,y.errorType=t,y.domain=document.domain,y.duration=a,y.currentTime=r,y.networkState=l,y.readyState=s,y.currentSrc=c,y.src=u,y.ended=p,y.errd=d,y.ex=(o[t]||{}).msg,y.errorCode=f,y.mediaError=g;else{var h=arguments[0];Object.keys(h).map((function(e){y[e]=h[e]})),y.ex=(h.type&&o[h.type]||{}).msg}return y},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};Object.defineProperty(n,"device",{get:function(){return n.os.isPc?"pc":"mobile"}}),Object.defineProperty(n,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(r){return t[r].test(e)})))[0]||""}}),Object.defineProperty(n,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),r=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||n&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:a,isAndroid:n,isPc:!(a||n||r||o),isSymbian:r,isWindowsPhone:t,isFireFox:i}}}),t.default=n,e.exports=t.default},function(e,t,r){"use strict";e.exports=function(e){return null!=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;rthis.video.videoWidth/this.video.videoHeight?o.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":o.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===o.config.fitVideoSize?o.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===o.config.fitVideoSize&&(o.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},o.once("loadeddata",r.getVideoSize),setTimeout((function(){r.emit("ready"),r.isReady=!0}),0),r.config.videoInit&&(0,a.hasClass)(r.root,"xgplayer-nostart")&&r.start(),o.config.rotate&&(o.on("requestFullscreen",r.updateRotateDeg),o.on("exitFullscreen",r.updateRotateDeg)),o.once("destroy",(function e(){o.root.removeEventListener("mousemove",o.mousemoveFunc),o.off("destroy",e)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var r=this;t&&""!==t?(this.canPlayFunc=function(){r.off("canplay",r.canPlayFunc);var e=r.video.play();void 0!==e&&e&&e.then((function(){r.emit("autoplay started")})).catch((function(){r.emit("autoplay was prevented"),(0,a.addClass)(r.root,"xgplayer-is-autoplay")}))},"Array"!==(0,a.typeOf)(t)?"String"===(0,a.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,a.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(l.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this;for(var o in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[o]),this._interval[o]=null;function a(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),r){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,c.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var r=Object.keys(t)[0],n=e[t[r]];n&&e.off(r,n)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){n.onKeydown(e,n)}))})),this.paused?a.call(this):(this.pause(),this.once("pause",a)),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,a.removeClass)(this.root,"xgplayer-ended"),l.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var r=this,n=function(e,t){r.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,n):n.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var r=this;if(t.plugins){var n=this.config.ignores;Object.keys(t.plugins).forEach((function(i){var o=t.plugins[i];o&&"function"==typeof o?n.some((function(e){return i===e||i==="s_"+e}))||"s_i18n"===i||(["pc","tablet","mobile"].some((function(e){return e===i}))?i===l.default.device&&setTimeout((function(){r.video&&o.call(r,r)}),0):o.call(e,e)):console.warn("plugin name",i,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,a.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,a.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,a.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,a.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,a.addClass)(this.root,"xgplayer-isloading"),(0,a.addClass)(this.root,"xgplayer-playing"),(0,a.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,a.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,a.addClass)(this.root,"xgplayer-ended"),(0,a.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,a.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,a.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,a.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,r){(0,a.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=r))}},{key:"installAll",value:function(e){for(var r=0;r0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return n+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var a=document.createElement("style");this.textTrackStyle=a,document.head.appendChild(a);var l="";for(var s in t.textTrackStyle)l+=s+": "+t.textTrackStyle[s]+";";var u=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;a.sheet.insertRule?a.sheet.insertRule(u+" video::cue { "+l+" }",0):a.sheet.addRule&&a.sheet.addRule(u+" video::cue",l)}var c=t.el?t.el:(0,o.findDom)(document,"#"+t.id),p=this.constructor.XgVideoProxy;(p&&this.videoConfig.mediaType===p.mediaType?this.video=new p(c,t):this.video=(0,o.createDom)(this.videoConfig.mediaType,n,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,o.setStyle)(r.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&n)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},r=e,n="on"+e.charAt(0).toUpperCase()+e.slice(1),r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t;var t,r,n})),(0,i.default)(this),this._interval={};var d="0,0",f=this,g=function(e){r&&("play"===e?r.hasStart=!0:"canplay"===e?(0,o.removeClass)(r.root,"xgplayer-is-enter"):"waiting"===e?r.inWaitingStart=(new Date).getTime():"playing"===e&&((0,o.removeClass)(r.root,"xgplayer-is-enter"),r.inWaitingStart&&(r.inWaitingStart=void 0)),"error"===e?r._onError(e):r.emit(e,r),r.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,o._clearInterval)(r,"bufferedChange"),(0,o._setInterval)(r,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,r=this.video.buffered.length;t-1}},function(e,t,r){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,r){"use strict";var n=r(32),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=arguments[1];if(n(e),void 0===r)i.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=i.call(e,"__ee__")&&e.__ee__))return;t[r]&&delete t[r]}}},function(e,t,r){"use strict";var n=r(33);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,r){"use strict";var n=r(3),i={function:!0,object:!0};e.exports=function(e){return n(e)&&i[typeof e]||!1}},function(e,t,r){var n=r(35);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?r+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,r=0,i=void 0,o={first:"",second:""};function a(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,a){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var l=this;if((0,n.hasClass)(t,"xgplayer-inactive")?l.emit("focus"):l.emit("blur"),!l.config.closeVideoTouch&&!l.isTouchMove){var s=function(){i=setTimeout((function(){if((0,n.hasClass)(l.root,"xgplayer-nostart"))return!1;if(!l.ended)if(l.paused){var e=l.play();void 0!==e&&e&&e.catch((function(e){}))}else l.pause();r=0}),200)};l.config.closeVideoClick||(r++,i&&clearTimeout(i),1===r?l.config.enableVideoDbltouch?o.first=new Date:s():2===r&&l.config.enableVideoDbltouch?(o.second=new Date,Math.abs(o.first-o.second)<400?s():(o.first=new Date,r=1)):r=0)}},e.once("ready",a),e.once("destroy",(function t(){e.off("ready",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,r=e.root,i=0,o=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var r=this;r.config.closeVideoClick||(i++,o&&clearTimeout(o),1===i?o=setTimeout((function(){if((0,n.hasClass)(r.root,"xgplayer-nostart"))return!1;if(!r.ended)if(r.paused){var e=r.play();void 0!==e&&e&&e.catch((function(e){}))}else r.pause();i=0}),200):i=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,r){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var n=t.querySelector(".xgplayer-fullscreen");if(n){var i=void 0;document.createEvent?(i=document.createEvent("Event")).initEvent("click",!0,!0):i=new Event("click"),n.dispatchEvent(i)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),r.addEventListener("mouseenter",a),r.addEventListener("mouseleave",l),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",s),e.once("destroy",(function t(){r.removeEventListener("mouseenter",a),r.removeEventListener("mouseleave",l),e.off("ready",s),e.off("destroy",t)}))}function a(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function l(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function s(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"start",method:function(){var e=this,t=e.root;function r(){e.off("canplay",r);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function i(){(0,n.hasClass)(t,"xgplayer-nostart")?((0,n.removeClass)(t,"xgplayer-nostart"),(0,n.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",r),e.start()):r():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",r),e.start()):r()):e.paused&&((0,n.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",i),e.once("destroy",(function t(){e.off("startBtnClick",i),e.off("canplay",r),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=a(r(41)),o=a(r(42));function a(e){return e&&e.__esModule?e:{default:e}}r(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,r=(0,n.createDom)("xg-start",'
'+i.default+'
\n
'+o.default+"
",{},"xgplayer-start");function a(e){(0,n.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,n.isWeiXin)()&&!(0,n.isUc)()&&(0,n.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,n.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,n.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,n.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(r),a(e)):e.once("ready",(function(){t.appendChild(r),a(e)})),e.once("autoplay was prevented",(function(){(0,n.removeClass)(e.root,"xgplayer-is-enter"),(0,n.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,n.removeClass)(e.root,"xgplayer-is-enter")})),r.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(44);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"fullscreen",method:function(){var e=this,t=e.root;function r(){e.config.rotateFullscreen?(0,n.hasClass)(t,"xgplayer-rotate-fullscreen")?e.exitRotateFullscreen():e.getRotateFullscreen():(0,n.hasClass)(t,"xgplayer-is-fullscreen")?e.exitFullscreen(t):e.getFullscreen(t)}function i(){var r=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;r&&r===t?((0,n.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")):(0,n.hasClass)(t,"xgplayer-is-fullscreen")&&((0,n.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}function o(r){e.video.webkitPresentationMode!==n.PresentationMode.FULLSCREEN&&((0,n.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen"))}e.on("fullscreenBtnClick",r),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.addEventListener(e,i)})),e.video.addEventListener("webkitbeginfullscreen",(function(){(0,n.addClass)(t,"xgplayer-is-fullscreen"),e.emit("requestFullscreen")})),e.video.addEventListener("webkitendfullscreen",(function(){(0,n.removeClass)(t,"xgplayer-is-fullscreen"),e.emit("exitFullscreen")})),(0,n.checkWebkitSetPresentationMode)(e.video)&&e.video.addEventListener("webkitpresentationmodechanged",o),e.once("destroy",(function t(){e.off("fullscreenBtnClick",r),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){document.removeEventListener(e,i)})),(0,n.checkWebkitSetPresentationMode)(e.video)&&e.video.removeEventListener("webkitpresentationmodechanged",o),e.off("destroy",t)})),e.getFullscreen=function(e){var t=this;if(e.requestFullscreen){var r=e.requestFullscreen();r&&r.catch((function(){t.emit("fullscreen error")}))}else e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):t.video.webkitSupportsFullscreen?t.video.webkitEnterFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():(0,n.addClass)(e,"xgplayer-is-cssfullscreen")},e.exitFullscreen=function(e){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),(0,n.removeClass)(e,"xgplayer-is-cssfullscreen")},e.getRotateFullscreen=function(){document.documentElement.style.width="100%",document.documentElement.style.height="100%",this.config.fluid&&(this.root.style["padding-top"]="",this.root.style["max-width"]="unset"),this.root&&!(0,n.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,n.addClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("getRotateFullscreen")},e.exitRotateFullscreen=function(){document.documentElement.style.width="unset",document.documentElement.style.height="unset",this.config.fluid&&(this.root.style.width="100%",this.root.style.height="0",this.root.style["padding-top"]=100*this.config.height/this.config.width+"%",this.root.style["max-width"]="100%"),this.root&&(0,n.hasClass)(this.root,"xgplayer-rotate-fullscreen")&&(0,n.removeClass)(this.root,"xgplayer-rotate-fullscreen"),this.emit("exitRotateFullscreen")}}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"play",method:function(){var e=this;function t(){if(e.config.allowPlayAfterEnded||!e.ended)if((0,n.hasClass)(e.root,"xgplayer-nostart")&&e.start(),e.paused){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}else e.pause()}e.on("playBtnClick",t),e.once("destroy",(function r(){e.off("playBtnClick",t),e.off("destroy",r)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.default={name:"replay",method:function(){var e=this,t=e.root;function r(){(0,n.removeClass)(t,"xgplayer-is-replay"),e.replay()}e.on("replayBtnClick",r),e.on("ended",(function(){e.config.loop||(0,n.addClass)(t,"xgplayer-is-replay")})),e.once("destroy",(function t(){e.off("replayBtnClick",r),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=a(r(49)),o=a(r(50));function a(e){return e&&e.__esModule?e:{default:e}}r(51);t.default={name:"s_play",method:function(){var e=this,t=e.config.playBtn?e.config.playBtn:{},r=void 0;r="img"===t.type?(0,n.createImgBtn)("play",t.url.play,t.width,t.height):(0,n.createDom)("xg-play",'\n
'+i.default+'
\n
'+o.default+"
\n
",{},"xgplayer-play");var a={};a.play=e.lang.PLAY_TIPS,a.pause=e.lang.PAUSE_TIPS;var l=(0,n.createDom)("xg-tips",''+a.play+'\n '+a.pause+"",{},"xgplayer-tips");r.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(r)})),["click","touchend"].forEach((function(t){r.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("playBtnClick")}))}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(52);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-play,.xgplayer-skin-default .xgplayer-play-img{width:40px;position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block;cursor:pointer;margin-left:3px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-play .xgplayer-icon{margin-top:3px;width:32px}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-play .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}.xgplayer-skin-default .xgplayer-play-img:hover,.xgplayer-skin-default .xgplayer-play:hover{opacity:.85}.xgplayer-skin-default .xgplayer-play-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-play{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-playing .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-playing .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-icon .xgplayer-icon-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-icon .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-play,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-play{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-play-img .xgplayer-tips .xgplayer-tip-pause,.xgplayer-skin-default.xgplayer-pause .xgplayer-play .xgplayer-tips .xgplayer-tip-pause{display:none}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(54);t.default={name:"s_poster",method:function(){var e=this.root;if(this.config.poster){var t=(0,n.createDom)("xg-poster","",{},"xgplayer-poster");t.style.backgroundImage="url("+this.config.poster+")",e.appendChild(t)}}},e.exports=t.default},function(e,t,r){var n=r(55);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-poster{display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover;background-position:50%}.xgplayer-skin-default.xgplayer-nostart .xgplayer-poster{display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(57);t.default={name:"s_flex",method:function(){var e=(0,n.createDom)("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)}},e.exports=t.default},function(e,t,r){var n=r(58);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=a(r(60)),o=a(r(61));function a(e){return e&&e.__esModule?e:{default:e}}r(62);t.default={name:"s_fullscreen",method:function(){var e=this,t=e.config.fullscreenBtn?e.config.fullscreenBtn:{},r=void 0;r="img"===t.type?(0,n.createImgBtn)("fullscreen",t.url.request,t.width,t.height):(0,n.createDom)("xg-fullscreen",'\n
'+i.default+'
\n
'+o.default+"
\n
",{},"xgplayer-fullscreen");var a={};a.requestfull=e.lang.FULLSCREEN_TIPS,a.exitfull=e.lang.EXITFULLSCREEN_TIPS;var l=(0,n.createDom)("xg-tips",''+a.requestfull+'\n '+a.exitfull+"",{},"xgplayer-tips");r.appendChild(l),e.once("ready",(function(){e.controls&&e.controls.appendChild(r)})),["click","touchend"].forEach((function(t){r.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("fullscreenBtnClick")}))}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(63);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-fullscreen,.xgplayer-skin-default .xgplayer-fullscreen-img{position:relative;-webkit-order:13;-moz-box-ordinal-group:14;order:13;display:block;cursor:pointer;margin-left:5px;margin-right:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon{margin-top:3px}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon div,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon div{position:absolute}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips{position:absolute;right:0;left:auto}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:block}.xgplayer-skin-default .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:none}.xgplayer-skin-default .xgplayer-fullscreen-img:hover,.xgplayer-skin-default .xgplayer-fullscreen:hover{opacity:.85}.xgplayer-skin-default .xgplayer-fullscreen-img:hover .xgplayer-tips,.xgplayer-skin-default .xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-icon .xgplayer-icon-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-icon .xgplayer-icon-exitfull{display:block}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-requestfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-requestfull{display:none}.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen-img .xgplayer-tips .xgplayer-tip-exitfull,.xgplayer-skin-default.xgplayer-rotate-fullscreen .xgplayer-fullscreen .xgplayer-tips .xgplayer-tip-exitfull{display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(0),o=r(65),a=(n=o)&&n.__esModule?n:{default:n};r(66);t.default={name:"s_loading",method:function(){var e=this.root,t=(0,i.createDom)("xg-loading",""+a.default,{},"xgplayer-loading");this.once("ready",(function(){e.appendChild(t)}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(67);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-50px auto auto -50px}.xgplayer-skin-default .xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-skin-default .xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-skin-default.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-skin-default.xgplayer-pause .xgplayer-loading{display:none!important}.xgplayer-skin-default.xgplayer-isloading .xgplayer-loading{display:block}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(0),o=r(5),a=(n=o)&&n.__esModule?n:{default:n};r(69);var l=function(e){return(0,i.hasClass)(e.root,"xgplayer-rotate-fullscreen")};t.default={name:"s_progress",method:function(){var e=this,t=(0,i.createDom)("xg-progress",'\n \n \n \n \n \n \n ',{tabindex:1},"xgplayer-progress"),r=void 0;e.controls.appendChild(t);var n=t.querySelector(".xgplayer-progress-played"),o=t.querySelector(".xgplayer-progress-outer"),s=t.querySelector(".xgplayer-progress-cache"),u=t.querySelector(".xgplayer-progress-point"),c=t.querySelector(".xgplayer-progress-thumbnail");function p(r,n){r.addEventListener("mouseenter",(function(e){n&&((0,i.addClass)(r,"xgplayer-progress-dot-show"),(0,i.addClass)(t,"xgplayer-progress-dot-active"))})),r.addEventListener("mouseleave",(function(e){n&&((0,i.removeClass)(r,"xgplayer-progress-dot-show"),(0,i.removeClass)(t,"xgplayer-progress-dot-active"))})),r.addEventListener("touchend",(function(o){o.stopPropagation(),n&&((0,i.hasClass)(r,"xgplayer-progress-dot-show")||Object.keys(e.dotArr).forEach((function(t){e.dotArr[t]&&(0,i.removeClass)(e.dotArr[t],"xgplayer-progress-dot-show")})),(0,i.toggleClass)(r,"xgplayer-progress-dot-show"),(0,i.toggleClass)(t,"xgplayer-progress-dot-active"))}))}function d(){e.config.progressDot&&"Array"===(0,i.typeOf)(e.config.progressDot)&&e.config.progressDot.forEach((function(t){if(t.time>=0&&t.time<=e.duration){var r=(0,i.createDom)("xg-progress-dot",t.text?''+t.text+"":"",{},"xgplayer-progress-dot");if(r.style.left=t.time/e.duration*100+"%",t.duration>=0&&(r.style.width=Math.min(t.duration,e.duration-t.time)/e.duration*100+"%"),t.style)for(var n in t.style)r.style[n]=t.style[n];o.appendChild(r),e.dotArr[t.time]=r,p(r,t.text)}}))}e.dotArr={},e.once("canplay",d),e.addProgressDot=function(t,r,n,a){if(!e.dotArr[t]&&t>=0&&t<=e.duration){var l=(0,i.createDom)("xg-progress-dot",r?''+r+"":"",{},"xgplayer-progress-dot");if(l.style.left=t/e.duration*100+"%",n>=0&&(l.style.width=Math.min(n,e.duration-t)/e.duration*100+"%"),a)for(var s in a)l.style[s]=a[s];o.appendChild(l),e.dotArr[t]=l,p(l,r)}},e.removeProgressDot=function(t){if(t>=0&&t<=e.duration&&e.dotArr[t]){var r=e.dotArr[t];r.parentNode.removeChild(r),r=null,e.dotArr[t]=null}},e.removeAllProgressDot=function(){Object.keys(e.dotArr).forEach((function(t){if(e.dotArr[t]){var r=e.dotArr[t];r.parentNode.removeChild(r),r=null,e.dotArr[t]=null}}))};var f=0,g=0,y=0,h=0,x=0,v=0,m=[],b=void 0,k=void 0,E=function(){e.config.thumbnail&&(e.config.thumbnail.isShowCoverPreview&&!b&&(n.removeChild(c),b=(0,i.createDom)("xg-coverpreview",'\n \n \n ',{tabindex:1},"xgplayer-coverpreview"),b.querySelector(".xgplayer-coverpreview-outer"),k=b.querySelector(".xgplayer-coverpreview-point"),c=b.querySelector(".xgplayer-coverpreview-thumbnail"),e.root.appendChild(b)),f=e.config.thumbnail.pic_num,g=e.config.thumbnail.width,y=e.config.thumbnail.height,h=e.config.thumbnail.col,x=e.config.thumbnail.row,m=e.config.thumbnail.urls,c.style.width=g+"px",c.style.height=y+"px")};e.on("loadedmetadata",E),"function"==typeof e.config.disableSwipeHandler&&"function"==typeof e.config.enableSwipeHandler&&(e.root.addEventListener("touchmove",(function(t){t.preventDefault(),e.disableSwipe||(e.disableSwipe=!0,e.config.disableSwipeHandler.call(e))})),e.root.addEventListener("touchstart",(function(t){e.disableSwipe=!0,e.config.disableSwipeHandler.call(e)})),e.root.addEventListener("touchend",(function(t){e.disableSwipe=!1,e.config.enableSwipeHandler.call(e)}))),["touchstart","mousedown"].forEach((function(o){t.addEventListener(o,(function(o){if(!e.config.disableProgress){if(o.stopPropagation(),(0,i.event)(o),o._target===u||!e.config.allowSeekAfterEnded&&e.ended)return!0;t.focus();var s=n.getBoundingClientRect().left,p=l(e);p?(s=n.getBoundingClientRect().top,r=t.getBoundingClientRect().height):(r=t.getBoundingClientRect().width,s=n.getBoundingClientRect().left);var d=function(t){t.stopPropagation(),(0,i.event)(t),e.isProgressMoving=!0;var o=(p?t.clientY:t.clientX)-s;o>r&&(o=r);var a=o/r*e.duration;if(a<0&&(a=0),e.config.allowSeekPlayed&&Number(a).toFixed(1)>e.maxPlayedTime);else if(n.style.width=100*o/r+"%","video"!==e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var l=(0,i.findDom)(e.controls,".xgplayer-time");l&&(l.innerHTML=''+(0,i.format)(a||0)+""+(0,i.format)(e.duration)+"")}else e.currentTime=Number(a).toFixed(1);if(e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview){k.innerHTML=""+(0,i.format)(a)+" / "+(0,i.format)(e.duration||0),v=e.duration/f;var u=Math.floor(a/v);c.style.backgroundImage="url("+m[Math.ceil((u+1)/(h*x))-1]+")";var d=u+1-h*x*(Math.ceil((u+1)/(h*x))-1),E=Math.ceil(d/x)-1,w=d-E*x-1;c.style["background-position"]="-"+w*g+"px -"+E*y+"px",b.style.display="block"}e.emit("focus")},E=function o(l){if(l.stopPropagation(),(0,i.event)(l),window.removeEventListener("mousemove",d),window.removeEventListener("touchmove",d,{passive:!1}),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o),a.default.browser.indexOf("ie")<0&&t.blur(),!e.isProgressMoving||e.videoConfig&&"audio"===e.videoConfig.mediaType||e.dash||e.config.closeMoveSeek){var u=(p?l.clientY:l.clientX)-s;u>r&&(u=r);var c=u/r*e.duration;c<0&&(c=0),e.config.allowSeekPlayed&&Number(c).toFixed(1)>e.maxPlayedTime||(n.style.width=100*u/r+"%",e.currentTime=Number(c).toFixed(1))}e.config.thumbnail&&e.config.thumbnail.isShowCoverPreview&&(b.style.display="none"),e.emit("focus"),e.isProgressMoving=!1};return window.addEventListener("mousemove",d),window.addEventListener("touchmove",d,{passive:!1}),window.addEventListener("mouseup",E),window.addEventListener("touchend",E),!0}}))})),t.addEventListener("mouseenter",(function(r){if(!e.config.allowSeekAfterEnded&&e.ended)return!0;var n=l(e),o=n?t.getBoundingClientRect().top:t.getBoundingClientRect().left,a=n?t.getBoundingClientRect().height:t.getBoundingClientRect().width,s=function(r){var l=((n?r.clientY:r.clientX)-o)/a*e.duration;l=l<0?0:l,u.textContent=(0,i.format)(l);var s=u.getBoundingClientRect().width;if(e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview){v=e.duration/f;var p=Math.floor(l/v);c.style.backgroundImage="url("+m[Math.ceil((p+1)/(h*x))-1]+")";var d=p+1-h*x*(Math.ceil((p+1)/(h*x))-1),b=Math.ceil(d/x)-1,k=d-b*x-1;c.style["background-position"]="-"+k*g+"px -"+b*y+"px";var E=(n?r.clientY:r.clientX)-o-g/2;E=(E=E>0?E:0)0?w:0)>a-s?a-s:w,u.style.left=w+"px"}(0,i.hasClass)(t,"xgplayer-progress-dot-active")?u.style.display="none":u.style.display="block"},p=function(e){s(e)};t.addEventListener("mousemove",p,!1),t.addEventListener("mouseleave",(function r(n){t.removeEventListener("mousemove",p,!1),t.removeEventListener("mouseleave",r,!1),s(n),u.style.display="none",e.config.thumbnail&&!e.config.thumbnail.isShowCoverPreview&&(c.style.display="none")}),!1),s(r)}),!1);var w=function(){if(void 0===e.maxPlayedTime&&(e.maxPlayedTime=0),e.maxPlayedTime0){for(var r=t.end(t.length-1),n=0,i=t.length;n=t.start(n)&&e.currentTime<=t.end(n)){r=t.end(n);for(var o=n+1;o=2){r=t.end(o-1);break}break}s.style.width=r/e.duration*100+"%"}},S=["bufferedChange","cacheupdate","ended","timeupdate"];S.forEach((function(t){e.on(t,C)})),e.once("destroy",(function t(){e.removeAllProgressDot(),e.off("canplay",d),e.off("timeupdate",w),e.off("currentTimeChange",_),e.off("srcChange",T),e.off("loadedmetadata",E),S.forEach((function(t){e.off(t,C)})),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){var n=r(70);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:12px;right:12px;outline:none;top:-15px;z-index:35}.xgplayer-skin-default .xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative;cursor:pointer}.xgplayer-skin-default .xgplayer-progress-cache,.xgplayer-skin-default .xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-skin-default .xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-skin-default .xgplayer-progress-btn{display:none;position:absolute;left:0;top:-5px;width:13px;height:13px;border-radius:30px;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26);left:100%;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);z-index:36}.xgplayer-skin-default .xgplayer-progress-point{position:absolute}.xgplayer-skin-default .xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none;z-index:100}.xgplayer-skin-default .xgplayer-progress-dot{display:inline-block;position:absolute;height:3px;width:5px;top:0;background:#fff;border-radius:6px;z-index:16}.xgplayer-skin-default .xgplayer-progress-dot .xgplayer-progress-tip{position:absolute;bottom:200%;right:50%;-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);height:auto;line-height:30px;width:auto;background:rgba(0,0,0,.3);border-radius:6px;border:1px solid rgba(0,0,0,.8);cursor:default;white-space:nowrap;display:none}.xgplayer-skin-default .xgplayer-progress-dot-show .xgplayer-progress-tip{display:block}.xgplayer-skin-default .xgplayer-progress-thumbnail{position:absolute;-moz-box-sizing:border-box;box-sizing:border-box}.xgplayer-skin-default .xgplayer-progress-thumbnail.xgplayer-tips{margin-left:0;display:none;z-index:99}.xgplayer-skin-default .xgplayer-coverpreview{position:absolute;width:100%;height:100%;top:0;left:0;display:none}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer{position:absolute;display:block;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-thumbnail{display:block}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point{display:block;text-align:center;font-family:PingFangSC-Regular;font-size:11px;color:#ccc;padding:2px 4px}.xgplayer-skin-default .xgplayer-coverpreview .xgplayer-coverpreview-outer .xgplayer-coverpreview-point span{color:#fff}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-dot,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-dot{height:6px}.xgplayer-skin-default .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default .xgplayer-progress:hover .xgplayer-progress-btn{display:block;top:-3px}.xgplayer-skin-default.xgplayer-definition-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-playbackrate-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-texttrack-active .xgplayer-progress,.xgplayer-skin-default.xgplayer-volume-active .xgplayer-progress{z-index:15}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress-btn{display:block!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-outer{height:3px!important;margin-top:8.5px!important}.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-btn,.xgplayer-skin-default.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-btn{display:block!important;top:-5px!important}",""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(72);t.default={name:"s_time",method:function(){var e=this,t=(0,n.createDom)("xg-time",''+(e.currentTime||(0,n.format)(0))+"\n "+(e.duration||(0,n.format)(0))+"",{},"xgplayer-time");e.once("ready",(function(){e.controls&&e.controls.appendChild(t)}));var r=function(){"audio"===e.videoConfig.mediaType&&e.isProgressMoving&&e.dash||(t.innerHTML=''+(0,n.format)(e.currentTime||0)+""+(0,n.format)(e.duration)+"")};e.on("durationchange",r),e.on("timeupdate",r),e.once("destroy",(function t(){e.off("durationchange",r),e.off("timeupdate",r),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){var n=r(73);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,'.xgplayer-skin-default .xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;height:40px;text-align:center;display:inline-block;margin:auto 8px}.xgplayer-skin-default .xgplayer-time span{color:hsla(0,0%,100%,.5)}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current{color:#fff}.xgplayer-skin-default .xgplayer-time .xgplayer-time-current:after{content:"/";display:inline-block;padding:0 3px}',""])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(0),o=r(75),a=(n=o)&&n.__esModule?n:{default:n};r(76);t.default={name:"s_replay",method:function(){var e=this,t=e.root,r=e.lang.REPLAY,n=(0,i.createDom)("xg-replay",a.default+'\n '+r+"\n ",{},"xgplayer-replay");function o(){var e=n.querySelector("path");if(e){var t=window.getComputedStyle(e).getPropertyValue("transform");if("string"==typeof t&&t.indexOf("none")>-1)return;e.setAttribute("transform",t)}}e.once("ready",(function(){t.appendChild(n)})),e.on("ended",o),n.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}));var l=n.querySelector("svg");["click","touchend"].forEach((function(t){l.addEventListener(t,(function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("replayBtnClick")}))})),e.once("destroy",(function t(){e.off("ended",o),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,r){"use strict";r.r(t),t.default='\n \n\n'},function(e,t,r){var n=r(77);"string"==typeof n&&(n=[[e.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(2)(n,i);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:105;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-skin-default .xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-skin-default .xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-skin-default .xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-skin-default .xgplayer-replay svg:hover path{fill:#fff}.xgplayer-skin-default .xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}",""])},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(174)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=m(r(9)),i=m(r(56)),o=m(r(45)),a=m(r(59)),l=m(r(64)),s=m(r(37)),u=m(r(38)),c=m(r(46)),p=m(r(48)),d=m(r(68)),f=m(r(53)),g=m(r(71)),y=m(r(39)),h=m(r(40)),x=m(r(47)),v=m(r(74));function m(e){return e&&e.__esModule?e:{default:e}}[i.default,o.default,a.default,l.default,s.default,u.default,c.default,p.default,d.default,f.default,g.default,y.default,h.default,x.default,v.default].forEach((function(e){n.default.install(e.name,e.method)})),t.default=n.default,e.exports=t.default}]); //# sourceMappingURL=simple_player.js.map \ No newline at end of file diff --git a/packages/xgplayer/dist/core_player.js b/packages/xgplayer/dist/core_player.js index 5c8b11aa8..d80626998 100644 --- a/packages/xgplayer/dist/core_player.js +++ b/packages/xgplayer/dist/core_player.js @@ -1,2 +1,4033 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.xgplayer=t():e.xgplayer=t()}(this,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=175)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=a,t.hasClass=s,t.addClass=l,t.removeClass=c,t.toggleClass=u,t.findDom=f,t.padStart=d,t.format=p,t.event=h,t.typeOf=v,t.deepCopy=y,t.getBgImage=g,t.copyDom=m,t._setInterval=x,t._clearInterval=E,t.createImgBtn=b,t.isWeiXin=T,t.isUc=_,t.computeWatchDur=k,t.offInDestroy=O,t.on=S,t.once=R,t.getBuffered2=w,t.checkIsBrowser=A,t.setStyle=P,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var i,o=n(7),r=(i=o)&&i.__esModule?i:{default:i};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=t,Object.keys(n).forEach((function(t){var i=t,r=n[t];"video"===e||"audio"===e?r&&o.setAttribute(i,r):o.setAttribute(i,r)})),o}function s(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function l(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):s(e,t)||(e.className+=" "+t))}function c(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):s(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function u(e,t){e&&t.split(/\s+/g).forEach((function(t){s(e,t)?c(e,t):l(e,t)}))}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(i){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function d(e,t,n){for(var i=String(n),o=t>>0,r=Math.ceil(o/i.length),a=[],s=String(e);r--;)a.push(i);return a.join("").substring(0,o-s.length)+s}function p(e){if(window.isNaN(e))return"";var t=d(Math.floor(e/3600),2,0),n=d(Math.floor((e-3600*t)/60),2,0),i=d(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")}function h(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function v(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===v(t)&&"Object"===v(e))return Object.keys(t).forEach((function(n){"Object"!==v(t[n])||t[n]instanceof Node?"Array"===v(t[n])?e[n]="Array"===v(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function g(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function m(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function x(e,t,n,i){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),i))}function E(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function b(e,t,n,i){var o=a("xg-"+e,"",{},"xgplayer-"+e+"-img");if(o.style.backgroundImage='url("'+t+'")',n&&i){var r=void 0,s=void 0,l=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&i.indexOf(e)>-1)||(r=Number(n.slice(0,n.indexOf(e)).trim()),s=Number(i.slice(0,i.indexOf(e)).trim()),l=e,!1)})),o.style.width=""+r+l,o.style.height=""+s+l,o.style.backgroundSize=""+r+l+" "+s+l,o.style.margin="start"===e?"-"+s/2+l+" auto auto -"+r/2+l:"auto 5px auto 5px"}return o}function T(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function k(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;nt[i].end)){var a=t[i].begin,s=t[i].end;t[i].begin=Math.min(o,a),t[i].end=Math.max(r,s);break}if(i>t.length-2){t.push({begin:o,end:r});break}}for(var l=0,c=0;c1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;il&&(o[s-1].end=n[a].end):o.push(n[a])}else o.push(n[a])}else o=n;return new r.default(o)}function A(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function P(e,t,n){var i=e.style;try{i[t]=n}catch(e){i.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:a,hasClass:s,addClass:l,removeClass:c,toggleClass:u,findDom:f,padStart:d,format:p,event:h,typeOf:v,deepCopy:y,getBgImage:g,copyDom:m,setInterval:x,clearInterval:E,createImgBtn:b,isWeiXin:T,isUc:_,computeWatchDur:k,offInDestroy:O,on:S,once:R,getBuffered2:w,checkIsBrowser:A,setStyle:P}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[n].concat(r).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o=0&&f.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",m(t,e.attrs),v(e,t),t}function m(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var a=u++;n=c||(c=g(t)),i=T.bind(null,n,a,!1),o=T.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",m(t,e.attrs),v(e,t),t}(t),i=k.bind(null,n,t),o=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),i=_.bind(null,n),o=function(){y(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return p(n,t),function(e){for(var i=[],o=0;o8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},p=arguments[9],h=arguments[10];o(this,e);var v={};if(arguments.length>1)v.playerVersion=i.version,v.errorType=t,v.domain=document.domain,v.duration=a,v.currentTime=n,v.networkState=s,v.readyState=l,v.currentSrc=u,v.src=c,v.ended=f,v.errd=d,v.ex=(r[t]||{}).msg,v.errorCode=p,v.mediaError=h;else{var y=arguments[0];Object.keys(y).map((function(e){v[e]=y[e]})),v.ex=(y.type&&r[y.type]||{}).msg}return v},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={};Object.defineProperty(i,"device",{get:function(){return i.os.isPc?"pc":"mobile"}}),Object.defineProperty(i,"browser",{get:function(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(n){return t[n].test(e)})))[0]||""}}),Object.defineProperty(i,"os",{get:function(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),r=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!r;return{isTablet:r,isPhone:a,isAndroid:i,isPc:!(a||i||n||r),isSymbian:n,isWindowsPhone:t,isFireFox:o}}}),t.default=i,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nthis.video.videoWidth/this.video.videoHeight?r.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":r.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===r.config.fitVideoSize?r.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===r.config.fitVideoSize&&(r.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},r.once("loadeddata",n.getVideoSize),setTimeout((function(){n.emit("ready"),n.isReady=!0}),0),n.config.videoInit&&(0,a.hasClass)(n.root,"xgplayer-nostart")&&n.start(),r.config.rotate&&(r.on("requestFullscreen",n.updateRotateDeg),r.on("exitFullscreen",n.updateRotateDeg)),r.once("destroy",(function e(){r.root.removeEventListener("mousemove",r.mousemoveFunc),r.off("destroy",e)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"attachVideo",value:function(){var e=this;this.video&&1===this.video.nodeType&&this.root.insertBefore(this.video,this.root.firstChild),setTimeout((function(){e.emit("complete"),e.danmu&&"function"==typeof e.danmu.resize&&e.danmu.resize()}),1)}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url;if(this.video){var n=this;t&&""!==t?(this.canPlayFunc=function(){n.off("canplay",n.canPlayFunc);var e=n.video.play();void 0!==e&&e&&e.then((function(){n.emit("autoplay started")})).catch((function(){n.emit("autoplay was prevented"),(0,a.addClass)(n.root,"xgplayer-is-autoplay")}))},"Array"!==(0,a.typeOf)(t)?"String"===(0,a.typeOf)(t)&&t.indexOf("blob:")>-1&&t===this.video.src||(this.video.src=t):t.forEach((function(t){e.video.appendChild((0,a.createDom)("source","",{src:""+t.src,type:""+(t.type||"")}))})),this.config.autoplay&&(s.default.os.isPhone?this.canPlayFunc():this.on("canplay",this.canPlayFunc)),this.config.disableStartLoad||this.video.load(),this.attachVideo()):this.emit("urlNull")}}},{key:"reload",value:function(){this.video.load(),this.reloadFunc=function(){var e=this.play();void 0!==e&&e&&e.catch((function(e){}))},this.once("loadeddata",this.reloadFunc)}},{key:"destroy",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=this;for(var r in clearInterval(this.bulletResizeTimer),this._interval)clearInterval(this._interval[r]),this._interval[r]=null;function a(){if(this.emit("destroy"),this.video.removeAttribute("src"),this.video.load(),n){this.root.innerHTML="";var e=this.root.className.split(" ");e.length>0?this.root.className=e.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):this.root.className=""}for(var t in this)delete this[t];(0,u.default)(this)}this.checkTimer&&clearInterval(this.checkTimer),this.waitTimer&&clearTimeout(this.waitTimer),this.ev.forEach((function(t){var n=Object.keys(t)[0],i=e[t[n]];i&&e.off(n,i)})),this.loadeddataFunc&&this.off("loadeddata",this.loadeddataFunc),this.reloadFunc&&this.off("loadeddata",this.reloadFunc),this.replayFunc&&this.off("play",this.replayFunc),this.playFunc&&this.off("play",this.playFunc),this.getVideoSize&&this.off("loadeddata",this.getVideoSize),["focus","blur"].forEach((function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])})),this.config.keyShortcut&&"on"!==this.config.keyShortcut||["video","controls"].forEach((function(t){e[t]&&e[t].removeEventListener("keydown",(function(e){i.onKeydown(e,i)}))})),this.paused?a.call(this):(this.pause(),this.once("pause",a)),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"replay",value:function(){var e=this._replay;if((0,a.removeClass)(this.root,"xgplayer-ended"),s.default.browser.indexOf("ie")>-1&&(this.emit("play"),this.emit("playing")),e&&e instanceof Function)e();else{this.currentTime=0;var t=this.play();void 0!==t&&t&&t.catch((function(e){}))}}},{key:"userGestureTrigEvent",value:function(e,t){var n=this,i=function(e,t){n.emit(e,t)};this.config.userGestureEventMiddleware&&"function"==typeof this.config.userGestureEventMiddleware[e]?this.config.userGestureEventMiddleware[e].call(this,this,e,t,i):i.call(this,e,t)}},{key:"pluginsCall",value:function(){var e=this;t.plugins.s_i18n&&t.plugins.s_i18n.call(this,this);var n=this;if(t.plugins){var i=this.config.ignores;Object.keys(t.plugins).forEach((function(o){var r=t.plugins[o];r&&"function"==typeof r?i.some((function(e){return o===e||o==="s_"+e}))||"s_i18n"===o||(["pc","tablet","mobile"].some((function(e){return e===o}))?o===s.default.device&&setTimeout((function(){n.video&&r.call(n,n)}),0):r.call(e,e)):console.warn("plugin name",o,"is invalid")}))}}},{key:"onFocus",value:function(){var e=this;(0,a.hasClass)(this.root,"xgplayer-inactive")&&e.emit("controlShow"),(0,a.removeClass)(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout((function(){e.emit("blur")}),e.config.inactive)}},{key:"onBlur",value:function(){!this.config.enablePausedInactive&&this.paused||this.ended||this.config.closeInactive||((0,a.hasClass)(this.root,"xgplayer-inactive")||this.emit("controlHide"),(0,a.addClass)(this.root,"xgplayer-inactive"))}},{key:"onPlay",value:function(){(0,a.addClass)(this.root,"xgplayer-isloading"),(0,a.addClass)(this.root,"xgplayer-playing"),(0,a.removeClass)(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){(0,a.addClass)(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){(0,a.addClass)(this.root,"xgplayer-ended"),(0,a.removeClass)(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){this.isSeeking=!0,this.onWaiting()}},{key:"onSeeked",value:function(){var e=this;this.once("timeupdate",(function(){e.isSeeking=!1})),this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.checkTimer&&(clearInterval(e.checkTimer),e.checkTimer=null);var t=e.currentTime;e.waitTimer=setTimeout((function(){(0,a.addClass)(e.root,"xgplayer-isloading"),e.checkTimer=setInterval((function(){e.currentTime!==t&&((0,a.removeClass)(e.root,"xgplayer-isloading"),clearInterval(e.checkTimer),e.checkTimer=null)}),1e3)}),500)}},{key:"onPlaying",value:function(){this.paused||(this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),(0,a.removeClass)(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),(0,a.addClass)(this.root,"xgplayer-playing"))}}],[{key:"install",value:function(e,n){(0,a.checkIsBrowser)()&&(t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n))}},{key:"installAll",value:function(e){for(var n=0;n0&&!t.nativeTextTrack.some((function(e){return e.default}))&&(t.nativeTextTrack[0].default=!0,this.textTrackShowDefault=!1),t.nativeTextTrack.some((function(e){if(e.src&&e.label&&e.default)return i+='",!0})),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var a=document.createElement("style");this.textTrackStyle=a,document.head.appendChild(a);var s="";for(var l in t.textTrackStyle)s+=l+": "+t.textTrackStyle[l]+";";var c=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;a.sheet.insertRule?a.sheet.insertRule(c+" video::cue { "+s+" }",0):a.sheet.addRule&&a.sheet.addRule(c+" video::cue",s)}var u=t.el?t.el:(0,r.findDom)(document,"#"+t.id),f=this.constructor.XgVideoProxy;(f&&this.videoConfig.mediaType===f.mediaType?this.video=new f(u,t):this.video=(0,r.createDom)(this.videoConfig.mediaType,i,this.videoConfig,""),t.videoStyle&&Object.keys(t.videoStyle).forEach((function(e){(0,r.setStyle)(n.video,e,t.videoStyle[e])})),!this.textTrackShowDefault&&i)&&(this.video.getElementsByTagName("Track")[0].track.mode="hidden");t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","progress","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","ratechange","loadedmetadata","loadeddata","loadstart"].map((function(e){return t={},n=e,i="on"+e.charAt(0).toUpperCase()+e.slice(1),n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t;var t,n,i})),(0,o.default)(this),this._interval={};var d="0,0",p=this,h=function(e){n&&("play"===e?n.hasStart=!0:"canplay"===e?(0,r.removeClass)(n.root,"xgplayer-is-enter"):"waiting"===e?n.inWaitingStart=(new Date).getTime():"playing"===e&&((0,r.removeClass)(n.root,"xgplayer-is-enter"),n.inWaitingStart&&(n.inWaitingStart=void 0)),"error"===e?n._onError(e):n.emit(e,n),n.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(e)<0?((0,r._clearInterval)(n,"bufferedChange"),(0,r._setInterval)(n,"bufferedChange",(function(){if(this.video&&this.video.buffered){for(var e=[],t=0,n=this.video.buffered.length;t-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var i=n(32),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)o.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=o.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";var i=n(33);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(3),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[typeof e]||!1}},function(e,t,n){var i=n(35);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default{background:#000;width:100%;height:100%;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.xgplayer-skin-default *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer-skin-default.xgplayer-rotate-fullscreen{position:absolute;top:0;left:100%;bottom:0;right:0;height:100vw!important;width:100vh!important;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.xgplayer-skin-default.xgplayer-is-fullscreen{width:100%!important;height:100%!important;padding-top:0!important;z-index:9999}.xgplayer-skin-default.xgplayer-is-fullscreen.xgplayer-inactive{cursor:none}.xgplayer-skin-default video{width:100%;height:100%;outline:none}.xgplayer-skin-default .xgplayer-none{display:none}@-webkit-keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingRotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}@keyframes loadingDashOffset{0%{stroke-dashoffset:236}to{stroke-dashoffset:0}}.xgplayer-skin-default .xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));z-index:10}.xgplayer-skin-default.xgplayer-inactive .xgplayer-controls,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-progress,.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-time,.xgplayer-skin-default.xgplayer-no-controls .xgplayer-controls,.xgplayer-skin-default.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-skin-default.xgplayer-is-live .xgplayer-controls .xgplayer-live{display:block}.xgplayer-skin-default .xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer-skin-default .xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-skin-default .xgplayer-icon svg{position:absolute}.xgplayer-skin-default .xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-skin-default.xgplayer-mobile .xgplayer-tips{display:none!important}.xgplayer-skin-default .xgplayer-screen-container{display:block;width:100%}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var o,r=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(o=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"mobile",method:function(){var e=this,t=e.root,n=0,o=void 0,r={first:"",second:""};function a(t){e.video.addEventListener("touchend",(function(t){e.onElementTouchend(t,e.video)})),e.video.addEventListener("touchstart",(function(){e.isTouchMove=!1})),e.video.addEventListener("touchmove",(function(){e.isTouchMove=!0})),e.config.autoplay&&e.start()}e.onElementTouchend=function(e,a){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var s=this;if((0,i.hasClass)(t,"xgplayer-inactive")?s.emit("focus"):s.emit("blur"),!s.config.closeVideoTouch&&!s.isTouchMove){var l=function(){o=setTimeout((function(){if((0,i.hasClass)(s.root,"xgplayer-nostart"))return!1;if(!s.ended)if(s.paused){var e=s.play();void 0!==e&&e&&e.catch((function(e){}))}else s.pause();n=0}),200)};s.config.closeVideoClick||(n++,o&&clearTimeout(o),1===n?s.config.enableVideoDbltouch?r.first=new Date:l():2===n&&s.config.enableVideoDbltouch?(r.second=new Date,Math.abs(r.first-r.second)<400?l():(r.first=new Date,n=1)):n=0)}},e.once("ready",a),e.once("destroy",(function t(){e.off("ready",a),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"pc",method:function(){var e=this;if(e.controls&&e.video){var t=e.controls,n=e.root,o=0,r=void 0;e.onElementClick=function(e,t){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();var n=this;n.config.closeVideoClick||(o++,r&&clearTimeout(r),1===o?r=setTimeout((function(){if((0,i.hasClass)(n.root,"xgplayer-nostart"))return!1;if(!n.ended)if(n.paused){var e=n.play();void 0!==e&&e&&e.catch((function(e){}))}else n.pause();o=0}),200):o=0)},e.video.addEventListener("click",(function(t){e.onElementClick(t,e.video)}),!1),e.onElementDblclick=function(e,n){this.config.closeVideoPreventDefault||e.preventDefault(),this.config.closeVideoStopPropagation||e.stopPropagation();if(!this.config.closeVideoDblclick){var i=t.querySelector(".xgplayer-fullscreen");if(i){var o=void 0;document.createEvent?(o=document.createEvent("Event")).initEvent("click",!0,!0):o=new Event("click"),i.dispatchEvent(o)}}},e.video.addEventListener("dblclick",(function(t){e.onElementDblclick(t,e.video)}),!1),n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",s),t.addEventListener("mouseenter",(function(t){e.userTimer&&clearTimeout(e.userTimer)})),t.addEventListener("mouseleave",(function(t){e.config.closeControlsBlur||e.emit("focus",e)})),t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()})),e.once("ready",l),e.once("destroy",(function t(){n.removeEventListener("mouseenter",a),n.removeEventListener("mouseleave",s),e.off("ready",l),e.off("destroy",t)}))}function a(){clearTimeout(e.leavePlayerTimer),e.emit("focus",e)}function s(){e.config.closePlayerBlur||(e.leavePlayerTimer=setTimeout((function(){e.emit("blur",e)}),e.config.leavePlayerTime||0))}function l(t){e.config.autoplay&&e.start()}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);t.default={name:"start",method:function(){var e=this,t=e.root;function n(){e.off("canplay",n);var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}function o(){(0,i.hasClass)(t,"xgplayer-nostart")?((0,i.removeClass)(t,"xgplayer-nostart"),(0,i.addClass)(t,"xgplayer-is-enter"),"function"==typeof t.contains?e.video&&1===e.video.nodeType&&!t.contains(e.video)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n():e.video&&1===e.video.nodeType&&!t.querySelector(this.videoConfig.mediaType)||e.video&&1!==e.video.nodeType&&void 0===e.video.mediaSource?(e.once("canplay",n),e.start()):n()):e.paused&&((0,i.removeClass)(t,"xgplayer-nostart xgplayer-isloading"),setTimeout((function(){var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}),10))}e.on("startBtnClick",o),e.once("destroy",(function t(){e.off("startBtnClick",o),e.off("canplay",n),e.off("destroy",t)}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=a(n(41)),r=a(n(42));function a(e){return e&&e.__esModule?e:{default:e}}n(43);t.default={name:"s_start",method:function(){var e=this,t=e.root,n=(0,i.createDom)("xg-start",'
'+o.default+'
\n
'+r.default+"
",{},"xgplayer-start");function a(e){(0,i.addClass)(e.root,"xgplayer-skin-default"),e.config&&(e.config.autoplay&&!(0,i.isWeiXin)()&&!(0,i.isUc)()&&(0,i.addClass)(e.root,"xgplayer-is-enter"),e.config.lang&&"en"===e.config.lang?(0,i.addClass)(e.root,"xgplayer-lang-is-en"):"jp"===e.config.lang&&(0,i.addClass)(e.root,"xgplayer-lang-is-jp"),e.config.enableContextmenu||e.video.addEventListener("contextmenu",(function(e){e.preventDefault(),e.stopPropagation()})))}e.config&&e.config.hideStartBtn&&(0,i.addClass)(t,"xgplayer-start-hide"),e.isReady?(t.appendChild(n),a(e)):e.once("ready",(function(){t.appendChild(n),a(e)})),e.once("autoplay was prevented",(function(){(0,i.removeClass)(e.root,"xgplayer-is-enter"),(0,i.addClass)(e.root,"xgplayer-nostart")})),e.once("canplay",(function(){(0,i.removeClass)(e.root,"xgplayer-is-enter")})),n.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.userGestureTrigEvent("startBtnClick")}}},e.exports=t.default},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){"use strict";n.r(t),t.default='\n \n\n'},function(e,t,n){var i=n(44);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".xgplayer-skin-default .xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:rgba(0,0,0,.38);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:115;margin:-35px auto auto -35px;cursor:pointer}.xgplayer-skin-default .xgplayer-start div{position:absolute}.xgplayer-skin-default .xgplayer-start div svg{fill:hsla(0,0%,100%,.7)}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default .xgplayer-start:hover{opacity:.85}.xgplayer-skin-default.xgplayer-pause.xgplayer-start-hide .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start,.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-play,.xgplayer-skin-default.xgplayer-start-hide .xgplayer-start{display:none}.xgplayer-skin-default.xgplayer-playing .xgplayer-start .xgplayer-icon-pause{display:block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start{display:inline-block}.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start,.xgplayer-skin-default.xgplayer-pause .xgplayer-start .xgplayer-icon-pause{display:none}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-play{display:block}.xgplayer-skin-default.xgplayer-is-replay .xgplayer-start .xgplayer-icon-pause{display:none}",""])},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(176)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(9)),o=l(n(37)),r=l(n(38)),a=l(n(39)),s=l(n(40));function l(e){return e&&e.__esModule?e:{default:e}}[o.default,r.default,a.default,s.default].forEach((function(e){i.default.install(e.name,e.method)})),t.default=i.default,e.exports=t.default}])})); +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["xgplayer"] = factory(); + else + root["xgplayer"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 175); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.util = exports.PresentationMode = undefined; +exports.createDom = createDom; +exports.hasClass = hasClass; +exports.addClass = addClass; +exports.removeClass = removeClass; +exports.toggleClass = toggleClass; +exports.findDom = findDom; +exports.padStart = padStart; +exports.format = format; +exports.event = event; +exports.typeOf = typeOf; +exports.deepCopy = deepCopy; +exports.getBgImage = getBgImage; +exports.copyDom = copyDom; +exports._setInterval = _setInterval; +exports._clearInterval = _clearInterval; +exports.createImgBtn = createImgBtn; +exports.isWeiXin = isWeiXin; +exports.isUc = isUc; +exports.computeWatchDur = computeWatchDur; +exports.offInDestroy = offInDestroy; +exports.on = on; +exports.once = once; +exports.getBuffered2 = getBuffered2; +exports.checkIsBrowser = checkIsBrowser; +exports.setStyle = setStyle; +exports.checkWebkitSetPresentationMode = checkWebkitSetPresentationMode; + +var _xgplayerTimeRange = __webpack_require__(7); + +var _xgplayerTimeRange2 = _interopRequireDefault(_xgplayerTimeRange); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +function createDom() { + var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div'; + var tpl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var cname = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ''; + + var dom = document.createElement(el); + dom.className = cname; + dom.innerHTML = tpl; + Object.keys(attrs).forEach(function (item) { + var key = item; + var value = attrs[item]; + if (el === 'video' || el === 'audio') { + if (value) { + dom.setAttribute(key, value); + } + } else { + dom.setAttribute(key, value); + } + }); + return dom; +} + +function hasClass(el, className) { + if (!el) { + return false; + } + + if (el.classList) { + return Array.prototype.some.call(el.classList, function (item) { + return item === className; + }); + } else if (el.className) { + return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')); + } else { + return false; + } +} + +function addClass(el, className) { + if (!el) { + return; + } + + if (el.classList) { + className.replace(/(^\s+|\s+$)/g, '').split(/\s+/g).forEach(function (item) { + item && el.classList.add(item); + }); + } else if (!hasClass(el, className)) { + el.className += ' ' + className; + } +} + +function removeClass(el, className) { + if (!el) { + return; + } + + if (el.classList) { + className.split(/\s+/g).forEach(function (item) { + el.classList.remove(item); + }); + } else if (hasClass(el, className)) { + className.split(/\s+/g).forEach(function (item) { + var reg = new RegExp('(\\s|^)' + item + '(\\s|$)'); + el.className = el.className.replace(reg, ' '); + }); + } +} + +function toggleClass(el, className) { + if (!el) { + return; + } + + className.split(/\s+/g).forEach(function (item) { + if (hasClass(el, item)) { + removeClass(el, item); + } else { + addClass(el, item); + } + }); +} + +function findDom() { + var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document; + var sel = arguments[1]; + + var dom = void 0; + // fix querySelector IDs that start with a digit + // https://stackoverflow.com/questions/37270787/uncaught-syntaxerror-failed-to-execute-queryselector-on-document + try { + dom = el.querySelector(sel); + } catch (e) { + if (sel.indexOf('#') === 0) { + dom = el.getElementById(sel.slice(1)); + } + } + return dom; +} + +function padStart(str, length, pad) { + var charstr = String(pad); + var len = length >> 0; + var maxlen = Math.ceil(len / charstr.length); + var chars = []; + var r = String(str); + while (maxlen--) { + chars.push(charstr); + } + return chars.join('').substring(0, len - r.length) + r; +} + +function format(time) { + if (window.isNaN(time)) { + return ''; + } + var hour = padStart(Math.floor(time / 3600), 2, 0); + var minute = padStart(Math.floor((time - hour * 3600) / 60), 2, 0); + var second = padStart(Math.floor(time - hour * 3600 - minute * 60), 2, 0); + return (hour === '00' ? [minute, second] : [hour, minute, second]).join(':'); +} + +function event(e) { + if (e.touches) { + var touch = e.touches[0] || e.changedTouches[0]; + e.clientX = touch.clientX || 0; + e.clientY = touch.clientY || 0; + e.offsetX = touch.pageX - touch.target.offsetLeft; + e.offsetY = touch.pageY - touch.target.offsetTop; + } + e._target = e.target || e.srcElement; +} + +function typeOf(obj) { + return Object.prototype.toString.call(obj).match(/([^\s.*]+)(?=]$)/g)[0]; +} + +function deepCopy(dst, src) { + if (typeOf(src) === 'Object' && typeOf(dst) === 'Object') { + Object.keys(src).forEach(function (key) { + if (typeOf(src[key]) === 'Object' && !(src[key] instanceof Node)) { + if (!dst[key]) { + dst[key] = src[key]; + } else { + deepCopy(dst[key], src[key]); + } + } else if (typeOf(src[key]) === 'Array') { + dst[key] = typeOf(dst[key]) === 'Array' ? dst[key].concat(src[key]) : src[key]; + } else { + dst[key] = src[key]; + } + }); + return dst; + } +} +function getBgImage(el) { + // fix: return current page url when url is none + var url = (el.currentStyle || window.getComputedStyle(el, null)).backgroundImage; + if (!url || url === 'none') { + return ''; + } + var a = document.createElement('a'); + a.href = url.replace(/url\("|"\)/g, ''); + return a.href; +} + +function copyDom(dom) { + if (dom && dom.nodeType === 1) { + var back = document.createElement(dom.tagName); + Array.prototype.forEach.call(dom.attributes, function (node) { + back.setAttribute(node.name, node.value); + }); + if (dom.innerHTML) { + back.innerHTML = dom.innerHTML; + } + return back; + } else { + return ''; + } +} + +function _setInterval(context, eventName, intervalFunc, frequency) { + if (!context._interval[eventName]) { + context._interval[eventName] = setInterval(intervalFunc.bind(context), frequency); + } +} + +function _clearInterval(context, eventName) { + clearInterval(context._interval[eventName]); + context._interval[eventName] = null; +} + +function createImgBtn(name, imgUrl, width, height) { + var btn = createDom('xg-' + name, '', {}, 'xgplayer-' + name + '-img'); + btn.style.backgroundImage = 'url("' + imgUrl + '")'; + if (width && height) { + var w = void 0, + h = void 0, + unit = void 0; + ['px', 'rem', 'em', 'pt', 'dp', 'vw', 'vh', 'vm', '%'].every(function (item) { + if (width.indexOf(item) > -1 && height.indexOf(item) > -1) { + w = Number(width.slice(0, width.indexOf(item)).trim()); + h = Number(height.slice(0, height.indexOf(item)).trim()); + unit = item; + return false; + } else { + return true; + } + }); + btn.style.width = '' + w + unit; + btn.style.height = '' + h + unit; + btn.style.backgroundSize = '' + w + unit + ' ' + h + unit; + if (name === 'start') { + btn.style.margin = '-' + h / 2 + unit + ' auto auto -' + w / 2 + unit; + } else { + btn.style.margin = 'auto 5px auto 5px'; + } + } + return btn; +} + +function isWeiXin() { + var ua = window.navigator.userAgent.toLowerCase(); + return ua.indexOf('micromessenger') > -1; +} + +function isUc() { + var ua = window.navigator.userAgent.toLowerCase(); + return ua.indexOf('ucbrowser') > -1; +} + +function computeWatchDur() { + var played = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + var arr = []; + for (var i = 0; i < played.length; i++) { + if (!played[i].end || played[i].begin < 0 || played[i].end < 0 || played[i].end < played[i].begin) { + continue; + } + if (arr.length < 1) { + arr.push({ begin: played[i].begin, end: played[i].end }); + } else { + for (var j = 0; j < arr.length; j++) { + var begin = played[i].begin; + var end = played[i].end; + if (end < arr[j].begin) { + arr.splice(j, 0, { begin: begin, end: end }); + break; + } else if (begin > arr[j].end) { + if (j > arr.length - 2) { + arr.push({ begin: begin, end: end }); + break; + } + } else { + var b = arr[j].begin; + var e = arr[j].end; + arr[j].begin = Math.min(begin, b); + arr[j].end = Math.max(end, e); + break; + } + } + } + } + var watch_dur = 0; + for (var _i = 0; _i < arr.length; _i++) { + watch_dur += arr[_i].end - arr[_i].begin; + } + return watch_dur; +} + +function offInDestroy(object, event, fn, offEvent) { + function onDestroy() { + object.off(event, fn); + object.off(offEvent, onDestroy); + } + object.once(offEvent, onDestroy); +} + +function on(object, event, fn, offEvent) { + if (offEvent) { + object.on(event, fn); + offInDestroy(object, event, fn, offEvent); + } else { + var _fn = function _fn(data) { + fn(data); + object.off(event, _fn); + }; + object.on(event, _fn); + } +} + +function once(object, event, fn, offEvent) { + if (offEvent) { + object.once(event, fn); + offInDestroy(object, event, fn, offEvent); + } else { + var _fn = function _fn(data) { + fn(data); + object.off(event, _fn); + }; + object.once(event, _fn); + } +} + +function getBuffered2(vbuffered) { + var maxHoleDuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5; + //ref: hls.js + var buffered = []; + for (var i = 0; i < vbuffered.length; i++) { + buffered.push({ start: vbuffered.start(i) < 0.5 ? 0 : vbuffered.start(i), end: vbuffered.end(i) }); + } + buffered.sort(function (a, b) { + var diff = a.start - b.start; + if (diff) { + return diff; + } else { + return b.end - a.end; + } + }); + var buffered_2 = []; + if (maxHoleDuration) { + for (var _i2 = 0; _i2 < buffered.length; _i2++) { + var buf2len = buffered_2.length; + if (buf2len) { + var buf2end = buffered_2[buf2len - 1].end; + if (buffered[_i2].start - buf2end < maxHoleDuration) { + if (buffered[_i2].end > buf2end) { + buffered_2[buf2len - 1].end = buffered[_i2].end; + } + } else { + buffered_2.push(buffered[_i2]); + } + } else { + buffered_2.push(buffered[_i2]); + } + } + } else { + buffered_2 = buffered; + } + return new _xgplayerTimeRange2.default(buffered_2); +} + +function checkIsBrowser() { + return !(typeof window === 'undefined' || typeof window.document === 'undefined' || typeof window.document.createElement === 'undefined'); +} + +function setStyle(elem, name, value) { + var style = elem.style; + try { + style[name] = value; + } catch (error) { + style.setProperty(name, value); + } +} + +var PresentationMode = exports.PresentationMode = { + PIP: 'picture-in-picture', + INLINE: 'inline', + FULLSCREEN: 'fullscreen' +}; + +function checkWebkitSetPresentationMode(video) { + return typeof video.webkitSetPresentationMode === 'function'; +} + +var util = exports.util = { + createDom: createDom, hasClass: hasClass, addClass: addClass, removeClass: removeClass, toggleClass: toggleClass, findDom: findDom, padStart: padStart, format: format, event: event, typeOf: typeOf, + deepCopy: deepCopy, getBgImage: getBgImage, copyDom: copyDom, setInterval: _setInterval, clearInterval: _clearInterval, createImgBtn: createImgBtn, isWeiXin: isWeiXin, isUc: isUc, computeWatchDur: computeWatchDur, + offInDestroy: offInDestroy, on: on, once: once, getBuffered2: getBuffered2, checkIsBrowser: checkIsBrowser, setStyle: setStyle +}; + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +module.exports = function (useSourceMap) { + var list = []; + + // return the list of modules as css string + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item, useSourceMap); + if (item[2]) { + return "@media " + item[2] + "{" + content + "}"; + } else { + return content; + } + }).join(""); + }; + + // import a list of modules into the list + list.i = function (modules, mediaQuery) { + if (typeof modules === "string") modules = [[null, modules, ""]]; + var alreadyImportedModules = {}; + for (var i = 0; i < this.length; i++) { + var id = this[i][0]; + if (typeof id === "number") alreadyImportedModules[id] = true; + } + for (i = 0; i < modules.length; i++) { + var item = modules[i]; + // skip already imported module + // this implementation is not 100% perfect for weird media query combinations + // when a module is imported multiple times with different media queries. + // I hope this will never occur (Hey this way we have smaller bundles) + if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { + if (mediaQuery && !item[2]) { + item[2] = mediaQuery; + } else if (mediaQuery) { + item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; + } + list.push(item); + } + } + }; + return list; +}; + +function cssWithMappingToString(item, useSourceMap) { + var content = item[1] || ''; + var cssMapping = item[3]; + if (!cssMapping) { + return content; + } + + if (useSourceMap && typeof btoa === 'function') { + var sourceMapping = toComment(cssMapping); + var sourceURLs = cssMapping.sources.map(function (source) { + return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'; + }); + + return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); + } + + return [content].join('\n'); +} + +// Adapted from convert-source-map (MIT) +function toComment(sourceMap) { + // eslint-disable-next-line no-undef + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + + return '/*# ' + data + ' */'; +} + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var stylesInDom = {}; + +var memoize = function (fn) { + var memo; + + return function () { + if (typeof memo === "undefined") memo = fn.apply(this, arguments); + return memo; + }; +}; + +var isOldIE = memoize(function () { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + return window && document && document.all && !window.atob; +}); + +var getTarget = function (target) { + return document.querySelector(target); +}; + +var getElement = (function (fn) { + var memo = {}; + + return function(target) { + // If passing function in options, then use it for resolve "head" element. + // Useful for Shadow Root style i.e + // { + // insertInto: function () { return document.querySelector("#foo").shadowRoot } + // } + if (typeof target === 'function') { + return target(); + } + if (typeof memo[target] === "undefined") { + var styleTarget = getTarget.call(this, target); + // Special case to return head of iframe instead of iframe itself + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch(e) { + styleTarget = null; + } + } + memo[target] = styleTarget; + } + return memo[target] + }; +})(); + +var singleton = null; +var singletonCounter = 0; +var stylesInsertedAtTop = []; + +var fixUrls = __webpack_require__(36); + +module.exports = function(list, options) { + if (typeof DEBUG !== "undefined" && DEBUG) { + if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); + } + + options = options || {}; + + options.attrs = typeof options.attrs === "object" ? options.attrs : {}; + + // Force single-tag solution on IE6-9, which has a hard limit on the # of