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=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=0?c.currentTime-=10:c.currentTime=0):t&&38===t.keyCode?c.volume+.1<=1?c.volume+=.1:c.volume=1:t&&39===t.keyCode?(c.onFocus(),c.currentTime+10<=c.duration?c.currentTime+=10:c.currentTime=c.duration-1):t&&40===t.keyCode?c.volume-.1>=0?c.volume-=.1:c.volume=0:t&&32===t.keyCode&&(c.paused?c.play():c.pause())}),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,i.default),r(t,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.url,n=this.root,r=this;"String"===o.default.typeOf(t)?this.video.src=t:t.forEach(function(t){e.video.appendChild(o.default.createDom("source","",{src:""+t.src,type:""+(t.type||"")}))}),r.config.autoplay&&this.video.addEventListener("canplay",function e(){r.video.play().then(function(){}),r.video.removeEventListener("canplay",e)}),n.insertBefore(this.video,n.firstChild),r.userTimer=setTimeout(function(){r.emit("blur")},r.config.inactive),setTimeout(function(){e.emit("complete")},1)}},{key:"reload",value:function(){this.video.load(),this.once("loadeddata",function(){this.play()})}},{key:"destroy",value:function(){var e=this,t=this.root.parentNode;for(var n in this._interval)clearInterval(this._interval[n]),this._interval[n]=null;if(this.ev.forEach(function(t){var n=Object.keys(t)[0],r=e[t[n]];r&&e.off(n,r)}),["focus","blur"].forEach(function(t){e.off(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])}),this.config.keyShortcut&&"on"!==this.config.keyShortcut||(document.onkeydown=void 0),this.paused)for(var r in this.emit("destroy"),this.root.id=this.root.id+"_del",t.insertBefore(this.rootBackup,this.root),t.removeChild(this.root),this)"config"!==r&&delete this[r];else this.pause(),this.once("pause",function(){for(var n in e.emit("destroy"),e.root.id=e.root.id+"_del",t.insertBefore(e.rootBackup,e.root),t.removeChild(e.root),e)"config"!==n&&delete e[n]})}},{key:"replay",value:function(){var e=this._replay;o.default.removeClass(this.root,"xgplayer-ended"),e&&e instanceof Function?e():(this.currentTime=0,this.play())}},{key:"pluginsCall",value:function(){var e=this;if(t.plugins){var n=this.config.ignores;Object.keys(t.plugins).forEach(function(r){var i=t.plugins[r];n.some(function(e){return r===e})||(["pc","tablet","mobile"].some(function(e){return e===r})?r===s.default.device&&i.call(e,e):i.call(e,e))})}}},{key:"onFocus",value:function(){var e=this;o.default.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.paused||this.ended||o.default.addClass(this.root,"xgplayer-inactive")}},{key:"onPlay",value:function(){o.default.addClass(this.root,"xgplayer-playing"),o.default.removeClass(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){o.default.addClass(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){o.default.addClass(this.root,"xgplayer-ended"),o.default.removeClass(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){}},{key:"onSeeked",value:function(){this.waitTimer&&clearTimeout(this.waitTimer),o.default.removeClass(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.waitTimer=setTimeout(function(){o.default.addClass(e.root,"xgplayer-isloading")},500)}},{key:"onPlaying",value:function(){this.waitTimer&&clearTimeout(this.waitTimer),o.default.removeClass(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),o.default.addClass(this.root,"xgplayer-playing")}}],[{key:"install",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]=n}}]),t}();d.util=o.default,d.sniffer=s.default,d.Errors=l.default,t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(17)();e.exports=function(e){return e!==r&&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;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.from=t.from,this.to=t.to,this.easing=t.easing||function(e){return e*e},this.duration=t.duration||150,this.curPath="",this.progress=t.progress,this.state=0}return r(e,[{key:"animate",value:function(){var e=this,t=new Date,n=e.duration,r=null,i=e.path2shapes(e.from),o=e.path2shapes(e.to),a=e._preprocessing(i,o);e.state=1;!function i(){var s=new Date-t;if(s>=n||2===e.state)return r=o,e.progress(r,1),window.cancelAnimationFrame(e.tickId),void(e.state=0);var l=e.easing(s/n);r=e._lerp(a[0],a[1],l),e.progress(r,l),e.tickId=window.requestAnimationFrame(i)}()}},{key:"toSVGString",value:function(e){return e.map(function(e){return e.forEach(function(e,t){t?e.splice(0,2,"C"):(e.splice(2,0,"C"),e.unshift("M"))}),e.map(function(e){return e.join(" ")}).join("")}).join("")}},{key:"start",value:function(){this.animate()}},{key:"stop",value:function(){0!==this.state&&(this.state=2),window.cancelAnimationFrame(self.tickId),this.state=0}},{key:"reverse",value:function(){0!==this.state&&this.stop();var e=this.from;this.from=this.to,this.to=e,this.animate()}},{key:"reset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.from;0!==this.state&&this.stop(),this.from=t,this.to=e,this.animate()}}]),e}();for(var a in i.default)i.default[a]instanceof Function&&!o.prototype[a]&&(o.prototype[a]=i.default[a]);t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={createDom:function(){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,o=n[t];"video"===e||"audio"===e?o&&i.setAttribute(r,o):i.setAttribute(r,o)}),i},hasClass:function(e,t){return e.classList?Array.prototype.some.call(e.classList,function(e){return e===t}):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(t){t&&e.classList.add(t)}):r.hasClass(e,t)||(e.className+=" "+t)},removeClass:function(e,t){e.classList?t.split(/\s+/g).forEach(function(t){e.classList.remove(t)}):r.hasClass(e,t)&&t.split(/\s+/g).forEach(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})},toggleClass:function(e,t){t.split(/\s+/g).forEach(function(t){r.hasClass(e,t)?r.removeClass(e,t):r.addClass(e,t)})},findDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1];return e.querySelector(t)},padStart:function(e,t,n){for(var r=String(n),i=t>>0,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},format:function(e){if(window.isNaN(e))return"";var t=r.padStart(Math.floor(e/3600),2,0),n=r.padStart(Math.floor((e-3600*t)/60),2,0),i=r.padStart(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},event:function(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},typeOf:function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},deepCopy:function(e,t){if("Object"===r.typeOf(t)&&"Object"===r.typeOf(e))return Object.keys(t).forEach(function(n){"Object"!==r.typeOf(t[n])||t[n]instanceof Node?"Array"===r.typeOf(t[n])?e[n]="Array"===r.typeOf(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?r.deepCopy(e[n],t[n]):e[n]=t[n]}),e},getBgImage:function(e){var t=document.createElement("a"),n=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;return t.href=n.replace(/url\("|"\)/g,""),t.href},copyDom:function(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)}),t}return""},setInterval:function(e,t,n,r){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),r))},clearInterval:function(e,t){clearInterval(e._interval[t]),e._interval[t]=null}};t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);var i={network:{code:1,msg:"视频下载错误",remark:"只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},mse:{code:2,msg:"流追加错误",remark:"追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},parse:{code:3,msg:"解析错误",remark:"mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},format:{code:4,msg:"格式错误",remark:"如果浏览器不支持的格式导致播放错误"},decoder:{code:5,msg:"解码错误",remark:"浏览器解码异常会抛出此类型错误"},runtime:{code:6,msg:"语法错误",remark:"播放器语法错误"},timeout:{code:7,msg:"播放超时",remark:"播放过程中无法正常请求下一个分段导致播放中断"},other:{code:8,msg:"其他错误",remark:"不可知的错误或被忽略的错误类型"}};t.default=function e(t,n,o,a,s,l,u,c){var p=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var d={};return d.playerVersion=r.version,d.errorType=t,d.domain=document.domain,d.duration=o,d.currentTime=n,d.networkState=a,d.readyState=s,d.currentSrc=u,d.src=l,d.ended=c,d.errd=p,d.ex=(i[t]||{}).msg,d},e.exports=t.default},function(e){e.exports={name:"xgplayer",version:"1.1.3",description:"video player",main:"./dist/index.js",scripts:{prepare:"npm run build",build:"webpack --progress --display-chunks -p",watch:"webpack --progress --display-chunks -p --watch",test:"karma start --single-run","test:watch":"karma start"},keywords:["video","player"],babel:{presets:["es2015"],plugins:["add-module-exports","babel-plugin-bulk-import"]},repository:{type:"git",url:"git+https://github.com/bytedance/xgplayer.git"},author:"yinguohui@bytedance.com",license:"MIT",dependencies:{"babel-plugin-add-module-exports":"^0.2.1",deepmerge:"^1.5.0",draggabilly:"^2.2.0","event-emitter":"^0.3.5",pasition:"^1.0.1","request-frame":"^1.5.3"},browserslist:["> 5%","IE 9","iOS 7","Firefox > 20"],devDependencies:{autoprefixer:"^9.1.5","babel-loader":"^7.1.4","babel-plugin-bulk-import":"^1.0.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-es2015":"^6.24.1",chai:"^4.1.2","core-js":"^2.5.4","css-loader":"^0.28.11","json-loader":"^0.5.7",karma:"^3.0.0","karma-chrome-launcher":"^2.2.0","karma-mocha":"^1.3.0","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.32","karma-webpack":"^4.0.0-rc.1",mocha:"^5.2.0","node-sass":"^4.8.3","postcss-cssnext":"^3.1.0","postcss-loader":"^2.1.5","sass-loader":"^6.0.7","style-loader":"^0.20.3",sugarss:"^1.0.1",webpack:"^4.11.0","webpack-cli":"^3.0.2",zlib:"^1.0.5"}}},function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=E(n(0)),i=E(n(27)),o=E(n(30)),a=E(n(31)),s=E(n(32)),l=E(n(33)),u=E(n(34)),c=E(n(35)),p=E(n(36)),d=E(n(37)),f=E(n(43)),h=E(n(44)),g=E(n(45)),y=E(n(48)),v=E(n(49)),m=E(n(50)),x=E(n(51)),b=E(n(52)),w=E(n(53)),k=E(n(54));function E(e){return e&&e.__esModule?e:{default:e}}n(55);var C={};function _(e,t,n){var r=e;t.map(function(e,i){r[e]=i==t.length-1?n:r[e]||{},r=r[e]})}_(C,["control","definition"],k.default),_(C,["control","error"],w.default),_(C,["control","flex"],b.default),_(C,["control","fullscreen"],x.default),_(C,["control","i18n"],m.default),_(C,["control","loading"],v.default),_(C,["control","localPreview"],y.default),_(C,["control","makeBullet"],g.default),_(C,["control","mobile"],h.default),_(C,["control","pc"],f.default),_(C,["control","pip"],d.default),_(C,["control","play"],p.default),_(C,["control","playbackRate"],c.default),_(C,["control","poster"],u.default),_(C,["control","progress"],l.default),_(C,["control","replay"],s.default),_(C,["control","textTrack"],a.default),_(C,["control","time"],o.default),_(C,["control","volume"],i.default),t.default=r.default,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;n-1||navigator.userAgent.indexOf("Firefox")>-1)&&(t.textTrack.some(function(e){if(e.src&&e.label&&e.default)return r+='",!0}),this.videoConfig.crossorigin="anonymous"),t.textTrackStyle){var s=document.createElement("style");document.head.appendChild(s);var l="";for(var u in t.textTrackStyle)l+=u+": "+t.textTrackStyle[u]+";";var c=t.id?"#"+t.id:t.el.id?"#"+t.el.id:"."+t.el.className;s.sheet.insertRule?s.sheet.insertRule(c+" video::cue { "+l+" }",0):s.sheet.addRule&&s.sheet.addRule(c+" video::cue",l)}this.video=o.default.createDom(this.videoConfig.mediaType,r,this.videoConfig,""),t.autoplay&&(this.video.autoplay=!0,t.autoplayMuted&&(this.video.muted=!0)),this.ev=["play","playing","pause","ended","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata"].map(function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,"on"+e.charAt(0).toUpperCase()+e.slice(1))}),(0,i.default)(this),this._interval={};var p="0,0";this.ev.forEach(function(e){var t=n,r=Object.keys(e)[0];t.video.addEventListener(r,function(){"play"===r&&(t.hasStart=!0),"error"===r?t.video.error&&t.emit(r,new a.default("other",t.currentTime,t.duration,t.networkState,t.readyState,t.currentSrc,t.src,t.ended,{line:41,msg:t.error,handle:"Constructor"})):t.emit(r,t),t.hasOwnProperty("_interval")&&(["ended","error","timeupdate"].indexOf(r)<0?o.default.setInterval(t,"bufferedChange",function(){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";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return r(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,i=n.indexedDB.open(n.myDB.name,r);i.onerror=function(e){},i.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},i.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction;t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=void 0,i=0;i\n \n \n \n \n \n \n \n \n \n ',{},"xgplayer-volume");e.controls.appendChild(u);var c=void 0,p=u.querySelector(".xgplayer-slider"),d=u.querySelector(".xgplayer-bar"),f=u.querySelector(".xgplayer-drag"),h=u.querySelector(".xgplayer-icon");f.style.height=100*e.config.volume+"%";var g=u.querySelectorAll("path")[1],y=new i.default({progress:function(e,t){var n=y.toSVGString(e);g.setAttribute("d",n),s=n},from:s,to:o.large}),v=null;p.volume=e.config.volume,["touchend","mousedown"].forEach(function(n){d.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),e.video.muted=!1,p.focus(),t.event(n),c=d.getBoundingClientRect().height,n.clientX;var r=n.clientY,i=f.getBoundingClientRect().height,o=!1,a=function(n){n.preventDefault(),n.stopPropagation(),t.event(n),o=!0;var a=i-n.clientY+r,s=a/c;f.style.height=a+"px",e.volume=Math.max(Math.min(s,1),.01)},s=function n(r){if(r.preventDefault(),r.stopPropagation(),t.event(r),window.removeEventListener("mousemove",a),window.removeEventListener("touchmove",a),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),v||(v=d.getBoundingClientRect()),!o){var i=v.height-(r.clientY-v.top),s=i/v.height;f.style.height=i+"px",s<=0&&(e.volume>0?f.volume=e.video.volume:s=f.volume),e.volume=Math.max(Math.min(s,1),.01)}p.volume=e.volume,o=!1};return window.addEventListener("mousemove",a),window.addEventListener("touchmove",a),window.addEventListener("mouseup",s),window.addEventListener("touchend",s),!1})}),["touchend","mousedown"].forEach(function(n){h.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),e.video.muted=!1,t.hasClass(p,"xgplayer-none")?(t.removeClass(p,"xgplayer-none"),p.focus()):0===e.volume?e.volume=p.volume:e.volume=0})}),p.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.addClass(p,"xgplayer-none")});var m=null;e.on("volumechange",function(){m&&clearTimeout(m),m=setTimeout(function(){y.reset(o[a(e.volume)],s),s=o[a[e.volume]],c||(c=d.getBoundingClientRect().height||76),f.style.height=e.volume*c+"px"},50)}),e.once("canplay",function(){e.config.autoplay&&e.config.autoplayMuted?e.volume=0:e.volume=e.config.volume}),e.once("destroy",function(){u=null,f=null})}})},function(e,t,n){"use strict";var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"===o(t)&&void 0!==e?e.exports=s():void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}(0,function(){var e=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t=2*Math.PI,n=function(e,t,n,r,i,o,a){var s=e.x,l=e.y;return{x:r*(s*=t)-i*(l*=n)+o,y:i*s+r*l+a}},r=function(e,t){var n=4/3*Math.tan(t/4),r=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),a=Math.sin(e+t);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},i=function(e,t,n,r){var i=e*r-t*n<0?-1:1,o=(e*n+t*r)/(Math.sqrt(e*e+t*t)*Math.sqrt(e*e+t*t));return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},o=function(o){var a=o.px,s=o.py,l=o.cx,u=o.cy,c=o.rx,p=o.ry,d=o.xAxisRotation,f=void 0===d?0:d,h=o.largeArcFlag,g=void 0===h?0:h,y=o.sweepFlag,v=void 0===y?0:y,m=[];if(0===c||0===p)return[];var x=Math.sin(f*t/360),b=Math.cos(f*t/360),w=b*(a-l)/2+x*(s-u)/2,k=-x*(a-l)/2+b*(s-u)/2;if(0===w&&0===k)return[];c=Math.abs(c),p=Math.abs(p);var E=Math.pow(w,2)/Math.pow(c,2)+Math.pow(k,2)/Math.pow(p,2);E>1&&(c*=Math.sqrt(E),p*=Math.sqrt(E));var C=function(e,n,r,o,a,s,l,u,c,p,d,f){var h=Math.pow(a,2),g=Math.pow(s,2),y=Math.pow(d,2),v=Math.pow(f,2),m=h*g-h*v-g*y;m<0&&(m=0),m/=h*v+g*y;var x=(m=Math.sqrt(m)*(l===u?-1:1))*a/s*f,b=m*-s/a*d,w=p*x-c*b+(e+r)/2,k=c*x+p*b+(n+o)/2,E=(d-x)/a,C=(f-b)/s,_=(-d-x)/a,T=(-f-b)/s,S=i(1,0,E,C),M=i(E,C,_,T);return 0===u&&M>0&&(M-=t),1===u&&M<0&&(M+=t),[w,k,S,M]}(a,s,l,u,c,p,g,v,x,b,w,k),_=e(C,4),T=_[0],S=_[1],M=_[2],L=_[3],D=Math.max(Math.ceil(Math.abs(L)/(t/4)),1);L/=D;for(var O=0;Oe-1&&(o-=e),r[o]=i}t.push(r)}return t})(e.length).forEach(function(r){var i=0,o=0;r.forEach(function(n){i+=function(e,t){var n=e[0],r=e[2],i=e[4],o=e[6],a=e[1],s=e[3],l=e[5],u=e[7],c=t[0],p=t[2],d=t[4],f=t[6],h=t[1],g=t[3],y=t[5],v=t[7];return Math.sqrt(Math.pow(c-n,2)+Math.pow(h-a,2))+Math.sqrt(Math.pow(p-r,2)+Math.pow(g-s,2))+Math.sqrt(Math.pow(d-i,2)+Math.pow(y-l,2))+Math.sqrt(Math.pow(f-o,2)+Math.pow(v-u,2))}(e[n],t[o++])}),n.push({index:r,distance:i})}),n.sort(function(e,t){return e.distance-t.distance});var r=[];return n[0].index.forEach(function(t){r.push(e[t])}),r}function p(e,t){var n=[];(function(e){for(var t=[],n=0;n2&&(t.push([n].concat(r.splice(0,2))),i="l",n="m"==n?"l":"L");;){if(r.length==a[i])return r.unshift(n),t.push(r);if(r.lengthi-1&&(r-=i)},d._splitCurves=function(e,t){for(var n=0,r=0;n=e.length-1&&(r=0)}},d._upShapes=function(e,t){for(var n=function(t){var n=[];e[e.length-1].forEach(function(e){n.push(e.slice(0))}),e.push(n)},r=0;rr?d._subShapes(i,o,n-r):nr?n=p)return a(c=n,1),o(c),void cancelAnimationFrame(u);var s=l(t/p);c=d._lerp(r[0],r[1],s),a(c,s),u=requestAnimationFrame(e)}()},d})},function(e,t,n){"use strict";!function(){for(var e=0,t=["webkit","moz"],n=0;n"+(e.currentTime||n(0))+""+(e.duration||n(0))+"",{},"xgplayer-time");e.controls.appendChild(i);var o=function(){"audio"===e.videoConfig.mediaType&&e.isProgressMoving&&e.dash||(i.innerHTML=""+n(e.currentTime||0)+""+n(e.duration))};e.on("durationchange",o),e.on("timeupdate",o),e.once("destroy",function(){e.off("durationchange",o),e.off("timeupdate",o),i=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("textTrack",function(){if(-1!==navigator.userAgent.indexOf("Chrome")){var e=this,t=r.default.util,n=(r.default.sniffer,t.createDom("xg-textTrack","",{tabindex:7},"xgplayer-textTrack")),i=e.controls,o=e.config.textTrack;o&&Array.isArray(o)&&o.length>1&&(t.addClass(e.root,"xgplayer-is-textTrack"),e.on("canplay",function(){var t=["
    "];t.push("
  • 关闭
  • "),o.forEach(function(e){t.push("
  • "+e.label+"
  • ")});var r=e.config.lang&&"zh-cn"===e.config.lang?"字幕":"Caption";t.push('

'+r+"

");var a=i.querySelector(".xgplayer-textTrack");a?a.innerHTML=t.join(""):(n.innerHTML=t.join(""),i.appendChild(n))})),["touchstart","click"].forEach(function(r){n.addEventListener(r,function(r){r.preventDefault(),r.stopPropagation();var i=r.target||r.srcElement;if(i&&"li"===i.tagName.toLocaleLowerCase()){Array.prototype.forEach.call(i.parentNode.childNodes,function(e){t.removeClass(e,"textTrack")}),t.addClass(i,"textTrack");var a=e.root.getElementsByTagName("Track");"关闭"===i.innerHTML?(a[0].track.mode="hidden",t.removeClass(e.root,"xgplayer-is-textTrack")):(t.hasClass(e.root,"xgplayer-is-textTrack")||t.addClass(e.root,"xgplayer-is-textTrack"),a[0].track.mode="showing",o.some(function(e){if(e.label===i.innerHTML)return a[0].src=e.src,e.kind&&(a[0].kind=e.kind),a[0].label=e.label,e.srclang&&(a[0].srclang=e.srclang),!0}),e.emit("textTrackChange",i.innerHTML))}else!i||"p"!==i.tagName.toLocaleLowerCase()&&"em"!==i.tagName.toLocaleLowerCase()||(t.addClass(n,"xgplayer-textTrack-active"),n.focus())},!1)}),n.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.removeClass(n,"xgplayer-textTrack-active")}),e.once("destroy",function(){n=null})}})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("replay",function(){var e=this,t=r.default.util,n=e.config.centerBtn?e.config.centerBtn:{},i=void 0,o=void 0,a=void 0,s=void 0;if("img"===n.type){if(o=t.createDom("xg-replay",'
',{},"xgplayer-replay"),(a=o.querySelector(".xgplayer-replay-img")).style.backgroundImage='url("'+n.url.replay+'")',n.width&&n.height){var l=void 0,u=void 0,c=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every(function(e){return!(n.width.indexOf(e)>-1&&n.height.indexOf(e)>-1&&(l=parseFloat(n.width.slice(0,n.width.indexOf(e)).trim()),u=parseFloat(n.height.slice(0,n.height.indexOf(e)).trim()),c=e,1))}),a.style.width=""+l+c,a.style.height=""+u+c,a.style.backgroundSize=""+l+c+" "+u+c,a.style.margin="-"+u/2+c+" auto auto -"+l/2+c}}else i={replay:n.replayPath?n.replayPath:"M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"},o=t.createDom("xg-replay",'\n \n \n \n 重播\n ',{},"xgplayer-replay"),s=o.querySelector(".xgplayer-replay-svg");var p=e.root;p.appendChild(o),e.on("ended",function(){if("img"===n.type)a.style.backgroundImage='url("'+n.url.replay+'")';else{o.querySelector(".xgplayer-replay-txt").textContent=e.lang.REPLAY;var r=o.querySelector("path"),i=window.getComputedStyle(r).getPropertyValue("transform");"none"!==i&&r.setAttribute("transform",i)}e.config.loop||t.addClass(p,"replay")}),(s||a).addEventListener("click",function(n){n.preventDefault(),t.removeClass(p,"replay"),e.replay()}),e.once("destroy",function(){s=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));var i;i=function(){var e=this,t=r.default.util,n=t.createDom("xg-progress",'',{tabindex:1},"xgplayer-progress"),i=e.controls,o=void 0;i.appendChild(n);var a=n.querySelector(".xgplayer-progress-played"),s=n.querySelector(".xgplayer-progress-cache"),l=n.querySelector(".xgplayer-progress-point"),u=n.querySelector(".xgplayer-progress-thumbnail"),c=0,p=0,d=0,f=0,h=0,g=0,y=[];e.config.thumbnail&&(c=e.config.thumbnail.pic_num,p=e.config.thumbnail.width,d=e.config.thumbnail.height,f=e.config.thumbnail.col,h=e.config.thumbnail.row,y=e.config.thumbnail.urls,u.style.width=p+"px",u.style.height=d+"px"),["touchstart","mousedown"].forEach(function(r){n.addEventListener(r,function(r){if(r.preventDefault(),r.stopPropagation(),t.event(r),r._target===l||e.ended)return!1;n.focus(),o=n.getBoundingClientRect().width;var s=a.getBoundingClientRect().left,u=function(n){n.preventDefault(),n.stopPropagation(),t.event(n),e.isProgressMoving=!0;var r=n.clientX-s>o?o:n.clientX-s,l=r/o*e.duration;if(a.style.width=100*r/o+"%","video"!==e.videoConfig.mediaType||e.dash){var u=t.findDom(i,".xgplayer-time");u&&(u.innerHTML=""+t.format(l||0)+""+t.format(e.duration))}else e.currentTime=Number(l).toFixed(1)},c=function r(i){if(i.preventDefault(),i.stopPropagation(),t.event(i),window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r),n.blur(),!e.isProgressMoving||"audio"===e.videoConfig.mediaType||e.dash){var l=i.clientX-s,c=l/o*e.duration;a.style.width=100*l/o+"%",e.currentTime=Number(c).toFixed(1)}e.isProgressMoving=!1};return window.addEventListener("mousemove",u),window.addEventListener("touchmove",u),window.addEventListener("mouseup",c),window.addEventListener("touchend",c),!1})}),n.addEventListener("mouseenter",function(r){if(e.ended)return!1;var i=n.getBoundingClientRect().left,o=n.getBoundingClientRect().width,a=function(n){var r=(n.clientX-i)/o*e.duration;l.textContent=t.format(r);var a=l.getBoundingClientRect().width;if(e.config.thumbnail){g=e.duration/c;var s=Math.floor(r/g);u.style.backgroundImage="url("+y[Math.ceil((s+1)/(f*h))-1]+")";var v=s+1-f*h*(Math.ceil((s+1)/(f*h))-1),m=Math.ceil(v/h)-1,x=v-m*h-1;u.style["background-position"]="-"+x*p+"px -"+m*d+"px";var b=n.clientX-i-p/2;b=(b=b>0?b:0)0?w:0)>o-a?o-a:w,l.style.left=w+"px"}l.style.display="block"},s=function(e){a(e)};n.addEventListener("mousemove",s,!1),n.addEventListener("mouseleave",function e(t){n.removeEventListener("mousemove",s,!1),n.removeEventListener("mouseleave",e,!1),a(t),l.style.display="none",u.style.display="none"},!1),a(r)},!1);var v=function(){!o&&n&&(o=n.getBoundingClientRect().width),"audio"===e.videoConfig.mediaType&&e.isProgressMoving&&e.dash||(a.style.width=100*e.currentTime/e.duration+"%")};e.on("timeupdate",v);var m=function(){var t=e.buffered;if(t&&t.length>0){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 o=r+1;o=2){n=t.end(o-1);break}break}s.style.width=n/e.duration*100+"%"}},x=["bufferedChange","cacheupdate","ended","timeupdate"];x.forEach(function(t){e.on(t,m)}),e.once("destroy",function(){x.forEach(function(t){e.off(t,m)}),e.off("timeupdate",v),n=null,a=null,l=null,u=null,s=null})},r.default.install("progress",i)},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("poster",function(){var e=r.default.util.createDom("xg-poster","",{},"xgplayer-poster"),t=this.root;this.config.poster&&(e.style.backgroundImage="url("+this.config.poster+")",t.appendChild(e)),this.on("play",function(){e.style.display="none"}),this.once("destroy",function(){e=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("playbackRate",function(){var e=this,t=r.default.util,n=0,i=[];if(!e.config.playbackRate)return!1;e.config.playbackRate.sort(function(e,t){return e-t}),e.config.playbackRate.forEach(function(e,t){1!==e&&"1"!==e||(n=t),i.push(e+"x")});var o=e.config.lang&&"zh-cn"===e.config.lang?"倍速":"Speed",a=t.createDom("xg-playback","

1x

",{},"xgplayer-playback"),s=e.controls,l=t.createDom("xg-tips",o,{},"xgplayer-tips");a.appendChild(l),s.appendChild(a),["touchstart","click"].forEach(function(t){a.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation();var r=t.target||t.srcElement;!r||"p"!==r.tagName.toLocaleLowerCase()&&"span"!==r.tagName.toLocaleLowerCase()||(n=n+1===i.length?0:n+1,a.querySelector("p").innerHTML=""+i[n]+"",e.video.playbackRate=1*i[n].replace(/x$/g,""))},!1)}),a.addEventListener("mouseenter",function(t){t.preventDefault(),t.stopPropagation(),l.style.left="50%";var n=l.getBoundingClientRect(),r=e.root.getBoundingClientRect();n.right>r.right&&(l.style.left=-n.right+r.right+16+"px")}),e.once("destroy",function(){a=null})})},function(e,t,n){"use strict";var r=o(n(0)),i=o(n(2));function o(e){return e&&e.__esModule?e:{default:e}}r.default.install("play",function(){var e=this,t=e.controls,n=r.default.util,o=e.config.iconScale||.0320625,a="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",s="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",l=n.createDom("xg-play",'\n \n '),u=e.config.lang&&"zh-cn"===e.config.lang?"播放":"Play",c=e.config.lang&&"zh-cn"===e.config.lang?"暂停":"Pause",p=n.createDom("xg-tips",u,{},"xgplayer-tips"),d=l.querySelector("path");l.appendChild(p);var f=new i.default({progress:function(e,t){d.setAttribute("d",f.toSVGString(e))},from:s,to:a,duration:50});l.className="xgplayer-play",t.appendChild(l),["click","touchstart"].forEach(function(t){l.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation(),e.ended||(e.paused?e.play():e.pause())},!1)}),e.on("play",function(){p.textContent=c,f.to!==s&&f.reset(s,a)}),e.on("pause",function(){p.textContent=u,f.to!==a&&f.reset(a,s)}),e.once("destroy",function(){l=null})})},function(e,t,n){"use strict";var r=o(n(0)),i=o(n(38));function o(e){return e&&e.__esModule?e:{default:e}}r.default.install("pip",function(){var e=this,t=r.default.util;if(e.config.pip){var n=t.createDom("xg-pip",'

画中画

',{tabindex:9},"xgplayer-pip"),o=t.createDom("xg-pip-lay","
",{},"xgplayer-pip-lay"),a=t.createDom("xg-pip-drag",'
点击按住可拖动视频
',{tabindex:9},"xgplayer-pip-drag"),s=e.controls,l=e.root;s.appendChild(n),l.appendChild(a),l.appendChild(o),new i.default(".xgplayer",{handle:".drag-handle"});var u=function(n){t.removeClass(n,"xgplayer-pip-active"),e.config.fluid&&(e.root.style["padding-top"]=100*e.config.height/e.config.width+"%")};["click","touchstart"].forEach(function(r){n.addEventListener(r,function(n){n.preventDefault(),n.stopPropagation(),t.hasClass(l,"xgplayer-pip-active")?u(l):function(n){var r=e.root.getBoundingClientRect(),i=r.top,a=r.left;t.addClass(n,"xgplayer-pip-active"),e.root.style.right=0,e.root.style.bottom="200px",e.root.style.top="",e.root.style.left="",e.config.fluid&&(e.root.style["padding-top"]=""),["click","touchstart"].forEach(function(t){o.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation(),u(l),e.root.style.top=i+"px",e.root.style.left=a+"px"})})}(l)})})}})},function(e,t,n){"use strict";var r,i;"function"==typeof Symbol&&Symbol.iterator; /*! * Draggabilly v2.2.0 * Make that shiz draggable * https://draggabilly.desandro.com * MIT license */ !function(o,a){r=[n(39),n(40)],void 0===(i=function(e,t){return function(e,t,n){function r(e,t){for(var n in t)e[n]=t[n];return e}var i=e.jQuery;function o(e,t){this.element="string"==typeof e?document.querySelector(e):e,i&&(this.$element=i(this.element)),this.options=r({},this.constructor.defaults),this.option(t),this._create()}var a=o.prototype=Object.create(n.prototype);o.defaults={},a.option=function(e){r(this.options,e)};var s={relative:!0,absolute:!0,fixed:!0};function l(e,t,n){return n=n||"round",t?Math[n](e/t)*t:e}a._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=r({},this.position);var e=getComputedStyle(this.element);s[e.position]||(this.element.style.position="relative"),this.on("pointerDown",this.onPointerDown),this.on("pointerMove",this.onPointerMove),this.on("pointerUp",this.onPointerUp),this.enable(),this.setHandles()},a.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},a.dispatchEvent=function(e,t,n){var r=[t].concat(n);this.emitEvent(e,r),this.dispatchJQueryEvent(e,t,n)},a.dispatchJQueryEvent=function(t,n,r){var i=e.jQuery;if(i&&this.$element){var o=i.Event(n);o.type=t,this.$element.trigger(o,r)}},a._getPosition=function(){var e=getComputedStyle(this.element),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=isNaN(t)?0:t,this.position.y=isNaN(n)?0:n,this._addTransformPosition(e)},a._getPositionCoord=function(e,n){if(-1!=e.indexOf("%")){var r=t(this.element.parentNode);return r?parseFloat(e)/100*r[n]:0}return parseInt(e,10)},a._addTransformPosition=function(e){var t=e.transform;if(0===t.indexOf("matrix")){var n=t.split(","),r=0===t.indexOf("matrix3d")?12:4,i=parseInt(n[r],10),o=parseInt(n[r+1],10);this.position.x+=i,this.position.y+=o}},a.onPointerDown=function(e,t){this.element.classList.add("is-pointer-down"),this.dispatchJQueryEvent("pointerDown",e,[t])},a.dragStart=function(e,t){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",e,[t]),this.animate())},a.measureContainment=function(){var e=this.getContainer();if(e){var n=t(this.element),r=t(e),i=this.element.getBoundingClientRect(),o=e.getBoundingClientRect(),a=r.borderLeftWidth+r.borderRightWidth,s=r.borderTopWidth+r.borderBottomWidth,l=this.relativeStartPosition={x:i.left-(o.left+r.borderLeftWidth),y:i.top-(o.top+r.borderTopWidth)};this.containSize={width:r.width-a-l.x-n.width,height:r.height-s-l.y-n.height}}},a.getContainer=function(){var e=this.options.containment;if(e)return e instanceof HTMLElement?e:"string"==typeof e?document.querySelector(e):this.element.parentNode},a.onPointerMove=function(e,t,n){this.dispatchJQueryEvent("pointerMove",e,[t,n])},a.dragMove=function(e,t,n){if(this.isEnabled){var r=n.x,i=n.y,o=this.options.grid,a=o&&o[0],s=o&&o[1];r=l(r,a),i=l(i,s),r=this.containDrag("x",r,a),i=this.containDrag("y",i,s),r="y"==this.options.axis?0:r,i="x"==this.options.axis?0:i,this.position.x=this.startPosition.x+r,this.position.y=this.startPosition.y+i,this.dragPoint.x=r,this.dragPoint.y=i,this.dispatchEvent("dragMove",e,[t,n])}},a.containDrag=function(e,t,n){if(!this.options.containment)return t;var r="x"==e?"width":"height",i=l(-this.relativeStartPosition[e],n,"ceil"),o=this.containSize[r];return o=l(o,n,"floor"),Math.max(i,Math.min(o,t))},a.onPointerUp=function(e,t){this.element.classList.remove("is-pointer-down"),this.dispatchJQueryEvent("pointerUp",e,[t])},a.dragEnd=function(e,t){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"),this.dispatchEvent("dragEnd",e,[t]))},a.animate=function(){if(this.isDragging){this.positionDrag();var e=this;requestAnimationFrame(function(){e.animate()})}},a.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},a.positionDrag=function(){this.element.style.transform="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"},a.staticClick=function(e,t){this.dispatchEvent("staticClick",e,[t])},a.setPosition=function(e,t){this.position.x=e,this.position.y=t,this.setLeftTop()},a.enable=function(){this.isEnabled=!0},a.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},a.destroy=function(){this.disable(),this.element.style.transform="",this.element.style.left="",this.element.style.top="",this.element.style.position="",this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},a._init=function(){},i&&i.bridget&&i.bridget("draggabilly",o);return o}(o,e,t)}.apply(t,r))||(e.exports=i)}(window)},function(e,t,n){"use strict";var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};window,void 0===(i="function"==typeof(r=function(){function e(e){var t=parseFloat(e),n=-1==e.indexOf("%")&&!isNaN(t);return n&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=n.length;function i(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),n}var a,s=!1;function l(t){if(function(){if(!s){s=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var r=i(t);a=200==Math.round(e(r.width)),l.isBoxSizeOuter=a,n.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==(void 0===t?"undefined":o(t))&&t.nodeType){var u=i(t);if("none"==u.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t3||Math.abs(e.y)>3},r.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t]),this._dragPointerUp(e,t)},r._dragPointerUp=function(e,t){this.isDragging?this._dragEnd(e,t):this._staticClick(e,t)},r._dragStart=function(e,t){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(e,t)},r.dragStart=function(e,t){this.emitEvent("dragStart",[e,t])},r._dragMove=function(e,t,n){this.isDragging&&this.dragMove(e,t,n)},r.dragMove=function(e,t,n){e.preventDefault(),this.emitEvent("dragMove",[e,t,n])},r._dragEnd=function(e,t){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(e,t)},r.dragEnd=function(e,t){this.emitEvent("dragEnd",[e,t])},r.onclick=function(e){this.isPreventingClicks&&e.preventDefault()},r._staticClick=function(e,t){this.isIgnoringMouseUp&&"mouseup"==e.type||(this.staticClick(e,t),"mouseup"!=e.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},r.staticClick=function(e,t){this.emitEvent("staticClick",[e,t])},n.getPointerPoint=t.getPointerPoint,n}(o,e)}.apply(t,r))||(e.exports=i)}(window)},function(e,t,n){"use strict";var r,i;"function"==typeof Symbol&&Symbol.iterator; /*! * Unipointer v2.3.0 * base class for doing one thing with pointer event * MIT license */ !function(o,a){r=[n(42)],void 0===(i=function(e){return function(e,t){function n(){}var r=n.prototype=Object.create(t.prototype);r.bindStartEvent=function(e){this._bindStartEvent(e,!0)},r.unbindStartEvent=function(e){this._bindStartEvent(e,!1)},r._bindStartEvent=function(t,n){var r=(n=void 0===n||n)?"addEventListener":"removeEventListener",i="mousedown";e.PointerEvent?i="pointerdown":"ontouchstart"in e&&(i="touchstart"),t[r](i,this)},r.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.getTouch=function(e){for(var t=0;t-1&&s.height.indexOf(e)>-1&&(p=parseFloat(s.width.slice(0,s.width.indexOf(e)).trim()),d=parseFloat(s.height.slice(0,s.height.indexOf(e)).trim()),f=e,1))}),u.style.width=""+p+f,u.style.height=""+d+f,u.style.backgroundSize=""+p+f+" "+d+f,u.style.margin="-"+d/2+f+" auto auto -"+p/2+f}}else l={pause:s.pausePath?s.pausePath:"M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",play:s.playPath?s.playPath:"M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"},u=t.createDom("xg-start",'\n \n \n ',{},"xgplayer-start"),c=u.querySelector("path");var h=t.createDom("xg-enter",'',{},"xgplayer-enter"),g=h.querySelector(".xgplayer-enter-logo");i.appendChild(u),i.appendChild(h);var y=h.querySelector(".xgplayer-enter-tips"),v=new Image;v.onload=function(){y.style.display="block"},e.config.enterLogo&&e.config.enterLogo.url&&e.config.enterLogo.width&&e.config.enterLogo.height?(v.src=e.config.enterLogo.url,g.style.backgroundImage='url("'+e.config.enterLogo.url+'")',g.style.width=e.config.enterLogo.width+"px",g.style.height=e.config.enterLogo.height+"px",g.style.backgroundSize=e.config.enterLogo.width+"px "+e.config.enterLogo.height+"px",g.style.margin="-"+e.config.enterLogo.height/2+"px auto auto -"+e.config.enterLogo.width/2+"px",y.style.margin=e.config.enterLogo.height-6+"px auto auto -62px"):v.src=t.getBgImage(g),e.config.enterTips&&e.config.enterTips.background&&(y.style.background=""+e.config.enterTips.background),e.config.enterBg&&(e.config.enterBg.url?h.style.backgroundImage='url("'+e.config.enterBg.url+'")':e.config.enterBg.color&&(h.style.background=e.config.enterBg.color)),["click","touchstart"].forEach(function(n){u.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),t.hasClass(i,"xgplayer-nostart")?(t.removeClass(i,"xgplayer-nostart"),t.addClass(i,"xgplayer-is-enter"),e.on("canplay",function(){t.removeClass(i,"xgplayer-is-enter")}),e.once("playing",function(){t.removeClass(i,"xgplayer-is-enter")}),i.querySelector("video")||e.start(),e.play(),setTimeout(function(){e.play()},10)):e.paused&&(t.removeClass(i,"xgplayer-nostart xgplayer-isloading"),setTimeout(function(){e.play()},10))})}),u.addEventListener("animationend",function(e){e.preventDefault(),t.removeClass(u,"xgplayer-start-interact"),u.style.display="none"}),e.on("play",function(){"img"===s.type?u.style.backgroundImage='url("'+s.url.play+'")':c.setAttribute("d",l.pause),u.style.display="inline-block",t.addClass(u,"xgplayer-start-interact")}),e.on("pause",function(){"img"===s.type?u.style.backgroundImage='url("'+s.url.pause+'")':c.setAttribute("d",l.play),u.style.display="inline-block",t.addClass(u,"xgplayer-start-interact")}),e.video.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation(),document.activeElement===e.video?(o++,a&&clearTimeout(a),1===o?a=setTimeout(function(){if(t.hasClass(e.root,"xgplayer-nostart"))return!1;e.ended||(e.paused?e.play():e.pause()),o=0},200):o=0):e.video.focus()},!1),e.video.addEventListener("dblclick",function(t){if(t.preventDefault(),t.stopPropagation(),document.activeElement===e.video){var r=n.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)}}else e.video.focus()},!1),i.addEventListener("mouseenter",function(t){e.emit("focus",e)},!1),i.addEventListener("mouseleave",function(t){e.emit("blur",e)},!1),n.addEventListener("mouseenter",function(t){e.userTimer&&clearTimeout(e.userTimer)},!1),n.addEventListener("mouseleave",function(t){e.emit("focus",e)},!1)})},function(e,t,n){"use strict";var r=o(n(0)),i=o(n(2));function o(e){return e&&e.__esModule?e:{default:e}}r.default.install("mobile",function(){var e=this,t=r.default.util,n=e.root,o=function(e){var t=r.default.util;return e.some(function(e){return"Function"===t.typeOf(e)?e.call(navigator.userAgent):"RegExp"===t.typeOf(e)?e.test(navigator.userAgent):"String"===t.typeOf(e)&&navigator.userAgent.indexOf(e)>-1})}(e.config.whitelist);e.mobilePass=o;var a=e.config.centerBtn?e.config.centerBtn:{},s=void 0,l=void 0,u=void 0,c=void 0;if("img"===a.type){if((l=t.createDom("xg-start","",{},"xgplayer-start-img")).style.backgroundImage='url("'+a.url.play+'")',a.width&&a.height){var p=void 0,d=void 0,f=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every(function(e){return!(a.width.indexOf(e)>-1&&a.height.indexOf(e)>-1&&(p=parseFloat(a.width.slice(0,a.width.indexOf(e)).trim()),d=parseFloat(a.height.slice(0,a.height.indexOf(e)).trim()),f=e,1))}),l.style.width=""+p+f,l.style.height=""+d+f,l.style.backgroundSize=""+p+f+" "+d+f,l.style.margin="-"+d/2+f+" auto auto -"+p/2+f}}else s={pause:a.pausePath?a.pausePath:"M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",play:a.playPath?a.playPath:"M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"},l=t.createDom("xg-start",'\n \n \n ',{},"xgplayer-start"),u=l.querySelector("path"),c=new i.default({from:s.play,to:s.pause,progress:function(e,t){u.setAttribute("d",c.toSVGString(e))}});var h=t.createDom("xg-enter",'',{},"xgplayer-enter"),g=h.querySelector(".xgplayer-enter-logo");n.appendChild(l),n.appendChild(h);var y=h.querySelector(".xgplayer-enter-tips"),v=new Image;if(v.onload=function(){y.style.display="block"},e.config.enterLogo&&e.config.enterLogo.url&&e.config.enterLogo.width&&e.config.enterLogo.height?(v.src=e.config.enterLogo.url,g.style.backgroundImage='url("'+e.config.enterLogo.url+'")',g.style.width=e.config.enterLogo.width+"px",g.style.height=e.config.enterLogo.height+"px",g.style.backgroundSize=e.config.enterLogo.width+"px "+e.config.enterLogo.height+"px",g.style.margin="-"+e.config.enterLogo.height/2+"px auto auto -"+e.config.enterLogo.width/2+"px",y.style.margin=e.config.enterLogo.height-6+"px auto auto -62px"):v.src=t.getBgImage(g),e.config.enterTips&&e.config.enterTips.background&&(y.style.background=""+e.config.enterTips.background),e.config.enterBg&&(e.config.enterBg.url?h.style.backgroundImage='url("'+e.config.enterBg.url+'")':e.config.enterBg.color&&(h.style.background=e.config.enterBg.color)),e.start(),o){e.video.addEventListener("touchend",function(r){r.preventDefault(),t.hasClass(n,"xgplayer-inactive")?e.emit("focus"):e.emit("blur")},!1),l.addEventListener("touchend",function(r){r.preventDefault(),t.hasClass(n,"xgplayer-nostart")?(t.removeClass(n,"xgplayer-nostart"),t.addClass(n,"xgplayer-is-enter"),e.on("canplay",function(){t.removeClass(n,"xgplayer-is-enter")}),e.once("playing",function(){t.removeClass(n,"xgplayer-is-enter")}),e.play()):e.paused?e.play():e.pause()}),e.on("play",function(){"img"===a.type?l.style.backgroundImage='url("'+a.url.play+'")':c.reset(s.play,s.pause)}),e.on("pause",function(){"img"===a.type?l.style.backgroundImage='url("'+a.url.play+'")':c.reset(s.pause,s.play)}),e.config.volume=e.config.autoplay?0:null!==e.config.volume?e.config.volume:1;var m=0!==e.config.volume&&1!==e.config.volume?1:e.config.volume;0===m&&(e.video.muted=!0);var x={muted:"M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z",large:"M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"},b=function(e){return 0===e?"muted":"large"},w=x[b(m)],k=x[b(m)],E=t.createDom("xg-volume",'\n \n \n \n \n ',{},"xgplayer-volume");e.controls.appendChild(E);var C=E.querySelector(".xgplayer-icon"),_=E.querySelectorAll("path")[1],T=new i.default({progress:function(e,t){var n=c.toSVGString(e);_.setAttribute("d",n),w=n},from:w,to:x.large});["touchend","mousedown"].forEach(function(t){C.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation(),e.video.muted?(e.video.muted=!1,e.volume=1,T.reset(x.large,x.muted),w=x.large):(e.volume=0,e.video.muted=!0,T.reset(x.muted,x.large),w=x.muted)})}),e.once("destroy",function(){E=null})}else t.addClass(n,"xgplayer-mobile-npassed"),e.once("ready",function(){e.video.controls=e.config.controls,e.video.controlsList=e.config.controlsList.join(" "),e.config.poster&&(e.video.poster=e.config.poster)});e.config.debug&&function(e){var t={};Object.assign(t,{host:"127.0.0.1",port:9090},e);var n=document.createElement("script"),r=document.createElement("h4");r.style.cssText="position:fixed;bottom:0;padding:10px;width:100%;background-color:#fff;text-align:center",r.textContent="weinre --boundHost "+t.host+" --httpPort "+t.port+"\r\n 启动服务后,刷新页面",n.anonymous=!0,n.async=!0,n.src="http://"+t.host+":"+t.port+"/target/target-script-min.js#anonymous",n.onload=function(){r.parentNode.removeChild(r)},document.body.appendChild(n),document.body.appendChild(r)}(e.config.debug)})},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;na.length){for(var c=function(e){a[e]={id:e,queue:[],step:t.channels[e].step,surplus:t.channels[e].surplus},t.channels[e].queue.forEach(function(t){return a[e].queue.push(t)})},p=0;pn.length)return{result:!1,message:"exceed channels.length, occupy="+i+",channelsSize="+n.length};for(var o=!0,a=void 0,s=-1,l=0,u=n.length;l-1&&(r.queue.splice(a,1),0===a&&(r.step=9999,r.surplus=0))}}},{key:"update",value:function(){var e=this.channels,t=this.width;e.forEach(function(e){var n=e.queue[0];n?e.surplus=t-n.left-n.width:(e.step=9999,e.surplus=0)})}},{key:"reset",value:function(){var e=this.player.root,t=this;setTimeout(function(){var n=e.querySelector(".xgplayer-bullet"),r=n.getBoundingClientRect();t.width=r.width,t.height=r.height,t.container=n;for(var i=/mobile/gi.test(navigator.userAgent)?10:12,o=Math.floor(t.height/i),a=[],s=0;s0?e.map(function(e){return{id:e.danmaku_id,txt:e.text.slice(0,40),duration:1*e.duration,color:e.text_color.replace("0x","#"),scale:1*e.text_scale,start:1*e.offset_time}}):[]}},n),t.on("dataIncoming",this.dataHandle.bind(this)),t.on("seeked",this.seekHandle.bind(this)),t.on("bullet_remove",this.updateQueue.bind(this)),t.on("ended",this.stop.bind(this)),t.on("pause",this.pause.bind(this)),t.on("play",this.play.bind(this))}return r(e,[{key:"updateQueue",value:function(e){var t=this;t.queue.some(function(n,r){if(n.id===e.bullet.id)return t.queue.splice(r,1),!0})}},{key:"init",value:function(){var e=this;if(e.data)return e.player.paused?void(e.status="paused"):e.player.ended?void(e.status="ended"):(e.readData(),e.retryTimer=setInterval(function(){e.readData(),e.dataHandle()},e.interval-1e3),void e.player.emit("dataIncoming"));fetch(e.options.url,{method:e.options.method,headers:{Accept:"application/json"}}).then(function(t){t.ok&&t.json().then(function(t){var n=e.options.dataMap.call(null,t.data);if(n.length){e.data=n;var r=document.createElement("span");r.style.padding=e.options.padding+"||'0px'",r.style.position="absolute",r.style.left="-99999px",document.body.appendChild(r);var i=void 0;if(e.data.forEach(function(e){r.textContent=e.txt,r.style.fontSize=20*e.scale+"px",i=r.getBoundingClientRect(),e.width=i.width,e.height=i.height}),e.data.sort(function(e,t){return e.start-t.start}),document.body.removeChild(r),e.player.paused)return void(e.status="paused");if(e.player.ended)return void(e.status="ended");e.readData(),e.retryTimer=setInterval(function(){e.readData(),e.dataHandle()},e.interval-1e3),e.player.emit("dataIncoming")}})}).catch(function(e){console.log("Fetch错误:"+e)})}},{key:"start",value:function(){this.status="playing",this.channel.reset(),this.init()}},{key:"stop",value:function(){this.status="closed",clearTimeout(this.retryTimer),(0,o.default)("cancel")(this.timer),this.queue.length=0,this.container.innerHTML=""}},{key:"play",value:function(){var e=this,t=i.default.util;"idle"===e.status||"ended"===e.status?t.hasClass(e.container,"xgplayer-has-bullet")&&e.start():"paused"===e.status&&t.hasClass(e.container,"xgplayer-has-bullet")&&(e.status="playing",e.dataHandle(),e.retryTimer=setInterval(function(){e.readData(),e.dataHandle()},e.interval-1e3))}},{key:"pause",value:function(){"playing"===this.status?(this.status="paused",clearTimeout(this.retryTimer),(0,o.default)("cancel")(this.timer)):"ended"===this.status&&this.stop()}},{key:"dataHandle",value:function(){var e=(0,o.default)("cancel");if(e(this.timer),this.queue.length){this.queue.forEach(function(e){"waiting"!==e.status&&"start"!==e.status||(e.status="start",e.move())});var t=(0,o.default)("request");this.timer=t(this.dataHandle.bind(this))}else e(this.timer)}},{key:"readData",value:function(){var e=this,t=this.player,n=this.formatTime(t.currentTime),r=void 0,i=e.interval,o=e.channel,a=e.container,s=e.data.filter(function(e){return e.start<=n&&n<=e.start+i});s.length>0&&s.forEach(function(n){r=new c(t,a,n),o.addBullet(r).result&&(e.queue.push(r),r.reset(),r.attach())})}},{key:"seekHandle",value:function(){i.default.util;this.stop(),this.player.paused?this.status="idle":(this.status="playing",this.channel.resetWithCb(),this.init())}},{key:"formatTime",value:function(e){var t=Math.floor(e);return 1e3*t+(e-t)}}]),e}(),d=function(){function e(t,n){l(this,e);var r=this;this.player=t,this.el_=this.createEl(),this.onceFlag=!1;["click","touchstart"].forEach(function(e){r.el_.addEventListener(e,function(e){e.preventDefault(),e.stopPropagation(),r.onClick()},!1)}),this.main=new p(t,n),"on"===n.switch&&this.player.once("play",function(){r.onChange(!0)})}return r(e,[{key:"createEl",value:function(){return i.default.util.createDom("xg-bullet-btn",'',{},"xgplayer-bullet-btn "+("on"===this.player.config.bullet.switch?"xgplayer-bullet-btn-active":""))}},{key:"onClick",value:function(){var e=this,t=i.default.util;t.toggleClass(e.el_,"xgplayer-bullet-btn-active");var n=!!t.hasClass(e.el_,"xgplayer-bullet-btn-active");function r(){e.onceFlag=!1,e.main.channel.resetWithCb(e.onChange.bind(e))}n?e.player.paused||e.player.ended?this.onceFlag||(this.onceFlag=!0,this.player.once("play",r)):r():(this.player.off("play",r),this.onChange(n))}},{key:"onChange",value:function(e){var t=i.default.util,n=this.player.root.querySelector(".xgplayer-bullet");e?(t.addClass(n,"xgplayer-has-bullet"),this.main.start()):(t.removeClass(n,"xgplayer-has-bullet"),this.main.stop())}}]),e}();i.default.install("makeBullet",function(){var e=this,t=i.default.util;if(e.config.bullet){var n=t.createDom("xg-bullet","",{},"xgplayer-bullet");e.root.appendChild(n);var r=new d(e,e.config.bullet);["touchstart","click"].forEach(function(t){n.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation(),e.paused?e.play():e.pause()},!1)}),e.controls.appendChild(r.el_)}})},function(e,t,n){"use strict";var r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}; /** * request-frame - requestAnimationFrame & cancelAnimationFrame polyfill for optimal cross-browser development. * @version v1.5.3 * @license MIT * Copyright Julien Etienne 2015 All Rights Reserved. */ !function(a,s){"object"===o(t)&&void 0!==e?e.exports=s():void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}(0,function(){return function(e){var t,n,r,i=["moz","webkit"],o="AnimationFrame",a="Request"+o,s=window.mozRequestAnimationFrame,l=window.mozCancelAnimationFrame,u=s&&!l,c=0;function p(){var e=window.webkitRequestAnimationFrame,t=window.requestAnimationFrame,n=screen.width<=768,r=!(e&&t),i=!window.performance;return function(e,t,n,r){return!!e&&function(e,t,n){return!(!e&&!t||(console.warn(n),0))}(n,r,t)}(r&&n&&i,"setTimeout is being used as a substitiue for \n requestAnimationFrame due to a bug within iOS 6 builds",e,t)}function d(e){clearTimeout(e)}function f(e){var t=Date.now(),n=Math.max(c+16,t);return setTimeout(function(){e(c=n)},n-t)}function h(){return Array.prototype.filter?(t=window["request"+o]||window[i.filter(function(e){if(void 0!==window[e+a])return e})+a]||f,p()?f:t):f}function g(){var e=[];return Array.prototype.map?(i.map(function(t){return["Cancel","CancelRequest"].map(function(n){e.push(t+n+o)})}),n=window["cancel"+o]||function(e,t){for(var n=void 0;t',{},"xgplayer-preview"),i=n.querySelector("input");e.config.preview&&e.config.preview.uploadEl&&(e.config.preview.uploadEl.appendChild(n),i.onchange=function(){e.uploadFile=i.files[0];var n=URL.createObjectURL(e.uploadFile);t.hasClass(e.root,"xgplayer-nostart")?(e.config.url=n,e.start()):(e.src=n,e.play())})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("loading",function(){var e=r.default.util.createDom("xg-loading",'\n \n \n \n ',{},"xgplayer-loading");this.root.appendChild(e),this.once("destroy",function(){e=null})})},function(e,t,n){"use strict";(function(e){return e&&e.__esModule?e:{default:e}})(n(0)).default.install("i18n",function(){var e=this,t={},n=e.constructor.util;t.en={HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"network is offline"},t["zh-cn"]={HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"当下载时发生错误",MEDIA_ERR_DECODE:"当解码时发生错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题"},Object.defineProperty(e,"lang",{get:function(){return t[e.config.lang]||t.en},set:function(e){"Object"===n.typeOf(e)&&Object.keys(e).forEach(function(n){t[n]=e[n]})}})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("fullscreen",function(){var e=this,t=r.default.util,n="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z",i="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z",o=t.createDom("xg-fullscreen",'\n \n ',{},"xgplayer-fullscreen"),a=e.config.lang&&"zh-cn"===e.config.lang?"全屏":"Full screen",s=e.config.lang&&"zh-cn"===e.config.lang?"退出全屏":"Exit full screen",l=e.controls,u=e.root,c=t.createDom("xg-tips",a,{},"xgplayer-tips"),p=o.querySelector("path");o.appendChild(c);l.appendChild(o),["click","touchend"].forEach(function(r){o.addEventListener(r,function(r){r.preventDefault(),r.stopPropagation(),t.hasClass(u,"xgplayer-fullscreen-active")||t.hasClass(u,"xgplayer-is-fullscreen")?function(n){p.setAttribute("d",i),c.textContent=a,document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():t.removeClass(n,"xgplayer-fullscreen-active"),e.emit("exitFullscreen")}(u):function(r){p.setAttribute("d",n),c.textContent=s,r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):e.video.webkitSupportsFullscreen?e.video.webkitEnterFullscreen():r.msRequestFullscreen?r.msRequestFullscreen():t.addClass(r,"xgplayer-fullscreen-active"),e.emit("requestFullscreen")}(u)})}),e.video.addEventListener("webkitendfullscreen",function(){e.emit("exitFullscreen"),p.setAttribute("d",i)});var d=function(e){var r=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;r&&r===u?(t.addClass(u,"xgplayer-is-fullscreen"),p.setAttribute("d",n),c.textContent=s):(t.removeClass(u,"xgplayer-is-fullscreen"),p.setAttribute("d",i),c.textContent=a)};o.addEventListener("mouseenter",function(e){e.preventDefault(),e.stopPropagation(),c.style.left="50%";var t=c.getBoundingClientRect(),n=u.getBoundingClientRect();t.right>n.right&&(c.style.left=-t.right+n.right+16+"px")}),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach(function(e){document.addEventListener(e,d)}),e.once("destroy",function(){["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach(function(e){document.removeEventListener(e,d)}),o=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("__flex__",function(){var e=r.default.util.createDom("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("error",function(){var e=this,t=r.default.util,n=t.createDom("xg-error",'刷新试试',{},"xgplayer-error");e.root.appendChild(n);var i=n.querySelector(".xgplayer-error-text"),o=null;e.on("error",function(){e.controls.style.display="none",e.config.lang&&"zh-cn"===e.config.lang?i.innerHTML=(e.lang[e.video.error.message]||e.lang.ERROR)+',请刷新试试':i.innerHTML=(e.lang[e.video.error.message]||e.lang.ERROR)+',please try to refresh',t.addClass(e.root,"xgplayer-is-error"),(o=n.querySelector(".xgplayer-error-refresh"))&&["touchstart","click"].forEach(function(t){o.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation();var n=t.target||t.srcElement;n&&"span"===n.tagName.toLocaleLowerCase()&&(e.controls.style.display="flex",e.reload())})})}),e.once("destroy",function(){o=null,n=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("definition",function(){var e=this,t=r.default.util,n=r.default.sniffer,i=t.createDom("xg-definition","",{tabindex:3},"xgplayer-definition"),o=e.controls;"mobile"!==n.device&&(e.on("resourceReady",function(n){n&&n instanceof Array&&n.length>1&&(t.addClass(e.root,"xgplayer-is-definition"),e.on("canplay",function(){var t=["
    "],r=e.config.url,a=document.createElement("a");e.switchURL?["mp4","hls","flv","dash"].every(function(t){return!e[t]||(a.href=e[t].url,r=a.href,!1)}):r=e.currentSrc||e.src,n.forEach(function(n){a.href=n.url,e.dash?t.push("
  • "+n.name+"
  • "):t.push("
  • "+n.name+"
  • ")});var s=n.filter(function(t){return a.href=t.url,e.dash?t.selected:a.href===r});t.push("

"+(s[0]||{name:""}).name+"

");var l=o.querySelector(".xgplayer-definition"),u=e.config.lang&&"zh-cn"===e.config.lang?"清晰度":"Quality";l?l.innerHTML=""+u+""+t.join(""):(i.innerHTML=""+u+""+t.join(""),o.appendChild(i))}))}),["touchstart","click"].forEach(function(n){i.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var r=n.target||n.srcElement,o=document.createElement("a");if(r&&"li"===r.tagName.toLocaleLowerCase()){if(Array.prototype.forEach.call(r.parentNode.childNodes,function(e){t.removeClass(e,"definition")}),t.addClass(r,"definition"),r.parentNode.nextSibling.innerHTML=""+r.getAttribute("cname")+"",o.href=r.getAttribute("url"),e.switchURL){var a=document.createElement("a");["mp4","hls","flv","dash"].every(function(t){return!e[t]||(a=e[t].url,!1)}),a.href===o.href||e.ended||e.switchURL(o.href)}else if(o.href!==e.currentSrc){var s=e.currentTime,l=e.paused;e.ended||(e.src=o.href,e.once("canplay",function(){e.currentTime=s,l||e.play()}))}e.emit("definitionchange",o.href)}else!r||"p"!==r.tagName.toLocaleLowerCase()&&"em"!==r.tagName.toLocaleLowerCase()||(t.addClass(i,"xgplayer-definition-active"),i.focus())},!1)}),i.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.removeClass(i,"xgplayer-definition-active")}),i.addEventListener("mouseenter",function(t){t.preventDefault(),t.stopPropagation();var n=i.querySelector(".xgplayer-tips");n.style.left="50%";var r=n.getBoundingClientRect(),o=e.root.getBoundingClientRect();r.right>o.right&&(n.style.left=-r.right+o.right+16+"px")}),e.once("destroy",function(){i=null}))})},function(e,t,n){var r=n(56);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(58)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(57)(!1)).push([e.i,'@-webkit-keyframes playPause{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}99%{-webkit-transform:scale(1.3);transform:scale(1.3);opacity:0}to{-webkit-transform:scale(0);transform:scale(0);opacity:0}}@keyframes playPause{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}99%{-webkit-transform:scale(1.3);transform:scale(1.3);opacity:0}to{-webkit-transform:scale(0);transform:scale(0);opacity:0}}@-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}}@-webkit-keyframes enterTips{0%{opacity:0;left:0;width:3px}50%{opacity:1;left:50%;width:5px}to{opacity:0;left:100%;width:3px}}@keyframes enterTips{0%{opacity:0;left:0;width:3px}50%{opacity:1;left:50%;width:5px}to{opacity:0;left:100%;width:3px}}.xgplayer{background:rgba(0,0,0,.26);width:100%;height:100%;position:relative}.xgplayer *{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.xgplayer.xgplayer-is-fullscreen{width:100%!important;height:100%!important;z-index:9999}.xgplayer video{width:100%;height:100%;outline:none}.xgplayer-icon{display:block;width:40px;height:40px;overflow:hidden;fill:#fff}.xgplayer-controls{display:-webkit-flex;display:-moz-box;display:flex;position:absolute;bottom:0;left:0;right:0;height:40px;background-image:linear-gradient(-1deg,rgba(0,0,0,.3),transparent);z-index:10}.xgplayer-inactive .xgplayer-controls,.xgplayer-is-live .xgplayer-controls>*,.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-is-live .xgplayer-controls .xgplayer-fullscreen,.xgplayer-is-live .xgplayer-controls .xgplayer-live,.xgplayer-is-live .xgplayer-controls .xgplayer-placeholder,.xgplayer-is-live .xgplayer-controls .xgplayer-play,.xgplayer-is-live .xgplayer-controls .xgplayer-volume{display:block}.xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:0;right:0;outline:none;top:-10px;z-index:15}.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-progress-cache,.xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-progress-played:after{content:" ";display:none;position:absolute;right:-4px;top:-4px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26)}.xgplayer-progress-point{position:absolute}.xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none;z-index:100}.xgplayer-progress-thumbnail{position:absolute;-moz-box-sizing:border-box;box-sizing:border-box}.xgplayer-progress-thumbnail.xgplayer-tips{margin-left:0;display:none;z-index:99}.xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-progress:focus .xgplayer-progress-played:after,.xgplayer-progress:hover .xgplayer-progress-played:after{display:block}.xgplayer-play{position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block;cursor:pointer}.xgplayer-play .xgplayer-icon{margin-top:3px}.xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;display:inline-block}.xgplayer-time span:after{content:"/";display:inline-block;padding:0 3px}.xgplayer-time em{color:hsla(0,0%,100%,.5)}.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-volume{outline:none;-webkit-order:4;-moz-box-ordinal-group:5;order:4;display:inline-block;position:relative;cursor:pointer}.xgplayer-volume .xgplayer-icon{margin-top:8px}.xgplayer-slider{height:88px;background:rgba(0,0,0,.54);border-radius:1px;bottom:50px;outline:none}.xgplayer-slider,.xgplayer-slider:after{display:block;position:absolute;width:28px;left:0}.xgplayer-slider:after{content:" ";height:15px;bottom:-15px;z-index:20}.xgplayer-bar,.xgplayer-drag{display:block;position:absolute;bottom:6px;left:12px;background:hsla(0,0%,100%,.3);border-radius:100px;width:4px;height:76px;outline:none}.xgplayer-drag{bottom:0;left:0;background:#fa1f41;max-height:76px}.xgplayer-drag:after{content:" ";display:inline-block;width:8px;height:8px;background:#fff;box-shadow:0 0 5px 0 rgba(0,0,0,.26);position:absolute;border-radius:50%;left:-2px;top:-6px}.xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}.xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:hsla(0,0%,100%,.3);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:1000;margin:-55px auto auto -35px;cursor:pointer}.xgplayer-inactive .xgplayer-start,.xgplayer-nostart .xgplayer-start{margin:-35px auto auto -35px}.xgplayer-start svg{fill:hsla(0,0%,100%,.7);margin:14px}.xgplayer-start.xgplayer-start-interact{-webkit-animation:playPause .4s ease-out forwards;animation:playPause .4s ease-out forwards}.xgplayer-start:hover{background:hsla(0,0%,100%,.5)}.xgplayer-start:hover svg{fill:hsla(0,0%,100%,.6)}.xgplayer-start-img{display:none;position:absolute;left:50%;top:50%;z-index:1000;cursor:pointer}.xgplayer-nostart .xgplayer-start-img{display:block}.xgplayer-start-img.xgplayer-start-interact{-webkit-animation:playPause .4s ease-out forwards;animation:playPause .4s ease-out forwards}.xgplayer-start-img:hover{opacity:.85}.xgplayer-textTrack{-webkit-order:7;-moz-box-ordinal-group:8;order:7;width:60px;position:relative;outline:none;display:block;cursor:pointer;margin-left:10px;margin-top:9px;margin-bottom:11px}.xgplayer-textTrack.xgplayer-textTrack-active ul{display:block}.xgplayer-textTrack ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:30px;left:0;text-align:center;white-space:nowrap;margin-left:-10px;z-index:26}.xgplayer-textTrack ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);padding:6px 13px}.xgplayer-textTrack ul li.textTrack{color:#fff;opacity:1}.xgplayer-textTrack ul:after{content:" ";display:inline-block;height:30px;width:100%;position:absolute;bottom:-20px;left:0}.xgplayer-textTrack .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:20px;height:20px;color:hsla(0,0%,100%,.8)}.xgplayer-textTrack .name em{width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-definition{-webkit-order:5;-moz-box-ordinal-group:6;order:5;width:60px;position:relative;outline:none;display:none;cursor:pointer;margin-left:10px;margin-top:9px;margin-bottom:11px}.xgplayer-definition .xgplayer-tips{margin-left:-20px}.xgplayer-definition:hover .xgplayer-tips{display:block;top:-40px}.xgplayer-definition.xgplayer-definition-active ul{display:block}.xgplayer-definition.xgplayer-definition-active .xgplayer-tips{display:none}.xgplayer-definition ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:30px;left:0;text-align:center;white-space:nowrap;margin-left:-10px;z-index:26}.xgplayer-definition ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);padding:6px 13px}.xgplayer-definition ul li.definition{color:#fff;opacity:1}.xgplayer-definition ul:after{content:" ";display:inline-block;height:30px;width:100%;position:absolute;bottom:-20px;left:0}.xgplayer-definition .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:20px;height:20px;color:hsla(0,0%,100%,.8)}.xgplayer-definition .name em{width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-is-definition .xgplayer-definition{display:block}.xgplayer-playback{-webkit-order:8;-moz-box-ordinal-group:9;order:8;position:relative;outline:none;display:block;cursor:pointer;margin-left:10px;margin-top:9px;margin-bottom:11px;height:20px}.xgplayer-playback .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:20px;height:20px;color:hsla(0,0%,100%,.8)}.xgplayer-playback .name span{width:40px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer-playback:hover .xgplayer-tips{display:block;top:-40px}.xgplayer-pip{-webkit-order:9;-moz-box-ordinal-group:10;order:9;position:relative;outline:none;display:block;cursor:pointer;margin-left:10px;margin-top:9px;margin-bottom:11px;height:20px}.xgplayer-pip .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:20px;height:20px;color:hsla(0,0%,100%,.8)}.xgplayer-pip .name span{width:60px;height:20px;line-height:20px;background:rgba(0,0,0,.38);border-radius:10px;display:inline-block;vertical-align:middle}.xgplayer.xgplayer-pip-active{position:fixed!important;right:0;bottom:200px;width:320px!important;height:180px!important;z-index:999!important}.xgplayer.xgplayer-pip-active .xgplayer-controls,.xgplayer.xgplayer-pip-active xg-bullet{display:none}.xgplayer.xgplayer-pip-active .xgplayer-pip-lay{display:block}.xgplayer-pip-lay{position:absolute;top:26px;left:0;z-index:1450;cursor:pointer;background-color:transparent;display:none}.xgplayer-pip-lay,.xgplayer-pip-lay div{width:100%;height:100%}.xgplayer-pip-drag{cursor:move;position:absolute;top:0;left:0;width:100%;height:26px;line-height:26px;background-image:linear-gradient(rgba(0,0,0,.3),transparent);z-index:1500;display:none}.xgplayer.xgplayer-pip-active .xgplayer-pip-drag{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer.xgplayer-inactive .xgplayer-pip-drag{display:none}.xgplayer-fullscreen{-webkit-order:10;-moz-box-ordinal-group:11;order:10;position:relative;display:inline-block;cursor:pointer}.xgplayer-fullscreen .xgplayer-icon{margin:4px -4px 0 0}.xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer.xgplayer-fullscreen-active{position:fixed!important;left:0!important;top:0!important;width:100%!important;height:100%!important;z-index:99999!important}.xgplayer-bullet-btn{width:32px;height:20px;border-radius:100px;background-color:#ccc;-moz-box-sizing:border-box;box-sizing:border-box;outline:none;cursor:pointer;-webkit-order:6;-moz-box-ordinal-group:7;order:6;z-index:26;position:relative;text-align:center;margin:10px auto}.xgplayer-bullet-btn.xgplayer-bullet-btn-active{padding-left:12px;background-color:#f85959}.xgplayer-bullet-btn span.txt{width:20px;height:20px;line-height:20px;text-align:center;display:block;border-radius:100px;background-color:#fff;box-shadow:-2px 0 0 0 rgba(0,0,0,.04);font-family:PingFangSC;font-size:10px;font-weight:500;color:#f44336}.xgplayer-bullet{display:none;top:0;left:0;right:0;bottom:3em;overflow:hidden;outline:none}.xgplayer-bullet,.xgplayer-bullet span{position:absolute;z-index:9;cursor:pointer}.xgplayer-bullet span{padding:5px;white-space:nowrap}.xgplayer-has-bullet{display:block}.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:-70px auto auto -50px}.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-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-nostart .xgplayer-loading{display:none}.xgplayer-isloading .xgplayer-loading{display:block}.xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:500;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;cursor:pointer}.xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-replay svg:hover path{fill:#fff}.xgplayer-replay .xgplayer-replay-img{position:absolute;left:50%;top:50%;cursor:pointer}.xgplayer-replay .xgplayer-replay-img:hover{opacity:.85}.xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px;cursor:pointer}.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-replay-img{display:none;position:absolute;left:50%;top:50%;z-index:500;cursor:pointer}.xgplayer-replay-img:hover{opacity:.85}.xgplayer.xgplayer-ended .xgplayer-replay-img{display:block}.xgplayer-enter{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:url("//s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-bg.svg") no-repeat 50%/cover;z-index:1100}.xgplayer-enter .xgplayer-enter-logo{display:block;position:absolute;left:50%;top:50%;width:130px;height:44px;margin:-22px auto auto -65px;background-size:130px 44px;background-image:url("//s3.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.1/xg-logo-new.png")}.xgplayer-enter .xgplayer-enter-tips{display:none;position:absolute;left:50%;top:50%;width:120px;height:1px;background:-webkit-linear-gradient(right,#000,red,red,red,#000);margin:32px auto auto -62px}.xgplayer-enter .xgplayer-enter-tips:before{content:" ";display:block;width:5px;height:1px;border-radius:50%;position:absolute;left:0;top:0;-webkit-animation:enterTips 1.6s linear infinite;animation:enterTips 1.6s linear infinite;background:#fff}.xgplayer-is-enter .xgplayer-enter,.xgplayer-is-enter .xgplayer-enter .xgplayer-enter-tips{display:block}.xgplayer-poster{position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover;background-position:50%}.xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer .xgplayer-none{display:none}.xgplayer-error{background:#000;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:1200;font-family:PingFangSC-Regular;font-size:14px;color:#fff;text-align:center;line-height:100%;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center}.xgplayer-error .xgplayer-error-refresh{color:#fa1f41;padding:0 3px;cursor:pointer}.xgplayer-is-error .xgplayer-error{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-error .xgplayer-error-text{line-height:18px;margin:auto 6px}.xgplayer-mobile .xgplayer-progress-played:after{display:block;top:-5px}.xgplayer-mobile .xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-mobile .xgplayer-progress:hover .xgplayer-progress-outer{height:3px;margin-top:8.5px}.xgplayer-mobile.xgplayer-ended .xgplayer-start,.xgplayer-mobile.xgplayer-ended .xgplayer-start-img,.xgplayer-mobile.xgplayer-inactive .xgplayer-start,.xgplayer-mobile.xgplayer-inactive .xgplayer-start-img{display:none}.xgplayer-mobile .xgplayer-start{width:60px;height:60px;line-height:60px;display:none;margin:-50px auto auto -30px}.xgplayer-mobile .xgplayer-start svg{margin:10px}.xgplayer-mobile .xgplayer-start-img{display:none}.xgplayer-mobile.xgplayer-nostart .xgplayer-start{margin:-30px auto auto -30px;display:block}.xgplayer-mobile.xgplayer-nostart .xgplayer-start-img{display:block}.xgplayer-mobile .xgplayer-loading{-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-controls,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-poster,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-start,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-start-img{display:none}',""])},function(e,t,n){"use strict";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=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}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&&l.splice(t,1)}function h(e){var t=document.createElement("style");return e.attrs.type="text/css",g(t,e.attrs),d(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var l=s++;n=a||(a=h(t)),r=m.bind(null,n,l,!1),i=m.bind(null,n,l,!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",g(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=u(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){f(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){f(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=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return c(n,t),function(e){for(var i=[],o=0;o