diff --git a/README.md b/README.md index a0835a7..8de4723 100644 --- a/README.md +++ b/README.md @@ -140,4 +140,4 @@ var dp = new DPlayer({ **DPlayer** © [DIYgod](https://github.com/DIYgod), Released under the [MIT](./LICENSE) License.
Authored and maintained by DIYgod with help from contributors ([list](https://github.com/DIYgod/DPlayer/contributors)). -> Blog [@Anotherhome](https://www.anotherhome.net) · GitHub [@DIYgod](https://github.com/DIYgod) · Twitter [@DIYgod](https://twitter.com/DIYgod) · Telegram Channel [@awesomeDIYgod](https://t.me/awesomeDIYgod) +> [Blog](https://diygod.me) · GitHub [@DIYgod](https://github.com/DIYgod) · Twitter [@DIYgod](https://twitter.com/DIYgod) · Telegram Channel [@awesomeDIYgod](https://t.me/awesomeDIYgod) diff --git a/dist/DPlayer.min.js b/dist/DPlayer.min.js index 8ebb7aa..55d2ef7 100644 --- a/dist/DPlayer.min.js +++ b/dist/DPlayer.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DPlayer",[],t):"object"==typeof exports?exports.DPlayer=t():e.DPlayer=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=1)}([function(e,t,i){"use strict";e.exports={secondToTime:function(e){var t=function(e){return e<10?"0"+e:""+e},i=parseInt(e/60),n=parseInt(e-60*i);return t(i)+":"+t(n)},getElementViewLeft:function(e){var t=e.offsetLeft,i=e.offsetParent,n=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==i&&i!==e;)t+=i.offsetLeft,i=i.offsetParent;else for(;null!==i;)t+=i.offsetLeft,i=i.offsetParent;return t-n},getScrollPosition:function(){return{left:window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},setScrollPosition:function(e){var t=e.left,i=void 0===t?0:t,n=e.top,a=void 0===n?0:n;this.isFirefox?(document.documentElement.scrollLeft=i,document.documentElement.scrollTop=a):window.scrollTo(i,a)},isMobile:/mobile/i.test(window.navigator.userAgent),isFirefox:/firefox/i.test(window.navigator.userAgent),isChrome:/chrome/i.test(window.navigator.userAgent),storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}}}},function(e,t,i){"use strict";console.log("\n %c DPlayer 1.17.2 4c587e5 %c http://dplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),e.exports=i(2)},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var i=0;i0?t:0,t=t<1?t:1,n[e+"Bar"].style[i]=100*t+"%"},document.addEventListener("click",function(){i.focus=!1},!0),this.container.addEventListener("click",function(){i.focus=!0},!0),this.options.danmaku&&(this.danmaku=new f.default({container:this.template.danmaku,opacity:this.user.get("opacity"),callback:function(){setTimeout(function(){i.template.danmakuLoading.style.display="none",i.options.autoplay&&!o.isMobile?i.play():o.isMobile&&i.pause()},0)},error:function(e){i.notice(e)},apiBackend:this.options.apiBackend,borderColor:this.options.theme,height:this.arrow?24:30,time:function(){return i.video.currentTime},unlimited:this.user.get("unlimited"),api:{id:this.options.danmaku.id,address:this.options.danmaku.api,token:this.options.danmaku.token,maximum:this.options.danmaku.maximum,addition:this.options.danmaku.addition,user:this.options.danmaku.user},events:this.events})),this.arrow=this.container.offsetWidth<=500,this.arrow){var r=document.createElement("style");r.innerHTML=".dplayer .dplayer-danmaku{font-size:18px}",document.head.appendChild(r)}if(this.video=this.template.video,this.template.bezel.addEventListener("animationend",function(){i.template.bezel.classList.remove("dplayer-bezel-transition")}),this.paused=!0,this.template.playButton.addEventListener("click",function(){i.toggle()}),o.isMobile){var d=function(){i.container.classList.contains("dplayer-hide-controller")?i.container.classList.remove("dplayer-hide-controller"):i.container.classList.add("dplayer-hide-controller")};this.template.videoWrap.addEventListener("click",d),this.template.controllerMask.addEventListener("click",d)}else this.template.videoWrap.addEventListener("click",function(){i.toggle()}),this.template.controllerMask.addEventListener("click",function(){i.toggle()});var p=0,m=0,v=!1;window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();var g=function(){i.checkLoading=setInterval(function(){m=i.video.currentTime,v||m!==p||i.video.paused||(i.container.classList.add("dplayer-loading"),v=!0),v&&m>p&&!i.video.paused&&(i.container.classList.remove("dplayer-loading"),v=!1),p=m},100)},b=function(){clearInterval(i.checkLoading)};this.playedTime=!1,this.animationFrame=function(){i.playedTime&&(i.updateBar("played",i.video.currentTime/i.video.duration,"width"),i.template.ptime.innerHTML=l.default.secondToTime(i.video.currentTime)),window.requestAnimationFrame(i.animationFrame)},window.requestAnimationFrame(this.animationFrame),this.setTime=function(e){e?(i[e+"Time"]=!0,"played"===e&&g()):(i.playedTime=!0,g())},this.clearTime=function(e){e?(i[e+"Time"]=!1,"played"===e&&b()):(i.playedTime=!1,b())},this.options.video.thumbnails&&this.initThumbnails(),this.isTimeTipsShow=!0,this.mouseHandler=this.mouseHandler(this.template.playedBarWrap,this.template.playedBarTime).bind(this),this.template.playedBarWrap.addEventListener("mousemove",this.mouseHandler),this.template.playedBarWrap.addEventListener("mouseenter",this.mouseHandler),this.template.playedBarWrap.addEventListener("mouseleave",this.mouseHandler);var k=function(e){var t=(e.clientX-l.default.getElementViewLeft(i.template.playedBarWrap))/s;t=t>0?t:0,t=t<1?t:1,i.updateBar("played",t,"width"),i.template.ptime.innerHTML=l.default.secondToTime(t*i.video.duration)},L=function e(t){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",k);var a=(t.clientX-l.default.getElementViewLeft(i.template.playedBarWrap))/s;a=a>0?a:0,a=a<1?a:1,i.updateBar("played",a,"width"),i.seek(parseFloat(n.playedBar.style.width)/100*i.video.duration),i.setTime()};this.template.playedBarWrap.addEventListener("mousedown",function(){s=i.template.playedBarWrap.clientWidth,i.clearTime(),document.addEventListener("mousemove",k),document.addEventListener("mouseup",L)});this.switchVolumeIcon=function(){i.volume()>=.95?i.template.volumeIcon.innerHTML=i.icons.get("volume-up"):i.volume()>0?i.template.volumeIcon.innerHTML=i.icons.get("volume-down"):i.template.volumeIcon.innerHTML=i.icons.get("volume-off")};var S=function(e){var t=e||window.event,n=(t.clientX-l.default.getElementViewLeft(i.template.volumeBarWrap)-5.5)/35;i.volume(n)},T=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",S),i.template.volumeButton.classList.remove("dplayer-volume-active")};this.template.volumeBarWrapWrap.addEventListener("click",function(e){var t=e||window.event,n=(t.clientX-l.default.getElementViewLeft(i.template.volumeBarWrap)-5.5)/35;i.volume(n)}),this.template.volumeBarWrapWrap.addEventListener("mousedown",function(){document.addEventListener("mousemove",S),document.addEventListener("mouseup",T),i.template.volumeButton.classList.add("dplayer-volume-active")}),this.template.volumeIcon.addEventListener("click",function(){i.video.muted?(i.video.muted=!1,i.switchVolumeIcon(),i.updateBar("volume",i.volume(),"width")):(i.video.muted=!0,i.template.volumeIcon.innerHTML=i.icons.get("volume-off"),i.updateBar("volume",0,"width"))}),this.hideTime=0;var E=function(){i.container.classList.remove("dplayer-hide-controller"),clearTimeout(i.hideTime),i.hideTime=setTimeout(function(){i.video.played.length&&!i.disableHideController&&(i.container.classList.add("dplayer-hide-controller"),z(),H())},2e3)};o.isMobile||(this.container.addEventListener("mousemove",E),this.container.addEventListener("click",E));var z=function(){i.template.settingBox.classList.contains("dplayer-setting-box-open")&&(i.template.settingBox.classList.remove("dplayer-setting-box-open"),i.template.mask.classList.remove("dplayer-mask-show"),setTimeout(function(){i.template.settingBox.classList.remove("dplayer-setting-box-narrow"),i.template.settingBox.classList.remove("dplayer-setting-box-speed")},300)),i.disableHideController=!1},F=function(){i.disableHideController=!0,i.template.settingBox.classList.add("dplayer-setting-box-open"),i.template.mask.classList.add("dplayer-mask-show")};this.template.mask.addEventListener("click",function(){z()}),this.template.settingButton.addEventListener("click",function(){F()}),this.loop=this.options.loop;var _=this.user.get("danmaku");_||this.danmaku&&this.danmaku.hide();var C=this.user.get("unlimited");if(this.template.loopToggle.checked=this.loop,this.template.loop.addEventListener("click",function(){i.template.loopToggle.checked=!i.template.loopToggle.checked,i.template.loopToggle.checked?i.loop=!0:i.loop=!1,z()}),this.template.showDanmakuToggle.checked=_,this.template.showDanmaku.addEventListener("click",function(){i.template.showDanmakuToggle.checked=!i.template.showDanmakuToggle.checked,i.template.showDanmakuToggle.checked?(_=!0,i.paused||i.danmaku.show()):(_=!1,i.danmaku.hide()),i.user.set("danmaku",_?1:0),z()}),this.template.unlimitDanmakuToggle.checked=C,this.template.unlimitDanmaku.addEventListener("click",function(){i.template.unlimitDanmakuToggle.checked=!i.template.unlimitDanmakuToggle.checked,i.template.unlimitDanmakuToggle.checked?(C=!0,i.danmaku.unlimit(!0)):(C=!1,i.danmaku.unlimit(!1)),i.user.set("unlimited",C?1:0),z()}),this.template.speed.addEventListener("click",function(){i.template.settingBox.classList.add("dplayer-setting-box-narrow"),i.template.settingBox.classList.add("dplayer-setting-box-speed");for(var e=0;e0?n:0,n=n<1?n:1,i.danmaku.opacity(n)},P=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",D),i.template.danmakuOpacityBox.classList.remove("dplayer-setting-danmaku-active")};this.template.danmakuOpacityBarWrapWrap.addEventListener("click",function(e){var t=e||window.event,n=(t.clientX-l.default.getElementViewLeft(i.template.danmakuOpacityBarWrap))/130;n=n>0?n:0,n=n<1?n:1,i.danmaku.opacity(n)}),this.template.danmakuOpacityBarWrapWrap.addEventListener("mousedown",function(){document.addEventListener("mousemove",D),document.addEventListener("mouseup",P),i.template.danmakuOpacityBox.classList.add("dplayer-setting-danmaku-active")})}1!==this.video.duration&&(this.template.dtime.innerHTML=this.video.duration?l.default.secondToTime(this.video.duration):"00:00"),this.danmaku||(this.options.autoplay&&!o.isMobile?this.play():o.isMobile&&this.pause());var W=function(){i.template.commentSettingBox.classList.contains("dplayer-comment-setting-open")&&i.template.commentSettingBox.classList.remove("dplayer-comment-setting-open")},I=function(){i.template.commentSettingBox.classList.contains("dplayer-comment-setting-open")?i.template.commentSettingBox.classList.remove("dplayer-comment-setting-open"):i.template.commentSettingBox.classList.add("dplayer-comment-setting-open")},H=function(){i.template.controller.classList.contains("dplayer-controller-comment")&&(i.template.controller.classList.remove("dplayer-controller-comment"),i.template.mask.classList.remove("dplayer-mask-show"),i.container.classList.remove("dplayer-show-controller"),W(),i.disableHideController=!1)},O=function(){i.disableHideController=!0,i.template.controller.classList.contains("dplayer-controller-comment")||(i.template.controller.classList.add("dplayer-controller-comment"),i.template.mask.classList.add("dplayer-mask-show"),i.container.classList.add("dplayer-show-controller"),i.template.commentInput.focus())};this.template.mask.addEventListener("click",function(){H()}),this.template.commentButton.addEventListener("click",function(){O()}),this.template.commentSettingButton.addEventListener("click",function(){I()}),this.template.commentColorSettingBox.addEventListener("click",function(){if(i.template.commentColorSettingBox.querySelector("input:checked+span")){var e=i.template.commentColorSettingBox.querySelector("input:checked").value;i.template.commentSettingFill.style.fill=e,i.template.commentInput.style.color=e,i.template.commentSendFill.style.fill=e}});var A=function(){if(i.template.commentInput.blur(),!i.template.commentInput.value.replace(/^\s+|\s+$/g,""))return void i.notice(i.tran("Please input danmaku content!"));i.danmaku.send({text:i.template.commentInput.value,color:i.container.querySelector(".dplayer-comment-setting-color input:checked").value,type:i.container.querySelector(".dplayer-comment-setting-type input:checked").value},function(){i.template.commentInput.value="",H()})};this.template.commentInput.addEventListener("click",function(){W()}),this.template.commentInput.addEventListener("keydown",function(e){13===(e||window.event).keyCode&&A()}),this.template.commentSendButton.addEventListener("click",A),this.fullScreen=new x.default(this),this.template.browserFullButton.addEventListener("click",function(){i.fullScreen.toggle("browser")}),this.template.webFullButton.addEventListener("click",function(){i.fullScreen.toggle("web")});var V=function(e){if(i.focus){var t=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==n&&"true"!==n){var a=e||window.event,s=void 0;switch(a.keyCode){case 32:a.preventDefault(),i.toggle();break;case 37:a.preventDefault(),i.seek(i.video.currentTime-5),E();break;case 39:a.preventDefault(),i.seek(i.video.currentTime+5),E();break;case 38:a.preventDefault(),s=i.volume()+.1,i.volume(s);break;case 40:a.preventDefault(),s=i.volume()-.1,i.volume(s)}}}};this.options.hotkey&&document.addEventListener("keydown",V),document.addEventListener("keydown",function(e){switch((e||window.event).keyCode){case 27:i.fullScreen.isFullScreen("web")&&i.fullScreen.cancel("web")}}),this.container.addEventListener("contextmenu",function(e){var t=e||window.event;t.preventDefault(),i.template.menu.classList.add("dplayer-menu-show");var n=i.container.getBoundingClientRect(),a=t.clientX-n.left,s=t.clientY-n.top;a+i.template.menu.offsetWidth>=n.width?(i.template.menu.style.right=n.width-a+"px",i.template.menu.style.left="initial"):(i.template.menu.style.left=t.clientX-i.container.getBoundingClientRect().left+"px",i.template.menu.style.right="initial"),s+i.template.menu.offsetHeight>=n.height?(i.template.menu.style.bottom=n.height-s+"px",i.template.menu.style.top="initial"):(i.template.menu.style.top=t.clientY-i.container.getBoundingClientRect().top+"px",i.template.menu.style.bottom="initial"),i.template.mask.classList.add("dplayer-mask-show"),i.events.trigger("contextmenu_show"),i.template.mask.addEventListener("click",function(){i.template.mask.classList.remove("dplayer-mask-show"),i.template.menu.classList.remove("dplayer-menu-show"),i.events.trigger("contextmenu_hide")})}),this.options.video.quality&&this.template.qualityList.addEventListener("click",function(e){e.target.classList.contains("dplayer-quality-item")&&i.switchQuality(e.target.dataset.index)}),this.options.screenshot&&this.template.camareButton.addEventListener("click",function(){var e=document.createElement("canvas");e.width=i.video.videoWidth,e.height=i.video.videoHeight,e.getContext("2d").drawImage(i.video,0,0,e.width,e.height);var t=e.toDataURL();i.template.camareButton.href=t,i.template.camareButton.download="DPlayer.png",i.events.trigger("screenshot",t)}),this.options.subtitle&&(this.events.on("subtitle_show",function(){i.template.subtitleButton.dataset.balloon=i.tran("Hide subtitle"),i.template.subtitleButtonInner.style.opacity="",i.user.set("subtitle",1)}),this.events.on("subtitle_hide",function(){i.template.subtitleButton.dataset.balloon=i.tran("Show subtitle"),i.template.subtitleButtonInner.style.opacity="0.4",i.user.set("subtitle",0)}),this.template.subtitleButton.addEventListener("click",function(){i.subtitle.toggle()})),this.initVideo(this.video,this.quality&&this.quality.type||this.options.video.type),B++,M.push(this)}return s(e,[{key:"seek",value:function(e){e=Math.max(e,0),this.video.duration&&(e=Math.min(e,this.video.duration)),this.video.currentTimee&&this.notice(this.tran("REW")+" "+(this.video.currentTime-e).toFixed(0)+" "+this.tran("s")),this.video.currentTime=e,this.danmaku&&this.danmaku.seek(),this.updateBar("played",e/this.video.duration,"width")}},{key:"play",value:function(){if(this.paused=!1,this.video.paused&&(this.template.bezel.innerHTML=this.icons.get("play"),this.template.bezel.classList.add("dplayer-bezel-transition")),this.template.playButton.innerHTML=this.icons.get("pause"),this.video.play(),this.setTime(),this.container.classList.add("dplayer-playing"),this.danmaku&&this.danmaku.play(),this.options.mutex)for(var e=0;e0?e:0,e=e<1?e:1,this.updateBar("volume",e,"width");var n=(100*e).toFixed(0)+"%";this.template.volumeBarWrapWrap.dataset.balloon=n,t||this.user.set("volume",e),i||this.notice(this.tran("Volume")+" "+(100*e).toFixed(0)+"%"),this.video.volume=e,this.video.muted&&(this.video.muted=!1),this.switchVolumeIcon()}return this.video.volume}},{key:"toggle",value:function(){this.video.paused?this.play():this.pause()}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"switchVideo",value:function(e,t){this.pause(),this.video.poster=e.pic?e.pic:"",this.video.src=e.url,this.initMSE(this.video,e.type||"auto"),t&&(this.template.danmakuLoading.style.display="block",this.updateBar("played",0,"width"),this.updateBar("loaded",0,"width"),this.template.ptime.innerHTML="00:00",this.template.danmaku.innerHTML="",this.danmaku&&this.danmaku.reload({id:t.id,address:t.api,token:t.token,maximum:t.maximum,addition:t.addition,user:t.user}))}},{key:"initMSE",value:function(e,t){if(this.type=t,"auto"===this.type&&(/m3u8(#|\?|$)/i.exec(e.src)?this.type="hls":/.flv(#|\?|$)/i.exec(e.src)?this.type="flv":/.mpd(#|\?|$)/i.exec(e.src)?this.type="dash":this.type="normal"),"hls"===this.type&&Hls&&Hls.isSupported()){var i=new Hls;i.loadSource(e.src),i.attachMedia(e)}if("flv"===this.type&&flvjs&&flvjs.isSupported()){var n=flvjs.createPlayer({type:"flv",url:e.src});n.attachMediaElement(e),n.load()}"dash"===this.type&&dashjs&&dashjs.MediaPlayer().create().initialize(e,e.src,!1)}},{key:"initVideo",value:function(e,t){var i=this;this.initMSE(e,t),this.on("durationchange",function(){1!==e.duration&&(i.template.dtime.innerHTML=l.default.secondToTime(e.duration))}),this.on("progress",function(){var t=e.buffered.length?e.buffered.end(e.buffered.length-1)/e.duration:0;i.updateBar("loaded",t,"width")}),this.on("error",function(){i.tran&&i.notice&&i.notice(i.tran("This video fails to load"),-1)}),this.ended=!1,this.on("ended",function(){i.updateBar("played",1,"width"),i.loop?(i.seek(0),e.play()):(i.ended=!0,i.pause()),i.danmaku&&(i.danmaku.danIndex=0)}),this.on("play",function(){i.paused&&i.play()}),this.on("pause",function(){i.paused||i.pause()});for(var n=0;ne.offsetWidth)){var c=i.video.duration*(r/e.offsetWidth);switch(t.style.left=r-20+"px",a.type){case"mouseenter":i.thumbnails&&i.thumbnails.show();break;case"mousemove":i.thumbnails&&i.thumbnails.move(r),t.innerText=l.default.secondToTime(c),i.timeTipsDisplay(!0,t);break;case"mouseleave":i.thumbnails&&i.thumbnails.hide(),i.timeTipsDisplay(!1,t)}}}}}},{key:"timeTipsDisplay",value:function(e,t){if(e){if(this.isTimeTipsShow)return;t.classList.remove("hidden"),this.isTimeTipsShow=!0}else{if(!this.isTimeTipsShow)return;t.classList.add("hidden"),this.isTimeTipsShow=!1}}},{key:"initThumbnails",value:function(){var e=this;this.thumbnails=new b.default(this.template.barPreview,this.template.barWrap.offsetWidth,this.options.video.thumbnails,this.events),this.on("loadedmetadata",function(){e.thumbnails.resize(160,90)})}},{key:"notice",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=n,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("notice_show",e),this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("notice_hide")},i)}},{key:"resize",value:function(){this.danmaku&&this.danmaku.resize(),this.events.trigger("resize")}},{key:"destroy",value:function(){M.splice(M.indexOf(this),1),this.pause(),clearTimeout(this.hideTime),this.video.src="",this.container.innerHTML="",this.events.trigger("destroy");for(var e in this)this.hasOwnProperty(e)&&"paused"!==e&&delete this[e]}}]),e}();e.exports=z},function(e,t){},function(e,t,i){"use strict";var n="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},a=i(5);e.exports=function(e){/mobile/i.test(window.navigator.userAgent)&&(e.autoplay=!1);var t={container:e.element||document.getElementsByClassName("dplayer")[0],live:!1,autoplay:!1,theme:"#b7daff",loop:!1,lang:(navigator.language||navigator.browserLanguage).toLowerCase(),screenshot:!1,hotkey:!0,preload:"auto",volume:.7,apiBackend:a,video:{},icons:{play:["0 0 16 32","M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"],pause:["0 0 17 32","M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"],"volume-up":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z"],"volume-down":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"],"volume-off":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"],loop:["0 0 32 32","M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z"],full:["0 0 32 33","M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z"],"full-in":["0 0 32 33","M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z"],setting:["0 0 32 28","M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z"],right:["0 0 32 32","M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"],comment:["0 0 32 32","M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z"],"comment-off":["0 0 32 32","M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z"],send:["0 0 32 32","M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z"],pallette:["0 0 32 32","M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z"],camera:["0 0 32 32","M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z"],subtitle:["0 0 32 32","M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"]},iconsColor:"#ffffff",contextmenu:[],mutex:!0};for(var i in t)t.hasOwnProperty(i)&&!e.hasOwnProperty(i)&&(e[i]=t[i]);return e.video&&!e.video.type&&(e.video.type="auto"),"object"===n(e.danmaku)&&e.danmaku&&!e.danmaku.user&&(e.danmaku.user="DIYgod"),e.subtitle&&(!e.subtitle.type&&(e.subtitle.type="webvtt"),!e.subtitle.fontSize&&(e.subtitle.fontSize="20px"),!e.subtitle.bottom&&(e.subtitle.bottom="40px"),!e.subtitle.color&&(e.subtitle.color="#fff")),e.video.quality&&(e.video.url=[e.video.quality[e.video.defaultQuality].url]),e.lang&&(e.lang=e.lang.toLowerCase()),e.icons&&(e.icons=Object.assign({},t.icons,e.icons)),e.contextmenu=e.contextmenu.concat([{text:"About author",link:"https://diygod.me"},{text:"About DPlayer",link:"https://github.com/MoePlayer/DPlayer"},{text:"DPlayer feedback",link:"https://github.com/DIYgod/DPlayer/issues"},{text:"DPlayer 1.17.2 4c587e5",link:"https://github.com/MoePlayer/DPlayer/releases"}]),e}},function(e,t,i){"use strict";var n=function(e,t,i,n,a){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState){if(s.status>=200&&s.status<300||304===s.status){var e=JSON.parse(s.responseText);return 1!==e.code?n(s,e):i(s,e)}a(s)}},s.open(null!==t?"POST":"GET",e,!0),s.send(null!==t?JSON.stringify(t):null)};e.exports={send:function(e,t,i){n(e,t,function(e,t){console.log("Post danmaku: ",t),i&&i()},function(e,t){alert(t.msg)},function(e){console.log("Request was unsuccessful: "+e.status)})},read:function(e,t){n(e,null,function(e,i){t(null,i.danmaku)},function(e,i){t({status:e.status,response:i})},function(e){t({status:e.status,response:null})})}}},function(e,t,i){"use strict";e.exports=function(e){var t=this;this.lang=e,this.tran=function(e){return n[t.lang]&&n[t.lang][e]?n[t.lang][e]:e}};var n={"zh-cn":{"Danmaku is loading":"\u5f39\u5e55\u52a0\u8f7d\u4e2d",Top:"\u9876\u90e8",Bottom:"\u5e95\u90e8",Rolling:"\u6eda\u52a8","Input danmaku, hit Enter":"\u8f93\u5165\u5f39\u5e55\uff0c\u56de\u8f66\u53d1\u9001","About author":"\u5173\u4e8e\u4f5c\u8005","DPlayer feedback":"\u64ad\u653e\u5668\u610f\u89c1\u53cd\u9988","About DPlayer":"\u5173\u4e8e DPlayer \u64ad\u653e\u5668",Loop:"\u6d17\u8111\u5faa\u73af",Speed:"\u901f\u5ea6","Opacity for danmaku":"\u5f39\u5e55\u900f\u660e\u5ea6",Normal:"\u6b63\u5e38","Please input danmaku content!":"\u8981\u8f93\u5165\u5f39\u5e55\u5185\u5bb9\u554a\u5582\uff01","Set danmaku color":"\u8bbe\u7f6e\u5f39\u5e55\u989c\u8272","Set danmaku type":"\u8bbe\u7f6e\u5f39\u5e55\u7c7b\u578b","Show danmaku":"\u663e\u793a\u5f39\u5e55","This video fails to load":"\u89c6\u9891\u52a0\u8f7d\u5931\u8d25","Switching to":"\u6b63\u5728\u5207\u6362\u81f3","Switched to":"\u5df2\u7ecf\u5207\u6362\u81f3",quality:"\u753b\u8d28",FF:"\u5feb\u8fdb",REW:"\u5feb\u9000","Unlimited danmaku":"\u6d77\u91cf\u5f39\u5e55","Send danmaku":"\u53d1\u9001\u5f39\u5e55",Setting:"\u8bbe\u7f6e","Full screen":"\u5168\u5c4f","Web full screen":"\u9875\u9762\u5168\u5c4f",Send:"\u53d1\u9001",Screenshot:"\u622a\u56fe",s:"\u79d2","Show subtitle":"\u663e\u793a\u5b57\u5e55","Hide subtitle":"\u9690\u85cf\u5b57\u5e55",Volume:"\u97f3\u91cf",Live:"\u76f4\u64ad"},"zh-tw":{"Danmaku is loading":"\u5f48\u5e55\u52a0\u8f09\u4e2d",Top:"\u9802\u90e8",Bottom:"\u5e95\u90e8",Rolling:"\u6efe\u52d5","Input danmaku, hit Enter":"\u8f38\u5165\u5f48\u5e55\uff0cEnter \u767c\u9001","About author":"\u95dc\u65bc\u4f5c\u8005","DPlayer feedback":"\u64ad\u653e\u5668\u610f\u898b\u53cd\u994b","About DPlayer":"\u95dc\u65bc DPlayer \u64ad\u653e\u5668",Loop:"\u5faa\u74b0\u64ad\u653e",Speed:"\u901f\u5ea6","Opacity for danmaku":"\u5f48\u5e55\u900f\u660e\u5ea6",Normal:"\u6b63\u5e38","Please input danmaku content!":"\u8acb\u8f38\u5165\u5f48\u5e55\u5185\u5bb9\u554a\uff01","Set danmaku color":"\u8a2d\u7f6e\u5f48\u5e55\u984f\u8272","Set danmaku type":"\u8a2d\u7f6e\u5f48\u5e55\u985e\u578b","Show danmaku":"\u986f\u793a\u5f48\u5e55","This video fails to load":"\u8996\u983b\u52a0\u8f09\u5931\u6557","Switching to":"\u6b63\u5728\u5207\u63db\u81f3","Switched to":"\u5df2\u7d93\u5207\u63db\u81f3",quality:"\u756b\u8cea",FF:"\u5feb\u9032",REW:"\u5feb\u9000","Unlimited danmaku":"\u6d77\u91cf\u5f48\u5e55","Send danmaku":"\u767c\u9001\u5f48\u5e55",Setting:"\u8a2d\u7f6e","Full screen":"\u5168\u5c4f","Web full screen":"\u9801\u9762\u5168\u5c4f",Send:"\u767c\u9001",Screenshot:"\u622a\u5716",s:"\u79d2","Show subtitle":"\u986f\u793a\u5b57\u5e55","Hide subtitle":"\u96b1\u85cf\u5b57\u5e55",Volume:"\u97f3\u91cf",Live:"\u76f4\u64ad"}}},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var i=0;i
'+this.tplVideo(!0,e.video.pic,e.screenshot,e.preload,e.video.url,e.subtitle)+(e.logo?'':"")+'
'+(e.danmaku?''+i("Danmaku is loading")+"":"")+'
'+i("Set danmaku color")+'
'+i("Set danmaku type")+'
0:00 / 0:00'+(e.live?''+i("Live")+"":"")+'
'+(e.video.quality?'
'+this.tplQualityList(e.video.quality)+"
":"")+(e.screenshot?''+n.get("camera")+"":"")+'
"+(e.subtitle?'
":"")+'
'+i("Speed")+'
'+n.get("right")+'
'+i("Loop")+'
'+i("Show danmaku")+'
'+i("Unlimited danmaku")+'
'+i("Opacity for danmaku")+'
0.5
0.75
'+i("Normal")+'
1.25
1.5
2
'+this.tplContextmenuList(e.contextmenu,i)+'
'}},{key:"tplDanmakumargin",value:function(e){var t="";if(e)for(var i in e)t+=i+":"+e[i]+";";return t}},{key:"tplContextmenuList",value:function(e,t){for(var i='";return i+=""}},{key:"tplQualityList",value:function(e){for(var t='
',i=0;i'+e[i].name+"
";return t+=""}},{key:"tplVideo",value:function(e,t,i,n,a,s){var o=s&&"webvtt"===s.type;return'"}}]),e}();e.exports=s},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var i=0;i'}}]),e}();e.exports=s},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a="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},s=function(){function e(e,t){for(var i=0;iparseFloat(t.time);)i.push(t),t=this.dan[++this.danIndex];this.draw(i)}window.requestAnimationFrame(function(){e.frame()})}},{key:"opacity",value:function(e){if(void 0!==e){for(var t=this.container.getElementsByClassName("dplayer-danmaku-item"),i=0;i'+e[a].text+"":s.innerHTML=e[a].text,s.style.opacity=t._opacity,s.style.color=e[a].color,s.addEventListener("animationend",function(){t.container.removeChild(s)});var o=t._measure(e[a].text),l=void 0;switch(e[a].type){case"right":l=c(s,e[a].type,o),l>=0&&(s.style.width=o+1+"px",s.style.top=i*l+"px",s.style.transform="translateX(-"+n+"px)");break;case"top":l=c(s,e[a].type),l>=0&&(s.style.top=i*l+"px");break;case"bottom":l=c(s,e[a].type),l>=0&&(s.style.bottom=i*l+"px");break;default:console.error("Can't handled danmaku type: "+e[a].type)}l>=0&&(s.classList.add("dplayer-danmaku-move"),d.appendChild(s))}(u);return this.container.appendChild(d),d}}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}},{key:"_measure",value:function(e){if(!this.context){var t=getComputedStyle(this.container.getElementsByClassName("dplayer-danmaku-item")[0],null);this.context=document.createElement("canvas").getContext("2d"),this.context.font=t.getPropertyValue("font")}return this.context.measureText(e).width}},{key:"seek",value:function(){this.clear();for(var e=0;e=this.options.time()){this.danIndex=e;break}this.danIndex=this.dan.length}}},{key:"clear",value:function(){this.danTunnel={right:{},top:{},bottom:{}},this.danIndex=0,this.options.container.innerHTML="",this.events&&this.events.trigger("danmaku_clear")}},{key:"htmlEncode",value:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}},{key:"resize",value:function(){for(var e=this.container.offsetWidth,t=this.container.getElementsByClassName("dplayer-danmaku-item"),i=0;i0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;case"web":return this.player.container.classList.contains("dplayer-fulled")}}},{key:"request",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":this.player.container.requestFullscreen?this.player.container.requestFullscreen():this.player.container.mozRequestFullScreen?this.player.container.mozRequestFullScreen():this.player.container.webkitRequestFullscreen?this.player.container.webkitRequestFullscreen():this.player.video.webkitEnterFullscreen&&this.player.video.webkitEnterFullscreen();break;case"web":this.player.container.classList.add("dplayer-fulled"),this.lastScrollPosition=o.default.getScrollPosition(),document.body.classList.add("dplayer-web-fullscreen-fix"),this.player.events.trigger("webfullscreen")}}},{key:"cancel",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen();break;case"web":this.player.container.classList.remove("dplayer-fulled"),document.body.classList.remove("dplayer-web-fullscreen-fix"),o.default.setScrollPosition(this.lastScrollPosition),this.player.events.trigger("webfullscreen_cancel")}}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser";this.isFullScreen(e)?this.cancel(e):this.request(e)}}]),e}();e.exports=l},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var i=0;ir&&!n.video.paused&&(n.container.classList.remove("dplayer-loading"),p=!1),r=d},100)},v=function(){clearInterval(n.checkLoading)};this.playedTime=!1,this.animationFrame=function(){n.playedTime&&(n.bar.set("played",n.video.currentTime/n.video.duration,"width"),n.template.ptime.innerHTML=l.default.secondToTime(n.video.currentTime)),window.requestAnimationFrame(n.animationFrame)},window.requestAnimationFrame(this.animationFrame),this.setTime=function(e){e?(n[e+"Time"]=!0,"played"===e&&m()):(n.playedTime=!0,m())},this.clearTime=function(e){e?(n[e+"Time"]=!1,"played"===e&&v()):(n.playedTime=!1,v())},this.options.video.thumbnails&&this.initThumbnails(),this.isTimeTipsShow=!0,this.mouseHandler=this.mouseHandler(this.template.playedBarWrap,this.template.playedBarTime).bind(this),this.template.playedBarWrap.addEventListener("mousemove",this.mouseHandler),this.template.playedBarWrap.addEventListener("mouseenter",this.mouseHandler),this.template.playedBarWrap.addEventListener("mouseleave",this.mouseHandler);var g=void 0,b=function(e){var t=(e.clientX-l.default.getElementViewLeft(n.template.playedBarWrap))/g;t=Math.max(t,0),t=Math.min(t,1),n.bar.set("played",t,"width"),n.template.ptime.innerHTML=l.default.secondToTime(t*n.video.duration)},k=function e(t){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",b);var i=(t.clientX-l.default.getElementViewLeft(n.template.playedBarWrap))/g;i=Math.max(i,0),i=Math.min(i,1),n.bar.set("played",i,"width"),n.seek(n.bar.get("played")*n.video.duration),n.setTime()};this.template.playedBarWrap.addEventListener("mousedown",function(){g=n.template.playedBarWrap.clientWidth,n.clearTime(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",k)});this.switchVolumeIcon=function(){n.volume()>=.95?n.template.volumeIcon.innerHTML=n.icons.get("volume-up"):n.volume()>0?n.template.volumeIcon.innerHTML=n.icons.get("volume-down"):n.template.volumeIcon.innerHTML=n.icons.get("volume-off")};var x=function(e){var t=e||window.event,i=(t.clientX-l.default.getElementViewLeft(n.template.volumeBarWrap)-5.5)/35;n.volume(i)},S=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",x),n.template.volumeButton.classList.remove("dplayer-volume-active")};this.template.volumeBarWrapWrap.addEventListener("click",function(e){var t=e||window.event,i=(t.clientX-l.default.getElementViewLeft(n.template.volumeBarWrap)-5.5)/35;n.volume(i)}),this.template.volumeBarWrapWrap.addEventListener("mousedown",function(){document.addEventListener("mousemove",x),document.addEventListener("mouseup",S),n.template.volumeButton.classList.add("dplayer-volume-active")}),this.template.volumeIcon.addEventListener("click",function(){n.video.muted?(n.video.muted=!1,n.switchVolumeIcon(),n.bar.set("volume",n.volume(),"width")):(n.video.muted=!0,n.template.volumeIcon.innerHTML=n.icons.get("volume-off"),n.bar.set("volume",0,"width"))}),this.hideTime=0;var T=function(){n.container.classList.remove("dplayer-hide-controller"),clearTimeout(n.hideTime),n.hideTime=setTimeout(function(){n.video.played.length&&!n.disableHideController&&(n.container.classList.add("dplayer-hide-controller"),E(),H())},2e3)};o.isMobile||(this.container.addEventListener("mousemove",T),this.container.addEventListener("click",T));var E=function(){n.template.settingBox.classList.contains("dplayer-setting-box-open")&&(n.template.settingBox.classList.remove("dplayer-setting-box-open"),n.template.mask.classList.remove("dplayer-mask-show"),setTimeout(function(){n.template.settingBox.classList.remove("dplayer-setting-box-narrow"),n.template.settingBox.classList.remove("dplayer-setting-box-speed")},300)),n.disableHideController=!1},M=function(){n.disableHideController=!0,n.template.settingBox.classList.add("dplayer-setting-box-open"),n.template.mask.classList.add("dplayer-mask-show")};this.template.mask.addEventListener("click",function(){E()}),this.template.settingButton.addEventListener("click",function(){M()}),this.loop=this.options.loop;var _=this.user.get("danmaku");_||this.danmaku&&this.danmaku.hide();var C=this.user.get("unlimited");if(this.template.loopToggle.checked=this.loop,this.template.loop.addEventListener("click",function(){n.template.loopToggle.checked=!n.template.loopToggle.checked,n.template.loopToggle.checked?n.loop=!0:n.loop=!1,E()}),this.template.showDanmakuToggle.checked=_,this.template.showDanmaku.addEventListener("click",function(){n.template.showDanmakuToggle.checked=!n.template.showDanmakuToggle.checked,n.template.showDanmakuToggle.checked?(_=!0,n.paused||n.danmaku.show()):(_=!1,n.danmaku.hide()),n.user.set("danmaku",_?1:0),E()}),this.template.unlimitDanmakuToggle.checked=C,this.template.unlimitDanmaku.addEventListener("click",function(){n.template.unlimitDanmakuToggle.checked=!n.template.unlimitDanmakuToggle.checked,n.template.unlimitDanmakuToggle.checked?(C=!0,n.danmaku.unlimit(!0)):(C=!1,n.danmaku.unlimit(!1)),n.user.set("unlimited",C?1:0),E()}),this.template.speed.addEventListener("click",function(){n.template.settingBox.classList.add("dplayer-setting-box-narrow"),n.template.settingBox.classList.add("dplayer-setting-box-speed");for(var e=0;e=i.width?(n.template.menu.style.right=i.width-a+"px",n.template.menu.style.left="initial"):(n.template.menu.style.left=t.clientX-n.container.getBoundingClientRect().left+"px",n.template.menu.style.right="initial"),s+n.template.menu.offsetHeight>=i.height?(n.template.menu.style.bottom=i.height-s+"px",n.template.menu.style.top="initial"):(n.template.menu.style.top=t.clientY-n.container.getBoundingClientRect().top+"px",n.template.menu.style.bottom="initial"),n.template.mask.classList.add("dplayer-mask-show"),n.events.trigger("contextmenu_show"),n.template.mask.addEventListener("click",function(){n.template.mask.classList.remove("dplayer-mask-show"),n.template.menu.classList.remove("dplayer-menu-show"),n.events.trigger("contextmenu_hide")})}),this.options.video.quality&&this.template.qualityList.addEventListener("click",function(e){e.target.classList.contains("dplayer-quality-item")&&n.switchQuality(e.target.dataset.index)}),this.options.screenshot&&this.template.camareButton.addEventListener("click",function(){var e=document.createElement("canvas");e.width=n.video.videoWidth,e.height=n.video.videoHeight,e.getContext("2d").drawImage(n.video,0,0,e.width,e.height);var t=e.toDataURL();n.template.camareButton.href=t,n.template.camareButton.download="DPlayer.png",n.events.trigger("screenshot",t)}),this.options.subtitle&&(this.events.on("subtitle_show",function(){n.template.subtitleButton.dataset.balloon=n.tran("Hide subtitle"),n.template.subtitleButtonInner.style.opacity="",n.user.set("subtitle",1)}),this.events.on("subtitle_hide",function(){n.template.subtitleButton.dataset.balloon=n.tran("Show subtitle"),n.template.subtitleButtonInner.style.opacity="0.4",n.user.set("subtitle",0)}),this.template.subtitleButton.addEventListener("click",function(){n.subtitle.toggle()})),this.initVideo(this.video,this.quality&&this.quality.type||this.options.video.type),z++,F.push(this)}return s(e,[{key:"seek",value:function(e){e=Math.max(e,0),this.video.duration&&(e=Math.min(e,this.video.duration)),this.video.currentTimee&&this.notice(this.tran("REW")+" "+(this.video.currentTime-e).toFixed(0)+" "+this.tran("s")),this.video.currentTime=e,this.danmaku&&this.danmaku.seek(),this.bar.set("played",e/this.video.duration,"width")}},{key:"play",value:function(){if(this.paused=!1,this.video.paused&&(this.template.bezel.innerHTML=this.icons.get("play"),this.template.bezel.classList.add("dplayer-bezel-transition")),this.template.playButton.innerHTML=this.icons.get("pause"),this.video.play(),this.setTime(),this.container.classList.add("dplayer-playing"),this.danmaku&&this.danmaku.play(),this.options.mutex)for(var e=0;ee.offsetWidth)){var c=n.video.duration*(r/e.offsetWidth);switch(t.style.left=r-20+"px",a.type){case"mouseenter":n.thumbnails&&n.thumbnails.show();break;case"mousemove":n.thumbnails&&n.thumbnails.move(r),t.innerText=l.default.secondToTime(c),n.timeTipsDisplay(!0,t);break;case"mouseleave":n.thumbnails&&n.thumbnails.hide(),n.timeTipsDisplay(!1,t)}}}}}},{key:"timeTipsDisplay",value:function(e,t){if(e){if(this.isTimeTipsShow)return;t.classList.remove("hidden"),this.isTimeTipsShow=!0}else{if(!this.isTimeTipsShow)return;t.classList.add("hidden"),this.isTimeTipsShow=!1}}},{key:"initThumbnails",value:function(){var e=this;this.thumbnails=new b.default(this.template.barPreview,this.template.barWrap.offsetWidth,this.options.video.thumbnails,this.events),this.on("loadedmetadata",function(){e.thumbnails.resize(160,90)})}},{key:"notice",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("notice_show",e),this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("notice_hide")},n)}},{key:"resize",value:function(){this.danmaku&&this.danmaku.resize(),this.events.trigger("resize")}},{key:"destroy",value:function(){F.splice(F.indexOf(this),1),this.pause(),clearTimeout(this.hideTime),this.video.src="",this.container.innerHTML="",this.events.trigger("destroy");for(var e in this)this.hasOwnProperty(e)&&"paused"!==e&&delete this[e]}}]),e}();e.exports=_},function(e,t){},function(e,t,n){"use strict";var i="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},a=n(5);e.exports=function(e){/mobile/i.test(window.navigator.userAgent)&&(e.autoplay=!1);var t={container:e.element||document.getElementsByClassName("dplayer")[0],live:!1,autoplay:!1,theme:"#b7daff",loop:!1,lang:(navigator.language||navigator.browserLanguage).toLowerCase(),screenshot:!1,hotkey:!0,preload:"auto",volume:.7,apiBackend:a,video:{},icons:{play:["0 0 16 32","M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"],pause:["0 0 17 32","M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"],"volume-up":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z"],"volume-down":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"],"volume-off":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"],loop:["0 0 32 32","M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z"],full:["0 0 32 33","M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z"],"full-in":["0 0 32 33","M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z"],setting:["0 0 32 28","M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z"],right:["0 0 32 32","M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"],comment:["0 0 32 32","M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z"],"comment-off":["0 0 32 32","M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z"],send:["0 0 32 32","M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z"],pallette:["0 0 32 32","M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z"],camera:["0 0 32 32","M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z"],subtitle:["0 0 32 32","M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"]},iconsColor:"#ffffff",contextmenu:[],mutex:!0};for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n]);return e.video&&!e.video.type&&(e.video.type="auto"),"object"===i(e.danmaku)&&e.danmaku&&!e.danmaku.user&&(e.danmaku.user="DIYgod"),e.subtitle&&(!e.subtitle.type&&(e.subtitle.type="webvtt"),!e.subtitle.fontSize&&(e.subtitle.fontSize="20px"),!e.subtitle.bottom&&(e.subtitle.bottom="40px"),!e.subtitle.color&&(e.subtitle.color="#fff")),e.video.quality&&(e.video.url=[e.video.quality[e.video.defaultQuality].url]),e.lang&&(e.lang=e.lang.toLowerCase()),e.icons&&(e.icons=Object.assign({},t.icons,e.icons)),e.contextmenu=e.contextmenu.concat([{text:"About author",link:"https://diygod.me"},{text:"About DPlayer",link:"https://github.com/MoePlayer/DPlayer"},{text:"DPlayer feedback",link:"https://github.com/DIYgod/DPlayer/issues"},{text:"DPlayer 1.17.2 febfc6a",link:"https://github.com/MoePlayer/DPlayer/releases"}]),e}},function(e,t,n){"use strict";var i=function(e,t,n,i,a){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState){if(s.status>=200&&s.status<300||304===s.status){var e=JSON.parse(s.responseText);return 1!==e.code?i(s,e):n(s,e)}a(s)}},s.open(null!==t?"POST":"GET",e,!0),s.send(null!==t?JSON.stringify(t):null)};e.exports={send:function(e,t,n){i(e,t,function(e,t){console.log("Post danmaku: ",t),n&&n()},function(e,t){alert(t.msg)},function(e){console.log("Request was unsuccessful: "+e.status)})},read:function(e,t){i(e,null,function(e,n){t(null,n.danmaku)},function(e,n){t({status:e.status,response:n})},function(e){t({status:e.status,response:null})})}}},function(e,t,n){"use strict";e.exports=function(e){var t=this;this.lang=e,this.tran=function(e){return i[t.lang]&&i[t.lang][e]?i[t.lang][e]:e}};var i={"zh-cn":{"Danmaku is loading":"\u5f39\u5e55\u52a0\u8f7d\u4e2d",Top:"\u9876\u90e8",Bottom:"\u5e95\u90e8",Rolling:"\u6eda\u52a8","Input danmaku, hit Enter":"\u8f93\u5165\u5f39\u5e55\uff0c\u56de\u8f66\u53d1\u9001","About author":"\u5173\u4e8e\u4f5c\u8005","DPlayer feedback":"\u64ad\u653e\u5668\u610f\u89c1\u53cd\u9988","About DPlayer":"\u5173\u4e8e DPlayer \u64ad\u653e\u5668",Loop:"\u6d17\u8111\u5faa\u73af",Speed:"\u901f\u5ea6","Opacity for danmaku":"\u5f39\u5e55\u900f\u660e\u5ea6",Normal:"\u6b63\u5e38","Please input danmaku content!":"\u8981\u8f93\u5165\u5f39\u5e55\u5185\u5bb9\u554a\u5582\uff01","Set danmaku color":"\u8bbe\u7f6e\u5f39\u5e55\u989c\u8272","Set danmaku type":"\u8bbe\u7f6e\u5f39\u5e55\u7c7b\u578b","Show danmaku":"\u663e\u793a\u5f39\u5e55","This video fails to load":"\u89c6\u9891\u52a0\u8f7d\u5931\u8d25","Switching to":"\u6b63\u5728\u5207\u6362\u81f3","Switched to":"\u5df2\u7ecf\u5207\u6362\u81f3",quality:"\u753b\u8d28",FF:"\u5feb\u8fdb",REW:"\u5feb\u9000","Unlimited danmaku":"\u6d77\u91cf\u5f39\u5e55","Send danmaku":"\u53d1\u9001\u5f39\u5e55",Setting:"\u8bbe\u7f6e","Full screen":"\u5168\u5c4f","Web full screen":"\u9875\u9762\u5168\u5c4f",Send:"\u53d1\u9001",Screenshot:"\u622a\u56fe",s:"\u79d2","Show subtitle":"\u663e\u793a\u5b57\u5e55","Hide subtitle":"\u9690\u85cf\u5b57\u5e55",Volume:"\u97f3\u91cf",Live:"\u76f4\u64ad"},"zh-tw":{"Danmaku is loading":"\u5f48\u5e55\u52a0\u8f09\u4e2d",Top:"\u9802\u90e8",Bottom:"\u5e95\u90e8",Rolling:"\u6efe\u52d5","Input danmaku, hit Enter":"\u8f38\u5165\u5f48\u5e55\uff0cEnter \u767c\u9001","About author":"\u95dc\u65bc\u4f5c\u8005","DPlayer feedback":"\u64ad\u653e\u5668\u610f\u898b\u53cd\u994b","About DPlayer":"\u95dc\u65bc DPlayer \u64ad\u653e\u5668",Loop:"\u5faa\u74b0\u64ad\u653e",Speed:"\u901f\u5ea6","Opacity for danmaku":"\u5f48\u5e55\u900f\u660e\u5ea6",Normal:"\u6b63\u5e38","Please input danmaku content!":"\u8acb\u8f38\u5165\u5f48\u5e55\u5185\u5bb9\u554a\uff01","Set danmaku color":"\u8a2d\u7f6e\u5f48\u5e55\u984f\u8272","Set danmaku type":"\u8a2d\u7f6e\u5f48\u5e55\u985e\u578b","Show danmaku":"\u986f\u793a\u5f48\u5e55","This video fails to load":"\u8996\u983b\u52a0\u8f09\u5931\u6557","Switching to":"\u6b63\u5728\u5207\u63db\u81f3","Switched to":"\u5df2\u7d93\u5207\u63db\u81f3",quality:"\u756b\u8cea",FF:"\u5feb\u9032",REW:"\u5feb\u9000","Unlimited danmaku":"\u6d77\u91cf\u5f48\u5e55","Send danmaku":"\u767c\u9001\u5f48\u5e55",Setting:"\u8a2d\u7f6e","Full screen":"\u5168\u5c4f","Web full screen":"\u9801\u9762\u5168\u5c4f",Send:"\u767c\u9001",Screenshot:"\u622a\u5716",s:"\u79d2","Show subtitle":"\u986f\u793a\u5b57\u5e55","Hide subtitle":"\u96b1\u85cf\u5b57\u5e55",Volume:"\u97f3\u91cf",Live:"\u76f4\u64ad"}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n
'+this.tplVideo(!0,e.video.pic,e.screenshot,e.preload,e.video.url,e.subtitle)+(e.logo?'':"")+'
'+(e.danmaku?''+n("Danmaku is loading")+"":"")+'
'+n("Set danmaku color")+'
'+n("Set danmaku type")+'
0:00 / 0:00'+(e.live?''+n("Live")+"":"")+'
'+(e.video.quality?'
'+this.tplQualityList(e.video.quality)+"
":"")+(e.screenshot?''+i.get("camera")+"":"")+'
"+(e.subtitle?'
":"")+'
'+n("Speed")+'
'+i.get("right")+'
'+n("Loop")+'
'+n("Show danmaku")+'
'+n("Unlimited danmaku")+'
'+n("Opacity for danmaku")+'
0.5
0.75
'+n("Normal")+'
1.25
1.5
2
'+this.tplContextmenuList(e.contextmenu,n)+'
'}},{key:"tplDanmakumargin",value:function(e){var t="";if(e)for(var n in e)t+=n+":"+e[n]+";";return t}},{key:"tplContextmenuList",value:function(e,t){for(var n='";return n+=""}},{key:"tplQualityList",value:function(e){for(var t='
',n=0;n'+e[n].name+"
";return t+=""}},{key:"tplVideo",value:function(e,t,n,i,a,s){var o=s&&"webvtt"===s.type;return'"}}]),e}();e.exports=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n'}}]),e}();e.exports=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a="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},s=function(){function e(e,t){for(var n=0;nparseFloat(t.time);)n.push(t),t=this.dan[++this.danIndex];this.draw(n)}window.requestAnimationFrame(function(){e.frame()})}},{key:"opacity",value:function(e){if(void 0!==e){for(var t=this.container.getElementsByClassName("dplayer-danmaku-item"),n=0;n'+e[a].text+"":s.innerHTML=e[a].text,s.style.opacity=t._opacity,s.style.color=e[a].color,s.addEventListener("animationend",function(){t.container.removeChild(s)});var o=t._measure(e[a].text),l=void 0;switch(e[a].type){case"right":l=c(s,e[a].type,o),l>=0&&(s.style.width=o+1+"px",s.style.top=n*l+"px",s.style.transform="translateX(-"+i+"px)");break;case"top":l=c(s,e[a].type),l>=0&&(s.style.top=n*l+"px");break;case"bottom":l=c(s,e[a].type),l>=0&&(s.style.bottom=n*l+"px");break;default:console.error("Can't handled danmaku type: "+e[a].type)}l>=0&&(s.classList.add("dplayer-danmaku-move"),d.appendChild(s))}(u);return this.container.appendChild(d),d}}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}},{key:"_measure",value:function(e){if(!this.context){var t=getComputedStyle(this.container.getElementsByClassName("dplayer-danmaku-item")[0],null);this.context=document.createElement("canvas").getContext("2d"),this.context.font=t.getPropertyValue("font")}return this.context.measureText(e).width}},{key:"seek",value:function(){this.clear();for(var e=0;e=this.options.time()){this.danIndex=e;break}this.danIndex=this.dan.length}}},{key:"clear",value:function(){this.danTunnel={right:{},top:{},bottom:{}},this.danIndex=0,this.options.container.innerHTML="",this.events&&this.events.trigger("danmaku_clear")}},{key:"htmlEncode",value:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}},{key:"resize",value:function(){for(var e=this.container.offsetWidth,t=this.container.getElementsByClassName("dplayer-danmaku-item"),n=0;n0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;case"web":return this.player.container.classList.contains("dplayer-fulled")}}},{key:"request",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":this.player.container.requestFullscreen?this.player.container.requestFullscreen():this.player.container.mozRequestFullScreen?this.player.container.mozRequestFullScreen():this.player.container.webkitRequestFullscreen?this.player.container.webkitRequestFullscreen():this.player.video.webkitEnterFullscreen&&this.player.video.webkitEnterFullscreen();break;case"web":this.player.container.classList.add("dplayer-fulled"),this.lastScrollPosition=o.default.getScrollPosition(),document.body.classList.add("dplayer-web-fullscreen-fix"),this.player.events.trigger("webfullscreen")}}},{key:"cancel",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen();break;case"web":this.player.container.classList.remove("dplayer-fulled"),document.body.classList.remove("dplayer-web-fullscreen-fix"),o.default.setScrollPosition(this.lastScrollPosition),this.player.events.trigger("webfullscreen_cancel")}}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser";if(this.isFullScreen(e))this.cancel(e);else{this.request(e);var t="browser"===e?"web":"browser";this.isFullScreen(t)&&this.cancel(t)}}}]),e}();e.exports=l},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n };\n document.addEventListener('click', function () {\n _this.focus = false;\n }, true);\n this.container.addEventListener('click', function () {\n _this.focus = true;\n }, true);\n if (this.options.danmaku) {\n this.danmaku = new _danmaku2.default({\n container: this.template.danmaku,\n opacity: this.user.get('opacity'),\n callback: function callback() {\n setTimeout(function () {\n _this.template.danmakuLoading.style.display = 'none';\n if (_this.options.autoplay && !_utils.isMobile) {\n _this.play();\n } else if (_utils.isMobile) {\n _this.pause();\n }\n }, 0);\n },\n error: function error(msg) {\n _this.notice(msg);\n },\n apiBackend: this.options.apiBackend,\n borderColor: this.options.theme,\n height: this.arrow ? 24 : 30,\n time: function time() {\n return _this.video.currentTime;\n },\n unlimited: this.user.get('unlimited'),\n api: {\n id: this.options.danmaku.id,\n address: this.options.danmaku.api,\n token: this.options.danmaku.token,\n maximum: this.options.danmaku.maximum,\n addition: this.options.danmaku.addition,\n user: this.options.danmaku.user\n },\n events: this.events\n });\n }\n this.arrow = this.container.offsetWidth <= 500;\n if (this.arrow) {\n var arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = '.dplayer .dplayer-danmaku{font-size:18px}';\n document.head.appendChild(arrowStyle);\n }\n this.video = this.template.video;\n this.template.bezel.addEventListener('animationend', function () {\n _this.template.bezel.classList.remove('dplayer-bezel-transition');\n });\n this.paused = true;\n this.template.playButton.addEventListener('click', function () {\n _this.toggle();\n });\n if (!_utils.isMobile) {\n this.template.videoWrap.addEventListener('click', function () {\n _this.toggle();\n });\n this.template.controllerMask.addEventListener('click', function () {\n _this.toggle();\n });\n } else {\n var toggleController = function toggleController() {\n if (_this.container.classList.contains('dplayer-hide-controller')) {\n _this.container.classList.remove('dplayer-hide-controller');\n } else {\n _this.container.classList.add('dplayer-hide-controller');\n }\n };\n this.template.videoWrap.addEventListener('click', toggleController);\n this.template.controllerMask.addEventListener('click', toggleController);\n }\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime;\n if (!bufferingDetected && currentPlayPos === lastPlayPos && !_this.video.paused) {\n _this.container.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos && !_this.video.paused) {\n _this.container.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.playedTime = false;\n this.animationFrame = function () {\n if (_this.playedTime) {\n _this.updateBar('played', _this.video.currentTime / _this.video.duration, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(_this.video.currentTime);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\n }\n }\n };\n if (this.options.video.thumbnails) {\n this.initThumbnails();\n }\n this.isTimeTipsShow = true;\n this.mouseHandler = this.mouseHandler(this.template.playedBarWrap, this.template.playedBarTime).bind(this);\n this.template.playedBarWrap.addEventListener('mousemove', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseenter', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseleave', this.mouseHandler);\n var thumbMove = function thumbMove(e) {\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(percentage * _this.video.duration);\n };\n var thumbUp = function thumbUp(e) {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.seek(parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration);\n _this.setTime();\n };\n this.template.playedBarWrap.addEventListener('mousedown', function () {\n barWidth = _this.template.playedBarWrap.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n var vWidth = 35;\n this.switchVolumeIcon = function () {\n if (_this.volume() >= 0.95) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-up');\n } else if (_this.volume() > 0) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-down');\n } else {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n }\n };\n var volumeMove = function volumeMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n };\n var volumeUp = function volumeUp() {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n _this.template.volumeButton.classList.remove('dplayer-volume-active');\n };\n this.template.volumeBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n });\n this.template.volumeBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n _this.template.volumeButton.classList.add('dplayer-volume-active');\n });\n this.template.volumeIcon.addEventListener('click', function () {\n if (_this.video.muted) {\n _this.video.muted = false;\n _this.switchVolumeIcon();\n _this.updateBar('volume', _this.volume(), 'width');\n } else {\n _this.video.muted = true;\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n _this.updateBar('volume', 0, 'width');\n }\n });\n this.hideTime = 0;\n var hideController = function hideController() {\n _this.container.classList.remove('dplayer-hide-controller');\n clearTimeout(_this.hideTime);\n _this.hideTime = setTimeout(function () {\n if (_this.video.played.length && !_this.disableHideController) {\n _this.container.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n if (!_utils.isMobile) {\n this.container.addEventListener('mousemove', hideController);\n this.container.addEventListener('click', hideController);\n }\n var closeSetting = function closeSetting() {\n if (_this.template.settingBox.classList.contains('dplayer-setting-box-open')) {\n _this.template.settingBox.classList.remove('dplayer-setting-box-open');\n _this.template.mask.classList.remove('dplayer-mask-show');\n setTimeout(function () {\n _this.template.settingBox.classList.remove('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.remove('dplayer-setting-box-speed');\n }, 300);\n }\n _this.disableHideController = false;\n };\n var openSetting = function openSetting() {\n _this.disableHideController = true;\n _this.template.settingBox.classList.add('dplayer-setting-box-open');\n _this.template.mask.classList.add('dplayer-mask-show');\n };\n this.template.mask.addEventListener('click', function () {\n closeSetting();\n });\n this.template.settingButton.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.options.loop;\n var showdan = this.user.get('danmaku');\n if (!showdan) {\n this.danmaku && this.danmaku.hide();\n }\n var unlimitDan = this.user.get('unlimited');\n this.template.loopToggle.checked = this.loop;\n this.template.loop.addEventListener('click', function () {\n _this.template.loopToggle.checked = !_this.template.loopToggle.checked;\n if (_this.template.loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n this.template.showDanmakuToggle.checked = showdan;\n this.template.showDanmaku.addEventListener('click', function () {\n _this.template.showDanmakuToggle.checked = !_this.template.showDanmakuToggle.checked;\n if (_this.template.showDanmakuToggle.checked) {\n showdan = true;\n if (!_this.paused) {\n _this.danmaku.show();\n }\n } else {\n showdan = false;\n _this.danmaku.hide();\n }\n _this.user.set('danmaku', showdan ? 1 : 0);\n closeSetting();\n });\n this.template.unlimitDanmakuToggle.checked = unlimitDan;\n this.template.unlimitDanmaku.addEventListener('click', function () {\n _this.template.unlimitDanmakuToggle.checked = !_this.template.unlimitDanmakuToggle.checked;\n if (_this.template.unlimitDanmakuToggle.checked) {\n unlimitDan = true;\n _this.danmaku.unlimit(true);\n } else {\n unlimitDan = false;\n _this.danmaku.unlimit(false);\n }\n _this.user.set('unlimited', unlimitDan ? 1 : 0);\n closeSetting();\n });\n this.template.speed.addEventListener('click', function () {\n _this.template.settingBox.classList.add('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.add('dplayer-setting-box-speed');\n var _loop = function _loop(i) {\n _this.template.speedItem[i].addEventListener('click', function () {\n _this.video.playbackRate = _this.template.speedItem[i].dataset.speed;\n closeSetting();\n });\n };\n for (var i = 0; i < _this.template.speedItem.length; i++) {\n _loop(i);\n }\n });\n if (this.danmaku) {\n bar.danmakuBar = this.template.danmakuOpacityBar;\n var dWidth = 130;\n this.on('danmaku_opacity', function (percentage) {\n _this.updateBar('danmaku', percentage, 'width');\n _this.user.set('opacity', percentage);\n });\n this.danmaku.opacity(this.user.get('opacity'));\n var danmakuMove = function danmakuMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.danmaku.opacity(percentage);\n };\n var danmakuUp = function danmakuUp() {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n _this.template.danmakuOpacityBox.classList.remove('dplayer-setting-danmaku-active');\n };\n this.template.danmakuOpacityBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.danmaku.opacity(percentage);\n });\n this.template.danmakuOpacityBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n _this.template.danmakuOpacityBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n if (this.video.duration !== 1) {\n this.template.dtime.innerHTML = this.video.duration ? _utils2.default.secondToTime(this.video.duration) : '00:00';\n }\n if (!this.danmaku) {\n if (this.options.autoplay && !_utils.isMobile) {\n this.play();\n } else if (_utils.isMobile) {\n this.pause();\n }\n }\n var closeCommentSetting = function closeCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n var toggleCommentSetting = function toggleCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n } else {\n _this.template.commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n var closeComment = function closeComment() {\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n return;\n }\n _this.template.controller.classList.remove('dplayer-controller-comment');\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.container.classList.remove('dplayer-show-controller');\n closeCommentSetting();\n _this.disableHideController = false;\n };\n var openComment = function openComment() {\n _this.disableHideController = true;\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n _this.template.controller.classList.add('dplayer-controller-comment');\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.container.classList.add('dplayer-show-controller');\n _this.template.commentInput.focus();\n }\n };\n this.template.mask.addEventListener('click', function () {\n closeComment();\n });\n this.template.commentButton.addEventListener('click', function () {\n openComment();\n });\n this.template.commentSettingButton.addEventListener('click', function () {\n toggleCommentSetting();\n });\n this.template.commentColorSettingBox.addEventListener('click', function () {\n var sele = _this.template.commentColorSettingBox.querySelector('input:checked+span');\n if (sele) {\n var color = _this.template.commentColorSettingBox.querySelector('input:checked').value;\n _this.template.commentSettingFill.style.fill = color;\n _this.template.commentInput.style.color = color;\n _this.template.commentSendFill.style.fill = color;\n }\n });\n var sendComment = function sendComment() {\n _this.template.commentInput.blur();\n if (!_this.template.commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\n }\n _this.danmaku.send({\n text: _this.template.commentInput.value,\n color: _this.container.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: _this.container.querySelector('.dplayer-comment-setting-type input:checked').value\n }, function () {\n _this.template.commentInput.value = '';\n closeComment();\n });\n };\n this.template.commentInput.addEventListener('click', function () {\n closeCommentSetting();\n });\n this.template.commentInput.addEventListener('keydown', function (e) {\n var event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n this.template.commentSendButton.addEventListener('click', sendComment);\n this.fullScreen = new _fullscreen2.default(this);\n this.template.browserFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('browser');\n });\n this.template.webFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('web');\n });\n var handleKeyDown = function handleKeyDown(e) {\n if (_this.focus) {\n var tag = document.activeElement.tagName.toUpperCase();\n var editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n var event = e || window.event;\n var percentage = void 0;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n _this.toggle();\n break;\n case 37:\n event.preventDefault();\n _this.seek(_this.video.currentTime - 5);\n hideController();\n break;\n case 39:\n event.preventDefault();\n _this.seek(_this.video.currentTime + 5);\n hideController();\n break;\n case 38:\n event.preventDefault();\n percentage = _this.volume() + 0.1;\n _this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = _this.volume() - 0.1;\n _this.volume(percentage);\n break;\n }\n }\n }\n };\n if (this.options.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', function (e) {\n var event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (_this.fullScreen.isFullScreen('web')) {\n _this.fullScreen.cancel('web');\n }\n break;\n }\n });\n this.container.addEventListener('contextmenu', function (e) {\n var event = e || window.event;\n event.preventDefault();\n _this.template.menu.classList.add('dplayer-menu-show');\n var clientRect = _this.container.getBoundingClientRect();\n var menuLeft = event.clientX - clientRect.left;\n var menuTop = event.clientY - clientRect.top;\n if (menuLeft + _this.template.menu.offsetWidth >= clientRect.width) {\n _this.template.menu.style.right = clientRect.width - menuLeft + 'px';\n _this.template.menu.style.left = 'initial';\n } else {\n _this.template.menu.style.left = event.clientX - _this.container.getBoundingClientRect().left + 'px';\n _this.template.menu.style.right = 'initial';\n }\n if (menuTop + _this.template.menu.offsetHeight >= clientRect.height) {\n _this.template.menu.style.bottom = clientRect.height - menuTop + 'px';\n _this.template.menu.style.top = 'initial';\n } else {\n _this.template.menu.style.top = event.clientY - _this.container.getBoundingClientRect().top + 'px';\n _this.template.menu.style.bottom = 'initial';\n }\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.events.trigger('contextmenu_show');\n _this.template.mask.addEventListener('click', function () {\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.template.menu.classList.remove('dplayer-menu-show');\n _this.events.trigger('contextmenu_hide');\n });\n });\n if (this.options.video.quality) {\n this.template.qualityList.addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.options.screenshot) {\n this.template.camareButton.addEventListener('click', function () {\n var canvas = document.createElement('canvas');\n canvas.width = _this.video.videoWidth;\n canvas.height = _this.video.videoHeight;\n canvas.getContext('2d').drawImage(_this.video, 0, 0, canvas.width, canvas.height);\n var dataURL = canvas.toDataURL();\n _this.template.camareButton.href = dataURL;\n _this.template.camareButton.download = 'DPlayer.png';\n _this.events.trigger('screenshot', dataURL);\n });\n }\n if (this.options.subtitle) {\n this.events.on('subtitle_show', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Hide subtitle');\n _this.template.subtitleButtonInner.style.opacity = '';\n _this.user.set('subtitle', 1);\n });\n this.events.on('subtitle_hide', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Show subtitle');\n _this.template.subtitleButtonInner.style.opacity = '0.4';\n _this.user.set('subtitle', 0);\n });\n this.template.subtitleButton.addEventListener('click', function () {\n _this.subtitle.toggle();\n });\n }\n this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type);\n index++;\n instances.push(this);\n }\n _createClass(DPlayer, [\n {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n if (this.video.duration) {\n time = Math.min(time, this.video.duration);\n }\n if (this.video.currentTime < time) {\n this.notice(this.tran('FF') + ' ' + (time - this.video.currentTime).toFixed(0) + ' ' + this.tran('s'));\n } else if (this.video.currentTime > time) {\n this.notice(this.tran('REW') + ' ' + (this.video.currentTime - time).toFixed(0) + ' ' + this.tran('s'));\n }\n this.video.currentTime = time;\n if (this.danmaku) {\n this.danmaku.seek();\n }\n this.updateBar('played', time / this.video.duration, 'width');\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n if (this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('play');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.template.playButton.innerHTML = this.icons.get('pause');\n this.video.play();\n this.setTime();\n this.container.classList.add('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.play();\n }\n if (this.options.mutex) {\n for (var i = 0; i < instances.length; i++) {\n if (this !== instances[i]) {\n instances[i].pause();\n }\n }\n }\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.container.classList.remove('dplayer-loading');\n if (!this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('pause');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.ended = false;\n this.template.playButton.innerHTML = this.icons.get('play');\n this.video.pause();\n this.clearTime();\n this.container.classList.remove('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.pause();\n }\n }\n },\n {\n key: 'volume',\n value: function volume(percentage, nostorage, nonotice) {\n percentage = parseFloat(percentage);\n if (!isNaN(percentage)) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('volume', percentage, 'width');\n var formatPercentage = (percentage * 100).toFixed(0) + '%';\n this.template.volumeBarWrapWrap.dataset.balloon = formatPercentage;\n if (!nostorage) {\n this.user.set('volume', percentage);\n }\n if (!nonotice) {\n this.notice(this.tran('Volume') + ' ' + (percentage * 100).toFixed(0) + '%');\n }\n this.video.volume = percentage;\n if (this.video.muted) {\n this.video.muted = false;\n }\n this.switchVolumeIcon();\n }\n return this.video.volume;\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.video.paused) {\n this.play();\n } else {\n this.pause();\n }\n }\n },\n {\n key: 'on',\n value: function on(name, callback) {\n this.events.on(name, callback);\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmakuAPI) {\n this.pause();\n this.video.poster = video.pic ? video.pic : '';\n this.video.src = video.url;\n this.initMSE(this.video, video.type || 'auto');\n if (danmakuAPI) {\n this.template.danmakuLoading.style.display = 'block';\n this.updateBar('played', 0, 'width');\n this.updateBar('loaded', 0, 'width');\n this.template.ptime.innerHTML = '00:00';\n this.template.danmaku.innerHTML = '';\n if (this.danmaku) {\n this.danmaku.reload({\n id: danmakuAPI.id,\n address: danmakuAPI.api,\n token: danmakuAPI.token,\n maximum: danmakuAPI.maximum,\n addition: danmakuAPI.addition,\n user: danmakuAPI.user\n });\n }\n }\n }\n },\n {\n key: 'initMSE',\n value: function initMSE(video, type) {\n this.type = type;\n if (this.type === 'auto') {\n if (/m3u8(#|\\?|$)/i.exec(video.src)) {\n this.type = 'hls';\n } else if (/.flv(#|\\?|$)/i.exec(video.src)) {\n this.type = 'flv';\n } else if (/.mpd(#|\\?|$)/i.exec(video.src)) {\n this.type = 'dash';\n } else {\n this.type = 'normal';\n }\n }\n if (this.type === 'hls' && Hls && Hls.isSupported()) {\n var hls = new Hls();\n hls.loadSource(video.src);\n hls.attachMedia(video);\n }\n if (this.type === 'flv' && flvjs && flvjs.isSupported()) {\n var flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: video.src\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n }\n if (this.type === 'dash' && dashjs) {\n dashjs.MediaPlayer().create().initialize(video, video.src, false);\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo(video, type) {\n var _this2 = this;\n this.initMSE(video, type);\n this.on('durationchange', function () {\n if (video.duration !== 1) {\n _this2.template.dtime.innerHTML = _utils2.default.secondToTime(video.duration);\n }\n });\n this.on('progress', function () {\n var percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0;\n _this2.updateBar('loaded', percentage, 'width');\n });\n this.on('error', function () {\n _this2.tran && _this2.notice && _this2.notice(_this2.tran('This video fails to load'), -1);\n });\n this.ended = false;\n this.on('ended', function () {\n _this2.updateBar('played', 1, 'width');\n if (!_this2.loop) {\n _this2.ended = true;\n _this2.pause();\n } else {\n _this2.seek(0);\n video.play();\n }\n if (_this2.danmaku) {\n _this2.danmaku.danIndex = 0;\n }\n });\n this.on('play', function () {\n if (_this2.paused) {\n _this2.play();\n }\n });\n this.on('pause', function () {\n if (!_this2.paused) {\n _this2.pause();\n }\n });\n var _loop2 = function _loop2(i) {\n video.addEventListener(_this2.events.videoEvents[i], function () {\n _this2.events.trigger(_this2.events.videoEvents[i]);\n });\n };\n for (var i = 0; i < this.events.videoEvents.length; i++) {\n _loop2(i);\n }\n this.volume(this.user.get('volume'), true, true);\n if (this.options.subtitle) {\n this.subtitle = new _subtitle2.default(this.template.subtitle, this.video, this.options.subtitle, this.events);\n if (!this.user.get('subtitle')) {\n this.subtitle.hide();\n }\n }\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this3 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.options.video.quality[index];\n this.template.qualityButton.innerHTML = this.quality.name;\n var paused = this.video.paused;\n this.video.pause();\n var videoHTML = this.template.tplVideo(false, null, this.options.screenshot, 'auto', this.quality.url, this.options.subtitle);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n this.template.videoWrap.insertBefore(videoEle, this.template.videoWrap.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = videoEle;\n this.initVideo(this.video, this.quality.type || this.options.video.type);\n this.seek(this.prevVideo.currentTime);\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.events.trigger('quality_start', this.quality);\n this.on('canplay', function () {\n if (_this3.prevVideo) {\n if (_this3.video.currentTime !== _this3.prevVideo.currentTime) {\n _this3.seek(_this3.prevVideo.currentTime);\n return;\n }\n _this3.template.videoWrap.removeChild(_this3.prevVideo);\n _this3.video.classList.add('dplayer-video-current');\n if (!paused) {\n _this3.video.play();\n }\n _this3.prevVideo = null;\n _this3.notice(_this3.tran('Switched to') + ' ' + _this3.quality.name + ' ' + _this3.tran('quality'));\n _this3.switchingQuality = false;\n _this3.events.trigger('quality_end');\n }\n });\n }\n },\n {\n key: 'mouseHandler',\n value: function mouseHandler(pbar, timeTips) {\n var _this4 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this4.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n if (tx < 0 || tx > pbar.offsetWidth) {\n return;\n }\n var time = _this4.video.duration * (tx / pbar.offsetWidth);\n timeTips.style.left = tx - 20 + 'px';\n switch (e.type) {\n case 'mouseenter':\n _this4.thumbnails && _this4.thumbnails.show();\n break;\n case 'mousemove':\n _this4.thumbnails && _this4.thumbnails.move(tx);\n timeTips.innerText = _utils2.default.secondToTime(time);\n _this4.timeTipsDisplay(true, timeTips);\n break;\n case 'mouseleave':\n _this4.thumbnails && _this4.thumbnails.hide();\n _this4.timeTipsDisplay(false, timeTips);\n break;\n }\n };\n }\n },\n {\n key: 'timeTipsDisplay',\n value: function timeTipsDisplay(show, timeTips) {\n if (show) {\n if (this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n this.isTimeTipsShow = true;\n } else {\n if (!this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n this.isTimeTipsShow = false;\n }\n }\n },\n {\n key: 'initThumbnails',\n value: function initThumbnails() {\n var _this5 = this;\n this.thumbnails = new _thumbnails2.default(this.template.barPreview, this.template.barWrap.offsetWidth, this.options.video.thumbnails, this.events);\n this.on('loadedmetadata', function () {\n _this5.thumbnails.resize(160, 90);\n });\n }\n },\n {\n key: 'notice',\n value: function notice(text) {\n var _this6 = this;\n var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;\n var opacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.8;\n this.template.notice.innerHTML = text;\n this.template.notice.style.opacity = opacity;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n this.events.trigger('notice_show', text);\n this.noticeTime = setTimeout(function () {\n _this6.template.notice.style.opacity = 0;\n _this6.events.trigger('notice_hide');\n }, time);\n }\n },\n {\n key: 'resize',\n value: function resize() {\n if (this.danmaku) {\n this.danmaku.resize();\n }\n this.events.trigger('resize');\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n instances.splice(instances.indexOf(this), 1);\n this.pause();\n clearTimeout(this.hideTime);\n this.video.src = '';\n this.container.innerHTML = '';\n this.events.trigger('destroy');\n for (var key in this) {\n if (this.hasOwnProperty(key) && key !== 'paused') {\n delete this[key];\n }\n }\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar defaultApiBackend = __webpack_require__(5);\nmodule.exports = function (options) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n options.autoplay = false;\n }\n var defaultOption = {\n container: options.element || document.getElementsByClassName('dplayer')[0],\n live: false,\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: (navigator.language || navigator.browserLanguage).toLowerCase(),\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n volume: 0.7,\n apiBackend: defaultApiBackend,\n video: {},\n icons: {\n play: [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n pause: [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z'\n ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n loop: [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n full: [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n setting: [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n right: [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n comment: [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n send: [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n pallette: [\n '0 0 32 32',\n 'M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z'\n ],\n camera: [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ],\n subtitle: [\n '0 0 32 32',\n 'M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z'\n ]\n },\n iconsColor: '#ffffff',\n contextmenu: [],\n mutex: true\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {\n options[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (options.video) {\n !options.video.type && (options.video.type = 'auto');\n }\n if (_typeof(options.danmaku) === 'object' && options.danmaku) {\n !options.danmaku.user && (options.danmaku.user = 'DIYgod');\n }\n if (options.subtitle) {\n !options.subtitle.type && (options.subtitle.type = 'webvtt');\n !options.subtitle.fontSize && (options.subtitle.fontSize = '20px');\n !options.subtitle.bottom && (options.subtitle.bottom = '40px');\n !options.subtitle.color && (options.subtitle.color = '#fff');\n }\n if (options.video.quality) {\n options.video.url = [options.video.quality[options.video.defaultQuality].url];\n }\n if (options.lang) {\n options.lang = options.lang.toLowerCase();\n }\n if (options.icons) {\n options.icons = Object.assign({}, defaultOption.icons, options.icons);\n }\n options.contextmenu = options.contextmenu.concat([\n {\n text: 'About author',\n link: 'https://diygod.me'\n },\n {\n text: 'About DPlayer',\n link: 'https://github.com/MoePlayer/DPlayer'\n },\n {\n text: 'DPlayer feedback',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: 'DPlayer ' + \"1.17.2\" + ' ' + \"4c587e5\",\n link: 'https://github.com/MoePlayer/DPlayer/releases'\n }\n ]);\n return options;\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData, callback) {\n SendXMLHttpRequest(endpoint, danmakuData, function (xhr, response) {\n console.log('Post danmaku: ', response);\n if (callback) {\n callback();\n }\n }, function (xhr, response) {\n alert(response.msg);\n }, function (xhr) {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n read: function read(endpoint, callback) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n callback(null, response.danmaku);\n }, function (xhr, response) {\n callback({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n callback({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = function (lang) {\n var _this = this;\n this.lang = lang;\n this.tran = function (text) {\n if (tranTxt[_this.lang] && tranTxt[_this.lang][text]) {\n return tranTxt[_this.lang][text];\n } else {\n return text;\n }\n };\n};\nvar tranTxt = {\n 'zh-cn': {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Show danmaku': '显示弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质',\n 'FF': '快进',\n 'REW': '快退',\n 'Unlimited danmaku': '海量弹幕',\n 'Send danmaku': '发送弹幕',\n 'Setting': '设置',\n 'Full screen': '全屏',\n 'Web full screen': '页面全屏',\n 'Send': '发送',\n 'Screenshot': '截图',\n 's': '秒',\n 'Show subtitle': '显示字幕',\n 'Hide subtitle': '隐藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n },\n 'zh-tw': {\n 'Danmaku is loading': '彈幕加載中',\n 'Top': '頂部',\n 'Bottom': '底部',\n 'Rolling': '滾動',\n 'Input danmaku, hit Enter': '輸入彈幕\\uFF0CEnter 發送',\n 'About author': '關於作者',\n 'DPlayer feedback': '播放器意見反饋',\n 'About DPlayer': '關於 DPlayer 播放器',\n 'Loop': '循環播放',\n 'Speed': '速度',\n 'Opacity for danmaku': '彈幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '請輸入彈幕内容啊\\uFF01',\n 'Set danmaku color': '設置彈幕顏色',\n 'Set danmaku type': '設置彈幕類型',\n 'Show danmaku': '顯示彈幕',\n 'This video fails to load': '視頻加載失敗',\n 'Switching to': '正在切換至',\n 'Switched to': '已經切換至',\n 'quality': '畫質',\n 'FF': '快進',\n 'REW': '快退',\n 'Unlimited danmaku': '海量彈幕',\n 'Send danmaku': '發送彈幕',\n 'Setting': '設置',\n 'Full screen': '全屏',\n 'Web full screen': '頁面全屏',\n 'Send': '發送',\n 'Screenshot': '截圖',\n 's': '秒',\n 'Show subtitle': '顯示字幕',\n 'Hide subtitle': '隱藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n }\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Template = function () {\n function Template(options) {\n _classCallCheck(this, Template);\n this.container = options.container;\n this.options = options.options;\n this.index = options.index;\n this.tran = options.tran;\n this.icons = options.icons;\n this.init();\n }\n _createClass(Template, [\n {\n key: 'init',\n value: function init() {\n this.container.innerHTML = this.tpl(this.options, this.index, this.tran, this.icons);\n this.volumeBar = this.container.querySelector('.dplayer-volume-bar-inner');\n this.volumeBarWrap = this.container.querySelector('.dplayer-volume-bar');\n this.volumeBarWrapWrap = this.container.querySelector('.dplayer-volume-bar-wrap');\n this.volumeButton = this.container.querySelector('.dplayer-volume');\n this.volumeIcon = this.container.querySelector('.dplayer-volume-icon .dplayer-icon-content');\n this.playedBar = this.container.querySelector('.dplayer-played');\n this.loadedBar = this.container.querySelector('.dplayer-loaded');\n this.playedBarWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.playedBarTime = this.container.querySelector('.dplayer-bar-time');\n this.danmaku = this.container.querySelector('.dplayer-danmaku');\n this.danmakuLoading = this.container.querySelector('.dplayer-danloading');\n this.video = this.container.querySelector('.dplayer-video-current');\n this.bezel = this.container.querySelector('.dplayer-bezel-icon');\n this.playButton = this.container.querySelector('.dplayer-play-icon');\n this.videoWrap = this.container.querySelector('.dplayer-video-wrap');\n this.controllerMask = this.container.querySelector('.dplayer-controller-mask');\n this.ptime = this.container.querySelector('.dplayer-ptime');\n this.settingButton = this.container.querySelector('.dplayer-setting-icon');\n this.settingBox = this.container.querySelector('.dplayer-setting-box');\n this.mask = this.container.querySelector('.dplayer-mask');\n this.loop = this.container.querySelector('.dplayer-setting-loop');\n this.loopToggle = this.container.querySelector('.dplayer-setting-loop .dplayer-toggle-setting-input');\n this.showDanmaku = this.container.querySelector('.dplayer-setting-showdan');\n this.showDanmakuToggle = this.container.querySelector('.dplayer-showdan-setting-input');\n this.unlimitDanmaku = this.container.querySelector('.dplayer-setting-danunlimit');\n this.unlimitDanmakuToggle = this.container.querySelector('.dplayer-danunlimit-setting-input');\n this.speed = this.container.querySelector('.dplayer-setting-speed');\n this.speedItem = this.container.querySelectorAll('dplayer-setting-speed-item');\n this.danmakuOpacityBar = this.container.querySelector('.dplayer-danmaku-bar-inner');\n this.danmakuOpacityBarWrap = this.container.querySelector('.dplayer-danmaku-bar');\n this.danmakuOpacityBarWrapWrap = this.container.querySelector('.dplayer-danmaku-bar-wrap');\n this.danmakuOpacityBox = this.container.querySelector('.dplayer-setting-danmaku');\n this.dtime = this.container.querySelector('.dplayer-dtime');\n this.controller = this.container.querySelector('.dplayer-controller');\n this.commentInput = this.container.querySelector('.dplayer-comment-input');\n this.commentButton = this.container.querySelector('.dplayer-comment-icon');\n this.commentSettingBox = this.container.querySelector('.dplayer-comment-setting-box');\n this.commentSettingButton = this.container.querySelector('.dplayer-comment-setting-icon');\n this.commentSettingFill = this.container.querySelector('.dplayer-comment-setting-icon .dplayer-fill');\n this.commentSendButton = this.container.querySelector('.dplayer-send-icon');\n this.commentSendFill = this.container.querySelector('.dplayer-send-icon .dplayer-fill');\n this.commentColorSettingBox = this.container.querySelector('.dplayer-comment-setting-color');\n this.svgFill = this.container.querySelector('.dplayer-fill');\n this.browserFullButton = this.container.querySelector('.dplayer-full-icon');\n this.webFullButton = this.container.querySelector('.dplayer-full-in-icon');\n this.menu = this.container.querySelector('.dplayer-menu');\n this.qualityList = this.container.querySelector('.dplayer-quality-list');\n this.camareButton = this.container.querySelector('.dplayer-camera-icon');\n this.subtitleButton = this.container.querySelector('.dplayer-subtitle-icon');\n this.subtitleButtonInner = this.container.querySelector('.dplayer-subtitle-icon .dplayer-icon-content');\n this.subtitle = this.container.querySelector('.dplayer-subtitle');\n this.qualityButton = this.container.querySelector('.dplayer-quality-icon');\n this.videoWrap = this.parent = this.container.querySelector('.dplayer-video-wrap');\n this.barPreview = this.container.querySelector('.dplayer-bar-preview');\n this.barWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.notice = this.container.querySelector('.dplayer-notice');\n }\n },\n {\n key: 'tpl',\n value: function tpl(options, index, tran, icons) {\n return '
' + this.tplVideo(true, options.video.pic, options.screenshot, options.preload, options.video.url, options.subtitle) + '' + (options.logo ? '
' : '') + '
' + (options.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
0:00 / 0:00' + (options.live ? '' + tran('Live') + '' : '') + '
' + (options.video.quality ? '
' + this.tplQualityList(options.video.quality) + '
' : '') + '' + (options.screenshot ? '' + icons.get('camera') + '' : '') + '
' + (options.subtitle ? '
' : '') + '
' + tran('Speed') + '
' + icons.get('right') + '
' + tran('Loop') + '
' + tran('Show danmaku') + '
' + tran('Unlimited danmaku') + '
' + tran('Opacity for danmaku') + '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
00:00
' + this.tplContextmenuList(options.contextmenu, tran) + '
';\n }\n },\n {\n key: 'tplDanmakumargin',\n value: function tplDanmakumargin(margin) {\n var result = '';\n if (margin) {\n for (var key in margin) {\n result += key + ':' + margin[key] + ';';\n }\n }\n return result;\n }\n },\n {\n key: 'tplContextmenuList',\n value: function tplContextmenuList(contextmenu, tran) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplQualityList',\n value: function tplQualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplVideo',\n value: function tplVideo(current, pic, screenshot, preload, url, subtitle) {\n var enableSubtitle = subtitle && subtitle.type === 'webvtt';\n return '';\n }\n }\n ]);\n return Template;\n}();\nmodule.exports = Template;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar SvgSource = function () {\n function SvgSource(options) {\n _classCallCheck(this, SvgSource);\n this.icons = options.icons;\n this.iconColor = options.iconsColor;\n }\n _createClass(SvgSource, [{\n key: 'get',\n value: function get(type) {\n return '';\n }\n }]);\n return SvgSource;\n}();\nmodule.exports = SvgSource;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Danmaku = function () {\n function Danmaku(options) {\n _classCallCheck(this, Danmaku);\n this.options = options;\n this.container = this.options.container;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.dan = [];\n this.showing = true;\n this._opacity = this.options.opacity;\n this.events = this.options.events;\n this.unlimited = this.options.unlimited;\n this._measure('');\n this.load();\n }\n _createClass(Danmaku, [\n {\n key: 'load',\n value: function load() {\n var _this = this;\n var apiurl = void 0;\n if (this.options.api.maximum) {\n apiurl = this.options.api.address + '?id=' + this.options.api.id + '&max=' + this.options.api.maximum;\n } else {\n apiurl = this.options.api.address + '?id=' + this.options.api.id;\n }\n var endpoints = (this.options.api.addition || []).slice(0);\n endpoints.push(apiurl);\n this.events && this.events.trigger('danmaku_load_start', endpoints);\n this._readAllEndpoints(endpoints, function (results) {\n _this.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n window.requestAnimationFrame(function () {\n _this.frame();\n });\n _this.options.callback();\n _this.events && _this.events.trigger('danmaku_load_end');\n });\n }\n },\n {\n key: 'reload',\n value: function reload(newAPI) {\n this.options.api = newAPI;\n this.dan = [];\n this.clear();\n this.load();\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, callback) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.options.error(err.response.msg);\n } else {\n _this2.options.error('Request was unsuccessful: ' + err.status);\n }\n results[i] = [];\n } else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return callback(results);\n }\n };\n };\n for (var i = 0; i < endpoints.length; ++i) {\n this.options.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'send',\n value: function send(dan, callback) {\n var danmakuData = {\n token: this.options.api.token,\n player: this.options.api.id,\n author: this.options.api.user,\n time: this.options.time(),\n text: dan.text,\n color: dan.color,\n type: dan.type\n };\n this.options.apiBackend.send(this.options.api.address, danmakuData, callback);\n this.dan.splice(this.danIndex, 0, danmakuData);\n this.danIndex++;\n var danmaku = {\n text: this.htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + this.options.borderColor\n };\n this.draw(danmaku);\n this.events && this.events.trigger('danmaku_send', danmakuData);\n }\n },\n {\n key: 'frame',\n value: function frame() {\n var _this3 = this;\n if (this.dan.length && !this.paused && this.showing) {\n var item = this.dan[this.danIndex];\n var dan = [];\n while (item && this.options.time() > parseFloat(item.time)) {\n dan.push(item);\n item = this.dan[++this.danIndex];\n }\n this.draw(dan);\n }\n window.requestAnimationFrame(function () {\n _this3.frame();\n });\n }\n },\n {\n key: 'opacity',\n value: function opacity(percentage) {\n if (percentage !== undefined) {\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this._opacity = percentage;\n this.events && this.events.trigger('danmaku_opacity', this._opacity);\n }\n return this._opacity;\n }\n },\n {\n key: 'draw',\n value: function draw(dan) {\n var _this4 = this;\n if (this.showing) {\n var itemHeight = this.options.height;\n var danWidth = this.container.offsetWidth;\n var danHeight = this.container.offsetHeight;\n var itemY = parseInt(danHeight / itemHeight);\n var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || _this4.container.getBoundingClientRect().right + eleWidth;\n return _this4.container.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop = function _loop(i) {\n var item = _this4.danTunnel[type][i + ''];\n if (item && item.length) {\n if (type !== 'right') {\n return 'continue';\n }\n for (var j = 0; j < item.length; j++) {\n var danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0; _this4.unlimited || i < itemY; i++) {\n var _ret = _loop(i);\n switch (_ret) {\n case 'continue':\n continue;\n default:\n if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === 'object')\n return _ret.v;\n }\n }\n return -1;\n };\n if (Object.prototype.toString.call(dan) !== '[object Array]') {\n dan = [dan];\n }\n var docFragment = document.createDocumentFragment();\n var _loop2 = function _loop2(i) {\n if (!dan[i].type) {\n dan[i].type = 'right';\n }\n if (!dan[i].color) {\n dan[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + dan[i].type);\n if (dan[i].border) {\n item.innerHTML = '' + dan[i].text + '';\n } else {\n item.innerHTML = dan[i].text;\n }\n item.style.opacity = _this4._opacity;\n item.style.color = dan[i].color;\n item.addEventListener('animationend', function () {\n _this4.container.removeChild(item);\n });\n var itemWidth = _this4._measure(dan[i].text);\n var tunnel = void 0;\n switch (dan[i].type) {\n case 'right':\n tunnel = getTunnel(item, dan[i].type, itemWidth);\n if (tunnel >= 0) {\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * tunnel + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n }\n break;\n case 'top':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.top = itemHeight * tunnel + 'px';\n }\n break;\n case 'bottom':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.bottom = itemHeight * tunnel + 'px';\n }\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + dan[i].type);\n }\n if (tunnel >= 0) {\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n }\n };\n for (var i = 0; i < dan.length; i++) {\n _loop2(i);\n }\n this.container.appendChild(docFragment);\n return docFragment;\n }\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n }\n },\n {\n key: '_measure',\n value: function _measure(text) {\n if (!this.context) {\n var measureStyle = getComputedStyle(this.container.getElementsByClassName('dplayer-danmaku-item')[0], null);\n this.context = document.createElement('canvas').getContext('2d');\n this.context.font = measureStyle.getPropertyValue('font');\n }\n return this.context.measureText(text).width;\n }\n },\n {\n key: 'seek',\n value: function seek() {\n this.clear();\n for (var i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.options.time()) {\n this.danIndex = i;\n break;\n }\n this.danIndex = this.dan.length;\n }\n }\n },\n {\n key: 'clear',\n value: function clear() {\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.options.container.innerHTML = '';\n this.events && this.events.trigger('danmaku_clear');\n }\n },\n {\n key: 'htmlEncode',\n value: function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n }\n },\n {\n key: 'resize',\n value: function resize() {\n var danWidth = this.container.offsetWidth;\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.transform = 'translateX(-' + danWidth + 'px)';\n }\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.showing = false;\n this.pause();\n this.clear();\n this.events && this.events.trigger('danmaku_hide');\n }\n },\n {\n key: 'show',\n value: function show() {\n this.seek();\n this.showing = true;\n this.play();\n this.events && this.events.trigger('danmaku_show');\n }\n },\n {\n key: 'unlimit',\n value: function unlimit(boolean) {\n this.unlimited = boolean;\n }\n }\n ]);\n return Danmaku;\n}();\nmodule.exports = Danmaku;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Thumbnails = function () {\n function Thumbnails(container, width, url, events) {\n _classCallCheck(this, Thumbnails);\n this.container = container;\n this.width = width;\n this.container.style.backgroundImage = 'url(\\'' + url + '\\')';\n this.events = events;\n }\n _createClass(Thumbnails, [\n {\n key: 'resize',\n value: function resize(width, height) {\n this.container.style.width = width + 'px';\n this.container.style.height = height + 'px';\n this.container.style.top = -height + 2 + 'px';\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.style.display = 'block';\n this.events && this.events.trigger('thumbnails_show');\n }\n },\n {\n key: 'move',\n value: function move(position) {\n this.container.style.backgroundPosition = '-' + (Math.ceil(position / this.width * 100) - 1) * 160 + 'px 0';\n this.container.style.left = position - this.container.offsetWidth / 2 + 'px';\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.style.display = 'none';\n this.events && this.events.trigger('thumbnails_hide');\n }\n }\n ]);\n return Thumbnails;\n}();\nmodule.exports = Thumbnails;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Events = function () {\n function Events() {\n _classCallCheck(this, Events);\n this.events = {};\n this.videoEvents = [\n 'abort',\n 'canplay',\n 'canplaythrough',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'loadeddata',\n 'loadedmetadata',\n 'loadstart',\n 'mozaudioavailable',\n 'pause',\n 'play',\n 'playing',\n 'progress',\n 'ratechange',\n 'seeked',\n 'seeking',\n 'stalled',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'waiting'\n ];\n this.playerEvents = [\n 'screenshot',\n 'thumbnails_show',\n 'thumbnails_hide',\n 'danmaku_show',\n 'danmaku_hide',\n 'danmaku_clear',\n 'danmaku_loaded',\n 'danmaku_send',\n 'danmaku_opacity',\n 'contextmenu_show',\n 'contextmenu_hide',\n 'notice_show',\n 'notice_hide',\n 'quality_start',\n 'quality_end',\n 'destroy',\n 'resize',\n 'fullscreen',\n 'fullscreen_cancel',\n 'webfullscreen',\n 'webfullscreen_cancel',\n 'subtitle_show',\n 'subtitle_hide',\n 'subtitle_change'\n ];\n }\n _createClass(Events, [\n {\n key: 'on',\n value: function on(name, callback) {\n if (this.type(name) && typeof callback === 'function') {\n if (!this.events[name]) {\n this.events[name] = [];\n }\n this.events[name].push(callback);\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(name, info) {\n if (this.events[name] && this.events[name].length) {\n for (var i = 0; i < this.events[name].length; i++) {\n this.events[name][i](info);\n }\n }\n }\n },\n {\n key: 'type',\n value: function type(name) {\n if (this.playerEvents.indexOf(name) !== -1) {\n return 'player';\n } else if (this.videoEvents.indexOf(name) !== -1) {\n return 'video';\n }\n console.error('Unknown event name: ' + name);\n return null;\n }\n }\n ]);\n return Events;\n}();\nmodule.exports = Events;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar FullScreen = function () {\n function FullScreen(player) {\n var _this = this;\n _classCallCheck(this, FullScreen);\n this.player = player;\n this.player.events.on('webfullscreen', function () {\n _this.player.resize();\n });\n this.player.events.on('webfullscreen_cancel', function () {\n _this.player.resize();\n });\n var fullscreenchange = function fullscreenchange() {\n _this.player.resize();\n if (_this.isFullScreen('browser')) {\n _this.player.events.trigger('fullscreen');\n } else {\n _this.player.events.trigger('fullscreen_cancel');\n }\n };\n this.player.container.addEventListener('fullscreenchange', fullscreenchange);\n this.player.container.addEventListener('mozfullscreenchange', fullscreenchange);\n this.player.container.addEventListener('webkitfullscreenchange', fullscreenchange);\n }\n _createClass(FullScreen, [\n {\n key: 'isFullScreen',\n value: function isFullScreen() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;\n case 'web':\n return this.player.container.classList.contains('dplayer-fulled');\n }\n }\n },\n {\n key: 'request',\n value: function request() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (this.player.container.requestFullscreen) {\n this.player.container.requestFullscreen();\n } else if (this.player.container.mozRequestFullScreen) {\n this.player.container.mozRequestFullScreen();\n } else if (this.player.container.webkitRequestFullscreen) {\n this.player.container.webkitRequestFullscreen();\n } else if (this.player.video.webkitEnterFullscreen) {\n this.player.video.webkitEnterFullscreen();\n }\n break;\n case 'web':\n this.player.container.classList.add('dplayer-fulled');\n this.lastScrollPosition = _utils2.default.getScrollPosition();\n document.body.classList.add('dplayer-web-fullscreen-fix');\n this.player.events.trigger('webfullscreen');\n break;\n }\n }\n },\n {\n key: 'cancel',\n value: function cancel() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n break;\n case 'web':\n this.player.container.classList.remove('dplayer-fulled');\n document.body.classList.remove('dplayer-web-fullscreen-fix');\n _utils2.default.setScrollPosition(this.lastScrollPosition);\n this.player.events.trigger('webfullscreen_cancel');\n break;\n }\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n if (this.isFullScreen(type)) {\n this.cancel(type);\n } else {\n this.request(type);\n }\n }\n }\n ]);\n return FullScreen;\n}();\nmodule.exports = FullScreen;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar User = function () {\n function User(player) {\n _classCallCheck(this, User);\n this.storageName = {\n opacity: 'dplayer-danmaku-opacity',\n volume: 'dplayer-volume',\n unlimited: 'dplayer-danmaku-unlimited',\n danmaku: 'dplayer-danmaku-show',\n subtitle: 'dplayer-subtitle-show'\n };\n this.default = {\n opacity: 0.7,\n volume: player.options.volume || 0.7,\n unlimited: (player.options.danmaku && player.options.danmaku.unlimited ? 1 : 0) || 0,\n danmaku: 1,\n subtitle: 1\n };\n this.data = {};\n this.init();\n }\n _createClass(User, [\n {\n key: 'init',\n value: function init() {\n for (var item in this.storageName) {\n var name = this.storageName[item];\n this.data[item] = parseFloat(_utils2.default.storage.get(name) || this.default[item]);\n }\n }\n },\n {\n key: 'get',\n value: function get(key) {\n return this.data[key];\n }\n },\n {\n key: 'set',\n value: function set(key, value) {\n this.data[key] = value;\n _utils2.default.storage.set(this.storageName[key], value);\n }\n }\n ]);\n return User;\n}();\nmodule.exports = User;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Subtitle = function () {\n function Subtitle(container, video, options, events) {\n _classCallCheck(this, Subtitle);\n this.container = container;\n this.video = video;\n this.options = options;\n this.events = events;\n this.init();\n }\n _createClass(Subtitle, [\n {\n key: 'init',\n value: function init() {\n var _this = this;\n this.container.style.fontSize = this.options.fontSize;\n this.container.style.bottom = this.options.bottom;\n this.container.style.color = this.options.color;\n if (this.video.textTracks && this.video.textTracks[0]) {\n var track = this.video.textTracks[0];\n track.oncuechange = function () {\n var cue = track.activeCues[0];\n if (cue) {\n _this.container.innerHTML = '';\n var p = document.createElement('p');\n p.appendChild(cue.getCueAsHTML());\n _this.container.appendChild(p);\n } else {\n _this.container.innerHTML = '';\n }\n _this.events.trigger('subtitle_change');\n };\n }\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.classList.remove('dplayer-subtitle-hide');\n this.events.trigger('subtitle_show');\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.classList.add('dplayer-subtitle-hide');\n this.events.trigger('subtitle_hide');\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.container.classList.contains('dplayer-subtitle-hide')) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n ]);\n return Subtitle;\n}();\nmodule.exports = Subtitle;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// DPlayer.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8dbefb8cf4d0c474f094","'use strict';\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n },\n getScrollPosition: function getScrollPosition() {\n return {\n left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0,\n top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0\n };\n },\n setScrollPosition: function setScrollPosition(_ref) {\n var _ref$left = _ref.left, left = _ref$left === undefined ? 0 : _ref$left, _ref$top = _ref.top, top = _ref$top === undefined ? 0 : _ref$top;\n if (this.isFirefox) {\n document.documentElement.scrollLeft = left;\n document.documentElement.scrollTop = top;\n } else {\n window.scrollTo(left, top);\n }\n },\n isMobile: /mobile/i.test(window.navigator.userAgent),\n isFirefox: /firefox/i.test(window.navigator.userAgent),\n isChrome: /chrome/i.test(window.navigator.userAgent),\n storage: {\n set: function set(key, value) {\n localStorage.setItem(key, value);\n },\n get: function get(key) {\n return localStorage.getItem(key);\n }\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 0\n// module chunks = 0","'use strict';\nconsole.log('\\n' + ' %c DPlayer ' + DPLAYER_VERSION + ' ' + GIT_HASH + ' %c http://dplayer.js.org ' + '\\n' + '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nmodule.exports = require('./DPlayer');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 1\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nrequire('./DPlayer.scss');\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nvar _options = require('./options');\nvar _options2 = _interopRequireDefault(_options);\nvar _i18n = require('./i18n');\nvar _i18n2 = _interopRequireDefault(_i18n);\nvar _template = require('./template');\nvar _template2 = _interopRequireDefault(_template);\nvar _svg = require('./svg');\nvar _svg2 = _interopRequireDefault(_svg);\nvar _danmaku = require('./danmaku');\nvar _danmaku2 = _interopRequireDefault(_danmaku);\nvar _thumbnails = require('./thumbnails');\nvar _thumbnails2 = _interopRequireDefault(_thumbnails);\nvar _events = require('./events');\nvar _events2 = _interopRequireDefault(_events);\nvar _fullscreen = require('./fullscreen');\nvar _fullscreen2 = _interopRequireDefault(_fullscreen);\nvar _user = require('./user');\nvar _user2 = _interopRequireDefault(_user);\nvar _subtitle = require('./subtitle');\nvar _subtitle2 = _interopRequireDefault(_subtitle);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar index = 0;\nvar instances = [];\nvar DPlayer = function () {\n function DPlayer(options) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.options = (0, _options2.default)(options);\n this.options.container.classList.add('dplayer');\n if (this.options.video.quality) {\n this.qualityIndex = this.options.video.defaultQuality;\n this.quality = this.options.video.quality[this.options.video.defaultQuality];\n }\n this.tran = new _i18n2.default(this.options.lang).tran;\n this.icons = new _svg2.default(this.options);\n this.events = new _events2.default();\n this.user = new _user2.default(this);\n this.container = this.options.container;\n if (!this.options.danmaku) {\n this.container.classList.add('dplayer-no-danmaku');\n }\n if (this.options.live) {\n this.container.classList.add('dplayer-live');\n }\n if (_utils.isMobile) {\n this.container.classList.add('dplayer-mobile');\n }\n this.template = new _template2.default({\n container: this.container,\n options: this.options,\n index: index,\n tran: this.tran,\n icons: this.icons\n });\n var bar = {};\n bar.volumeBar = this.template.volumeBar;\n bar.playedBar = this.template.playedBar;\n bar.loadedBar = this.template.loadedBar;\n var barWidth = void 0;\n this.updateBar = function (type, percentage, direction) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n };\n document.addEventListener('click', function () {\n _this.focus = false;\n }, true);\n this.container.addEventListener('click', function () {\n _this.focus = true;\n }, true);\n if (this.options.danmaku) {\n this.danmaku = new _danmaku2.default({\n container: this.template.danmaku,\n opacity: this.user.get('opacity'),\n callback: function callback() {\n setTimeout(function () {\n _this.template.danmakuLoading.style.display = 'none';\n if (_this.options.autoplay && !_utils.isMobile) {\n _this.play();\n } else if (_utils.isMobile) {\n _this.pause();\n }\n }, 0);\n },\n error: function error(msg) {\n _this.notice(msg);\n },\n apiBackend: this.options.apiBackend,\n borderColor: this.options.theme,\n height: this.arrow ? 24 : 30,\n time: function time() {\n return _this.video.currentTime;\n },\n unlimited: this.user.get('unlimited'),\n api: {\n id: this.options.danmaku.id,\n address: this.options.danmaku.api,\n token: this.options.danmaku.token,\n maximum: this.options.danmaku.maximum,\n addition: this.options.danmaku.addition,\n user: this.options.danmaku.user\n },\n events: this.events\n });\n }\n this.arrow = this.container.offsetWidth <= 500;\n if (this.arrow) {\n var arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = '.dplayer .dplayer-danmaku{font-size:18px}';\n document.head.appendChild(arrowStyle);\n }\n this.video = this.template.video;\n this.template.bezel.addEventListener('animationend', function () {\n _this.template.bezel.classList.remove('dplayer-bezel-transition');\n });\n this.paused = true;\n this.template.playButton.addEventListener('click', function () {\n _this.toggle();\n });\n if (!_utils.isMobile) {\n this.template.videoWrap.addEventListener('click', function () {\n _this.toggle();\n });\n this.template.controllerMask.addEventListener('click', function () {\n _this.toggle();\n });\n } else {\n var toggleController = function toggleController() {\n if (_this.container.classList.contains('dplayer-hide-controller')) {\n _this.container.classList.remove('dplayer-hide-controller');\n } else {\n _this.container.classList.add('dplayer-hide-controller');\n }\n };\n this.template.videoWrap.addEventListener('click', toggleController);\n this.template.controllerMask.addEventListener('click', toggleController);\n }\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime;\n if (!bufferingDetected && currentPlayPos === lastPlayPos && !_this.video.paused) {\n _this.container.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos && !_this.video.paused) {\n _this.container.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.playedTime = false;\n this.animationFrame = function () {\n if (_this.playedTime) {\n _this.updateBar('played', _this.video.currentTime / _this.video.duration, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(_this.video.currentTime);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\n }\n }\n };\n if (this.options.video.thumbnails) {\n this.initThumbnails();\n }\n this.isTimeTipsShow = true;\n this.mouseHandler = this.mouseHandler(this.template.playedBarWrap, this.template.playedBarTime).bind(this);\n this.template.playedBarWrap.addEventListener('mousemove', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseenter', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseleave', this.mouseHandler);\n var thumbMove = function thumbMove(e) {\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(percentage * _this.video.duration);\n };\n var thumbUp = function thumbUp(e) {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.seek(parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration);\n _this.setTime();\n };\n this.template.playedBarWrap.addEventListener('mousedown', function () {\n barWidth = _this.template.playedBarWrap.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n var vWidth = 35;\n this.switchVolumeIcon = function () {\n if (_this.volume() >= 0.95) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-up');\n } else if (_this.volume() > 0) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-down');\n } else {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n }\n };\n var volumeMove = function volumeMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n };\n var volumeUp = function volumeUp() {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n _this.template.volumeButton.classList.remove('dplayer-volume-active');\n };\n this.template.volumeBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n });\n this.template.volumeBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n _this.template.volumeButton.classList.add('dplayer-volume-active');\n });\n this.template.volumeIcon.addEventListener('click', function () {\n if (_this.video.muted) {\n _this.video.muted = false;\n _this.switchVolumeIcon();\n _this.updateBar('volume', _this.volume(), 'width');\n } else {\n _this.video.muted = true;\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n _this.updateBar('volume', 0, 'width');\n }\n });\n this.hideTime = 0;\n var hideController = function hideController() {\n _this.container.classList.remove('dplayer-hide-controller');\n clearTimeout(_this.hideTime);\n _this.hideTime = setTimeout(function () {\n if (_this.video.played.length && !_this.disableHideController) {\n _this.container.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n if (!_utils.isMobile) {\n this.container.addEventListener('mousemove', hideController);\n this.container.addEventListener('click', hideController);\n }\n var closeSetting = function closeSetting() {\n if (_this.template.settingBox.classList.contains('dplayer-setting-box-open')) {\n _this.template.settingBox.classList.remove('dplayer-setting-box-open');\n _this.template.mask.classList.remove('dplayer-mask-show');\n setTimeout(function () {\n _this.template.settingBox.classList.remove('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.remove('dplayer-setting-box-speed');\n }, 300);\n }\n _this.disableHideController = false;\n };\n var openSetting = function openSetting() {\n _this.disableHideController = true;\n _this.template.settingBox.classList.add('dplayer-setting-box-open');\n _this.template.mask.classList.add('dplayer-mask-show');\n };\n this.template.mask.addEventListener('click', function () {\n closeSetting();\n });\n this.template.settingButton.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.options.loop;\n var showdan = this.user.get('danmaku');\n if (!showdan) {\n this.danmaku && this.danmaku.hide();\n }\n var unlimitDan = this.user.get('unlimited');\n this.template.loopToggle.checked = this.loop;\n this.template.loop.addEventListener('click', function () {\n _this.template.loopToggle.checked = !_this.template.loopToggle.checked;\n if (_this.template.loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n this.template.showDanmakuToggle.checked = showdan;\n this.template.showDanmaku.addEventListener('click', function () {\n _this.template.showDanmakuToggle.checked = !_this.template.showDanmakuToggle.checked;\n if (_this.template.showDanmakuToggle.checked) {\n showdan = true;\n if (!_this.paused) {\n _this.danmaku.show();\n }\n } else {\n showdan = false;\n _this.danmaku.hide();\n }\n _this.user.set('danmaku', showdan ? 1 : 0);\n closeSetting();\n });\n this.template.unlimitDanmakuToggle.checked = unlimitDan;\n this.template.unlimitDanmaku.addEventListener('click', function () {\n _this.template.unlimitDanmakuToggle.checked = !_this.template.unlimitDanmakuToggle.checked;\n if (_this.template.unlimitDanmakuToggle.checked) {\n unlimitDan = true;\n _this.danmaku.unlimit(true);\n } else {\n unlimitDan = false;\n _this.danmaku.unlimit(false);\n }\n _this.user.set('unlimited', unlimitDan ? 1 : 0);\n closeSetting();\n });\n this.template.speed.addEventListener('click', function () {\n _this.template.settingBox.classList.add('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.add('dplayer-setting-box-speed');\n var _loop = function _loop(i) {\n _this.template.speedItem[i].addEventListener('click', function () {\n _this.video.playbackRate = _this.template.speedItem[i].dataset.speed;\n closeSetting();\n });\n };\n for (var i = 0; i < _this.template.speedItem.length; i++) {\n _loop(i);\n }\n });\n if (this.danmaku) {\n bar.danmakuBar = this.template.danmakuOpacityBar;\n var dWidth = 130;\n this.on('danmaku_opacity', function (percentage) {\n _this.updateBar('danmaku', percentage, 'width');\n _this.user.set('opacity', percentage);\n });\n this.danmaku.opacity(this.user.get('opacity'));\n var danmakuMove = function danmakuMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.danmaku.opacity(percentage);\n };\n var danmakuUp = function danmakuUp() {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n _this.template.danmakuOpacityBox.classList.remove('dplayer-setting-danmaku-active');\n };\n this.template.danmakuOpacityBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.danmaku.opacity(percentage);\n });\n this.template.danmakuOpacityBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n _this.template.danmakuOpacityBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n if (this.video.duration !== 1) {\n this.template.dtime.innerHTML = this.video.duration ? _utils2.default.secondToTime(this.video.duration) : '00:00';\n }\n if (!this.danmaku) {\n if (this.options.autoplay && !_utils.isMobile) {\n this.play();\n } else if (_utils.isMobile) {\n this.pause();\n }\n }\n var closeCommentSetting = function closeCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n var toggleCommentSetting = function toggleCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n } else {\n _this.template.commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n var closeComment = function closeComment() {\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n return;\n }\n _this.template.controller.classList.remove('dplayer-controller-comment');\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.container.classList.remove('dplayer-show-controller');\n closeCommentSetting();\n _this.disableHideController = false;\n };\n var openComment = function openComment() {\n _this.disableHideController = true;\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n _this.template.controller.classList.add('dplayer-controller-comment');\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.container.classList.add('dplayer-show-controller');\n _this.template.commentInput.focus();\n }\n };\n this.template.mask.addEventListener('click', function () {\n closeComment();\n });\n this.template.commentButton.addEventListener('click', function () {\n openComment();\n });\n this.template.commentSettingButton.addEventListener('click', function () {\n toggleCommentSetting();\n });\n this.template.commentColorSettingBox.addEventListener('click', function () {\n var sele = _this.template.commentColorSettingBox.querySelector('input:checked+span');\n if (sele) {\n var color = _this.template.commentColorSettingBox.querySelector('input:checked').value;\n _this.template.commentSettingFill.style.fill = color;\n _this.template.commentInput.style.color = color;\n _this.template.commentSendFill.style.fill = color;\n }\n });\n var sendComment = function sendComment() {\n _this.template.commentInput.blur();\n if (!_this.template.commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\n }\n _this.danmaku.send({\n text: _this.template.commentInput.value,\n color: _this.container.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: _this.container.querySelector('.dplayer-comment-setting-type input:checked').value\n }, function () {\n _this.template.commentInput.value = '';\n closeComment();\n });\n };\n this.template.commentInput.addEventListener('click', function () {\n closeCommentSetting();\n });\n this.template.commentInput.addEventListener('keydown', function (e) {\n var event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n this.template.commentSendButton.addEventListener('click', sendComment);\n this.fullScreen = new _fullscreen2.default(this);\n this.template.browserFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('browser');\n });\n this.template.webFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('web');\n });\n var handleKeyDown = function handleKeyDown(e) {\n if (_this.focus) {\n var tag = document.activeElement.tagName.toUpperCase();\n var editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n var event = e || window.event;\n var percentage = void 0;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n _this.toggle();\n break;\n case 37:\n event.preventDefault();\n _this.seek(_this.video.currentTime - 5);\n hideController();\n break;\n case 39:\n event.preventDefault();\n _this.seek(_this.video.currentTime + 5);\n hideController();\n break;\n case 38:\n event.preventDefault();\n percentage = _this.volume() + 0.1;\n _this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = _this.volume() - 0.1;\n _this.volume(percentage);\n break;\n }\n }\n }\n };\n if (this.options.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', function (e) {\n var event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (_this.fullScreen.isFullScreen('web')) {\n _this.fullScreen.cancel('web');\n }\n break;\n }\n });\n this.container.addEventListener('contextmenu', function (e) {\n var event = e || window.event;\n event.preventDefault();\n _this.template.menu.classList.add('dplayer-menu-show');\n var clientRect = _this.container.getBoundingClientRect();\n var menuLeft = event.clientX - clientRect.left;\n var menuTop = event.clientY - clientRect.top;\n if (menuLeft + _this.template.menu.offsetWidth >= clientRect.width) {\n _this.template.menu.style.right = clientRect.width - menuLeft + 'px';\n _this.template.menu.style.left = 'initial';\n } else {\n _this.template.menu.style.left = event.clientX - _this.container.getBoundingClientRect().left + 'px';\n _this.template.menu.style.right = 'initial';\n }\n if (menuTop + _this.template.menu.offsetHeight >= clientRect.height) {\n _this.template.menu.style.bottom = clientRect.height - menuTop + 'px';\n _this.template.menu.style.top = 'initial';\n } else {\n _this.template.menu.style.top = event.clientY - _this.container.getBoundingClientRect().top + 'px';\n _this.template.menu.style.bottom = 'initial';\n }\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.events.trigger('contextmenu_show');\n _this.template.mask.addEventListener('click', function () {\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.template.menu.classList.remove('dplayer-menu-show');\n _this.events.trigger('contextmenu_hide');\n });\n });\n if (this.options.video.quality) {\n this.template.qualityList.addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.options.screenshot) {\n this.template.camareButton.addEventListener('click', function () {\n var canvas = document.createElement('canvas');\n canvas.width = _this.video.videoWidth;\n canvas.height = _this.video.videoHeight;\n canvas.getContext('2d').drawImage(_this.video, 0, 0, canvas.width, canvas.height);\n var dataURL = canvas.toDataURL();\n _this.template.camareButton.href = dataURL;\n _this.template.camareButton.download = 'DPlayer.png';\n _this.events.trigger('screenshot', dataURL);\n });\n }\n if (this.options.subtitle) {\n this.events.on('subtitle_show', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Hide subtitle');\n _this.template.subtitleButtonInner.style.opacity = '';\n _this.user.set('subtitle', 1);\n });\n this.events.on('subtitle_hide', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Show subtitle');\n _this.template.subtitleButtonInner.style.opacity = '0.4';\n _this.user.set('subtitle', 0);\n });\n this.template.subtitleButton.addEventListener('click', function () {\n _this.subtitle.toggle();\n });\n }\n this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type);\n index++;\n instances.push(this);\n }\n _createClass(DPlayer, [\n {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n if (this.video.duration) {\n time = Math.min(time, this.video.duration);\n }\n if (this.video.currentTime < time) {\n this.notice(this.tran('FF') + ' ' + (time - this.video.currentTime).toFixed(0) + ' ' + this.tran('s'));\n } else if (this.video.currentTime > time) {\n this.notice(this.tran('REW') + ' ' + (this.video.currentTime - time).toFixed(0) + ' ' + this.tran('s'));\n }\n this.video.currentTime = time;\n if (this.danmaku) {\n this.danmaku.seek();\n }\n this.updateBar('played', time / this.video.duration, 'width');\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n if (this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('play');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.template.playButton.innerHTML = this.icons.get('pause');\n this.video.play();\n this.setTime();\n this.container.classList.add('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.play();\n }\n if (this.options.mutex) {\n for (var i = 0; i < instances.length; i++) {\n if (this !== instances[i]) {\n instances[i].pause();\n }\n }\n }\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.container.classList.remove('dplayer-loading');\n if (!this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('pause');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.ended = false;\n this.template.playButton.innerHTML = this.icons.get('play');\n this.video.pause();\n this.clearTime();\n this.container.classList.remove('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.pause();\n }\n }\n },\n {\n key: 'volume',\n value: function volume(percentage, nostorage, nonotice) {\n percentage = parseFloat(percentage);\n if (!isNaN(percentage)) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('volume', percentage, 'width');\n var formatPercentage = (percentage * 100).toFixed(0) + '%';\n this.template.volumeBarWrapWrap.dataset.balloon = formatPercentage;\n if (!nostorage) {\n this.user.set('volume', percentage);\n }\n if (!nonotice) {\n this.notice(this.tran('Volume') + ' ' + (percentage * 100).toFixed(0) + '%');\n }\n this.video.volume = percentage;\n if (this.video.muted) {\n this.video.muted = false;\n }\n this.switchVolumeIcon();\n }\n return this.video.volume;\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.video.paused) {\n this.play();\n } else {\n this.pause();\n }\n }\n },\n {\n key: 'on',\n value: function on(name, callback) {\n this.events.on(name, callback);\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmakuAPI) {\n this.pause();\n this.video.poster = video.pic ? video.pic : '';\n this.video.src = video.url;\n this.initMSE(this.video, video.type || 'auto');\n if (danmakuAPI) {\n this.template.danmakuLoading.style.display = 'block';\n this.updateBar('played', 0, 'width');\n this.updateBar('loaded', 0, 'width');\n this.template.ptime.innerHTML = '00:00';\n this.template.danmaku.innerHTML = '';\n if (this.danmaku) {\n this.danmaku.reload({\n id: danmakuAPI.id,\n address: danmakuAPI.api,\n token: danmakuAPI.token,\n maximum: danmakuAPI.maximum,\n addition: danmakuAPI.addition,\n user: danmakuAPI.user\n });\n }\n }\n }\n },\n {\n key: 'initMSE',\n value: function initMSE(video, type) {\n this.type = type;\n if (this.type === 'auto') {\n if (/m3u8(#|\\?|$)/i.exec(video.src)) {\n this.type = 'hls';\n } else if (/.flv(#|\\?|$)/i.exec(video.src)) {\n this.type = 'flv';\n } else if (/.mpd(#|\\?|$)/i.exec(video.src)) {\n this.type = 'dash';\n } else {\n this.type = 'normal';\n }\n }\n if (this.type === 'hls' && Hls && Hls.isSupported()) {\n var hls = new Hls();\n hls.loadSource(video.src);\n hls.attachMedia(video);\n }\n if (this.type === 'flv' && flvjs && flvjs.isSupported()) {\n var flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: video.src\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n }\n if (this.type === 'dash' && dashjs) {\n dashjs.MediaPlayer().create().initialize(video, video.src, false);\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo(video, type) {\n var _this2 = this;\n this.initMSE(video, type);\n this.on('durationchange', function () {\n if (video.duration !== 1) {\n _this2.template.dtime.innerHTML = _utils2.default.secondToTime(video.duration);\n }\n });\n this.on('progress', function () {\n var percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0;\n _this2.updateBar('loaded', percentage, 'width');\n });\n this.on('error', function () {\n _this2.tran && _this2.notice && _this2.notice(_this2.tran('This video fails to load'), -1);\n });\n this.ended = false;\n this.on('ended', function () {\n _this2.updateBar('played', 1, 'width');\n if (!_this2.loop) {\n _this2.ended = true;\n _this2.pause();\n } else {\n _this2.seek(0);\n video.play();\n }\n if (_this2.danmaku) {\n _this2.danmaku.danIndex = 0;\n }\n });\n this.on('play', function () {\n if (_this2.paused) {\n _this2.play();\n }\n });\n this.on('pause', function () {\n if (!_this2.paused) {\n _this2.pause();\n }\n });\n var _loop2 = function _loop2(i) {\n video.addEventListener(_this2.events.videoEvents[i], function () {\n _this2.events.trigger(_this2.events.videoEvents[i]);\n });\n };\n for (var i = 0; i < this.events.videoEvents.length; i++) {\n _loop2(i);\n }\n this.volume(this.user.get('volume'), true, true);\n if (this.options.subtitle) {\n this.subtitle = new _subtitle2.default(this.template.subtitle, this.video, this.options.subtitle, this.events);\n if (!this.user.get('subtitle')) {\n this.subtitle.hide();\n }\n }\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this3 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.options.video.quality[index];\n this.template.qualityButton.innerHTML = this.quality.name;\n var paused = this.video.paused;\n this.video.pause();\n var videoHTML = this.template.tplVideo(false, null, this.options.screenshot, 'auto', this.quality.url, this.options.subtitle);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n this.template.videoWrap.insertBefore(videoEle, this.template.videoWrap.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = videoEle;\n this.initVideo(this.video, this.quality.type || this.options.video.type);\n this.seek(this.prevVideo.currentTime);\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.events.trigger('quality_start', this.quality);\n this.on('canplay', function () {\n if (_this3.prevVideo) {\n if (_this3.video.currentTime !== _this3.prevVideo.currentTime) {\n _this3.seek(_this3.prevVideo.currentTime);\n return;\n }\n _this3.template.videoWrap.removeChild(_this3.prevVideo);\n _this3.video.classList.add('dplayer-video-current');\n if (!paused) {\n _this3.video.play();\n }\n _this3.prevVideo = null;\n _this3.notice(_this3.tran('Switched to') + ' ' + _this3.quality.name + ' ' + _this3.tran('quality'));\n _this3.switchingQuality = false;\n _this3.events.trigger('quality_end');\n }\n });\n }\n },\n {\n key: 'mouseHandler',\n value: function mouseHandler(pbar, timeTips) {\n var _this4 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this4.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n if (tx < 0 || tx > pbar.offsetWidth) {\n return;\n }\n var time = _this4.video.duration * (tx / pbar.offsetWidth);\n timeTips.style.left = tx - 20 + 'px';\n switch (e.type) {\n case 'mouseenter':\n _this4.thumbnails && _this4.thumbnails.show();\n break;\n case 'mousemove':\n _this4.thumbnails && _this4.thumbnails.move(tx);\n timeTips.innerText = _utils2.default.secondToTime(time);\n _this4.timeTipsDisplay(true, timeTips);\n break;\n case 'mouseleave':\n _this4.thumbnails && _this4.thumbnails.hide();\n _this4.timeTipsDisplay(false, timeTips);\n break;\n }\n };\n }\n },\n {\n key: 'timeTipsDisplay',\n value: function timeTipsDisplay(show, timeTips) {\n if (show) {\n if (this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n this.isTimeTipsShow = true;\n } else {\n if (!this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n this.isTimeTipsShow = false;\n }\n }\n },\n {\n key: 'initThumbnails',\n value: function initThumbnails() {\n var _this5 = this;\n this.thumbnails = new _thumbnails2.default(this.template.barPreview, this.template.barWrap.offsetWidth, this.options.video.thumbnails, this.events);\n this.on('loadedmetadata', function () {\n _this5.thumbnails.resize(160, 90);\n });\n }\n },\n {\n key: 'notice',\n value: function notice(text) {\n var _this6 = this;\n var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;\n var opacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.8;\n this.template.notice.innerHTML = text;\n this.template.notice.style.opacity = opacity;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n this.events.trigger('notice_show', text);\n this.noticeTime = setTimeout(function () {\n _this6.template.notice.style.opacity = 0;\n _this6.events.trigger('notice_hide');\n }, time);\n }\n },\n {\n key: 'resize',\n value: function resize() {\n if (this.danmaku) {\n this.danmaku.resize();\n }\n this.events.trigger('resize');\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n instances.splice(instances.indexOf(this), 1);\n this.pause();\n clearTimeout(this.hideTime);\n this.video.src = '';\n this.container.innerHTML = '';\n this.events.trigger('destroy');\n for (var key in this) {\n if (this.hasOwnProperty(key) && key !== 'paused') {\n delete this[key];\n }\n }\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DPlayer.js\n// module id = 2\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar defaultApiBackend = require('./api.js');\nmodule.exports = function (options) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n options.autoplay = false;\n }\n var defaultOption = {\n container: options.element || document.getElementsByClassName('dplayer')[0],\n live: false,\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: (navigator.language || navigator.browserLanguage).toLowerCase(),\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n volume: 0.7,\n apiBackend: defaultApiBackend,\n video: {},\n icons: {\n play: [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n pause: [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z'\n ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n loop: [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n full: [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n setting: [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n right: [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n comment: [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n send: [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n pallette: [\n '0 0 32 32',\n 'M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z'\n ],\n camera: [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ],\n subtitle: [\n '0 0 32 32',\n 'M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z'\n ]\n },\n iconsColor: '#ffffff',\n contextmenu: [],\n mutex: true\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {\n options[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (options.video) {\n !options.video.type && (options.video.type = 'auto');\n }\n if (_typeof(options.danmaku) === 'object' && options.danmaku) {\n !options.danmaku.user && (options.danmaku.user = 'DIYgod');\n }\n if (options.subtitle) {\n !options.subtitle.type && (options.subtitle.type = 'webvtt');\n !options.subtitle.fontSize && (options.subtitle.fontSize = '20px');\n !options.subtitle.bottom && (options.subtitle.bottom = '40px');\n !options.subtitle.color && (options.subtitle.color = '#fff');\n }\n if (options.video.quality) {\n options.video.url = [options.video.quality[options.video.defaultQuality].url];\n }\n if (options.lang) {\n options.lang = options.lang.toLowerCase();\n }\n if (options.icons) {\n options.icons = Object.assign({}, defaultOption.icons, options.icons);\n }\n options.contextmenu = options.contextmenu.concat([\n {\n text: 'About author',\n link: 'https://diygod.me'\n },\n {\n text: 'About DPlayer',\n link: 'https://github.com/MoePlayer/DPlayer'\n },\n {\n text: 'DPlayer feedback',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: 'DPlayer ' + DPLAYER_VERSION + ' ' + GIT_HASH,\n link: 'https://github.com/MoePlayer/DPlayer/releases'\n }\n ]);\n return options;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/options.js\n// module id = 4\n// module chunks = 0","'use strict';\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData, callback) {\n SendXMLHttpRequest(endpoint, danmakuData, function (xhr, response) {\n console.log('Post danmaku: ', response);\n if (callback) {\n callback();\n }\n }, function (xhr, response) {\n alert(response.msg);\n }, function (xhr) {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n read: function read(endpoint, callback) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n callback(null, response.danmaku);\n }, function (xhr, response) {\n callback({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n callback({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 5\n// module chunks = 0","'use strict';\nmodule.exports = function (lang) {\n var _this = this;\n this.lang = lang;\n this.tran = function (text) {\n if (tranTxt[_this.lang] && tranTxt[_this.lang][text]) {\n return tranTxt[_this.lang][text];\n } else {\n return text;\n }\n };\n};\nvar tranTxt = {\n 'zh-cn': {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Show danmaku': '显示弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质',\n 'FF': '快进',\n 'REW': '快退',\n 'Unlimited danmaku': '海量弹幕',\n 'Send danmaku': '发送弹幕',\n 'Setting': '设置',\n 'Full screen': '全屏',\n 'Web full screen': '页面全屏',\n 'Send': '发送',\n 'Screenshot': '截图',\n 's': '秒',\n 'Show subtitle': '显示字幕',\n 'Hide subtitle': '隐藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n },\n 'zh-tw': {\n 'Danmaku is loading': '彈幕加載中',\n 'Top': '頂部',\n 'Bottom': '底部',\n 'Rolling': '滾動',\n 'Input danmaku, hit Enter': '輸入彈幕\\uFF0CEnter 發送',\n 'About author': '關於作者',\n 'DPlayer feedback': '播放器意見反饋',\n 'About DPlayer': '關於 DPlayer 播放器',\n 'Loop': '循環播放',\n 'Speed': '速度',\n 'Opacity for danmaku': '彈幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '請輸入彈幕内容啊\\uFF01',\n 'Set danmaku color': '設置彈幕顏色',\n 'Set danmaku type': '設置彈幕類型',\n 'Show danmaku': '顯示彈幕',\n 'This video fails to load': '視頻加載失敗',\n 'Switching to': '正在切換至',\n 'Switched to': '已經切換至',\n 'quality': '畫質',\n 'FF': '快進',\n 'REW': '快退',\n 'Unlimited danmaku': '海量彈幕',\n 'Send danmaku': '發送彈幕',\n 'Setting': '設置',\n 'Full screen': '全屏',\n 'Web full screen': '頁面全屏',\n 'Send': '發送',\n 'Screenshot': '截圖',\n 's': '秒',\n 'Show subtitle': '顯示字幕',\n 'Hide subtitle': '隱藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/i18n.js\n// module id = 6\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Template = function () {\n function Template(options) {\n _classCallCheck(this, Template);\n this.container = options.container;\n this.options = options.options;\n this.index = options.index;\n this.tran = options.tran;\n this.icons = options.icons;\n this.init();\n }\n _createClass(Template, [\n {\n key: 'init',\n value: function init() {\n this.container.innerHTML = this.tpl(this.options, this.index, this.tran, this.icons);\n this.volumeBar = this.container.querySelector('.dplayer-volume-bar-inner');\n this.volumeBarWrap = this.container.querySelector('.dplayer-volume-bar');\n this.volumeBarWrapWrap = this.container.querySelector('.dplayer-volume-bar-wrap');\n this.volumeButton = this.container.querySelector('.dplayer-volume');\n this.volumeIcon = this.container.querySelector('.dplayer-volume-icon .dplayer-icon-content');\n this.playedBar = this.container.querySelector('.dplayer-played');\n this.loadedBar = this.container.querySelector('.dplayer-loaded');\n this.playedBarWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.playedBarTime = this.container.querySelector('.dplayer-bar-time');\n this.danmaku = this.container.querySelector('.dplayer-danmaku');\n this.danmakuLoading = this.container.querySelector('.dplayer-danloading');\n this.video = this.container.querySelector('.dplayer-video-current');\n this.bezel = this.container.querySelector('.dplayer-bezel-icon');\n this.playButton = this.container.querySelector('.dplayer-play-icon');\n this.videoWrap = this.container.querySelector('.dplayer-video-wrap');\n this.controllerMask = this.container.querySelector('.dplayer-controller-mask');\n this.ptime = this.container.querySelector('.dplayer-ptime');\n this.settingButton = this.container.querySelector('.dplayer-setting-icon');\n this.settingBox = this.container.querySelector('.dplayer-setting-box');\n this.mask = this.container.querySelector('.dplayer-mask');\n this.loop = this.container.querySelector('.dplayer-setting-loop');\n this.loopToggle = this.container.querySelector('.dplayer-setting-loop .dplayer-toggle-setting-input');\n this.showDanmaku = this.container.querySelector('.dplayer-setting-showdan');\n this.showDanmakuToggle = this.container.querySelector('.dplayer-showdan-setting-input');\n this.unlimitDanmaku = this.container.querySelector('.dplayer-setting-danunlimit');\n this.unlimitDanmakuToggle = this.container.querySelector('.dplayer-danunlimit-setting-input');\n this.speed = this.container.querySelector('.dplayer-setting-speed');\n this.speedItem = this.container.querySelectorAll('dplayer-setting-speed-item');\n this.danmakuOpacityBar = this.container.querySelector('.dplayer-danmaku-bar-inner');\n this.danmakuOpacityBarWrap = this.container.querySelector('.dplayer-danmaku-bar');\n this.danmakuOpacityBarWrapWrap = this.container.querySelector('.dplayer-danmaku-bar-wrap');\n this.danmakuOpacityBox = this.container.querySelector('.dplayer-setting-danmaku');\n this.dtime = this.container.querySelector('.dplayer-dtime');\n this.controller = this.container.querySelector('.dplayer-controller');\n this.commentInput = this.container.querySelector('.dplayer-comment-input');\n this.commentButton = this.container.querySelector('.dplayer-comment-icon');\n this.commentSettingBox = this.container.querySelector('.dplayer-comment-setting-box');\n this.commentSettingButton = this.container.querySelector('.dplayer-comment-setting-icon');\n this.commentSettingFill = this.container.querySelector('.dplayer-comment-setting-icon .dplayer-fill');\n this.commentSendButton = this.container.querySelector('.dplayer-send-icon');\n this.commentSendFill = this.container.querySelector('.dplayer-send-icon .dplayer-fill');\n this.commentColorSettingBox = this.container.querySelector('.dplayer-comment-setting-color');\n this.svgFill = this.container.querySelector('.dplayer-fill');\n this.browserFullButton = this.container.querySelector('.dplayer-full-icon');\n this.webFullButton = this.container.querySelector('.dplayer-full-in-icon');\n this.menu = this.container.querySelector('.dplayer-menu');\n this.qualityList = this.container.querySelector('.dplayer-quality-list');\n this.camareButton = this.container.querySelector('.dplayer-camera-icon');\n this.subtitleButton = this.container.querySelector('.dplayer-subtitle-icon');\n this.subtitleButtonInner = this.container.querySelector('.dplayer-subtitle-icon .dplayer-icon-content');\n this.subtitle = this.container.querySelector('.dplayer-subtitle');\n this.qualityButton = this.container.querySelector('.dplayer-quality-icon');\n this.videoWrap = this.parent = this.container.querySelector('.dplayer-video-wrap');\n this.barPreview = this.container.querySelector('.dplayer-bar-preview');\n this.barWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.notice = this.container.querySelector('.dplayer-notice');\n }\n },\n {\n key: 'tpl',\n value: function tpl(options, index, tran, icons) {\n return '
' + this.tplVideo(true, options.video.pic, options.screenshot, options.preload, options.video.url, options.subtitle) + '' + (options.logo ? '
' : '') + '
' + (options.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
0:00 / 0:00' + (options.live ? '' + tran('Live') + '' : '') + '
' + (options.video.quality ? '
' + this.tplQualityList(options.video.quality) + '
' : '') + '' + (options.screenshot ? '' + icons.get('camera') + '' : '') + '
' + (options.subtitle ? '
' : '') + '
' + tran('Speed') + '
' + icons.get('right') + '
' + tran('Loop') + '
' + tran('Show danmaku') + '
' + tran('Unlimited danmaku') + '
' + tran('Opacity for danmaku') + '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
00:00
' + this.tplContextmenuList(options.contextmenu, tran) + '
';\n }\n },\n {\n key: 'tplDanmakumargin',\n value: function tplDanmakumargin(margin) {\n var result = '';\n if (margin) {\n for (var key in margin) {\n result += key + ':' + margin[key] + ';';\n }\n }\n return result;\n }\n },\n {\n key: 'tplContextmenuList',\n value: function tplContextmenuList(contextmenu, tran) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplQualityList',\n value: function tplQualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplVideo',\n value: function tplVideo(current, pic, screenshot, preload, url, subtitle) {\n var enableSubtitle = subtitle && subtitle.type === 'webvtt';\n return '';\n }\n }\n ]);\n return Template;\n}();\nmodule.exports = Template;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/template.js\n// module id = 7\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar SvgSource = function () {\n function SvgSource(options) {\n _classCallCheck(this, SvgSource);\n this.icons = options.icons;\n this.iconColor = options.iconsColor;\n }\n _createClass(SvgSource, [{\n key: 'get',\n value: function get(type) {\n return '';\n }\n }]);\n return SvgSource;\n}();\nmodule.exports = SvgSource;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg.js\n// module id = 8\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Danmaku = function () {\n function Danmaku(options) {\n _classCallCheck(this, Danmaku);\n this.options = options;\n this.container = this.options.container;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.dan = [];\n this.showing = true;\n this._opacity = this.options.opacity;\n this.events = this.options.events;\n this.unlimited = this.options.unlimited;\n this._measure('');\n this.load();\n }\n _createClass(Danmaku, [\n {\n key: 'load',\n value: function load() {\n var _this = this;\n var apiurl = void 0;\n if (this.options.api.maximum) {\n apiurl = this.options.api.address + '?id=' + this.options.api.id + '&max=' + this.options.api.maximum;\n } else {\n apiurl = this.options.api.address + '?id=' + this.options.api.id;\n }\n var endpoints = (this.options.api.addition || []).slice(0);\n endpoints.push(apiurl);\n this.events && this.events.trigger('danmaku_load_start', endpoints);\n this._readAllEndpoints(endpoints, function (results) {\n _this.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n window.requestAnimationFrame(function () {\n _this.frame();\n });\n _this.options.callback();\n _this.events && _this.events.trigger('danmaku_load_end');\n });\n }\n },\n {\n key: 'reload',\n value: function reload(newAPI) {\n this.options.api = newAPI;\n this.dan = [];\n this.clear();\n this.load();\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, callback) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.options.error(err.response.msg);\n } else {\n _this2.options.error('Request was unsuccessful: ' + err.status);\n }\n results[i] = [];\n } else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return callback(results);\n }\n };\n };\n for (var i = 0; i < endpoints.length; ++i) {\n this.options.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'send',\n value: function send(dan, callback) {\n var danmakuData = {\n token: this.options.api.token,\n player: this.options.api.id,\n author: this.options.api.user,\n time: this.options.time(),\n text: dan.text,\n color: dan.color,\n type: dan.type\n };\n this.options.apiBackend.send(this.options.api.address, danmakuData, callback);\n this.dan.splice(this.danIndex, 0, danmakuData);\n this.danIndex++;\n var danmaku = {\n text: this.htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + this.options.borderColor\n };\n this.draw(danmaku);\n this.events && this.events.trigger('danmaku_send', danmakuData);\n }\n },\n {\n key: 'frame',\n value: function frame() {\n var _this3 = this;\n if (this.dan.length && !this.paused && this.showing) {\n var item = this.dan[this.danIndex];\n var dan = [];\n while (item && this.options.time() > parseFloat(item.time)) {\n dan.push(item);\n item = this.dan[++this.danIndex];\n }\n this.draw(dan);\n }\n window.requestAnimationFrame(function () {\n _this3.frame();\n });\n }\n },\n {\n key: 'opacity',\n value: function opacity(percentage) {\n if (percentage !== undefined) {\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this._opacity = percentage;\n this.events && this.events.trigger('danmaku_opacity', this._opacity);\n }\n return this._opacity;\n }\n },\n {\n key: 'draw',\n value: function draw(dan) {\n var _this4 = this;\n if (this.showing) {\n var itemHeight = this.options.height;\n var danWidth = this.container.offsetWidth;\n var danHeight = this.container.offsetHeight;\n var itemY = parseInt(danHeight / itemHeight);\n var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || _this4.container.getBoundingClientRect().right + eleWidth;\n return _this4.container.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop = function _loop(i) {\n var item = _this4.danTunnel[type][i + ''];\n if (item && item.length) {\n if (type !== 'right') {\n return 'continue';\n }\n for (var j = 0; j < item.length; j++) {\n var danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0; _this4.unlimited || i < itemY; i++) {\n var _ret = _loop(i);\n switch (_ret) {\n case 'continue':\n continue;\n default:\n if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === 'object')\n return _ret.v;\n }\n }\n return -1;\n };\n if (Object.prototype.toString.call(dan) !== '[object Array]') {\n dan = [dan];\n }\n var docFragment = document.createDocumentFragment();\n var _loop2 = function _loop2(i) {\n if (!dan[i].type) {\n dan[i].type = 'right';\n }\n if (!dan[i].color) {\n dan[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + dan[i].type);\n if (dan[i].border) {\n item.innerHTML = '' + dan[i].text + '';\n } else {\n item.innerHTML = dan[i].text;\n }\n item.style.opacity = _this4._opacity;\n item.style.color = dan[i].color;\n item.addEventListener('animationend', function () {\n _this4.container.removeChild(item);\n });\n var itemWidth = _this4._measure(dan[i].text);\n var tunnel = void 0;\n switch (dan[i].type) {\n case 'right':\n tunnel = getTunnel(item, dan[i].type, itemWidth);\n if (tunnel >= 0) {\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * tunnel + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n }\n break;\n case 'top':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.top = itemHeight * tunnel + 'px';\n }\n break;\n case 'bottom':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.bottom = itemHeight * tunnel + 'px';\n }\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + dan[i].type);\n }\n if (tunnel >= 0) {\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n }\n };\n for (var i = 0; i < dan.length; i++) {\n _loop2(i);\n }\n this.container.appendChild(docFragment);\n return docFragment;\n }\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n }\n },\n {\n key: '_measure',\n value: function _measure(text) {\n if (!this.context) {\n var measureStyle = getComputedStyle(this.container.getElementsByClassName('dplayer-danmaku-item')[0], null);\n this.context = document.createElement('canvas').getContext('2d');\n this.context.font = measureStyle.getPropertyValue('font');\n }\n return this.context.measureText(text).width;\n }\n },\n {\n key: 'seek',\n value: function seek() {\n this.clear();\n for (var i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.options.time()) {\n this.danIndex = i;\n break;\n }\n this.danIndex = this.dan.length;\n }\n }\n },\n {\n key: 'clear',\n value: function clear() {\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.options.container.innerHTML = '';\n this.events && this.events.trigger('danmaku_clear');\n }\n },\n {\n key: 'htmlEncode',\n value: function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n }\n },\n {\n key: 'resize',\n value: function resize() {\n var danWidth = this.container.offsetWidth;\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.transform = 'translateX(-' + danWidth + 'px)';\n }\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.showing = false;\n this.pause();\n this.clear();\n this.events && this.events.trigger('danmaku_hide');\n }\n },\n {\n key: 'show',\n value: function show() {\n this.seek();\n this.showing = true;\n this.play();\n this.events && this.events.trigger('danmaku_show');\n }\n },\n {\n key: 'unlimit',\n value: function unlimit(boolean) {\n this.unlimited = boolean;\n }\n }\n ]);\n return Danmaku;\n}();\nmodule.exports = Danmaku;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/danmaku.js\n// module id = 9\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Thumbnails = function () {\n function Thumbnails(container, width, url, events) {\n _classCallCheck(this, Thumbnails);\n this.container = container;\n this.width = width;\n this.container.style.backgroundImage = 'url(\\'' + url + '\\')';\n this.events = events;\n }\n _createClass(Thumbnails, [\n {\n key: 'resize',\n value: function resize(width, height) {\n this.container.style.width = width + 'px';\n this.container.style.height = height + 'px';\n this.container.style.top = -height + 2 + 'px';\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.style.display = 'block';\n this.events && this.events.trigger('thumbnails_show');\n }\n },\n {\n key: 'move',\n value: function move(position) {\n this.container.style.backgroundPosition = '-' + (Math.ceil(position / this.width * 100) - 1) * 160 + 'px 0';\n this.container.style.left = position - this.container.offsetWidth / 2 + 'px';\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.style.display = 'none';\n this.events && this.events.trigger('thumbnails_hide');\n }\n }\n ]);\n return Thumbnails;\n}();\nmodule.exports = Thumbnails;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/thumbnails.js\n// module id = 10\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Events = function () {\n function Events() {\n _classCallCheck(this, Events);\n this.events = {};\n this.videoEvents = [\n 'abort',\n 'canplay',\n 'canplaythrough',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'loadeddata',\n 'loadedmetadata',\n 'loadstart',\n 'mozaudioavailable',\n 'pause',\n 'play',\n 'playing',\n 'progress',\n 'ratechange',\n 'seeked',\n 'seeking',\n 'stalled',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'waiting'\n ];\n this.playerEvents = [\n 'screenshot',\n 'thumbnails_show',\n 'thumbnails_hide',\n 'danmaku_show',\n 'danmaku_hide',\n 'danmaku_clear',\n 'danmaku_loaded',\n 'danmaku_send',\n 'danmaku_opacity',\n 'contextmenu_show',\n 'contextmenu_hide',\n 'notice_show',\n 'notice_hide',\n 'quality_start',\n 'quality_end',\n 'destroy',\n 'resize',\n 'fullscreen',\n 'fullscreen_cancel',\n 'webfullscreen',\n 'webfullscreen_cancel',\n 'subtitle_show',\n 'subtitle_hide',\n 'subtitle_change'\n ];\n }\n _createClass(Events, [\n {\n key: 'on',\n value: function on(name, callback) {\n if (this.type(name) && typeof callback === 'function') {\n if (!this.events[name]) {\n this.events[name] = [];\n }\n this.events[name].push(callback);\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(name, info) {\n if (this.events[name] && this.events[name].length) {\n for (var i = 0; i < this.events[name].length; i++) {\n this.events[name][i](info);\n }\n }\n }\n },\n {\n key: 'type',\n value: function type(name) {\n if (this.playerEvents.indexOf(name) !== -1) {\n return 'player';\n } else if (this.videoEvents.indexOf(name) !== -1) {\n return 'video';\n }\n console.error('Unknown event name: ' + name);\n return null;\n }\n }\n ]);\n return Events;\n}();\nmodule.exports = Events;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/events.js\n// module id = 11\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar FullScreen = function () {\n function FullScreen(player) {\n var _this = this;\n _classCallCheck(this, FullScreen);\n this.player = player;\n this.player.events.on('webfullscreen', function () {\n _this.player.resize();\n });\n this.player.events.on('webfullscreen_cancel', function () {\n _this.player.resize();\n });\n var fullscreenchange = function fullscreenchange() {\n _this.player.resize();\n if (_this.isFullScreen('browser')) {\n _this.player.events.trigger('fullscreen');\n } else {\n _this.player.events.trigger('fullscreen_cancel');\n }\n };\n this.player.container.addEventListener('fullscreenchange', fullscreenchange);\n this.player.container.addEventListener('mozfullscreenchange', fullscreenchange);\n this.player.container.addEventListener('webkitfullscreenchange', fullscreenchange);\n }\n _createClass(FullScreen, [\n {\n key: 'isFullScreen',\n value: function isFullScreen() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;\n case 'web':\n return this.player.container.classList.contains('dplayer-fulled');\n }\n }\n },\n {\n key: 'request',\n value: function request() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (this.player.container.requestFullscreen) {\n this.player.container.requestFullscreen();\n } else if (this.player.container.mozRequestFullScreen) {\n this.player.container.mozRequestFullScreen();\n } else if (this.player.container.webkitRequestFullscreen) {\n this.player.container.webkitRequestFullscreen();\n } else if (this.player.video.webkitEnterFullscreen) {\n this.player.video.webkitEnterFullscreen();\n }\n break;\n case 'web':\n this.player.container.classList.add('dplayer-fulled');\n this.lastScrollPosition = _utils2.default.getScrollPosition();\n document.body.classList.add('dplayer-web-fullscreen-fix');\n this.player.events.trigger('webfullscreen');\n break;\n }\n }\n },\n {\n key: 'cancel',\n value: function cancel() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n break;\n case 'web':\n this.player.container.classList.remove('dplayer-fulled');\n document.body.classList.remove('dplayer-web-fullscreen-fix');\n _utils2.default.setScrollPosition(this.lastScrollPosition);\n this.player.events.trigger('webfullscreen_cancel');\n break;\n }\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n if (this.isFullScreen(type)) {\n this.cancel(type);\n } else {\n this.request(type);\n }\n }\n }\n ]);\n return FullScreen;\n}();\nmodule.exports = FullScreen;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/fullscreen.js\n// module id = 12\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar User = function () {\n function User(player) {\n _classCallCheck(this, User);\n this.storageName = {\n opacity: 'dplayer-danmaku-opacity',\n volume: 'dplayer-volume',\n unlimited: 'dplayer-danmaku-unlimited',\n danmaku: 'dplayer-danmaku-show',\n subtitle: 'dplayer-subtitle-show'\n };\n this.default = {\n opacity: 0.7,\n volume: player.options.volume || 0.7,\n unlimited: (player.options.danmaku && player.options.danmaku.unlimited ? 1 : 0) || 0,\n danmaku: 1,\n subtitle: 1\n };\n this.data = {};\n this.init();\n }\n _createClass(User, [\n {\n key: 'init',\n value: function init() {\n for (var item in this.storageName) {\n var name = this.storageName[item];\n this.data[item] = parseFloat(_utils2.default.storage.get(name) || this.default[item]);\n }\n }\n },\n {\n key: 'get',\n value: function get(key) {\n return this.data[key];\n }\n },\n {\n key: 'set',\n value: function set(key, value) {\n this.data[key] = value;\n _utils2.default.storage.set(this.storageName[key], value);\n }\n }\n ]);\n return User;\n}();\nmodule.exports = User;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/user.js\n// module id = 13\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Subtitle = function () {\n function Subtitle(container, video, options, events) {\n _classCallCheck(this, Subtitle);\n this.container = container;\n this.video = video;\n this.options = options;\n this.events = events;\n this.init();\n }\n _createClass(Subtitle, [\n {\n key: 'init',\n value: function init() {\n var _this = this;\n this.container.style.fontSize = this.options.fontSize;\n this.container.style.bottom = this.options.bottom;\n this.container.style.color = this.options.color;\n if (this.video.textTracks && this.video.textTracks[0]) {\n var track = this.video.textTracks[0];\n track.oncuechange = function () {\n var cue = track.activeCues[0];\n if (cue) {\n _this.container.innerHTML = '';\n var p = document.createElement('p');\n p.appendChild(cue.getCueAsHTML());\n _this.container.appendChild(p);\n } else {\n _this.container.innerHTML = '';\n }\n _this.events.trigger('subtitle_change');\n };\n }\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.classList.remove('dplayer-subtitle-hide');\n this.events.trigger('subtitle_show');\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.classList.add('dplayer-subtitle-hide');\n this.events.trigger('subtitle_hide');\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.container.classList.contains('dplayer-subtitle-hide')) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n ]);\n return Subtitle;\n}();\nmodule.exports = Subtitle;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/subtitle.js\n// module id = 14\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///DPlayer.min.js","webpack:///webpack/bootstrap 999f118f6986c5f4a82e","webpack:///./src/utils.js","webpack:///./src/index.js","webpack:///./src/DPlayer.js","webpack:///./src/options.js","webpack:///./src/api.js","webpack:///./src/i18n.js","webpack:///./src/template.js","webpack:///./src/svg.js","webpack:///./src/danmaku.js","webpack:///./src/thumbnails.js","webpack:///./src/events.js","webpack:///./src/fullscreen.js","webpack:///./src/user.js","webpack:///./src/subtitle.js","webpack:///./src/bar.js"],"names":["root","factory","exports","module","define","amd","self","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","secondToTime","second","add0","num","min","parseInt","sec","getElementViewLeft","element","actualLeft","offsetLeft","current","offsetParent","elementScrollLeft","document","body","scrollLeft","documentElement","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","getScrollPosition","left","window","pageXOffset","top","pageYOffset","scrollTop","setScrollPosition","_ref","_ref$left","undefined","_ref$top","isFirefox","scrollTo","isMobile","test","navigator","userAgent","isChrome","storage","set","key","value","localStorage","setItem","getItem","console","log","_interopRequireDefault","obj","default","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","length","descriptor","writable","protoProps","staticProps","_utils","_utils2","_options","_options2","_i18n","_i18n2","_template","_template2","_svg","_svg2","_danmaku","_danmaku2","_thumbnails","_thumbnails2","_events","_events2","_fullscreen","_fullscreen2","_user","_user2","_subtitle","_subtitle2","_bar","_bar2","index","instances","DPlayer","options","_this","video","quality","qualityIndex","defaultQuality","tran","lang","icons","events","user","container","classList","add","danmaku","live","template","bar","addEventListener","focus","opacity","callback","setTimeout","danmakuLoading","style","display","autoplay","play","pause","error","msg","notice","apiBackend","borderColor","theme","height","arrow","time","currentTime","unlimited","api","id","address","token","maximum","addition","offsetWidth","arrowStyle","createElement","innerHTML","head","appendChild","bezel","remove","paused","playButton","toggle","toggleController","contains","videoWrap","controllerMask","lastPlayPos","currentPlayPos","bufferingDetected","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","setCheckLoadingTime","checkLoading","setInterval","clearCheckLoadingTime","clearInterval","playedTime","animationFrame","duration","ptime","setTime","type","clearTime","thumbnails","initThumbnails","isTimeTipsShow","mouseHandler","playedBarWrap","playedBarTime","bind","barWidth","thumbMove","e","percentage","clientX","Math","max","thumbUp","removeEventListener","seek","clientWidth","switchVolumeIcon","volume","volumeIcon","volumeMove","event","volumeBarWrap","volumeUp","volumeButton","volumeBarWrapWrap","muted","hideTime","hideController","clearTimeout","played","disableHideController","closeSetting","closeComment","settingBox","mask","openSetting","settingButton","loop","showdan","hide","unlimitDan","loopToggle","checked","showDanmakuToggle","showDanmaku","show","unlimitDanmakuToggle","unlimitDanmaku","unlimit","speed","speedItem","playbackRate","dataset","on","danmakuMove","danmakuOpacityBarWrap","danmakuUp","danmakuOpacityBox","danmakuOpacityBarWrapWrap","dtime","closeCommentSetting","commentSettingBox","toggleCommentSetting","controller","openComment","commentInput","commentButton","commentSettingButton","commentColorSettingBox","querySelector","color","commentSettingFill","fill","commentSendFill","sendComment","blur","replace","send","text","keyCode","commentSendButton","fullScreen","browserFullButton","webFullButton","handleKeyDown","tag","activeElement","tagName","toUpperCase","editable","getAttribute","preventDefault","hotkey","isFullScreen","cancel","menu","clientRect","getBoundingClientRect","menuLeft","menuTop","clientY","width","right","offsetHeight","bottom","trigger","qualityList","switchQuality","screenshot","camareButton","canvas","videoWidth","videoHeight","getContext","drawImage","dataURL","toDataURL","href","download","subtitle","subtitleButton","balloon","subtitleButtonInner","initVideo","push","toFixed","mutex","ended","nostorage","nonotice","parseFloat","isNaN","formatPercentage","danmakuAPI","poster","pic","src","url","initMSE","reload","exec","Hls","isSupported","hls","loadSource","attachMedia","flvjs","flvPlayer","createPlayer","attachMediaElement","load","dashjs","MediaPlayer","create","initialize","_this2","buffered","end","danIndex","videoEvents","_this3","switchingQuality","qualityButton","videoHTML","tplVideo","videoEle","DOMParser","parseFromString","firstChild","insertBefore","getElementsByTagName","prevVideo","removeChild","pbar","timeTips","_this4","cumulativeOffset","offsetTop","px","tx","move","innerText","timeTipsDisplay","_this5","barPreview","barWrap","resize","_this6","arguments","noticeTime","splice","indexOf","_typeof","Symbol","iterator","constructor","defaultApiBackend","defaultOption","getElementsByClassName","language","browserLanguage","toLowerCase","preload","volume-up","volume-down","volume-off","full","full-in","setting","comment","comment-off","pallette","camera","iconsColor","contextmenu","defaultKey","fontSize","assign","concat","link","SendXMLHttpRequest","data","success","fail","xhr","XMLHttpRequest","onreadystatechange","readyState","status","response","JSON","parse","responseText","code","open","stringify","endpoint","danmakuData","alert","read","tranTxt","zh-cn","Danmaku is loading","Top","Bottom","Rolling","Input danmaku, hit Enter","About author","DPlayer feedback","About DPlayer","Loop","Speed","Opacity for danmaku","Normal","Please input danmaku content!","Set danmaku color","Set danmaku type","Show danmaku","This video fails to load","Switching to","Switched to","FF","REW","Unlimited danmaku","Send danmaku","Setting","Full screen","Web full screen","Send","Screenshot","Show subtitle","Hide subtitle","Volume","Live","zh-tw","Template","init","tpl","volumeBar","playedBar","loadedBar","querySelectorAll","danmakuOpacityBar","logo","tplDanmakumargin","margin","tplQualityList","tplContextmenuList","result","enableSubtitle","SvgSource","iconColor","Danmaku","danTunnel","dan","showing","_opacity","_measure","apiurl","endpoints","slice","_readAllEndpoints","results","apply","sort","a","b","frame","newAPI","clear","readCount","err","player","author","htmlEncode","border","draw","item","items","itemHeight","danWidth","danHeight","itemY","danItemRight","ele","eleWidth","eleRight","danSpeed","getTunnel","tmp","_ret","v","j","danRight","toString","docFragment","createDocumentFragment","itemWidth","tunnel","transform","context","measureStyle","getComputedStyle","font","getPropertyValue","measureText","str","boolean","Thumbnails","backgroundImage","position","backgroundPosition","ceil","Events","playerEvents","info","FullScreen","fullscreenchange","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","webkitEnterFullscreen","lastScrollPosition","cancelFullScreen","mozCancelFullScreen","webkitCancelFullScreen","request","anotherType","User","storageName","Subtitle","textTracks","track","oncuechange","cue","activeCues","getCueAsHTML","Bar","elements","loaded","direction"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,OAAA,aAAAH,GACA,gBAAAC,SACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,KACC,mBAAAK,WAAAC,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAR,OA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A,GAAA5b,GACAxD,EAAA/E,KAAAmkB,GACAnkB,KAAAokB,YACApkB,KAAAokB,SAAAzW,OAAApF,EAAAyV,UACAhe,KAAAokB,SAAA7V,OAAAhG,EAAA0V,UACAje,KAAAokB,SAAAC,OAAA9b,EAAA2V,UACAle,KAAAokB,SAAA/b,QAAAE,EAAA6V,kBAkBA,MAhBAjZ,GAAAgf,IAEA9f,IAAA,MACAC,MAAA,SAAAgI,EAAAY,EAAAoX,GACApX,EAAAE,KAAAC,IAAAH,EAAA,GACAA,EAAAE,KAAArL,IAAAmL,EAAA,GACAlN,KAAAokB,SAAA9X,GAAAvD,MAAAub,GAAA,IAAApX,EAAA,OAIA7I,IAAA,MACAC,MAAA,SAAAgI,GACA,MAAAsI,YAAA5U,KAAAokB,SAAA9X,GAAAvD,MAAAgK,OAAA,QAIAoR,IAEAvkB,GAAAD,QAAAwkB","file":"DPlayer.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"DPlayer\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DPlayer\"] = factory();\n\telse\n\t\troot[\"DPlayer\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"DPlayer\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DPlayer\"] = factory();\n\telse\n\t\troot[\"DPlayer\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n },\n getScrollPosition: function getScrollPosition() {\n return {\n left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0,\n top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0\n };\n },\n setScrollPosition: function setScrollPosition(_ref) {\n var _ref$left = _ref.left, left = _ref$left === undefined ? 0 : _ref$left, _ref$top = _ref.top, top = _ref$top === undefined ? 0 : _ref$top;\n if (this.isFirefox) {\n document.documentElement.scrollLeft = left;\n document.documentElement.scrollTop = top;\n } else {\n window.scrollTo(left, top);\n }\n },\n isMobile: /mobile/i.test(window.navigator.userAgent),\n isFirefox: /firefox/i.test(window.navigator.userAgent),\n isChrome: /chrome/i.test(window.navigator.userAgent),\n storage: {\n set: function set(key, value) {\n localStorage.setItem(key, value);\n },\n get: function get(key) {\n return localStorage.getItem(key);\n }\n }\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nconsole.log('\\n' + ' %c DPlayer ' + \"1.17.2\" + ' ' + \"febfc6a\" + ' %c http://dplayer.js.org ' + '\\n' + '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nmodule.exports = __webpack_require__(2);\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n__webpack_require__(3);\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nvar _options = __webpack_require__(4);\nvar _options2 = _interopRequireDefault(_options);\nvar _i18n = __webpack_require__(6);\nvar _i18n2 = _interopRequireDefault(_i18n);\nvar _template = __webpack_require__(7);\nvar _template2 = _interopRequireDefault(_template);\nvar _svg = __webpack_require__(8);\nvar _svg2 = _interopRequireDefault(_svg);\nvar _danmaku = __webpack_require__(9);\nvar _danmaku2 = _interopRequireDefault(_danmaku);\nvar _thumbnails = __webpack_require__(10);\nvar _thumbnails2 = _interopRequireDefault(_thumbnails);\nvar _events = __webpack_require__(11);\nvar _events2 = _interopRequireDefault(_events);\nvar _fullscreen = __webpack_require__(12);\nvar _fullscreen2 = _interopRequireDefault(_fullscreen);\nvar _user = __webpack_require__(13);\nvar _user2 = _interopRequireDefault(_user);\nvar _subtitle = __webpack_require__(14);\nvar _subtitle2 = _interopRequireDefault(_subtitle);\nvar _bar = __webpack_require__(15);\nvar _bar2 = _interopRequireDefault(_bar);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar index = 0;\nvar instances = [];\nvar DPlayer = function () {\n function DPlayer(options) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.options = (0, _options2.default)(options);\n if (this.options.video.quality) {\n this.qualityIndex = this.options.video.defaultQuality;\n this.quality = this.options.video.quality[this.options.video.defaultQuality];\n }\n this.tran = new _i18n2.default(this.options.lang).tran;\n this.icons = new _svg2.default(this.options);\n this.events = new _events2.default();\n this.user = new _user2.default(this);\n this.container = this.options.container;\n this.container.classList.add('dplayer');\n if (!this.options.danmaku) {\n this.container.classList.add('dplayer-no-danmaku');\n }\n if (this.options.live) {\n this.container.classList.add('dplayer-live');\n }\n if (_utils.isMobile) {\n this.container.classList.add('dplayer-mobile');\n }\n this.template = new _template2.default({\n container: this.container,\n options: this.options,\n index: index,\n tran: this.tran,\n icons: this.icons\n });\n this.bar = new _bar2.default(this.template);\n document.addEventListener('click', function () {\n _this.focus = false;\n }, true);\n this.container.addEventListener('click', function () {\n _this.focus = true;\n }, true);\n if (this.options.danmaku) {\n this.danmaku = new _danmaku2.default({\n container: this.template.danmaku,\n opacity: this.user.get('opacity'),\n callback: function callback() {\n setTimeout(function () {\n _this.template.danmakuLoading.style.display = 'none';\n if (_this.options.autoplay && !_utils.isMobile) {\n _this.play();\n } else if (_utils.isMobile) {\n _this.pause();\n }\n }, 0);\n },\n error: function error(msg) {\n _this.notice(msg);\n },\n apiBackend: this.options.apiBackend,\n borderColor: this.options.theme,\n height: this.arrow ? 24 : 30,\n time: function time() {\n return _this.video.currentTime;\n },\n unlimited: this.user.get('unlimited'),\n api: {\n id: this.options.danmaku.id,\n address: this.options.danmaku.api,\n token: this.options.danmaku.token,\n maximum: this.options.danmaku.maximum,\n addition: this.options.danmaku.addition,\n user: this.options.danmaku.user\n },\n events: this.events\n });\n }\n this.arrow = this.container.offsetWidth <= 500;\n if (this.arrow) {\n var arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = '.dplayer .dplayer-danmaku{font-size:18px}';\n document.head.appendChild(arrowStyle);\n }\n this.video = this.template.video;\n this.template.bezel.addEventListener('animationend', function () {\n _this.template.bezel.classList.remove('dplayer-bezel-transition');\n });\n this.paused = true;\n this.template.playButton.addEventListener('click', function () {\n _this.toggle();\n });\n if (!_utils.isMobile) {\n this.template.videoWrap.addEventListener('click', function () {\n _this.toggle();\n });\n this.template.controllerMask.addEventListener('click', function () {\n _this.toggle();\n });\n } else {\n var toggleController = function toggleController() {\n if (_this.container.classList.contains('dplayer-hide-controller')) {\n _this.container.classList.remove('dplayer-hide-controller');\n } else {\n _this.container.classList.add('dplayer-hide-controller');\n }\n };\n this.template.videoWrap.addEventListener('click', toggleController);\n this.template.controllerMask.addEventListener('click', toggleController);\n }\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime;\n if (!bufferingDetected && currentPlayPos === lastPlayPos && !_this.video.paused) {\n _this.container.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos && !_this.video.paused) {\n _this.container.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.playedTime = false;\n this.animationFrame = function () {\n if (_this.playedTime) {\n _this.bar.set('played', _this.video.currentTime / _this.video.duration, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(_this.video.currentTime);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\n }\n }\n };\n if (this.options.video.thumbnails) {\n this.initThumbnails();\n }\n this.isTimeTipsShow = true;\n this.mouseHandler = this.mouseHandler(this.template.playedBarWrap, this.template.playedBarTime).bind(this);\n this.template.playedBarWrap.addEventListener('mousemove', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseenter', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseleave', this.mouseHandler);\n var barWidth = void 0;\n var thumbMove = function thumbMove(e) {\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.bar.set('played', percentage, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(percentage * _this.video.duration);\n };\n var thumbUp = function thumbUp(e) {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.bar.set('played', percentage, 'width');\n _this.seek(_this.bar.get('played') * _this.video.duration);\n _this.setTime();\n };\n this.template.playedBarWrap.addEventListener('mousedown', function () {\n barWidth = _this.template.playedBarWrap.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n var vWidth = 35;\n this.switchVolumeIcon = function () {\n if (_this.volume() >= 0.95) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-up');\n } else if (_this.volume() > 0) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-down');\n } else {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n }\n };\n var volumeMove = function volumeMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n };\n var volumeUp = function volumeUp() {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n _this.template.volumeButton.classList.remove('dplayer-volume-active');\n };\n this.template.volumeBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n });\n this.template.volumeBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n _this.template.volumeButton.classList.add('dplayer-volume-active');\n });\n this.template.volumeIcon.addEventListener('click', function () {\n if (_this.video.muted) {\n _this.video.muted = false;\n _this.switchVolumeIcon();\n _this.bar.set('volume', _this.volume(), 'width');\n } else {\n _this.video.muted = true;\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n _this.bar.set('volume', 0, 'width');\n }\n });\n this.hideTime = 0;\n var hideController = function hideController() {\n _this.container.classList.remove('dplayer-hide-controller');\n clearTimeout(_this.hideTime);\n _this.hideTime = setTimeout(function () {\n if (_this.video.played.length && !_this.disableHideController) {\n _this.container.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n if (!_utils.isMobile) {\n this.container.addEventListener('mousemove', hideController);\n this.container.addEventListener('click', hideController);\n }\n var closeSetting = function closeSetting() {\n if (_this.template.settingBox.classList.contains('dplayer-setting-box-open')) {\n _this.template.settingBox.classList.remove('dplayer-setting-box-open');\n _this.template.mask.classList.remove('dplayer-mask-show');\n setTimeout(function () {\n _this.template.settingBox.classList.remove('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.remove('dplayer-setting-box-speed');\n }, 300);\n }\n _this.disableHideController = false;\n };\n var openSetting = function openSetting() {\n _this.disableHideController = true;\n _this.template.settingBox.classList.add('dplayer-setting-box-open');\n _this.template.mask.classList.add('dplayer-mask-show');\n };\n this.template.mask.addEventListener('click', function () {\n closeSetting();\n });\n this.template.settingButton.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.options.loop;\n var showdan = this.user.get('danmaku');\n if (!showdan) {\n this.danmaku && this.danmaku.hide();\n }\n var unlimitDan = this.user.get('unlimited');\n this.template.loopToggle.checked = this.loop;\n this.template.loop.addEventListener('click', function () {\n _this.template.loopToggle.checked = !_this.template.loopToggle.checked;\n if (_this.template.loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n this.template.showDanmakuToggle.checked = showdan;\n this.template.showDanmaku.addEventListener('click', function () {\n _this.template.showDanmakuToggle.checked = !_this.template.showDanmakuToggle.checked;\n if (_this.template.showDanmakuToggle.checked) {\n showdan = true;\n if (!_this.paused) {\n _this.danmaku.show();\n }\n } else {\n showdan = false;\n _this.danmaku.hide();\n }\n _this.user.set('danmaku', showdan ? 1 : 0);\n closeSetting();\n });\n this.template.unlimitDanmakuToggle.checked = unlimitDan;\n this.template.unlimitDanmaku.addEventListener('click', function () {\n _this.template.unlimitDanmakuToggle.checked = !_this.template.unlimitDanmakuToggle.checked;\n if (_this.template.unlimitDanmakuToggle.checked) {\n unlimitDan = true;\n _this.danmaku.unlimit(true);\n } else {\n unlimitDan = false;\n _this.danmaku.unlimit(false);\n }\n _this.user.set('unlimited', unlimitDan ? 1 : 0);\n closeSetting();\n });\n this.template.speed.addEventListener('click', function () {\n _this.template.settingBox.classList.add('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.add('dplayer-setting-box-speed');\n var _loop = function _loop(i) {\n _this.template.speedItem[i].addEventListener('click', function () {\n _this.video.playbackRate = _this.template.speedItem[i].dataset.speed;\n closeSetting();\n });\n };\n for (var i = 0; i < _this.template.speedItem.length; i++) {\n _loop(i);\n }\n });\n if (this.danmaku) {\n var dWidth = 130;\n this.on('danmaku_opacity', function (percentage) {\n _this.bar.set('danmaku', percentage, 'width');\n _this.user.set('opacity', percentage);\n });\n this.danmaku.opacity(this.user.get('opacity'));\n var danmakuMove = function danmakuMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.danmaku.opacity(percentage);\n };\n var danmakuUp = function danmakuUp() {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n _this.template.danmakuOpacityBox.classList.remove('dplayer-setting-danmaku-active');\n };\n this.template.danmakuOpacityBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.danmaku.opacity(percentage);\n });\n this.template.danmakuOpacityBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n _this.template.danmakuOpacityBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n if (this.video.duration !== 1) {\n this.template.dtime.innerHTML = this.video.duration ? _utils2.default.secondToTime(this.video.duration) : '00:00';\n }\n if (!this.danmaku) {\n if (this.options.autoplay && !_utils.isMobile) {\n this.play();\n } else if (_utils.isMobile) {\n this.pause();\n }\n }\n var closeCommentSetting = function closeCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n var toggleCommentSetting = function toggleCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n } else {\n _this.template.commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n var closeComment = function closeComment() {\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n return;\n }\n _this.template.controller.classList.remove('dplayer-controller-comment');\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.container.classList.remove('dplayer-show-controller');\n closeCommentSetting();\n _this.disableHideController = false;\n };\n var openComment = function openComment() {\n _this.disableHideController = true;\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n _this.template.controller.classList.add('dplayer-controller-comment');\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.container.classList.add('dplayer-show-controller');\n _this.template.commentInput.focus();\n }\n };\n this.template.mask.addEventListener('click', function () {\n closeComment();\n });\n this.template.commentButton.addEventListener('click', function () {\n openComment();\n });\n this.template.commentSettingButton.addEventListener('click', function () {\n toggleCommentSetting();\n });\n this.template.commentColorSettingBox.addEventListener('click', function () {\n var sele = _this.template.commentColorSettingBox.querySelector('input:checked+span');\n if (sele) {\n var color = _this.template.commentColorSettingBox.querySelector('input:checked').value;\n _this.template.commentSettingFill.style.fill = color;\n _this.template.commentInput.style.color = color;\n _this.template.commentSendFill.style.fill = color;\n }\n });\n var sendComment = function sendComment() {\n _this.template.commentInput.blur();\n if (!_this.template.commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\n }\n _this.danmaku.send({\n text: _this.template.commentInput.value,\n color: _this.container.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: _this.container.querySelector('.dplayer-comment-setting-type input:checked').value\n }, function () {\n _this.template.commentInput.value = '';\n closeComment();\n });\n };\n this.template.commentInput.addEventListener('click', function () {\n closeCommentSetting();\n });\n this.template.commentInput.addEventListener('keydown', function (e) {\n var event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n this.template.commentSendButton.addEventListener('click', sendComment);\n this.fullScreen = new _fullscreen2.default(this);\n this.template.browserFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('browser');\n });\n this.template.webFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('web');\n });\n var handleKeyDown = function handleKeyDown(e) {\n if (_this.focus) {\n var tag = document.activeElement.tagName.toUpperCase();\n var editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n var event = e || window.event;\n var percentage = void 0;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n _this.toggle();\n break;\n case 37:\n event.preventDefault();\n _this.seek(_this.video.currentTime - 5);\n hideController();\n break;\n case 39:\n event.preventDefault();\n _this.seek(_this.video.currentTime + 5);\n hideController();\n break;\n case 38:\n event.preventDefault();\n percentage = _this.volume() + 0.1;\n _this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = _this.volume() - 0.1;\n _this.volume(percentage);\n break;\n }\n }\n }\n };\n if (this.options.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', function (e) {\n var event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (_this.fullScreen.isFullScreen('web')) {\n _this.fullScreen.cancel('web');\n }\n break;\n }\n });\n this.container.addEventListener('contextmenu', function (e) {\n var event = e || window.event;\n event.preventDefault();\n _this.template.menu.classList.add('dplayer-menu-show');\n var clientRect = _this.container.getBoundingClientRect();\n var menuLeft = event.clientX - clientRect.left;\n var menuTop = event.clientY - clientRect.top;\n if (menuLeft + _this.template.menu.offsetWidth >= clientRect.width) {\n _this.template.menu.style.right = clientRect.width - menuLeft + 'px';\n _this.template.menu.style.left = 'initial';\n } else {\n _this.template.menu.style.left = event.clientX - _this.container.getBoundingClientRect().left + 'px';\n _this.template.menu.style.right = 'initial';\n }\n if (menuTop + _this.template.menu.offsetHeight >= clientRect.height) {\n _this.template.menu.style.bottom = clientRect.height - menuTop + 'px';\n _this.template.menu.style.top = 'initial';\n } else {\n _this.template.menu.style.top = event.clientY - _this.container.getBoundingClientRect().top + 'px';\n _this.template.menu.style.bottom = 'initial';\n }\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.events.trigger('contextmenu_show');\n _this.template.mask.addEventListener('click', function () {\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.template.menu.classList.remove('dplayer-menu-show');\n _this.events.trigger('contextmenu_hide');\n });\n });\n if (this.options.video.quality) {\n this.template.qualityList.addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.options.screenshot) {\n this.template.camareButton.addEventListener('click', function () {\n var canvas = document.createElement('canvas');\n canvas.width = _this.video.videoWidth;\n canvas.height = _this.video.videoHeight;\n canvas.getContext('2d').drawImage(_this.video, 0, 0, canvas.width, canvas.height);\n var dataURL = canvas.toDataURL();\n _this.template.camareButton.href = dataURL;\n _this.template.camareButton.download = 'DPlayer.png';\n _this.events.trigger('screenshot', dataURL);\n });\n }\n if (this.options.subtitle) {\n this.events.on('subtitle_show', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Hide subtitle');\n _this.template.subtitleButtonInner.style.opacity = '';\n _this.user.set('subtitle', 1);\n });\n this.events.on('subtitle_hide', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Show subtitle');\n _this.template.subtitleButtonInner.style.opacity = '0.4';\n _this.user.set('subtitle', 0);\n });\n this.template.subtitleButton.addEventListener('click', function () {\n _this.subtitle.toggle();\n });\n }\n this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type);\n index++;\n instances.push(this);\n }\n _createClass(DPlayer, [\n {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n if (this.video.duration) {\n time = Math.min(time, this.video.duration);\n }\n if (this.video.currentTime < time) {\n this.notice(this.tran('FF') + ' ' + (time - this.video.currentTime).toFixed(0) + ' ' + this.tran('s'));\n } else if (this.video.currentTime > time) {\n this.notice(this.tran('REW') + ' ' + (this.video.currentTime - time).toFixed(0) + ' ' + this.tran('s'));\n }\n this.video.currentTime = time;\n if (this.danmaku) {\n this.danmaku.seek();\n }\n this.bar.set('played', time / this.video.duration, 'width');\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n if (this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('play');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.template.playButton.innerHTML = this.icons.get('pause');\n this.video.play();\n this.setTime();\n this.container.classList.add('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.play();\n }\n if (this.options.mutex) {\n for (var i = 0; i < instances.length; i++) {\n if (this !== instances[i]) {\n instances[i].pause();\n }\n }\n }\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.container.classList.remove('dplayer-loading');\n if (!this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('pause');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.ended = false;\n this.template.playButton.innerHTML = this.icons.get('play');\n this.video.pause();\n this.clearTime();\n this.container.classList.remove('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.pause();\n }\n }\n },\n {\n key: 'volume',\n value: function volume(percentage, nostorage, nonotice) {\n percentage = parseFloat(percentage);\n if (!isNaN(percentage)) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.bar.set('volume', percentage, 'width');\n var formatPercentage = (percentage * 100).toFixed(0) + '%';\n this.template.volumeBarWrapWrap.dataset.balloon = formatPercentage;\n if (!nostorage) {\n this.user.set('volume', percentage);\n }\n if (!nonotice) {\n this.notice(this.tran('Volume') + ' ' + (percentage * 100).toFixed(0) + '%');\n }\n this.video.volume = percentage;\n if (this.video.muted) {\n this.video.muted = false;\n }\n this.switchVolumeIcon();\n }\n return this.video.volume;\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.video.paused) {\n this.play();\n } else {\n this.pause();\n }\n }\n },\n {\n key: 'on',\n value: function on(name, callback) {\n this.events.on(name, callback);\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmakuAPI) {\n this.pause();\n this.video.poster = video.pic ? video.pic : '';\n this.video.src = video.url;\n this.initMSE(this.video, video.type || 'auto');\n if (danmakuAPI) {\n this.template.danmakuLoading.style.display = 'block';\n this.bar.set('played', 0, 'width');\n this.bar.set('loaded', 0, 'width');\n this.template.ptime.innerHTML = '00:00';\n this.template.danmaku.innerHTML = '';\n if (this.danmaku) {\n this.danmaku.reload({\n id: danmakuAPI.id,\n address: danmakuAPI.api,\n token: danmakuAPI.token,\n maximum: danmakuAPI.maximum,\n addition: danmakuAPI.addition,\n user: danmakuAPI.user\n });\n }\n }\n }\n },\n {\n key: 'initMSE',\n value: function initMSE(video, type) {\n this.type = type;\n if (this.type === 'auto') {\n if (/m3u8(#|\\?|$)/i.exec(video.src)) {\n this.type = 'hls';\n } else if (/.flv(#|\\?|$)/i.exec(video.src)) {\n this.type = 'flv';\n } else if (/.mpd(#|\\?|$)/i.exec(video.src)) {\n this.type = 'dash';\n } else {\n this.type = 'normal';\n }\n }\n if (this.type === 'hls' && Hls && Hls.isSupported()) {\n var hls = new Hls();\n hls.loadSource(video.src);\n hls.attachMedia(video);\n }\n if (this.type === 'flv' && flvjs && flvjs.isSupported()) {\n var flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: video.src\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n }\n if (this.type === 'dash' && dashjs) {\n dashjs.MediaPlayer().create().initialize(video, video.src, false);\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo(video, type) {\n var _this2 = this;\n this.initMSE(video, type);\n this.on('durationchange', function () {\n if (video.duration !== 1) {\n _this2.template.dtime.innerHTML = _utils2.default.secondToTime(video.duration);\n }\n });\n this.on('progress', function () {\n var percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0;\n _this2.bar.set('loaded', percentage, 'width');\n });\n this.on('error', function () {\n _this2.tran && _this2.notice && _this2.notice(_this2.tran('This video fails to load'), -1);\n });\n this.ended = false;\n this.on('ended', function () {\n _this2.bar.set('played', 1, 'width');\n if (!_this2.loop) {\n _this2.ended = true;\n _this2.pause();\n } else {\n _this2.seek(0);\n video.play();\n }\n if (_this2.danmaku) {\n _this2.danmaku.danIndex = 0;\n }\n });\n this.on('play', function () {\n if (_this2.paused) {\n _this2.play();\n }\n });\n this.on('pause', function () {\n if (!_this2.paused) {\n _this2.pause();\n }\n });\n var _loop2 = function _loop2(i) {\n video.addEventListener(_this2.events.videoEvents[i], function () {\n _this2.events.trigger(_this2.events.videoEvents[i]);\n });\n };\n for (var i = 0; i < this.events.videoEvents.length; i++) {\n _loop2(i);\n }\n this.volume(this.user.get('volume'), true, true);\n if (this.options.subtitle) {\n this.subtitle = new _subtitle2.default(this.template.subtitle, this.video, this.options.subtitle, this.events);\n if (!this.user.get('subtitle')) {\n this.subtitle.hide();\n }\n }\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this3 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.options.video.quality[index];\n this.template.qualityButton.innerHTML = this.quality.name;\n var paused = this.video.paused;\n this.video.pause();\n var videoHTML = this.template.tplVideo(false, null, this.options.screenshot, 'auto', this.quality.url, this.options.subtitle);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n this.template.videoWrap.insertBefore(videoEle, this.template.videoWrap.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = videoEle;\n this.initVideo(this.video, this.quality.type || this.options.video.type);\n this.seek(this.prevVideo.currentTime);\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.events.trigger('quality_start', this.quality);\n this.on('canplay', function () {\n if (_this3.prevVideo) {\n if (_this3.video.currentTime !== _this3.prevVideo.currentTime) {\n _this3.seek(_this3.prevVideo.currentTime);\n return;\n }\n _this3.template.videoWrap.removeChild(_this3.prevVideo);\n _this3.video.classList.add('dplayer-video-current');\n if (!paused) {\n _this3.video.play();\n }\n _this3.prevVideo = null;\n _this3.notice(_this3.tran('Switched to') + ' ' + _this3.quality.name + ' ' + _this3.tran('quality'));\n _this3.switchingQuality = false;\n _this3.events.trigger('quality_end');\n }\n });\n }\n },\n {\n key: 'mouseHandler',\n value: function mouseHandler(pbar, timeTips) {\n var _this4 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this4.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n if (tx < 0 || tx > pbar.offsetWidth) {\n return;\n }\n var time = _this4.video.duration * (tx / pbar.offsetWidth);\n timeTips.style.left = tx - 20 + 'px';\n switch (e.type) {\n case 'mouseenter':\n _this4.thumbnails && _this4.thumbnails.show();\n break;\n case 'mousemove':\n _this4.thumbnails && _this4.thumbnails.move(tx);\n timeTips.innerText = _utils2.default.secondToTime(time);\n _this4.timeTipsDisplay(true, timeTips);\n break;\n case 'mouseleave':\n _this4.thumbnails && _this4.thumbnails.hide();\n _this4.timeTipsDisplay(false, timeTips);\n break;\n }\n };\n }\n },\n {\n key: 'timeTipsDisplay',\n value: function timeTipsDisplay(show, timeTips) {\n if (show) {\n if (this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n this.isTimeTipsShow = true;\n } else {\n if (!this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n this.isTimeTipsShow = false;\n }\n }\n },\n {\n key: 'initThumbnails',\n value: function initThumbnails() {\n var _this5 = this;\n this.thumbnails = new _thumbnails2.default(this.template.barPreview, this.template.barWrap.offsetWidth, this.options.video.thumbnails, this.events);\n this.on('loadedmetadata', function () {\n _this5.thumbnails.resize(160, 90);\n });\n }\n },\n {\n key: 'notice',\n value: function notice(text) {\n var _this6 = this;\n var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;\n var opacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.8;\n this.template.notice.innerHTML = text;\n this.template.notice.style.opacity = opacity;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n this.events.trigger('notice_show', text);\n this.noticeTime = setTimeout(function () {\n _this6.template.notice.style.opacity = 0;\n _this6.events.trigger('notice_hide');\n }, time);\n }\n },\n {\n key: 'resize',\n value: function resize() {\n if (this.danmaku) {\n this.danmaku.resize();\n }\n this.events.trigger('resize');\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n instances.splice(instances.indexOf(this), 1);\n this.pause();\n clearTimeout(this.hideTime);\n this.video.src = '';\n this.container.innerHTML = '';\n this.events.trigger('destroy');\n for (var key in this) {\n if (this.hasOwnProperty(key) && key !== 'paused') {\n delete this[key];\n }\n }\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar defaultApiBackend = __webpack_require__(5);\nmodule.exports = function (options) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n options.autoplay = false;\n }\n var defaultOption = {\n container: options.element || document.getElementsByClassName('dplayer')[0],\n live: false,\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: (navigator.language || navigator.browserLanguage).toLowerCase(),\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n volume: 0.7,\n apiBackend: defaultApiBackend,\n video: {},\n icons: {\n play: [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n pause: [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z'\n ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n loop: [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n full: [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n setting: [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n right: [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n comment: [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n send: [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n pallette: [\n '0 0 32 32',\n 'M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z'\n ],\n camera: [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ],\n subtitle: [\n '0 0 32 32',\n 'M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z'\n ]\n },\n iconsColor: '#ffffff',\n contextmenu: [],\n mutex: true\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {\n options[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (options.video) {\n !options.video.type && (options.video.type = 'auto');\n }\n if (_typeof(options.danmaku) === 'object' && options.danmaku) {\n !options.danmaku.user && (options.danmaku.user = 'DIYgod');\n }\n if (options.subtitle) {\n !options.subtitle.type && (options.subtitle.type = 'webvtt');\n !options.subtitle.fontSize && (options.subtitle.fontSize = '20px');\n !options.subtitle.bottom && (options.subtitle.bottom = '40px');\n !options.subtitle.color && (options.subtitle.color = '#fff');\n }\n if (options.video.quality) {\n options.video.url = [options.video.quality[options.video.defaultQuality].url];\n }\n if (options.lang) {\n options.lang = options.lang.toLowerCase();\n }\n if (options.icons) {\n options.icons = Object.assign({}, defaultOption.icons, options.icons);\n }\n options.contextmenu = options.contextmenu.concat([\n {\n text: 'About author',\n link: 'https://diygod.me'\n },\n {\n text: 'About DPlayer',\n link: 'https://github.com/MoePlayer/DPlayer'\n },\n {\n text: 'DPlayer feedback',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: 'DPlayer ' + \"1.17.2\" + ' ' + \"febfc6a\",\n link: 'https://github.com/MoePlayer/DPlayer/releases'\n }\n ]);\n return options;\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData, callback) {\n SendXMLHttpRequest(endpoint, danmakuData, function (xhr, response) {\n console.log('Post danmaku: ', response);\n if (callback) {\n callback();\n }\n }, function (xhr, response) {\n alert(response.msg);\n }, function (xhr) {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n read: function read(endpoint, callback) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n callback(null, response.danmaku);\n }, function (xhr, response) {\n callback({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n callback({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = function (lang) {\n var _this = this;\n this.lang = lang;\n this.tran = function (text) {\n if (tranTxt[_this.lang] && tranTxt[_this.lang][text]) {\n return tranTxt[_this.lang][text];\n } else {\n return text;\n }\n };\n};\nvar tranTxt = {\n 'zh-cn': {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Show danmaku': '显示弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质',\n 'FF': '快进',\n 'REW': '快退',\n 'Unlimited danmaku': '海量弹幕',\n 'Send danmaku': '发送弹幕',\n 'Setting': '设置',\n 'Full screen': '全屏',\n 'Web full screen': '页面全屏',\n 'Send': '发送',\n 'Screenshot': '截图',\n 's': '秒',\n 'Show subtitle': '显示字幕',\n 'Hide subtitle': '隐藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n },\n 'zh-tw': {\n 'Danmaku is loading': '彈幕加載中',\n 'Top': '頂部',\n 'Bottom': '底部',\n 'Rolling': '滾動',\n 'Input danmaku, hit Enter': '輸入彈幕\\uFF0CEnter 發送',\n 'About author': '關於作者',\n 'DPlayer feedback': '播放器意見反饋',\n 'About DPlayer': '關於 DPlayer 播放器',\n 'Loop': '循環播放',\n 'Speed': '速度',\n 'Opacity for danmaku': '彈幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '請輸入彈幕内容啊\\uFF01',\n 'Set danmaku color': '設置彈幕顏色',\n 'Set danmaku type': '設置彈幕類型',\n 'Show danmaku': '顯示彈幕',\n 'This video fails to load': '視頻加載失敗',\n 'Switching to': '正在切換至',\n 'Switched to': '已經切換至',\n 'quality': '畫質',\n 'FF': '快進',\n 'REW': '快退',\n 'Unlimited danmaku': '海量彈幕',\n 'Send danmaku': '發送彈幕',\n 'Setting': '設置',\n 'Full screen': '全屏',\n 'Web full screen': '頁面全屏',\n 'Send': '發送',\n 'Screenshot': '截圖',\n 's': '秒',\n 'Show subtitle': '顯示字幕',\n 'Hide subtitle': '隱藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n }\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Template = function () {\n function Template(options) {\n _classCallCheck(this, Template);\n this.container = options.container;\n this.options = options.options;\n this.index = options.index;\n this.tran = options.tran;\n this.icons = options.icons;\n this.init();\n }\n _createClass(Template, [\n {\n key: 'init',\n value: function init() {\n this.container.innerHTML = this.tpl(this.options, this.index, this.tran, this.icons);\n this.volumeBar = this.container.querySelector('.dplayer-volume-bar-inner');\n this.volumeBarWrap = this.container.querySelector('.dplayer-volume-bar');\n this.volumeBarWrapWrap = this.container.querySelector('.dplayer-volume-bar-wrap');\n this.volumeButton = this.container.querySelector('.dplayer-volume');\n this.volumeIcon = this.container.querySelector('.dplayer-volume-icon .dplayer-icon-content');\n this.playedBar = this.container.querySelector('.dplayer-played');\n this.loadedBar = this.container.querySelector('.dplayer-loaded');\n this.playedBarWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.playedBarTime = this.container.querySelector('.dplayer-bar-time');\n this.danmaku = this.container.querySelector('.dplayer-danmaku');\n this.danmakuLoading = this.container.querySelector('.dplayer-danloading');\n this.video = this.container.querySelector('.dplayer-video-current');\n this.bezel = this.container.querySelector('.dplayer-bezel-icon');\n this.playButton = this.container.querySelector('.dplayer-play-icon');\n this.videoWrap = this.container.querySelector('.dplayer-video-wrap');\n this.controllerMask = this.container.querySelector('.dplayer-controller-mask');\n this.ptime = this.container.querySelector('.dplayer-ptime');\n this.settingButton = this.container.querySelector('.dplayer-setting-icon');\n this.settingBox = this.container.querySelector('.dplayer-setting-box');\n this.mask = this.container.querySelector('.dplayer-mask');\n this.loop = this.container.querySelector('.dplayer-setting-loop');\n this.loopToggle = this.container.querySelector('.dplayer-setting-loop .dplayer-toggle-setting-input');\n this.showDanmaku = this.container.querySelector('.dplayer-setting-showdan');\n this.showDanmakuToggle = this.container.querySelector('.dplayer-showdan-setting-input');\n this.unlimitDanmaku = this.container.querySelector('.dplayer-setting-danunlimit');\n this.unlimitDanmakuToggle = this.container.querySelector('.dplayer-danunlimit-setting-input');\n this.speed = this.container.querySelector('.dplayer-setting-speed');\n this.speedItem = this.container.querySelectorAll('dplayer-setting-speed-item');\n this.danmakuOpacityBar = this.container.querySelector('.dplayer-danmaku-bar-inner');\n this.danmakuOpacityBarWrap = this.container.querySelector('.dplayer-danmaku-bar');\n this.danmakuOpacityBarWrapWrap = this.container.querySelector('.dplayer-danmaku-bar-wrap');\n this.danmakuOpacityBox = this.container.querySelector('.dplayer-setting-danmaku');\n this.dtime = this.container.querySelector('.dplayer-dtime');\n this.controller = this.container.querySelector('.dplayer-controller');\n this.commentInput = this.container.querySelector('.dplayer-comment-input');\n this.commentButton = this.container.querySelector('.dplayer-comment-icon');\n this.commentSettingBox = this.container.querySelector('.dplayer-comment-setting-box');\n this.commentSettingButton = this.container.querySelector('.dplayer-comment-setting-icon');\n this.commentSettingFill = this.container.querySelector('.dplayer-comment-setting-icon .dplayer-fill');\n this.commentSendButton = this.container.querySelector('.dplayer-send-icon');\n this.commentSendFill = this.container.querySelector('.dplayer-send-icon .dplayer-fill');\n this.commentColorSettingBox = this.container.querySelector('.dplayer-comment-setting-color');\n this.browserFullButton = this.container.querySelector('.dplayer-full-icon');\n this.webFullButton = this.container.querySelector('.dplayer-full-in-icon');\n this.menu = this.container.querySelector('.dplayer-menu');\n this.qualityList = this.container.querySelector('.dplayer-quality-list');\n this.camareButton = this.container.querySelector('.dplayer-camera-icon');\n this.subtitleButton = this.container.querySelector('.dplayer-subtitle-icon');\n this.subtitleButtonInner = this.container.querySelector('.dplayer-subtitle-icon .dplayer-icon-content');\n this.subtitle = this.container.querySelector('.dplayer-subtitle');\n this.qualityButton = this.container.querySelector('.dplayer-quality-icon');\n this.barPreview = this.container.querySelector('.dplayer-bar-preview');\n this.barWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.notice = this.container.querySelector('.dplayer-notice');\n }\n },\n {\n key: 'tpl',\n value: function tpl(options, index, tran, icons) {\n return '
' + this.tplVideo(true, options.video.pic, options.screenshot, options.preload, options.video.url, options.subtitle) + '' + (options.logo ? '
' : '') + '
' + (options.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
0:00 / 0:00' + (options.live ? '' + tran('Live') + '' : '') + '
' + (options.video.quality ? '
' + this.tplQualityList(options.video.quality) + '
' : '') + '' + (options.screenshot ? '' + icons.get('camera') + '' : '') + '
' + (options.subtitle ? '
' : '') + '
' + tran('Speed') + '
' + icons.get('right') + '
' + tran('Loop') + '
' + tran('Show danmaku') + '
' + tran('Unlimited danmaku') + '
' + tran('Opacity for danmaku') + '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
00:00
' + this.tplContextmenuList(options.contextmenu, tran) + '
';\n }\n },\n {\n key: 'tplDanmakumargin',\n value: function tplDanmakumargin(margin) {\n var result = '';\n if (margin) {\n for (var key in margin) {\n result += key + ':' + margin[key] + ';';\n }\n }\n return result;\n }\n },\n {\n key: 'tplContextmenuList',\n value: function tplContextmenuList(contextmenu, tran) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplQualityList',\n value: function tplQualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplVideo',\n value: function tplVideo(current, pic, screenshot, preload, url, subtitle) {\n var enableSubtitle = subtitle && subtitle.type === 'webvtt';\n return '';\n }\n }\n ]);\n return Template;\n}();\nmodule.exports = Template;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar SvgSource = function () {\n function SvgSource(options) {\n _classCallCheck(this, SvgSource);\n this.icons = options.icons;\n this.iconColor = options.iconsColor;\n }\n _createClass(SvgSource, [{\n key: 'get',\n value: function get(type) {\n return '';\n }\n }]);\n return SvgSource;\n}();\nmodule.exports = SvgSource;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Danmaku = function () {\n function Danmaku(options) {\n _classCallCheck(this, Danmaku);\n this.options = options;\n this.container = this.options.container;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.dan = [];\n this.showing = true;\n this._opacity = this.options.opacity;\n this.events = this.options.events;\n this.unlimited = this.options.unlimited;\n this._measure('');\n this.load();\n }\n _createClass(Danmaku, [\n {\n key: 'load',\n value: function load() {\n var _this = this;\n var apiurl = void 0;\n if (this.options.api.maximum) {\n apiurl = this.options.api.address + '?id=' + this.options.api.id + '&max=' + this.options.api.maximum;\n } else {\n apiurl = this.options.api.address + '?id=' + this.options.api.id;\n }\n var endpoints = (this.options.api.addition || []).slice(0);\n endpoints.push(apiurl);\n this.events && this.events.trigger('danmaku_load_start', endpoints);\n this._readAllEndpoints(endpoints, function (results) {\n _this.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n window.requestAnimationFrame(function () {\n _this.frame();\n });\n _this.options.callback();\n _this.events && _this.events.trigger('danmaku_load_end');\n });\n }\n },\n {\n key: 'reload',\n value: function reload(newAPI) {\n this.options.api = newAPI;\n this.dan = [];\n this.clear();\n this.load();\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, callback) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.options.error(err.response.msg);\n } else {\n _this2.options.error('Request was unsuccessful: ' + err.status);\n }\n results[i] = [];\n } else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return callback(results);\n }\n };\n };\n for (var i = 0; i < endpoints.length; ++i) {\n this.options.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'send',\n value: function send(dan, callback) {\n var danmakuData = {\n token: this.options.api.token,\n player: this.options.api.id,\n author: this.options.api.user,\n time: this.options.time(),\n text: dan.text,\n color: dan.color,\n type: dan.type\n };\n this.options.apiBackend.send(this.options.api.address, danmakuData, callback);\n this.dan.splice(this.danIndex, 0, danmakuData);\n this.danIndex++;\n var danmaku = {\n text: this.htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + this.options.borderColor\n };\n this.draw(danmaku);\n this.events && this.events.trigger('danmaku_send', danmakuData);\n }\n },\n {\n key: 'frame',\n value: function frame() {\n var _this3 = this;\n if (this.dan.length && !this.paused && this.showing) {\n var item = this.dan[this.danIndex];\n var dan = [];\n while (item && this.options.time() > parseFloat(item.time)) {\n dan.push(item);\n item = this.dan[++this.danIndex];\n }\n this.draw(dan);\n }\n window.requestAnimationFrame(function () {\n _this3.frame();\n });\n }\n },\n {\n key: 'opacity',\n value: function opacity(percentage) {\n if (percentage !== undefined) {\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this._opacity = percentage;\n this.events && this.events.trigger('danmaku_opacity', this._opacity);\n }\n return this._opacity;\n }\n },\n {\n key: 'draw',\n value: function draw(dan) {\n var _this4 = this;\n if (this.showing) {\n var itemHeight = this.options.height;\n var danWidth = this.container.offsetWidth;\n var danHeight = this.container.offsetHeight;\n var itemY = parseInt(danHeight / itemHeight);\n var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || _this4.container.getBoundingClientRect().right + eleWidth;\n return _this4.container.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop = function _loop(i) {\n var item = _this4.danTunnel[type][i + ''];\n if (item && item.length) {\n if (type !== 'right') {\n return 'continue';\n }\n for (var j = 0; j < item.length; j++) {\n var danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0; _this4.unlimited || i < itemY; i++) {\n var _ret = _loop(i);\n switch (_ret) {\n case 'continue':\n continue;\n default:\n if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === 'object')\n return _ret.v;\n }\n }\n return -1;\n };\n if (Object.prototype.toString.call(dan) !== '[object Array]') {\n dan = [dan];\n }\n var docFragment = document.createDocumentFragment();\n var _loop2 = function _loop2(i) {\n if (!dan[i].type) {\n dan[i].type = 'right';\n }\n if (!dan[i].color) {\n dan[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + dan[i].type);\n if (dan[i].border) {\n item.innerHTML = '' + dan[i].text + '';\n } else {\n item.innerHTML = dan[i].text;\n }\n item.style.opacity = _this4._opacity;\n item.style.color = dan[i].color;\n item.addEventListener('animationend', function () {\n _this4.container.removeChild(item);\n });\n var itemWidth = _this4._measure(dan[i].text);\n var tunnel = void 0;\n switch (dan[i].type) {\n case 'right':\n tunnel = getTunnel(item, dan[i].type, itemWidth);\n if (tunnel >= 0) {\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * tunnel + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n }\n break;\n case 'top':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.top = itemHeight * tunnel + 'px';\n }\n break;\n case 'bottom':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.bottom = itemHeight * tunnel + 'px';\n }\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + dan[i].type);\n }\n if (tunnel >= 0) {\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n }\n };\n for (var i = 0; i < dan.length; i++) {\n _loop2(i);\n }\n this.container.appendChild(docFragment);\n return docFragment;\n }\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n }\n },\n {\n key: '_measure',\n value: function _measure(text) {\n if (!this.context) {\n var measureStyle = getComputedStyle(this.container.getElementsByClassName('dplayer-danmaku-item')[0], null);\n this.context = document.createElement('canvas').getContext('2d');\n this.context.font = measureStyle.getPropertyValue('font');\n }\n return this.context.measureText(text).width;\n }\n },\n {\n key: 'seek',\n value: function seek() {\n this.clear();\n for (var i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.options.time()) {\n this.danIndex = i;\n break;\n }\n this.danIndex = this.dan.length;\n }\n }\n },\n {\n key: 'clear',\n value: function clear() {\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.options.container.innerHTML = '';\n this.events && this.events.trigger('danmaku_clear');\n }\n },\n {\n key: 'htmlEncode',\n value: function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n }\n },\n {\n key: 'resize',\n value: function resize() {\n var danWidth = this.container.offsetWidth;\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.transform = 'translateX(-' + danWidth + 'px)';\n }\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.showing = false;\n this.pause();\n this.clear();\n this.events && this.events.trigger('danmaku_hide');\n }\n },\n {\n key: 'show',\n value: function show() {\n this.seek();\n this.showing = true;\n this.play();\n this.events && this.events.trigger('danmaku_show');\n }\n },\n {\n key: 'unlimit',\n value: function unlimit(boolean) {\n this.unlimited = boolean;\n }\n }\n ]);\n return Danmaku;\n}();\nmodule.exports = Danmaku;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Thumbnails = function () {\n function Thumbnails(container, width, url, events) {\n _classCallCheck(this, Thumbnails);\n this.container = container;\n this.width = width;\n this.container.style.backgroundImage = 'url(\\'' + url + '\\')';\n this.events = events;\n }\n _createClass(Thumbnails, [\n {\n key: 'resize',\n value: function resize(width, height) {\n this.container.style.width = width + 'px';\n this.container.style.height = height + 'px';\n this.container.style.top = -height + 2 + 'px';\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.style.display = 'block';\n this.events && this.events.trigger('thumbnails_show');\n }\n },\n {\n key: 'move',\n value: function move(position) {\n this.container.style.backgroundPosition = '-' + (Math.ceil(position / this.width * 100) - 1) * 160 + 'px 0';\n this.container.style.left = position - this.container.offsetWidth / 2 + 'px';\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.style.display = 'none';\n this.events && this.events.trigger('thumbnails_hide');\n }\n }\n ]);\n return Thumbnails;\n}();\nmodule.exports = Thumbnails;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Events = function () {\n function Events() {\n _classCallCheck(this, Events);\n this.events = {};\n this.videoEvents = [\n 'abort',\n 'canplay',\n 'canplaythrough',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'loadeddata',\n 'loadedmetadata',\n 'loadstart',\n 'mozaudioavailable',\n 'pause',\n 'play',\n 'playing',\n 'progress',\n 'ratechange',\n 'seeked',\n 'seeking',\n 'stalled',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'waiting'\n ];\n this.playerEvents = [\n 'screenshot',\n 'thumbnails_show',\n 'thumbnails_hide',\n 'danmaku_show',\n 'danmaku_hide',\n 'danmaku_clear',\n 'danmaku_loaded',\n 'danmaku_send',\n 'danmaku_opacity',\n 'contextmenu_show',\n 'contextmenu_hide',\n 'notice_show',\n 'notice_hide',\n 'quality_start',\n 'quality_end',\n 'destroy',\n 'resize',\n 'fullscreen',\n 'fullscreen_cancel',\n 'webfullscreen',\n 'webfullscreen_cancel',\n 'subtitle_show',\n 'subtitle_hide',\n 'subtitle_change'\n ];\n }\n _createClass(Events, [\n {\n key: 'on',\n value: function on(name, callback) {\n if (this.type(name) && typeof callback === 'function') {\n if (!this.events[name]) {\n this.events[name] = [];\n }\n this.events[name].push(callback);\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(name, info) {\n if (this.events[name] && this.events[name].length) {\n for (var i = 0; i < this.events[name].length; i++) {\n this.events[name][i](info);\n }\n }\n }\n },\n {\n key: 'type',\n value: function type(name) {\n if (this.playerEvents.indexOf(name) !== -1) {\n return 'player';\n } else if (this.videoEvents.indexOf(name) !== -1) {\n return 'video';\n }\n console.error('Unknown event name: ' + name);\n return null;\n }\n }\n ]);\n return Events;\n}();\nmodule.exports = Events;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar FullScreen = function () {\n function FullScreen(player) {\n var _this = this;\n _classCallCheck(this, FullScreen);\n this.player = player;\n this.player.events.on('webfullscreen', function () {\n _this.player.resize();\n });\n this.player.events.on('webfullscreen_cancel', function () {\n _this.player.resize();\n });\n var fullscreenchange = function fullscreenchange() {\n _this.player.resize();\n if (_this.isFullScreen('browser')) {\n _this.player.events.trigger('fullscreen');\n } else {\n _this.player.events.trigger('fullscreen_cancel');\n }\n };\n this.player.container.addEventListener('fullscreenchange', fullscreenchange);\n this.player.container.addEventListener('mozfullscreenchange', fullscreenchange);\n this.player.container.addEventListener('webkitfullscreenchange', fullscreenchange);\n }\n _createClass(FullScreen, [\n {\n key: 'isFullScreen',\n value: function isFullScreen() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;\n case 'web':\n return this.player.container.classList.contains('dplayer-fulled');\n }\n }\n },\n {\n key: 'request',\n value: function request() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (this.player.container.requestFullscreen) {\n this.player.container.requestFullscreen();\n } else if (this.player.container.mozRequestFullScreen) {\n this.player.container.mozRequestFullScreen();\n } else if (this.player.container.webkitRequestFullscreen) {\n this.player.container.webkitRequestFullscreen();\n } else if (this.player.video.webkitEnterFullscreen) {\n this.player.video.webkitEnterFullscreen();\n }\n break;\n case 'web':\n this.player.container.classList.add('dplayer-fulled');\n this.lastScrollPosition = _utils2.default.getScrollPosition();\n document.body.classList.add('dplayer-web-fullscreen-fix');\n this.player.events.trigger('webfullscreen');\n break;\n }\n }\n },\n {\n key: 'cancel',\n value: function cancel() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n break;\n case 'web':\n this.player.container.classList.remove('dplayer-fulled');\n document.body.classList.remove('dplayer-web-fullscreen-fix');\n _utils2.default.setScrollPosition(this.lastScrollPosition);\n this.player.events.trigger('webfullscreen_cancel');\n break;\n }\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n if (this.isFullScreen(type)) {\n this.cancel(type);\n } else {\n this.request(type);\n var anotherType = type === 'browser' ? 'web' : 'browser';\n if (this.isFullScreen(anotherType)) {\n this.cancel(anotherType);\n }\n }\n }\n }\n ]);\n return FullScreen;\n}();\nmodule.exports = FullScreen;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = __webpack_require__(0);\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar User = function () {\n function User(player) {\n _classCallCheck(this, User);\n this.storageName = {\n opacity: 'dplayer-danmaku-opacity',\n volume: 'dplayer-volume',\n unlimited: 'dplayer-danmaku-unlimited',\n danmaku: 'dplayer-danmaku-show',\n subtitle: 'dplayer-subtitle-show'\n };\n this.default = {\n opacity: 0.7,\n volume: player.options.volume || 0.7,\n unlimited: (player.options.danmaku && player.options.danmaku.unlimited ? 1 : 0) || 0,\n danmaku: 1,\n subtitle: 1\n };\n this.data = {};\n this.init();\n }\n _createClass(User, [\n {\n key: 'init',\n value: function init() {\n for (var item in this.storageName) {\n var name = this.storageName[item];\n this.data[item] = parseFloat(_utils2.default.storage.get(name) || this.default[item]);\n }\n }\n },\n {\n key: 'get',\n value: function get(key) {\n return this.data[key];\n }\n },\n {\n key: 'set',\n value: function set(key, value) {\n this.data[key] = value;\n _utils2.default.storage.set(this.storageName[key], value);\n }\n }\n ]);\n return User;\n}();\nmodule.exports = User;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Subtitle = function () {\n function Subtitle(container, video, options, events) {\n _classCallCheck(this, Subtitle);\n this.container = container;\n this.video = video;\n this.options = options;\n this.events = events;\n this.init();\n }\n _createClass(Subtitle, [\n {\n key: 'init',\n value: function init() {\n var _this = this;\n this.container.style.fontSize = this.options.fontSize;\n this.container.style.bottom = this.options.bottom;\n this.container.style.color = this.options.color;\n if (this.video.textTracks && this.video.textTracks[0]) {\n var track = this.video.textTracks[0];\n track.oncuechange = function () {\n var cue = track.activeCues[0];\n if (cue) {\n _this.container.innerHTML = '';\n var p = document.createElement('p');\n p.appendChild(cue.getCueAsHTML());\n _this.container.appendChild(p);\n } else {\n _this.container.innerHTML = '';\n }\n _this.events.trigger('subtitle_change');\n };\n }\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.classList.remove('dplayer-subtitle-hide');\n this.events.trigger('subtitle_show');\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.classList.add('dplayer-subtitle-hide');\n this.events.trigger('subtitle_hide');\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.container.classList.contains('dplayer-subtitle-hide')) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n ]);\n return Subtitle;\n}();\nmodule.exports = Subtitle;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Bar = function () {\n function Bar(template) {\n _classCallCheck(this, Bar);\n this.elements = {};\n this.elements.volume = template.volumeBar;\n this.elements.played = template.playedBar;\n this.elements.loaded = template.loadedBar;\n this.elements.danmaku = template.danmakuOpacityBar;\n }\n _createClass(Bar, [\n {\n key: 'set',\n value: function set(type, percentage, direction) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.elements[type].style[direction] = percentage * 100 + '%';\n }\n },\n {\n key: 'get',\n value: function get(type) {\n return parseFloat(this.elements[type].style.width) / 100;\n }\n }\n ]);\n return Bar;\n}();\nmodule.exports = Bar;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// DPlayer.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 999f118f6986c5f4a82e","'use strict';\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n },\n getScrollPosition: function getScrollPosition() {\n return {\n left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0,\n top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0\n };\n },\n setScrollPosition: function setScrollPosition(_ref) {\n var _ref$left = _ref.left, left = _ref$left === undefined ? 0 : _ref$left, _ref$top = _ref.top, top = _ref$top === undefined ? 0 : _ref$top;\n if (this.isFirefox) {\n document.documentElement.scrollLeft = left;\n document.documentElement.scrollTop = top;\n } else {\n window.scrollTo(left, top);\n }\n },\n isMobile: /mobile/i.test(window.navigator.userAgent),\n isFirefox: /firefox/i.test(window.navigator.userAgent),\n isChrome: /chrome/i.test(window.navigator.userAgent),\n storage: {\n set: function set(key, value) {\n localStorage.setItem(key, value);\n },\n get: function get(key) {\n return localStorage.getItem(key);\n }\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 0\n// module chunks = 0","'use strict';\nconsole.log('\\n' + ' %c DPlayer ' + DPLAYER_VERSION + ' ' + GIT_HASH + ' %c http://dplayer.js.org ' + '\\n' + '\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nmodule.exports = require('./DPlayer');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 1\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nrequire('./DPlayer.scss');\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nvar _options = require('./options');\nvar _options2 = _interopRequireDefault(_options);\nvar _i18n = require('./i18n');\nvar _i18n2 = _interopRequireDefault(_i18n);\nvar _template = require('./template');\nvar _template2 = _interopRequireDefault(_template);\nvar _svg = require('./svg');\nvar _svg2 = _interopRequireDefault(_svg);\nvar _danmaku = require('./danmaku');\nvar _danmaku2 = _interopRequireDefault(_danmaku);\nvar _thumbnails = require('./thumbnails');\nvar _thumbnails2 = _interopRequireDefault(_thumbnails);\nvar _events = require('./events');\nvar _events2 = _interopRequireDefault(_events);\nvar _fullscreen = require('./fullscreen');\nvar _fullscreen2 = _interopRequireDefault(_fullscreen);\nvar _user = require('./user');\nvar _user2 = _interopRequireDefault(_user);\nvar _subtitle = require('./subtitle');\nvar _subtitle2 = _interopRequireDefault(_subtitle);\nvar _bar = require('./bar');\nvar _bar2 = _interopRequireDefault(_bar);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar index = 0;\nvar instances = [];\nvar DPlayer = function () {\n function DPlayer(options) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.options = (0, _options2.default)(options);\n if (this.options.video.quality) {\n this.qualityIndex = this.options.video.defaultQuality;\n this.quality = this.options.video.quality[this.options.video.defaultQuality];\n }\n this.tran = new _i18n2.default(this.options.lang).tran;\n this.icons = new _svg2.default(this.options);\n this.events = new _events2.default();\n this.user = new _user2.default(this);\n this.container = this.options.container;\n this.container.classList.add('dplayer');\n if (!this.options.danmaku) {\n this.container.classList.add('dplayer-no-danmaku');\n }\n if (this.options.live) {\n this.container.classList.add('dplayer-live');\n }\n if (_utils.isMobile) {\n this.container.classList.add('dplayer-mobile');\n }\n this.template = new _template2.default({\n container: this.container,\n options: this.options,\n index: index,\n tran: this.tran,\n icons: this.icons\n });\n this.bar = new _bar2.default(this.template);\n document.addEventListener('click', function () {\n _this.focus = false;\n }, true);\n this.container.addEventListener('click', function () {\n _this.focus = true;\n }, true);\n if (this.options.danmaku) {\n this.danmaku = new _danmaku2.default({\n container: this.template.danmaku,\n opacity: this.user.get('opacity'),\n callback: function callback() {\n setTimeout(function () {\n _this.template.danmakuLoading.style.display = 'none';\n if (_this.options.autoplay && !_utils.isMobile) {\n _this.play();\n } else if (_utils.isMobile) {\n _this.pause();\n }\n }, 0);\n },\n error: function error(msg) {\n _this.notice(msg);\n },\n apiBackend: this.options.apiBackend,\n borderColor: this.options.theme,\n height: this.arrow ? 24 : 30,\n time: function time() {\n return _this.video.currentTime;\n },\n unlimited: this.user.get('unlimited'),\n api: {\n id: this.options.danmaku.id,\n address: this.options.danmaku.api,\n token: this.options.danmaku.token,\n maximum: this.options.danmaku.maximum,\n addition: this.options.danmaku.addition,\n user: this.options.danmaku.user\n },\n events: this.events\n });\n }\n this.arrow = this.container.offsetWidth <= 500;\n if (this.arrow) {\n var arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = '.dplayer .dplayer-danmaku{font-size:18px}';\n document.head.appendChild(arrowStyle);\n }\n this.video = this.template.video;\n this.template.bezel.addEventListener('animationend', function () {\n _this.template.bezel.classList.remove('dplayer-bezel-transition');\n });\n this.paused = true;\n this.template.playButton.addEventListener('click', function () {\n _this.toggle();\n });\n if (!_utils.isMobile) {\n this.template.videoWrap.addEventListener('click', function () {\n _this.toggle();\n });\n this.template.controllerMask.addEventListener('click', function () {\n _this.toggle();\n });\n } else {\n var toggleController = function toggleController() {\n if (_this.container.classList.contains('dplayer-hide-controller')) {\n _this.container.classList.remove('dplayer-hide-controller');\n } else {\n _this.container.classList.add('dplayer-hide-controller');\n }\n };\n this.template.videoWrap.addEventListener('click', toggleController);\n this.template.controllerMask.addEventListener('click', toggleController);\n }\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime;\n if (!bufferingDetected && currentPlayPos === lastPlayPos && !_this.video.paused) {\n _this.container.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos && !_this.video.paused) {\n _this.container.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.playedTime = false;\n this.animationFrame = function () {\n if (_this.playedTime) {\n _this.bar.set('played', _this.video.currentTime / _this.video.duration, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(_this.video.currentTime);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\n }\n }\n };\n if (this.options.video.thumbnails) {\n this.initThumbnails();\n }\n this.isTimeTipsShow = true;\n this.mouseHandler = this.mouseHandler(this.template.playedBarWrap, this.template.playedBarTime).bind(this);\n this.template.playedBarWrap.addEventListener('mousemove', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseenter', this.mouseHandler);\n this.template.playedBarWrap.addEventListener('mouseleave', this.mouseHandler);\n var barWidth = void 0;\n var thumbMove = function thumbMove(e) {\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.bar.set('played', percentage, 'width');\n _this.template.ptime.innerHTML = _utils2.default.secondToTime(percentage * _this.video.duration);\n };\n var thumbUp = function thumbUp(e) {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.playedBarWrap)) / barWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.bar.set('played', percentage, 'width');\n _this.seek(_this.bar.get('played') * _this.video.duration);\n _this.setTime();\n };\n this.template.playedBarWrap.addEventListener('mousedown', function () {\n barWidth = _this.template.playedBarWrap.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n var vWidth = 35;\n this.switchVolumeIcon = function () {\n if (_this.volume() >= 0.95) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-up');\n } else if (_this.volume() > 0) {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-down');\n } else {\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n }\n };\n var volumeMove = function volumeMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n };\n var volumeUp = function volumeUp() {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n _this.template.volumeButton.classList.remove('dplayer-volume-active');\n };\n this.template.volumeBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n });\n this.template.volumeBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n _this.template.volumeButton.classList.add('dplayer-volume-active');\n });\n this.template.volumeIcon.addEventListener('click', function () {\n if (_this.video.muted) {\n _this.video.muted = false;\n _this.switchVolumeIcon();\n _this.bar.set('volume', _this.volume(), 'width');\n } else {\n _this.video.muted = true;\n _this.template.volumeIcon.innerHTML = _this.icons.get('volume-off');\n _this.bar.set('volume', 0, 'width');\n }\n });\n this.hideTime = 0;\n var hideController = function hideController() {\n _this.container.classList.remove('dplayer-hide-controller');\n clearTimeout(_this.hideTime);\n _this.hideTime = setTimeout(function () {\n if (_this.video.played.length && !_this.disableHideController) {\n _this.container.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n if (!_utils.isMobile) {\n this.container.addEventListener('mousemove', hideController);\n this.container.addEventListener('click', hideController);\n }\n var closeSetting = function closeSetting() {\n if (_this.template.settingBox.classList.contains('dplayer-setting-box-open')) {\n _this.template.settingBox.classList.remove('dplayer-setting-box-open');\n _this.template.mask.classList.remove('dplayer-mask-show');\n setTimeout(function () {\n _this.template.settingBox.classList.remove('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.remove('dplayer-setting-box-speed');\n }, 300);\n }\n _this.disableHideController = false;\n };\n var openSetting = function openSetting() {\n _this.disableHideController = true;\n _this.template.settingBox.classList.add('dplayer-setting-box-open');\n _this.template.mask.classList.add('dplayer-mask-show');\n };\n this.template.mask.addEventListener('click', function () {\n closeSetting();\n });\n this.template.settingButton.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.options.loop;\n var showdan = this.user.get('danmaku');\n if (!showdan) {\n this.danmaku && this.danmaku.hide();\n }\n var unlimitDan = this.user.get('unlimited');\n this.template.loopToggle.checked = this.loop;\n this.template.loop.addEventListener('click', function () {\n _this.template.loopToggle.checked = !_this.template.loopToggle.checked;\n if (_this.template.loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n this.template.showDanmakuToggle.checked = showdan;\n this.template.showDanmaku.addEventListener('click', function () {\n _this.template.showDanmakuToggle.checked = !_this.template.showDanmakuToggle.checked;\n if (_this.template.showDanmakuToggle.checked) {\n showdan = true;\n if (!_this.paused) {\n _this.danmaku.show();\n }\n } else {\n showdan = false;\n _this.danmaku.hide();\n }\n _this.user.set('danmaku', showdan ? 1 : 0);\n closeSetting();\n });\n this.template.unlimitDanmakuToggle.checked = unlimitDan;\n this.template.unlimitDanmaku.addEventListener('click', function () {\n _this.template.unlimitDanmakuToggle.checked = !_this.template.unlimitDanmakuToggle.checked;\n if (_this.template.unlimitDanmakuToggle.checked) {\n unlimitDan = true;\n _this.danmaku.unlimit(true);\n } else {\n unlimitDan = false;\n _this.danmaku.unlimit(false);\n }\n _this.user.set('unlimited', unlimitDan ? 1 : 0);\n closeSetting();\n });\n this.template.speed.addEventListener('click', function () {\n _this.template.settingBox.classList.add('dplayer-setting-box-narrow');\n _this.template.settingBox.classList.add('dplayer-setting-box-speed');\n var _loop = function _loop(i) {\n _this.template.speedItem[i].addEventListener('click', function () {\n _this.video.playbackRate = _this.template.speedItem[i].dataset.speed;\n closeSetting();\n });\n };\n for (var i = 0; i < _this.template.speedItem.length; i++) {\n _loop(i);\n }\n });\n if (this.danmaku) {\n var dWidth = 130;\n this.on('danmaku_opacity', function (percentage) {\n _this.bar.set('danmaku', percentage, 'width');\n _this.user.set('opacity', percentage);\n });\n this.danmaku.opacity(this.user.get('opacity'));\n var danmakuMove = function danmakuMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.danmaku.opacity(percentage);\n };\n var danmakuUp = function danmakuUp() {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n _this.template.danmakuOpacityBox.classList.remove('dplayer-setting-danmaku-active');\n };\n this.template.danmakuOpacityBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - _utils2.default.getElementViewLeft(_this.template.danmakuOpacityBarWrap)) / dWidth;\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n _this.danmaku.opacity(percentage);\n });\n this.template.danmakuOpacityBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n _this.template.danmakuOpacityBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n if (this.video.duration !== 1) {\n this.template.dtime.innerHTML = this.video.duration ? _utils2.default.secondToTime(this.video.duration) : '00:00';\n }\n if (!this.danmaku) {\n if (this.options.autoplay && !_utils.isMobile) {\n this.play();\n } else if (_utils.isMobile) {\n this.pause();\n }\n }\n var closeCommentSetting = function closeCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n var toggleCommentSetting = function toggleCommentSetting() {\n if (_this.template.commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n _this.template.commentSettingBox.classList.remove('dplayer-comment-setting-open');\n } else {\n _this.template.commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n var closeComment = function closeComment() {\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n return;\n }\n _this.template.controller.classList.remove('dplayer-controller-comment');\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.container.classList.remove('dplayer-show-controller');\n closeCommentSetting();\n _this.disableHideController = false;\n };\n var openComment = function openComment() {\n _this.disableHideController = true;\n if (!_this.template.controller.classList.contains('dplayer-controller-comment')) {\n _this.template.controller.classList.add('dplayer-controller-comment');\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.container.classList.add('dplayer-show-controller');\n _this.template.commentInput.focus();\n }\n };\n this.template.mask.addEventListener('click', function () {\n closeComment();\n });\n this.template.commentButton.addEventListener('click', function () {\n openComment();\n });\n this.template.commentSettingButton.addEventListener('click', function () {\n toggleCommentSetting();\n });\n this.template.commentColorSettingBox.addEventListener('click', function () {\n var sele = _this.template.commentColorSettingBox.querySelector('input:checked+span');\n if (sele) {\n var color = _this.template.commentColorSettingBox.querySelector('input:checked').value;\n _this.template.commentSettingFill.style.fill = color;\n _this.template.commentInput.style.color = color;\n _this.template.commentSendFill.style.fill = color;\n }\n });\n var sendComment = function sendComment() {\n _this.template.commentInput.blur();\n if (!_this.template.commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\n }\n _this.danmaku.send({\n text: _this.template.commentInput.value,\n color: _this.container.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: _this.container.querySelector('.dplayer-comment-setting-type input:checked').value\n }, function () {\n _this.template.commentInput.value = '';\n closeComment();\n });\n };\n this.template.commentInput.addEventListener('click', function () {\n closeCommentSetting();\n });\n this.template.commentInput.addEventListener('keydown', function (e) {\n var event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n this.template.commentSendButton.addEventListener('click', sendComment);\n this.fullScreen = new _fullscreen2.default(this);\n this.template.browserFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('browser');\n });\n this.template.webFullButton.addEventListener('click', function () {\n _this.fullScreen.toggle('web');\n });\n var handleKeyDown = function handleKeyDown(e) {\n if (_this.focus) {\n var tag = document.activeElement.tagName.toUpperCase();\n var editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n var event = e || window.event;\n var percentage = void 0;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n _this.toggle();\n break;\n case 37:\n event.preventDefault();\n _this.seek(_this.video.currentTime - 5);\n hideController();\n break;\n case 39:\n event.preventDefault();\n _this.seek(_this.video.currentTime + 5);\n hideController();\n break;\n case 38:\n event.preventDefault();\n percentage = _this.volume() + 0.1;\n _this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = _this.volume() - 0.1;\n _this.volume(percentage);\n break;\n }\n }\n }\n };\n if (this.options.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', function (e) {\n var event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (_this.fullScreen.isFullScreen('web')) {\n _this.fullScreen.cancel('web');\n }\n break;\n }\n });\n this.container.addEventListener('contextmenu', function (e) {\n var event = e || window.event;\n event.preventDefault();\n _this.template.menu.classList.add('dplayer-menu-show');\n var clientRect = _this.container.getBoundingClientRect();\n var menuLeft = event.clientX - clientRect.left;\n var menuTop = event.clientY - clientRect.top;\n if (menuLeft + _this.template.menu.offsetWidth >= clientRect.width) {\n _this.template.menu.style.right = clientRect.width - menuLeft + 'px';\n _this.template.menu.style.left = 'initial';\n } else {\n _this.template.menu.style.left = event.clientX - _this.container.getBoundingClientRect().left + 'px';\n _this.template.menu.style.right = 'initial';\n }\n if (menuTop + _this.template.menu.offsetHeight >= clientRect.height) {\n _this.template.menu.style.bottom = clientRect.height - menuTop + 'px';\n _this.template.menu.style.top = 'initial';\n } else {\n _this.template.menu.style.top = event.clientY - _this.container.getBoundingClientRect().top + 'px';\n _this.template.menu.style.bottom = 'initial';\n }\n _this.template.mask.classList.add('dplayer-mask-show');\n _this.events.trigger('contextmenu_show');\n _this.template.mask.addEventListener('click', function () {\n _this.template.mask.classList.remove('dplayer-mask-show');\n _this.template.menu.classList.remove('dplayer-menu-show');\n _this.events.trigger('contextmenu_hide');\n });\n });\n if (this.options.video.quality) {\n this.template.qualityList.addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.options.screenshot) {\n this.template.camareButton.addEventListener('click', function () {\n var canvas = document.createElement('canvas');\n canvas.width = _this.video.videoWidth;\n canvas.height = _this.video.videoHeight;\n canvas.getContext('2d').drawImage(_this.video, 0, 0, canvas.width, canvas.height);\n var dataURL = canvas.toDataURL();\n _this.template.camareButton.href = dataURL;\n _this.template.camareButton.download = 'DPlayer.png';\n _this.events.trigger('screenshot', dataURL);\n });\n }\n if (this.options.subtitle) {\n this.events.on('subtitle_show', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Hide subtitle');\n _this.template.subtitleButtonInner.style.opacity = '';\n _this.user.set('subtitle', 1);\n });\n this.events.on('subtitle_hide', function () {\n _this.template.subtitleButton.dataset.balloon = _this.tran('Show subtitle');\n _this.template.subtitleButtonInner.style.opacity = '0.4';\n _this.user.set('subtitle', 0);\n });\n this.template.subtitleButton.addEventListener('click', function () {\n _this.subtitle.toggle();\n });\n }\n this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type);\n index++;\n instances.push(this);\n }\n _createClass(DPlayer, [\n {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n if (this.video.duration) {\n time = Math.min(time, this.video.duration);\n }\n if (this.video.currentTime < time) {\n this.notice(this.tran('FF') + ' ' + (time - this.video.currentTime).toFixed(0) + ' ' + this.tran('s'));\n } else if (this.video.currentTime > time) {\n this.notice(this.tran('REW') + ' ' + (this.video.currentTime - time).toFixed(0) + ' ' + this.tran('s'));\n }\n this.video.currentTime = time;\n if (this.danmaku) {\n this.danmaku.seek();\n }\n this.bar.set('played', time / this.video.duration, 'width');\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n if (this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('play');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.template.playButton.innerHTML = this.icons.get('pause');\n this.video.play();\n this.setTime();\n this.container.classList.add('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.play();\n }\n if (this.options.mutex) {\n for (var i = 0; i < instances.length; i++) {\n if (this !== instances[i]) {\n instances[i].pause();\n }\n }\n }\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.container.classList.remove('dplayer-loading');\n if (!this.video.paused) {\n this.template.bezel.innerHTML = this.icons.get('pause');\n this.template.bezel.classList.add('dplayer-bezel-transition');\n }\n this.ended = false;\n this.template.playButton.innerHTML = this.icons.get('play');\n this.video.pause();\n this.clearTime();\n this.container.classList.remove('dplayer-playing');\n if (this.danmaku) {\n this.danmaku.pause();\n }\n }\n },\n {\n key: 'volume',\n value: function volume(percentage, nostorage, nonotice) {\n percentage = parseFloat(percentage);\n if (!isNaN(percentage)) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.bar.set('volume', percentage, 'width');\n var formatPercentage = (percentage * 100).toFixed(0) + '%';\n this.template.volumeBarWrapWrap.dataset.balloon = formatPercentage;\n if (!nostorage) {\n this.user.set('volume', percentage);\n }\n if (!nonotice) {\n this.notice(this.tran('Volume') + ' ' + (percentage * 100).toFixed(0) + '%');\n }\n this.video.volume = percentage;\n if (this.video.muted) {\n this.video.muted = false;\n }\n this.switchVolumeIcon();\n }\n return this.video.volume;\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.video.paused) {\n this.play();\n } else {\n this.pause();\n }\n }\n },\n {\n key: 'on',\n value: function on(name, callback) {\n this.events.on(name, callback);\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmakuAPI) {\n this.pause();\n this.video.poster = video.pic ? video.pic : '';\n this.video.src = video.url;\n this.initMSE(this.video, video.type || 'auto');\n if (danmakuAPI) {\n this.template.danmakuLoading.style.display = 'block';\n this.bar.set('played', 0, 'width');\n this.bar.set('loaded', 0, 'width');\n this.template.ptime.innerHTML = '00:00';\n this.template.danmaku.innerHTML = '';\n if (this.danmaku) {\n this.danmaku.reload({\n id: danmakuAPI.id,\n address: danmakuAPI.api,\n token: danmakuAPI.token,\n maximum: danmakuAPI.maximum,\n addition: danmakuAPI.addition,\n user: danmakuAPI.user\n });\n }\n }\n }\n },\n {\n key: 'initMSE',\n value: function initMSE(video, type) {\n this.type = type;\n if (this.type === 'auto') {\n if (/m3u8(#|\\?|$)/i.exec(video.src)) {\n this.type = 'hls';\n } else if (/.flv(#|\\?|$)/i.exec(video.src)) {\n this.type = 'flv';\n } else if (/.mpd(#|\\?|$)/i.exec(video.src)) {\n this.type = 'dash';\n } else {\n this.type = 'normal';\n }\n }\n if (this.type === 'hls' && Hls && Hls.isSupported()) {\n var hls = new Hls();\n hls.loadSource(video.src);\n hls.attachMedia(video);\n }\n if (this.type === 'flv' && flvjs && flvjs.isSupported()) {\n var flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: video.src\n });\n flvPlayer.attachMediaElement(video);\n flvPlayer.load();\n }\n if (this.type === 'dash' && dashjs) {\n dashjs.MediaPlayer().create().initialize(video, video.src, false);\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo(video, type) {\n var _this2 = this;\n this.initMSE(video, type);\n this.on('durationchange', function () {\n if (video.duration !== 1) {\n _this2.template.dtime.innerHTML = _utils2.default.secondToTime(video.duration);\n }\n });\n this.on('progress', function () {\n var percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0;\n _this2.bar.set('loaded', percentage, 'width');\n });\n this.on('error', function () {\n _this2.tran && _this2.notice && _this2.notice(_this2.tran('This video fails to load'), -1);\n });\n this.ended = false;\n this.on('ended', function () {\n _this2.bar.set('played', 1, 'width');\n if (!_this2.loop) {\n _this2.ended = true;\n _this2.pause();\n } else {\n _this2.seek(0);\n video.play();\n }\n if (_this2.danmaku) {\n _this2.danmaku.danIndex = 0;\n }\n });\n this.on('play', function () {\n if (_this2.paused) {\n _this2.play();\n }\n });\n this.on('pause', function () {\n if (!_this2.paused) {\n _this2.pause();\n }\n });\n var _loop2 = function _loop2(i) {\n video.addEventListener(_this2.events.videoEvents[i], function () {\n _this2.events.trigger(_this2.events.videoEvents[i]);\n });\n };\n for (var i = 0; i < this.events.videoEvents.length; i++) {\n _loop2(i);\n }\n this.volume(this.user.get('volume'), true, true);\n if (this.options.subtitle) {\n this.subtitle = new _subtitle2.default(this.template.subtitle, this.video, this.options.subtitle, this.events);\n if (!this.user.get('subtitle')) {\n this.subtitle.hide();\n }\n }\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this3 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.options.video.quality[index];\n this.template.qualityButton.innerHTML = this.quality.name;\n var paused = this.video.paused;\n this.video.pause();\n var videoHTML = this.template.tplVideo(false, null, this.options.screenshot, 'auto', this.quality.url, this.options.subtitle);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n this.template.videoWrap.insertBefore(videoEle, this.template.videoWrap.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = videoEle;\n this.initVideo(this.video, this.quality.type || this.options.video.type);\n this.seek(this.prevVideo.currentTime);\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.events.trigger('quality_start', this.quality);\n this.on('canplay', function () {\n if (_this3.prevVideo) {\n if (_this3.video.currentTime !== _this3.prevVideo.currentTime) {\n _this3.seek(_this3.prevVideo.currentTime);\n return;\n }\n _this3.template.videoWrap.removeChild(_this3.prevVideo);\n _this3.video.classList.add('dplayer-video-current');\n if (!paused) {\n _this3.video.play();\n }\n _this3.prevVideo = null;\n _this3.notice(_this3.tran('Switched to') + ' ' + _this3.quality.name + ' ' + _this3.tran('quality'));\n _this3.switchingQuality = false;\n _this3.events.trigger('quality_end');\n }\n });\n }\n },\n {\n key: 'mouseHandler',\n value: function mouseHandler(pbar, timeTips) {\n var _this4 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this4.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n if (tx < 0 || tx > pbar.offsetWidth) {\n return;\n }\n var time = _this4.video.duration * (tx / pbar.offsetWidth);\n timeTips.style.left = tx - 20 + 'px';\n switch (e.type) {\n case 'mouseenter':\n _this4.thumbnails && _this4.thumbnails.show();\n break;\n case 'mousemove':\n _this4.thumbnails && _this4.thumbnails.move(tx);\n timeTips.innerText = _utils2.default.secondToTime(time);\n _this4.timeTipsDisplay(true, timeTips);\n break;\n case 'mouseleave':\n _this4.thumbnails && _this4.thumbnails.hide();\n _this4.timeTipsDisplay(false, timeTips);\n break;\n }\n };\n }\n },\n {\n key: 'timeTipsDisplay',\n value: function timeTipsDisplay(show, timeTips) {\n if (show) {\n if (this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n this.isTimeTipsShow = true;\n } else {\n if (!this.isTimeTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n this.isTimeTipsShow = false;\n }\n }\n },\n {\n key: 'initThumbnails',\n value: function initThumbnails() {\n var _this5 = this;\n this.thumbnails = new _thumbnails2.default(this.template.barPreview, this.template.barWrap.offsetWidth, this.options.video.thumbnails, this.events);\n this.on('loadedmetadata', function () {\n _this5.thumbnails.resize(160, 90);\n });\n }\n },\n {\n key: 'notice',\n value: function notice(text) {\n var _this6 = this;\n var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;\n var opacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.8;\n this.template.notice.innerHTML = text;\n this.template.notice.style.opacity = opacity;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n this.events.trigger('notice_show', text);\n this.noticeTime = setTimeout(function () {\n _this6.template.notice.style.opacity = 0;\n _this6.events.trigger('notice_hide');\n }, time);\n }\n },\n {\n key: 'resize',\n value: function resize() {\n if (this.danmaku) {\n this.danmaku.resize();\n }\n this.events.trigger('resize');\n }\n },\n {\n key: 'destroy',\n value: function destroy() {\n instances.splice(instances.indexOf(this), 1);\n this.pause();\n clearTimeout(this.hideTime);\n this.video.src = '';\n this.container.innerHTML = '';\n this.events.trigger('destroy');\n for (var key in this) {\n if (this.hasOwnProperty(key) && key !== 'paused') {\n delete this[key];\n }\n }\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DPlayer.js\n// module id = 2\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar defaultApiBackend = require('./api.js');\nmodule.exports = function (options) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n options.autoplay = false;\n }\n var defaultOption = {\n container: options.element || document.getElementsByClassName('dplayer')[0],\n live: false,\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: (navigator.language || navigator.browserLanguage).toLowerCase(),\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n volume: 0.7,\n apiBackend: defaultApiBackend,\n video: {},\n icons: {\n play: [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n pause: [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z'\n ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n loop: [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n full: [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n setting: [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n right: [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n comment: [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n send: [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n pallette: [\n '0 0 32 32',\n 'M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z'\n ],\n camera: [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ],\n subtitle: [\n '0 0 32 32',\n 'M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z'\n ]\n },\n iconsColor: '#ffffff',\n contextmenu: [],\n mutex: true\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {\n options[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (options.video) {\n !options.video.type && (options.video.type = 'auto');\n }\n if (_typeof(options.danmaku) === 'object' && options.danmaku) {\n !options.danmaku.user && (options.danmaku.user = 'DIYgod');\n }\n if (options.subtitle) {\n !options.subtitle.type && (options.subtitle.type = 'webvtt');\n !options.subtitle.fontSize && (options.subtitle.fontSize = '20px');\n !options.subtitle.bottom && (options.subtitle.bottom = '40px');\n !options.subtitle.color && (options.subtitle.color = '#fff');\n }\n if (options.video.quality) {\n options.video.url = [options.video.quality[options.video.defaultQuality].url];\n }\n if (options.lang) {\n options.lang = options.lang.toLowerCase();\n }\n if (options.icons) {\n options.icons = Object.assign({}, defaultOption.icons, options.icons);\n }\n options.contextmenu = options.contextmenu.concat([\n {\n text: 'About author',\n link: 'https://diygod.me'\n },\n {\n text: 'About DPlayer',\n link: 'https://github.com/MoePlayer/DPlayer'\n },\n {\n text: 'DPlayer feedback',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: 'DPlayer ' + DPLAYER_VERSION + ' ' + GIT_HASH,\n link: 'https://github.com/MoePlayer/DPlayer/releases'\n }\n ]);\n return options;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/options.js\n// module id = 4\n// module chunks = 0","'use strict';\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData, callback) {\n SendXMLHttpRequest(endpoint, danmakuData, function (xhr, response) {\n console.log('Post danmaku: ', response);\n if (callback) {\n callback();\n }\n }, function (xhr, response) {\n alert(response.msg);\n }, function (xhr) {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n read: function read(endpoint, callback) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n callback(null, response.danmaku);\n }, function (xhr, response) {\n callback({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n callback({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 5\n// module chunks = 0","'use strict';\nmodule.exports = function (lang) {\n var _this = this;\n this.lang = lang;\n this.tran = function (text) {\n if (tranTxt[_this.lang] && tranTxt[_this.lang][text]) {\n return tranTxt[_this.lang][text];\n } else {\n return text;\n }\n };\n};\nvar tranTxt = {\n 'zh-cn': {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Show danmaku': '显示弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质',\n 'FF': '快进',\n 'REW': '快退',\n 'Unlimited danmaku': '海量弹幕',\n 'Send danmaku': '发送弹幕',\n 'Setting': '设置',\n 'Full screen': '全屏',\n 'Web full screen': '页面全屏',\n 'Send': '发送',\n 'Screenshot': '截图',\n 's': '秒',\n 'Show subtitle': '显示字幕',\n 'Hide subtitle': '隐藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n },\n 'zh-tw': {\n 'Danmaku is loading': '彈幕加載中',\n 'Top': '頂部',\n 'Bottom': '底部',\n 'Rolling': '滾動',\n 'Input danmaku, hit Enter': '輸入彈幕\\uFF0CEnter 發送',\n 'About author': '關於作者',\n 'DPlayer feedback': '播放器意見反饋',\n 'About DPlayer': '關於 DPlayer 播放器',\n 'Loop': '循環播放',\n 'Speed': '速度',\n 'Opacity for danmaku': '彈幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '請輸入彈幕内容啊\\uFF01',\n 'Set danmaku color': '設置彈幕顏色',\n 'Set danmaku type': '設置彈幕類型',\n 'Show danmaku': '顯示彈幕',\n 'This video fails to load': '視頻加載失敗',\n 'Switching to': '正在切換至',\n 'Switched to': '已經切換至',\n 'quality': '畫質',\n 'FF': '快進',\n 'REW': '快退',\n 'Unlimited danmaku': '海量彈幕',\n 'Send danmaku': '發送彈幕',\n 'Setting': '設置',\n 'Full screen': '全屏',\n 'Web full screen': '頁面全屏',\n 'Send': '發送',\n 'Screenshot': '截圖',\n 's': '秒',\n 'Show subtitle': '顯示字幕',\n 'Hide subtitle': '隱藏字幕',\n 'Volume': '音量',\n 'Live': '直播'\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/i18n.js\n// module id = 6\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Template = function () {\n function Template(options) {\n _classCallCheck(this, Template);\n this.container = options.container;\n this.options = options.options;\n this.index = options.index;\n this.tran = options.tran;\n this.icons = options.icons;\n this.init();\n }\n _createClass(Template, [\n {\n key: 'init',\n value: function init() {\n this.container.innerHTML = this.tpl(this.options, this.index, this.tran, this.icons);\n this.volumeBar = this.container.querySelector('.dplayer-volume-bar-inner');\n this.volumeBarWrap = this.container.querySelector('.dplayer-volume-bar');\n this.volumeBarWrapWrap = this.container.querySelector('.dplayer-volume-bar-wrap');\n this.volumeButton = this.container.querySelector('.dplayer-volume');\n this.volumeIcon = this.container.querySelector('.dplayer-volume-icon .dplayer-icon-content');\n this.playedBar = this.container.querySelector('.dplayer-played');\n this.loadedBar = this.container.querySelector('.dplayer-loaded');\n this.playedBarWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.playedBarTime = this.container.querySelector('.dplayer-bar-time');\n this.danmaku = this.container.querySelector('.dplayer-danmaku');\n this.danmakuLoading = this.container.querySelector('.dplayer-danloading');\n this.video = this.container.querySelector('.dplayer-video-current');\n this.bezel = this.container.querySelector('.dplayer-bezel-icon');\n this.playButton = this.container.querySelector('.dplayer-play-icon');\n this.videoWrap = this.container.querySelector('.dplayer-video-wrap');\n this.controllerMask = this.container.querySelector('.dplayer-controller-mask');\n this.ptime = this.container.querySelector('.dplayer-ptime');\n this.settingButton = this.container.querySelector('.dplayer-setting-icon');\n this.settingBox = this.container.querySelector('.dplayer-setting-box');\n this.mask = this.container.querySelector('.dplayer-mask');\n this.loop = this.container.querySelector('.dplayer-setting-loop');\n this.loopToggle = this.container.querySelector('.dplayer-setting-loop .dplayer-toggle-setting-input');\n this.showDanmaku = this.container.querySelector('.dplayer-setting-showdan');\n this.showDanmakuToggle = this.container.querySelector('.dplayer-showdan-setting-input');\n this.unlimitDanmaku = this.container.querySelector('.dplayer-setting-danunlimit');\n this.unlimitDanmakuToggle = this.container.querySelector('.dplayer-danunlimit-setting-input');\n this.speed = this.container.querySelector('.dplayer-setting-speed');\n this.speedItem = this.container.querySelectorAll('dplayer-setting-speed-item');\n this.danmakuOpacityBar = this.container.querySelector('.dplayer-danmaku-bar-inner');\n this.danmakuOpacityBarWrap = this.container.querySelector('.dplayer-danmaku-bar');\n this.danmakuOpacityBarWrapWrap = this.container.querySelector('.dplayer-danmaku-bar-wrap');\n this.danmakuOpacityBox = this.container.querySelector('.dplayer-setting-danmaku');\n this.dtime = this.container.querySelector('.dplayer-dtime');\n this.controller = this.container.querySelector('.dplayer-controller');\n this.commentInput = this.container.querySelector('.dplayer-comment-input');\n this.commentButton = this.container.querySelector('.dplayer-comment-icon');\n this.commentSettingBox = this.container.querySelector('.dplayer-comment-setting-box');\n this.commentSettingButton = this.container.querySelector('.dplayer-comment-setting-icon');\n this.commentSettingFill = this.container.querySelector('.dplayer-comment-setting-icon .dplayer-fill');\n this.commentSendButton = this.container.querySelector('.dplayer-send-icon');\n this.commentSendFill = this.container.querySelector('.dplayer-send-icon .dplayer-fill');\n this.commentColorSettingBox = this.container.querySelector('.dplayer-comment-setting-color');\n this.browserFullButton = this.container.querySelector('.dplayer-full-icon');\n this.webFullButton = this.container.querySelector('.dplayer-full-in-icon');\n this.menu = this.container.querySelector('.dplayer-menu');\n this.qualityList = this.container.querySelector('.dplayer-quality-list');\n this.camareButton = this.container.querySelector('.dplayer-camera-icon');\n this.subtitleButton = this.container.querySelector('.dplayer-subtitle-icon');\n this.subtitleButtonInner = this.container.querySelector('.dplayer-subtitle-icon .dplayer-icon-content');\n this.subtitle = this.container.querySelector('.dplayer-subtitle');\n this.qualityButton = this.container.querySelector('.dplayer-quality-icon');\n this.barPreview = this.container.querySelector('.dplayer-bar-preview');\n this.barWrap = this.container.querySelector('.dplayer-bar-wrap');\n this.notice = this.container.querySelector('.dplayer-notice');\n }\n },\n {\n key: 'tpl',\n value: function tpl(options, index, tran, icons) {\n return '
' + this.tplVideo(true, options.video.pic, options.screenshot, options.preload, options.video.url, options.subtitle) + '' + (options.logo ? '
' : '') + '
' + (options.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
0:00 / 0:00' + (options.live ? '' + tran('Live') + '' : '') + '
' + (options.video.quality ? '
' + this.tplQualityList(options.video.quality) + '
' : '') + '' + (options.screenshot ? '' + icons.get('camera') + '' : '') + '
' + (options.subtitle ? '
' : '') + '
' + tran('Speed') + '
' + icons.get('right') + '
' + tran('Loop') + '
' + tran('Show danmaku') + '
' + tran('Unlimited danmaku') + '
' + tran('Opacity for danmaku') + '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
00:00
' + this.tplContextmenuList(options.contextmenu, tran) + '
';\n }\n },\n {\n key: 'tplDanmakumargin',\n value: function tplDanmakumargin(margin) {\n var result = '';\n if (margin) {\n for (var key in margin) {\n result += key + ':' + margin[key] + ';';\n }\n }\n return result;\n }\n },\n {\n key: 'tplContextmenuList',\n value: function tplContextmenuList(contextmenu, tran) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplQualityList',\n value: function tplQualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n }\n },\n {\n key: 'tplVideo',\n value: function tplVideo(current, pic, screenshot, preload, url, subtitle) {\n var enableSubtitle = subtitle && subtitle.type === 'webvtt';\n return '';\n }\n }\n ]);\n return Template;\n}();\nmodule.exports = Template;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/template.js\n// module id = 7\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar SvgSource = function () {\n function SvgSource(options) {\n _classCallCheck(this, SvgSource);\n this.icons = options.icons;\n this.iconColor = options.iconsColor;\n }\n _createClass(SvgSource, [{\n key: 'get',\n value: function get(type) {\n return '';\n }\n }]);\n return SvgSource;\n}();\nmodule.exports = SvgSource;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg.js\n// module id = 8\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Danmaku = function () {\n function Danmaku(options) {\n _classCallCheck(this, Danmaku);\n this.options = options;\n this.container = this.options.container;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.dan = [];\n this.showing = true;\n this._opacity = this.options.opacity;\n this.events = this.options.events;\n this.unlimited = this.options.unlimited;\n this._measure('');\n this.load();\n }\n _createClass(Danmaku, [\n {\n key: 'load',\n value: function load() {\n var _this = this;\n var apiurl = void 0;\n if (this.options.api.maximum) {\n apiurl = this.options.api.address + '?id=' + this.options.api.id + '&max=' + this.options.api.maximum;\n } else {\n apiurl = this.options.api.address + '?id=' + this.options.api.id;\n }\n var endpoints = (this.options.api.addition || []).slice(0);\n endpoints.push(apiurl);\n this.events && this.events.trigger('danmaku_load_start', endpoints);\n this._readAllEndpoints(endpoints, function (results) {\n _this.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n window.requestAnimationFrame(function () {\n _this.frame();\n });\n _this.options.callback();\n _this.events && _this.events.trigger('danmaku_load_end');\n });\n }\n },\n {\n key: 'reload',\n value: function reload(newAPI) {\n this.options.api = newAPI;\n this.dan = [];\n this.clear();\n this.load();\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, callback) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.options.error(err.response.msg);\n } else {\n _this2.options.error('Request was unsuccessful: ' + err.status);\n }\n results[i] = [];\n } else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return callback(results);\n }\n };\n };\n for (var i = 0; i < endpoints.length; ++i) {\n this.options.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'send',\n value: function send(dan, callback) {\n var danmakuData = {\n token: this.options.api.token,\n player: this.options.api.id,\n author: this.options.api.user,\n time: this.options.time(),\n text: dan.text,\n color: dan.color,\n type: dan.type\n };\n this.options.apiBackend.send(this.options.api.address, danmakuData, callback);\n this.dan.splice(this.danIndex, 0, danmakuData);\n this.danIndex++;\n var danmaku = {\n text: this.htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + this.options.borderColor\n };\n this.draw(danmaku);\n this.events && this.events.trigger('danmaku_send', danmakuData);\n }\n },\n {\n key: 'frame',\n value: function frame() {\n var _this3 = this;\n if (this.dan.length && !this.paused && this.showing) {\n var item = this.dan[this.danIndex];\n var dan = [];\n while (item && this.options.time() > parseFloat(item.time)) {\n dan.push(item);\n item = this.dan[++this.danIndex];\n }\n this.draw(dan);\n }\n window.requestAnimationFrame(function () {\n _this3.frame();\n });\n }\n },\n {\n key: 'opacity',\n value: function opacity(percentage) {\n if (percentage !== undefined) {\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this._opacity = percentage;\n this.events && this.events.trigger('danmaku_opacity', this._opacity);\n }\n return this._opacity;\n }\n },\n {\n key: 'draw',\n value: function draw(dan) {\n var _this4 = this;\n if (this.showing) {\n var itemHeight = this.options.height;\n var danWidth = this.container.offsetWidth;\n var danHeight = this.container.offsetHeight;\n var itemY = parseInt(danHeight / itemHeight);\n var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || _this4.container.getBoundingClientRect().right + eleWidth;\n return _this4.container.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop = function _loop(i) {\n var item = _this4.danTunnel[type][i + ''];\n if (item && item.length) {\n if (type !== 'right') {\n return 'continue';\n }\n for (var j = 0; j < item.length; j++) {\n var danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0; _this4.unlimited || i < itemY; i++) {\n var _ret = _loop(i);\n switch (_ret) {\n case 'continue':\n continue;\n default:\n if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === 'object')\n return _ret.v;\n }\n }\n return -1;\n };\n if (Object.prototype.toString.call(dan) !== '[object Array]') {\n dan = [dan];\n }\n var docFragment = document.createDocumentFragment();\n var _loop2 = function _loop2(i) {\n if (!dan[i].type) {\n dan[i].type = 'right';\n }\n if (!dan[i].color) {\n dan[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + dan[i].type);\n if (dan[i].border) {\n item.innerHTML = '' + dan[i].text + '';\n } else {\n item.innerHTML = dan[i].text;\n }\n item.style.opacity = _this4._opacity;\n item.style.color = dan[i].color;\n item.addEventListener('animationend', function () {\n _this4.container.removeChild(item);\n });\n var itemWidth = _this4._measure(dan[i].text);\n var tunnel = void 0;\n switch (dan[i].type) {\n case 'right':\n tunnel = getTunnel(item, dan[i].type, itemWidth);\n if (tunnel >= 0) {\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * tunnel + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n }\n break;\n case 'top':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.top = itemHeight * tunnel + 'px';\n }\n break;\n case 'bottom':\n tunnel = getTunnel(item, dan[i].type);\n if (tunnel >= 0) {\n item.style.bottom = itemHeight * tunnel + 'px';\n }\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + dan[i].type);\n }\n if (tunnel >= 0) {\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n }\n };\n for (var i = 0; i < dan.length; i++) {\n _loop2(i);\n }\n this.container.appendChild(docFragment);\n return docFragment;\n }\n }\n },\n {\n key: 'play',\n value: function play() {\n this.paused = false;\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n }\n },\n {\n key: '_measure',\n value: function _measure(text) {\n if (!this.context) {\n var measureStyle = getComputedStyle(this.container.getElementsByClassName('dplayer-danmaku-item')[0], null);\n this.context = document.createElement('canvas').getContext('2d');\n this.context.font = measureStyle.getPropertyValue('font');\n }\n return this.context.measureText(text).width;\n }\n },\n {\n key: 'seek',\n value: function seek() {\n this.clear();\n for (var i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.options.time()) {\n this.danIndex = i;\n break;\n }\n this.danIndex = this.dan.length;\n }\n }\n },\n {\n key: 'clear',\n value: function clear() {\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.danIndex = 0;\n this.options.container.innerHTML = '';\n this.events && this.events.trigger('danmaku_clear');\n }\n },\n {\n key: 'htmlEncode',\n value: function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n }\n },\n {\n key: 'resize',\n value: function resize() {\n var danWidth = this.container.offsetWidth;\n var items = this.container.getElementsByClassName('dplayer-danmaku-item');\n for (var i = 0; i < items.length; i++) {\n items[i].style.transform = 'translateX(-' + danWidth + 'px)';\n }\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.showing = false;\n this.pause();\n this.clear();\n this.events && this.events.trigger('danmaku_hide');\n }\n },\n {\n key: 'show',\n value: function show() {\n this.seek();\n this.showing = true;\n this.play();\n this.events && this.events.trigger('danmaku_show');\n }\n },\n {\n key: 'unlimit',\n value: function unlimit(boolean) {\n this.unlimited = boolean;\n }\n }\n ]);\n return Danmaku;\n}();\nmodule.exports = Danmaku;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/danmaku.js\n// module id = 9\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Thumbnails = function () {\n function Thumbnails(container, width, url, events) {\n _classCallCheck(this, Thumbnails);\n this.container = container;\n this.width = width;\n this.container.style.backgroundImage = 'url(\\'' + url + '\\')';\n this.events = events;\n }\n _createClass(Thumbnails, [\n {\n key: 'resize',\n value: function resize(width, height) {\n this.container.style.width = width + 'px';\n this.container.style.height = height + 'px';\n this.container.style.top = -height + 2 + 'px';\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.style.display = 'block';\n this.events && this.events.trigger('thumbnails_show');\n }\n },\n {\n key: 'move',\n value: function move(position) {\n this.container.style.backgroundPosition = '-' + (Math.ceil(position / this.width * 100) - 1) * 160 + 'px 0';\n this.container.style.left = position - this.container.offsetWidth / 2 + 'px';\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.style.display = 'none';\n this.events && this.events.trigger('thumbnails_hide');\n }\n }\n ]);\n return Thumbnails;\n}();\nmodule.exports = Thumbnails;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/thumbnails.js\n// module id = 10\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Events = function () {\n function Events() {\n _classCallCheck(this, Events);\n this.events = {};\n this.videoEvents = [\n 'abort',\n 'canplay',\n 'canplaythrough',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'loadeddata',\n 'loadedmetadata',\n 'loadstart',\n 'mozaudioavailable',\n 'pause',\n 'play',\n 'playing',\n 'progress',\n 'ratechange',\n 'seeked',\n 'seeking',\n 'stalled',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'waiting'\n ];\n this.playerEvents = [\n 'screenshot',\n 'thumbnails_show',\n 'thumbnails_hide',\n 'danmaku_show',\n 'danmaku_hide',\n 'danmaku_clear',\n 'danmaku_loaded',\n 'danmaku_send',\n 'danmaku_opacity',\n 'contextmenu_show',\n 'contextmenu_hide',\n 'notice_show',\n 'notice_hide',\n 'quality_start',\n 'quality_end',\n 'destroy',\n 'resize',\n 'fullscreen',\n 'fullscreen_cancel',\n 'webfullscreen',\n 'webfullscreen_cancel',\n 'subtitle_show',\n 'subtitle_hide',\n 'subtitle_change'\n ];\n }\n _createClass(Events, [\n {\n key: 'on',\n value: function on(name, callback) {\n if (this.type(name) && typeof callback === 'function') {\n if (!this.events[name]) {\n this.events[name] = [];\n }\n this.events[name].push(callback);\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(name, info) {\n if (this.events[name] && this.events[name].length) {\n for (var i = 0; i < this.events[name].length; i++) {\n this.events[name][i](info);\n }\n }\n }\n },\n {\n key: 'type',\n value: function type(name) {\n if (this.playerEvents.indexOf(name) !== -1) {\n return 'player';\n } else if (this.videoEvents.indexOf(name) !== -1) {\n return 'video';\n }\n console.error('Unknown event name: ' + name);\n return null;\n }\n }\n ]);\n return Events;\n}();\nmodule.exports = Events;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/events.js\n// module id = 11\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar FullScreen = function () {\n function FullScreen(player) {\n var _this = this;\n _classCallCheck(this, FullScreen);\n this.player = player;\n this.player.events.on('webfullscreen', function () {\n _this.player.resize();\n });\n this.player.events.on('webfullscreen_cancel', function () {\n _this.player.resize();\n });\n var fullscreenchange = function fullscreenchange() {\n _this.player.resize();\n if (_this.isFullScreen('browser')) {\n _this.player.events.trigger('fullscreen');\n } else {\n _this.player.events.trigger('fullscreen_cancel');\n }\n };\n this.player.container.addEventListener('fullscreenchange', fullscreenchange);\n this.player.container.addEventListener('mozfullscreenchange', fullscreenchange);\n this.player.container.addEventListener('webkitfullscreenchange', fullscreenchange);\n }\n _createClass(FullScreen, [\n {\n key: 'isFullScreen',\n value: function isFullScreen() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;\n case 'web':\n return this.player.container.classList.contains('dplayer-fulled');\n }\n }\n },\n {\n key: 'request',\n value: function request() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (this.player.container.requestFullscreen) {\n this.player.container.requestFullscreen();\n } else if (this.player.container.mozRequestFullScreen) {\n this.player.container.mozRequestFullScreen();\n } else if (this.player.container.webkitRequestFullscreen) {\n this.player.container.webkitRequestFullscreen();\n } else if (this.player.video.webkitEnterFullscreen) {\n this.player.video.webkitEnterFullscreen();\n }\n break;\n case 'web':\n this.player.container.classList.add('dplayer-fulled');\n this.lastScrollPosition = _utils2.default.getScrollPosition();\n document.body.classList.add('dplayer-web-fullscreen-fix');\n this.player.events.trigger('webfullscreen');\n break;\n }\n }\n },\n {\n key: 'cancel',\n value: function cancel() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n switch (type) {\n case 'browser':\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n break;\n case 'web':\n this.player.container.classList.remove('dplayer-fulled');\n document.body.classList.remove('dplayer-web-fullscreen-fix');\n _utils2.default.setScrollPosition(this.lastScrollPosition);\n this.player.events.trigger('webfullscreen_cancel');\n break;\n }\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'browser';\n if (this.isFullScreen(type)) {\n this.cancel(type);\n } else {\n this.request(type);\n var anotherType = type === 'browser' ? 'web' : 'browser';\n if (this.isFullScreen(anotherType)) {\n this.cancel(anotherType);\n }\n }\n }\n }\n ]);\n return FullScreen;\n}();\nmodule.exports = FullScreen;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/fullscreen.js\n// module id = 12\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar _utils = require('./utils');\nvar _utils2 = _interopRequireDefault(_utils);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar User = function () {\n function User(player) {\n _classCallCheck(this, User);\n this.storageName = {\n opacity: 'dplayer-danmaku-opacity',\n volume: 'dplayer-volume',\n unlimited: 'dplayer-danmaku-unlimited',\n danmaku: 'dplayer-danmaku-show',\n subtitle: 'dplayer-subtitle-show'\n };\n this.default = {\n opacity: 0.7,\n volume: player.options.volume || 0.7,\n unlimited: (player.options.danmaku && player.options.danmaku.unlimited ? 1 : 0) || 0,\n danmaku: 1,\n subtitle: 1\n };\n this.data = {};\n this.init();\n }\n _createClass(User, [\n {\n key: 'init',\n value: function init() {\n for (var item in this.storageName) {\n var name = this.storageName[item];\n this.data[item] = parseFloat(_utils2.default.storage.get(name) || this.default[item]);\n }\n }\n },\n {\n key: 'get',\n value: function get(key) {\n return this.data[key];\n }\n },\n {\n key: 'set',\n value: function set(key, value) {\n this.data[key] = value;\n _utils2.default.storage.set(this.storageName[key], value);\n }\n }\n ]);\n return User;\n}();\nmodule.exports = User;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/user.js\n// module id = 13\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Subtitle = function () {\n function Subtitle(container, video, options, events) {\n _classCallCheck(this, Subtitle);\n this.container = container;\n this.video = video;\n this.options = options;\n this.events = events;\n this.init();\n }\n _createClass(Subtitle, [\n {\n key: 'init',\n value: function init() {\n var _this = this;\n this.container.style.fontSize = this.options.fontSize;\n this.container.style.bottom = this.options.bottom;\n this.container.style.color = this.options.color;\n if (this.video.textTracks && this.video.textTracks[0]) {\n var track = this.video.textTracks[0];\n track.oncuechange = function () {\n var cue = track.activeCues[0];\n if (cue) {\n _this.container.innerHTML = '';\n var p = document.createElement('p');\n p.appendChild(cue.getCueAsHTML());\n _this.container.appendChild(p);\n } else {\n _this.container.innerHTML = '';\n }\n _this.events.trigger('subtitle_change');\n };\n }\n }\n },\n {\n key: 'show',\n value: function show() {\n this.container.classList.remove('dplayer-subtitle-hide');\n this.events.trigger('subtitle_show');\n }\n },\n {\n key: 'hide',\n value: function hide() {\n this.container.classList.add('dplayer-subtitle-hide');\n this.events.trigger('subtitle_hide');\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n if (this.container.classList.contains('dplayer-subtitle-hide')) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n ]);\n return Subtitle;\n}();\nmodule.exports = Subtitle;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/subtitle.js\n// module id = 14\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Bar = function () {\n function Bar(template) {\n _classCallCheck(this, Bar);\n this.elements = {};\n this.elements.volume = template.volumeBar;\n this.elements.played = template.playedBar;\n this.elements.loaded = template.loadedBar;\n this.elements.danmaku = template.danmakuOpacityBar;\n }\n _createClass(Bar, [\n {\n key: 'set',\n value: function set(type, percentage, direction) {\n percentage = Math.max(percentage, 0);\n percentage = Math.min(percentage, 1);\n this.elements[type].style[direction] = percentage * 100 + '%';\n }\n },\n {\n key: 'get',\n value: function get(type) {\n return parseFloat(this.elements[type].style.width) / 100;\n }\n }\n ]);\n return Bar;\n}();\nmodule.exports = Bar;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/bar.js\n// module id = 15\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/DPlayer.js b/src/DPlayer.js index a02346d..7bfa620 100644 --- a/src/DPlayer.js +++ b/src/DPlayer.js @@ -11,6 +11,7 @@ import Events from './events'; import FullScreen from './fullscreen'; import User from './user'; import Subtitle from './subtitle'; +import Bar from './bar'; let index = 0; const instances = []; @@ -26,22 +27,17 @@ class DPlayer { constructor (options) { this.options = handleOption(options); - this.options.container.classList.add('dplayer'); - if (this.options.video.quality) { this.qualityIndex = this.options.video.defaultQuality; this.quality = this.options.video.quality[this.options.video.defaultQuality]; } - this.tran = new i18n(this.options.lang).tran; - this.icons = new SvgCollection(this.options); - this.events = new Events(); - this.user = new User(this); - this.container = this.options.container; + + this.container.classList.add('dplayer'); if (!this.options.danmaku) { this.container.classList.add('dplayer-no-danmaku'); } @@ -60,24 +56,7 @@ class DPlayer { icons: this.icons }); - const bar = {}; - bar.volumeBar = this.template.volumeBar; - bar.playedBar = this.template.playedBar; - bar.loadedBar = this.template.loadedBar; - let barWidth; - - /** - * Update progress bar, including loading progress bar and play progress bar - * - * @param {String} type - Point out which bar it is, should be played loaded or volume - * @param {Number} percentage - * @param {String} direction - Point out the direction of this bar, Should be height or width - */ - this.updateBar = (type, percentage, direction) => { - percentage = percentage > 0 ? percentage : 0; - percentage = percentage < 1 ? percentage : 1; - bar[type + 'Bar'].style[direction] = percentage * 100 + '%'; - }; + this.bar = new Bar(this.template); document.addEventListener('click', () => { this.focus = false; @@ -208,7 +187,7 @@ class DPlayer { this.playedTime = false; this.animationFrame = () => { if (this.playedTime) { - this.updateBar('played', this.video.currentTime / this.video.duration, 'width'); + this.bar.set('played', this.video.currentTime / this.video.duration, 'width'); this.template.ptime.innerHTML = utils.secondToTime(this.video.currentTime); } window.requestAnimationFrame(this.animationFrame); @@ -249,12 +228,12 @@ class DPlayer { this.template.playedBarWrap.addEventListener('mouseenter', this.mouseHandler); this.template.playedBarWrap.addEventListener('mouseleave', this.mouseHandler); - + let barWidth; const thumbMove = (e) => { let percentage = (e.clientX - utils.getElementViewLeft(this.template.playedBarWrap)) / barWidth; - percentage = percentage > 0 ? percentage : 0; - percentage = percentage < 1 ? percentage : 1; - this.updateBar('played', percentage, 'width'); + percentage = Math.max(percentage, 0); + percentage = Math.min(percentage, 1); + this.bar.set('played', percentage, 'width'); this.template.ptime.innerHTML = utils.secondToTime(percentage * this.video.duration); }; @@ -262,10 +241,10 @@ class DPlayer { document.removeEventListener('mouseup', thumbUp); document.removeEventListener('mousemove', thumbMove); let percentage = (e.clientX - utils.getElementViewLeft(this.template.playedBarWrap)) / barWidth; - percentage = percentage > 0 ? percentage : 0; - percentage = percentage < 1 ? percentage : 1; - this.updateBar('played', percentage, 'width'); - this.seek(parseFloat(bar.playedBar.style.width) / 100 * this.video.duration); + percentage = Math.max(percentage, 0); + percentage = Math.min(percentage, 1); + this.bar.set('played', percentage, 'width'); + this.seek(this.bar.get('played') * this.video.duration); this.setTime(); }; @@ -318,12 +297,12 @@ class DPlayer { if (this.video.muted) { this.video.muted = false; this.switchVolumeIcon(); - this.updateBar('volume', this.volume(), 'width'); + this.bar.set('volume', this.volume(), 'width'); } else { this.video.muted = true; this.template.volumeIcon.innerHTML = this.icons.get('volume-off'); - this.updateBar('volume', 0, 'width'); + this.bar.set('volume', 0, 'width'); } }); @@ -451,10 +430,9 @@ class DPlayer { if (this.danmaku) { // danmaku opacity - bar.danmakuBar = this.template.danmakuOpacityBar; const dWidth = 130; this.on('danmaku_opacity', (percentage) => { - this.updateBar('danmaku', percentage, 'width'); + this.bar.set('danmaku', percentage, 'width'); this.user.set('opacity', percentage); }); this.danmaku.opacity(this.user.get('opacity')); @@ -462,8 +440,8 @@ class DPlayer { const danmakuMove = (event) => { const e = event || window.event; let percentage = (e.clientX - utils.getElementViewLeft(this.template.danmakuOpacityBarWrap)) / dWidth; - percentage = percentage > 0 ? percentage : 0; - percentage = percentage < 1 ? percentage : 1; + percentage = Math.max(percentage, 0); + percentage = Math.min(percentage, 1); this.danmaku.opacity(percentage); }; const danmakuUp = () => { @@ -475,8 +453,8 @@ class DPlayer { this.template.danmakuOpacityBarWrapWrap.addEventListener('click', (event) => { const e = event || window.event; let percentage = (e.clientX - utils.getElementViewLeft(this.template.danmakuOpacityBarWrap)) / dWidth; - percentage = percentage > 0 ? percentage : 0; - percentage = percentage < 1 ? percentage : 1; + percentage = Math.max(percentage, 0); + percentage = Math.min(percentage, 1); this.danmaku.opacity(percentage); }); this.template.danmakuOpacityBarWrapWrap.addEventListener('mousedown', () => { @@ -778,7 +756,7 @@ class DPlayer { this.danmaku.seek(); } - this.updateBar('played', time / this.video.duration, 'width'); + this.bar.set('played', time / this.video.duration, 'width'); } /** @@ -836,9 +814,9 @@ class DPlayer { volume (percentage, nostorage, nonotice) { percentage = parseFloat(percentage); if (!isNaN(percentage)) { - percentage = percentage > 0 ? percentage : 0; - percentage = percentage < 1 ? percentage : 1; - this.updateBar('volume', percentage, 'width'); + percentage = Math.max(percentage, 0); + percentage = Math.min(percentage, 1); + this.bar.set('volume', percentage, 'width'); const formatPercentage = `${(percentage * 100).toFixed(0)}%`; this.template.volumeBarWrapWrap.dataset.balloon = formatPercentage; if (!nostorage) { @@ -890,8 +868,8 @@ class DPlayer { this.initMSE(this.video, video.type || 'auto'); if (danmakuAPI) { this.template.danmakuLoading.style.display = 'block'; - this.updateBar('played', 0, 'width'); - this.updateBar('loaded', 0, 'width'); + this.bar.set('played', 0, 'width'); + this.bar.set('loaded', 0, 'width'); this.template.ptime.innerHTML = '00:00'; this.template.danmaku.innerHTML = ''; if (this.danmaku) { @@ -963,7 +941,7 @@ class DPlayer { // show video loaded bar: to inform interested parties of progress downloading the media this.on('progress', () => { const percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0; - this.updateBar('loaded', percentage, 'width'); + this.bar.set('loaded', percentage, 'width'); }); // video download error: an error occurs @@ -974,7 +952,7 @@ class DPlayer { // video end this.ended = false; this.on('ended', () => { - this.updateBar('played', 1, 'width'); + this.bar.set('played', 1, 'width'); if (!this.loop) { this.ended = true; this.pause(); diff --git a/src/bar.js b/src/bar.js new file mode 100644 index 0000000..929a131 --- /dev/null +++ b/src/bar.js @@ -0,0 +1,28 @@ +class Bar { + constructor (template) { + this.elements = {}; + this.elements.volume = template.volumeBar; + this.elements.played = template.playedBar; + this.elements.loaded = template.loadedBar; + this.elements.danmaku = template.danmakuOpacityBar; + } + + /** + * Update progress + * + * @param {String} type - Point out which bar it is + * @param {Number} percentage + * @param {String} direction - Point out the direction of this bar, Should be height or width + */ + set (type, percentage, direction) { + percentage = Math.max(percentage, 0); + percentage = Math.min(percentage, 1); + this.elements[type].style[direction] = percentage * 100 + '%'; + } + + get (type) { + return parseFloat(this.elements[type].style.width) / 100; + } +} + +module.exports = Bar; \ No newline at end of file