commit 8cd2f147c3ad69706a25a1edb73b0c060d171956 Author: Volio Date: Thu Jul 27 08:52:16 2017 +0800 Update DPlayer diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40fd2b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.idea/* +/player/.git \ No newline at end of file diff --git a/Plugin.php b/Plugin.php new file mode 100644 index 0000000..66468e5 --- /dev/null +++ b/Plugin.php @@ -0,0 +1,294 @@ +contentEx = array('DPlayer_Plugin', 'playerparse'); + Typecho_Plugin::factory('Widget_Abstract_Contents')->excerptEx = array('DPlayer_Plugin', 'playerparse'); + Typecho_Plugin::factory('Widget_Archive')->header = array('DPlayer_Plugin', 'playerHeader'); + Typecho_Plugin::factory('Widget_Archive')->footer = array('DPlayer_Plugin', 'playerFooter'); + } + + /** + * 禁用插件方法,如果禁用失败,直接抛出异常 + * + * @static + * @access public + * @return void + * @throws Typecho_Plugin_Exception + */ + public static function deactivate() + { + } + + /** + * 插入顶部代码 + */ + public static function playerHeader() + { + echo ''; + } + + /** + * 插入底部代码 + */ + public static function playerFooter() + { + $url = Helper::options()->pluginUrl . '/DPlayer'; + if (Typecho_Widget::widget('Widget_Options')->plugin('DPlayer')->hls) { + echo "\n"; + } + if (Typecho_Widget::widget('Widget_Options')->plugin('DPlayer')->flv) { + echo "\n"; + } + echo << + +EOF; + } + + /** + * 内容标签替换 + * + * @param string $content + * @return string + */ + public static function playerparse($content, $widget, $lastResult) + { + $content = empty($lastResult) ? $content : $lastResult; + if ($widget instanceof Widget_Archive) { + if (false === strpos($content, '[')) { + return $content; + } + $pattern = self::get_shortcode_regex(array('dplayer')); + $content = preg_replace_callback("/$pattern/", array('DPlayer_Plugin', 'parseCallback'), $content); + } + return $content; + } + + /** + * 回调解析 + * @param unknown $matches + * @return string + */ + public static function parseCallback($matches) + { + /* + $mathes array + * 1 - An extra [ to allow for escaping shortcodes with double [[]] + * 2 - The shortcode name + * 3 - The shortcode argument list + * 4 - The self closing / + * 5 - The content of a shortcode when it wraps some content. + * 6 - An extra ] to allow for escaping shortcodes with double [[]] + */ + // allow [[player]] syntax for escaping the tag + if ($matches[1] == '[' && $matches[6] == ']') { + return substr($matches[0], 1, -1); + } + //还原转义后的html + //[dplayer title="Test Abc" artist="haha" id="1234543"/] + $attr = htmlspecialchars_decode($matches[3]); + //[dplayer]标签的属性,类型为array + $atts = self::shortcode_parse_atts($attr); + //播放器id + $id = md5($_SERVER['HTTP_HOST'] . $atts['url']); + + $result = array( + 'url' => isset($atts['url']) ? $atts['url'] : '', + 'pic' => isset($atts['pic']) ? $atts['pic'] : '' + ); + //播放器设置 + $theme = Typecho_Widget::widget('Widget_Options')->plugin('DPlayer')->theme; + $api = Typecho_Widget::widget('Widget_Options')->plugin('DPlayer')->api; + if (!$theme) $theme = '#FADFA3'; + //播放器默认属性 + $data = array( + 'id' => $id, + 'autoplay' => false, + 'theme' => $theme + ); + //自动播放 + $data['autoplay'] = (isset($atts['autoplay']) && $atts['autoplay'] == 'true') ? true : false; + $data['theme'] = isset($atts['theme']) ? $atts['theme'] : $theme; + //输出代码 + $playerCode = '
'; + $playerCode .= "
\n"; + $data['video'] = $result; + //弹幕部分配置文件 + $danmaku = array( + 'id' => md5($id), + 'token' => md5(md5($id)), + 'api' => $api + ); + + if (isset($atts['addition'])) { + $danmaku['addition'] = array($atts['addition']); + } + + $data['danmaku'] = (isset($atts['danmu']) && $atts['danmu'] == 'false') ? null : $danmaku; + //加入头部数组 + $js = json_encode($data); + $playerCode .= <<dPlayerOptions.push({$js}); +EOF; + return $playerCode; + } + + public static function config(Typecho_Widget_Helper_Form $form) + { + $theme = new Typecho_Widget_Helper_Form_Element_Text( + 'theme', null, '#FADFA3', + _t('默认主题颜色'), _t('播放器默认的主题颜色,如 #372e21、#75c、red、blue,该设定会被[dplayer]标签中的theme属性覆盖,默认为 #FADFA3')); + $api = new Typecho_Widget_Helper_Form_Element_Text( + 'api', null, 'https://api.prprpr.me/dplayer/', + _t('弹幕服务器地址'), _t('用于保存视频弹幕,默认为 https://api.prprpr.me/dplayer/')); + $hls = new Typecho_Widget_Helper_Form_Element_Radio('hls',array('0' => _t('不开启HLS支持'),'1' => _t('开启HLS支持')),'0',_t('HLS支持'),_t("开启后可解析 m3u8 格式视频")); + $flv = new Typecho_Widget_Helper_Form_Element_Radio('flv',array('0' => _t('不开启FLV支持'),'1' => _t('开启FLV支持')),'0',_t('FLV支持'),_t("开启后可解析 flv 格式视频")); + $form->addInput($theme); + $form->addInput($api); + $form->addInput($hls); + $form->addInput($flv); + } + + public static function personalConfig(Typecho_Widget_Helper_Form $form) + { + } + + /** + * Retrieve all attributes from the shortcodes tag. + * + * The attributes list has the attribute name as the key and the value of the + * attribute as the value in the key/value pair. This allows for easier + * retrieval of the attributes, since all attributes have to be known. + * + * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/shortcodes.php + * @since 2.5.0 + * + * @param string $text + * @return array|string List of attribute values. + * Returns empty array if trim( $text ) == '""'. + * Returns empty string if trim( $text ) == ''. + * All other matches are checked for not empty(). + */ + private static function shortcode_parse_atts($text) + { + $atts = array(); + $pattern = '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/'; + $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text); + if (preg_match_all($pattern, $text, $match, PREG_SET_ORDER)) { + foreach ($match as $m) { + if (!empty($m[1])) + $atts[strtolower($m[1])] = stripcslashes($m[2]); + elseif (!empty($m[3])) + $atts[strtolower($m[3])] = stripcslashes($m[4]); + elseif (!empty($m[5])) + $atts[strtolower($m[5])] = stripcslashes($m[6]); + elseif (isset($m[7]) && strlen($m[7])) + $atts[] = stripcslashes($m[7]); + elseif (isset($m[8])) + $atts[] = stripcslashes($m[8]); + } + + // Reject any unclosed HTML elements + foreach ($atts as &$value) { + if (false !== strpos($value, '<')) { + if (1 !== preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value)) { + $value = ''; + } + } + } + } else { + $atts = ltrim($text); + } + return $atts; + } + + /** + * Retrieve the shortcode regular expression for searching. + * + * The regular expression combines the shortcode tags in the regular expression + * in a regex class. + * + * The regular expression contains 6 different sub matches to help with parsing. + * + * 1 - An extra [ to allow for escaping shortcodes with double [[]] + * 2 - The shortcode name + * 3 - The shortcode argument list + * 4 - The self closing / + * 5 - The content of a shortcode when it wraps some content. + * 6 - An extra ] to allow for escaping shortcodes with double [[]] + * + * @link https://github.com/WordPress/WordPress/blob/master/wp-includes/shortcodes.php + * @since 2.5.0 + * + * + * @param array $tagnames List of shortcodes to find. Optional. Defaults to all registered shortcodes. + * @return string The shortcode search regular expression + */ + private static function get_shortcode_regex($tagnames = null) + { + $tagregexp = join('|', array_map('preg_quote', $tagnames)); + + // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag() + // Also, see shortcode_unautop() and shortcode.js. + return + '\\[' // Opening bracket + . '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]] + . "($tagregexp)" // 2: Shortcode name + . '(?![\\w-])' // Not followed by word character or hyphen + . '(' // 3: Unroll the loop: Inside the opening shortcode tag + . '[^\\]\\/]*' // Not a closing bracket or forward slash + . '(?:' + . '\\/(?!\\])' // A forward slash not followed by a closing bracket + . '[^\\]\\/]*' // Not a closing bracket or forward slash + . ')*?' + . ')' + . '(?:' + . '(\\/)' // 4: Self closing tag ... + . '\\]' // ... and closing bracket + . '|' + . '\\]' // Closing bracket + . '(?:' + . '(' // 5: Unroll the loop: Optionally, anything between the opening and closing shortcode tags + . '[^\\[]*+' // Not an opening bracket + . '(?:' + . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag + . '[^\\[]*+' // Not an opening bracket + . ')*+' + . ')' + . '\\[\\/\\2\\]' // Closing shortcode tag + . ')?' + . ')' + . '(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]] + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..446cca1 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +## DPlayer-for-typecho +[DPlayer](https://github.com/DIYgod/DPlayer) for typecho + +### 声明 +部分代码参考 [https://github.com/zgq354/APlayer-Typecho-Plugin](https://github.com/zgq354/APlayer-Typecho-Plugin) + +### 使用方式 +下载后将文件夹名改为DPlayer上传启用即可 + +默认不自动播放,弹幕开启 +``` +[dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg"/] +``` + +关闭弹幕 +``` +[dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg" danmu="false"/] +``` + +开启自动播放 +``` +[dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg" autoplay="true"/] +``` + +添加额外弹幕源(例:bilibili弹幕) +``` +[dplayer url="http://xxx.com/xxx.mp4" pic="http://xxx.com/xxx.jpg" autoplay="true" addition="https://api.prprpr.me/dplayer/bilibili?aid=7286894"/] +``` + +### 设置截图 +![](https://raw.githubusercontent.com/volio/DPlayer-for-typecho/master/assets/screenshot.png) + +### LICENSE +MIT © [Volio](https://niconiconi.org) \ No newline at end of file diff --git a/assets/screenshot.png b/assets/screenshot.png new file mode 100644 index 0000000..d706191 Binary files /dev/null and b/assets/screenshot.png differ diff --git a/dist/DPlayer.min.js b/dist/DPlayer.min.js new file mode 100644 index 0000000..fb5a51d --- /dev/null +++ b/dist/DPlayer.min.js @@ -0,0 +1,4 @@ +!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()}(this,function(){return function(e){function t(n){if(a[n])return a[n].exports;var r=a[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var a={};return t.m=e,t.c=a,t.p="",t(0)}([function(e,t,a){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},l=function(){function e(e,t){for(var a=0;a\n \n \n \n '},this.option=t;var s=/mobile/i.test(window.navigator.userAgent);s&&(this.option.autoplay=!1);var d={element:document.getElementsByClassName("dplayer")[0],autoplay:!1,theme:"#b7daff",loop:!1,lang:navigator.language.indexOf("zh")!==-1?"zh":"en",screenshot:!1,hotkey:!0,preload:"auto",apiBackend:o};for(var p in d)d.hasOwnProperty(p)&&!this.option.hasOwnProperty(p)&&(this.option[p]=d[p]);var m={"Danmaku is loading":"弹幕加载中",Top:"顶部",Bottom:"底部",Rolling:"滚动","Input danmaku, hit Enter":"输入弹幕,回车发送","About author":"关于作者","DPlayer feedback":"播放器意见反馈","About DPlayer":"关于 DPlay 播放器",Loop:"洗脑循环",Speed:"速度","Opacity for danmaku":"弹幕透明度",Normal:"正常","Please input danmaku!":"要输入弹幕内容啊喂!","Set danmaku color":"设置弹幕颜色","Set danmaku type":"设置弹幕类型",Danmaku:"弹幕"},c=function(e){return"en"===a.option.lang?e:"zh"===a.option.lang?m[e]:void 0};this.updateBar=function(e,t,a){t=t>0?t:0,t=t<1?t:1,Y[e+"Bar"].style[a]=100*t+"%"};var y=["play","pause","canplay","playing","ended","error"];this.event={};for(var u=0;u\n
\n \n
\n
\n
\n
\n \n '+(this.option.danmaku?''+c("Danmaku is loading")+"":"")+'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n
\n
\n
\n 0:00 / 0:00\n
\n
\n '+(this.option.screenshot?'\n "+this.getSVG("camera")+" \n ":"")+'\n
\n \n
\n \n
\n
\n
'+c("Set danmaku color")+'
\n \n \n \n \n \n \n
\n
\n
'+c("Set danmaku type")+'
\n \n \n \n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n ");var g=this.element.offsetWidth<=500;if(g){var f=document.createElement("style");f.innerHTML=".dplayer .dplayer-danmaku{font-size:18px}",document.head.appendChild(f)}if(this.video=this.element.getElementsByClassName("dplayer-video")[0],/(m3u8\?|m3u8$)/i.exec(this.option.video.url)&&Hls.isSupported()&&!function(){a.element.getElementsByClassName("dplayer-time")[0].style.display="none";var e=new Hls;e.attachMedia(a.video),e.on(Hls.Events.MEDIA_ATTACHED,function(){e.loadSource(a.option.video.url),e.on(Hls.Events.MANIFEST_PARSED,function(e,t){console.log("manifest loaded, found "+t.levels.length+" quality level")})})}(),/(flv\?|flv$)/i.exec(this.option.video.url)&&flvjs.isSupported()){var b=flvjs.createPlayer({type:"flv",url:this.option.video.url});b.attachMediaElement(this.video),b.load()}this.bezel=this.element.getElementsByClassName("dplayer-bezel-icon")[0],this.bezel.addEventListener("animationend",function(){a.bezel.classList.remove("dplayer-bezel-transition")}),this.playButton=this.element.getElementsByClassName("dplayer-play-icon")[0],this.shouldpause=!0,this.playButton.addEventListener("click",function(){a.toggle()});var h=this.element.getElementsByClassName("dplayer-video-wrap")[0],v=this.element.getElementsByClassName("dplayer-controller-mask")[0];if(s){var x=function(){a.element.classList.contains("dplayer-hide-controller")?a.element.classList.remove("dplayer-hide-controller"):a.element.classList.add("dplayer-hide-controller")};h.addEventListener("click",x),v.addEventListener("click",x)}else h.addEventListener("click",function(){a.toggle()}),v.addEventListener("click",function(){a.toggle()});var k=function(e){var t=function(e){return e<10?"0"+e:""+e},a=parseInt(e/60),n=parseInt(e-60*a);return t(a)+":"+t(n)},w=function(e){var t=e.offsetLeft,n=e.offsetParent,r=void 0;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==a.element;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return r=document.body.scrollLeft+document.documentElement.scrollLeft,t-r},Y={};Y.playedBar=this.element.getElementsByClassName("dplayer-played")[0],Y.loadedBar=this.element.getElementsByClassName("dplayer-loaded")[0];var E=this.element.getElementsByClassName("dplayer-bar-wrap")[0],L=void 0;this.option.danmaku&&this.video.addEventListener("seeking",function(){for(var e=0;e=a.video.currentTime)return void(a.danIndex=e);a.danIndex=a.dan.length}});var z=0,B=0,C=!1,T=void 0;this.setTime=function(){a.playedTime=setInterval(function(){B=a.video.currentTime,!C&&Bz+.01&&!a.video.paused&&(a.element.classList.remove("dplayer-loading"),C=!1),z=B,a.updateBar("played",a.video.currentTime/a.video.duration,"width"),a.element.getElementsByClassName("dplayer-ptime")[0].innerHTML=k(a.video.currentTime),a.trigger("playing")},100),a.option.danmaku&&(T=setInterval(function(){for(var e=a.dan[a.danIndex];e&&a.video.currentTime>=parseFloat(e.time);)le(e.text,e.color,e.type),e=a.dan[++a.danIndex]},0))},this.clearTime=function(){clearInterval(a.playedTime),a.option.danmaku&&clearInterval(T)},E.addEventListener("click",function(e){var t=e||window.event;L=E.clientWidth;var n=(t.clientX-w(E))/L;n=n>0?n:0,n=n<1?n:1,a.updateBar("played",n,"width"),a.video.currentTime=parseFloat(Y.playedBar.style.width)/100*a.video.duration});var N=function(e){var t=e||window.event,n=(t.clientX-w(E))/L;n=n>0?n:0,n=n<1?n:1,a.updateBar("played",n,"width"),a.element.getElementsByClassName("dplayer-ptime")[0].innerHTML=k(n*a.video.duration)},M=function we(){document.removeEventListener("mouseup",we),document.removeEventListener("mousemove",N),a.video.currentTime=parseFloat(Y.playedBar.style.width)/100*a.video.duration,a.setTime()};E.addEventListener("mousedown",function(){L=E.clientWidth,a.clearTime(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",M)}),Y.volumeBar=this.element.getElementsByClassName("dplayer-volume-bar-inner")[0];var q=this.element.getElementsByClassName("dplayer-volume")[0],S=this.element.getElementsByClassName("dplayer-volume-bar-wrap")[0],A=this.element.getElementsByClassName("dplayer-volume-bar")[0],D=this.element.getElementsByClassName("dplayer-volume-icon")[0],I=35;this.switchVolumeIcon=function(){var e=a.element.getElementsByClassName("dplayer-volume-icon")[0];a.video.volume>=.8?e.innerHTML=a.getSVG("volume-up"):a.video.volume>0?e.innerHTML=a.getSVG("volume-down"):e.innerHTML=a.getSVG("volume-off")};var R=function(e){var t=e||window.event,n=(t.clientX-w(A)-5.5)/I;a.volume(n)},H=function Ye(){document.removeEventListener("mouseup",Ye),document.removeEventListener("mousemove",R),q.classList.remove("dplayer-volume-active")};S.addEventListener("click",function(e){var t=e||window.event,n=(t.clientX-w(A)-5.5)/I;a.volume(n)}),S.addEventListener("mousedown",function(){document.addEventListener("mousemove",R),document.addEventListener("mouseup",H),q.classList.add("dplayer-volume-active")}),D.addEventListener("click",function(){a.video.muted?(a.video.muted=!1,a.switchVolumeIcon(),a.updateBar("volume",a.video.volume,"width")):(a.video.muted=!0,D.innerHTML=a.getSVG("volume-off"),a.updateBar("volume",0,"width"))});var F=0;if(!s){var X=function(){a.element.classList.remove("dplayer-hide-controller"),clearTimeout(F),F=setTimeout(function(){a.video.played.length&&(a.element.classList.add("dplayer-hide-controller"),G(),be())},2e3)};this.element.addEventListener("mousemove",X),this.element.addEventListener("click",X)}var P=localStorage.getItem("DPlayer-opacity")||.7,V={original:'\n
\n '+c("Speed")+'\n
'+this.getSVG("right")+('
\n
\n
\n '+c("Loop")+'\n
\n \n \n
\n
\n
\n '+c("Danmaku")+'\n
\n \n \n
\n
\n
\n '+c("Opacity for danmaku")+'\n
\n
\n
\n \n
\n
\n
\n
'),speed:'\n
\n 0.5\n
\n
\n 0.75\n
\n
\n '+c("Normal")+'\n
\n
\n 1.25\n
\n
\n 1.5\n
\n
\n 2\n
'},O=this.element.getElementsByClassName("dplayer-setting-icon")[0],U=this.element.getElementsByClassName("dplayer-setting-box")[0],j=this.element.getElementsByClassName("dplayer-mask")[0];U.innerHTML=V.original;var G=function(){U.classList.contains("dplayer-setting-box-open")&&(U.classList.remove("dplayer-setting-box-open"),j.classList.remove("dplayer-mask-show"),setTimeout(function(){U.classList.remove("dplayer-setting-box-narrow"),U.innerHTML=V.original,$()},300))},W=function(){U.classList.add("dplayer-setting-box-open"),j.classList.add("dplayer-mask-show")};j.addEventListener("click",function(){G()}),O.addEventListener("click",function(){W()});var J=this.option.loop,_=this.element.getElementsByClassName("dplayer-danmaku")[0],Q=!0,$=function(){var e=a.element.getElementsByClassName("dplayer-setting-loop")[0],t=e.getElementsByClassName("dplayer-toggle-setting-input")[0];t.checked=J,e.addEventListener("click",function(){t.checked=!t.checked,t.checked?(J=!0,a.video.loop=J):(J=!1,a.video.loop=J),G()});var n=a.element.getElementsByClassName("dplayer-setting-showdan")[0],r=n.getElementsByClassName("dplayer-showdan-setting-input")[0];r.checked=Q,n.addEventListener("click",function(){if(r.checked=!r.checked,r.checked){if(Q=!0,a.option.danmaku){for(var e=0;e=a.video.currentTime){a.danIndex=e;break}a.danIndex=a.dan.length}T=setInterval(function(){for(var e=a.dan[a.danIndex];e&&a.video.currentTime>=parseFloat(e.time);)le(e.text,e.color,e.type),e=a.dan[++a.danIndex]},0)}}else Q=!1,a.option.danmaku&&(clearInterval(T),_.innerHTML='
',a.danTunnel={right:{},top:{},bottom:{}},a.itemDemo=a.element.getElementsByClassName("dplayer-danmaku-item")[0]);G()});var l=a.element.getElementsByClassName("dplayer-setting-speed")[0]; +l.addEventListener("click",function(){U.classList.add("dplayer-setting-box-narrow"),U.innerHTML=V.speed;for(var e=U.getElementsByClassName("dplayer-setting-speed-item"),t=function(t){e[t].addEventListener("click",function(){a.video.playbackRate=e[t].dataset.speed,G()})},n=0;n0?l:0,l=l<1?l:1,a.updateBar("danmaku",l,"width");for(var o=a.element.getElementsByClassName("dplayer-danmaku-item"),i=0;i0?l:0,l=l<1?l:1,a.updateBar("danmaku",l,"width");for(var o=a.element.getElementsByClassName("dplayer-danmaku-item"),i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},ye=function(){if(oe.blur(),!oe.value.replace(/^\s+|\s+$/g,""))return void alert(c("Please input danmaku!"));var e={token:a.option.danmaku.token,player:a.option.danmaku.id,author:"DIYgod",time:a.video.currentTime,text:oe.value,color:a.element.querySelector(".dplayer-comment-setting-color input:checked").value,type:a.element.querySelector(".dplayer-comment-setting-type input:checked").value};a.option.apiBackend.send(a.option.danmaku.api,e),oe.value="",be(),a.dan.splice(a.danIndex,0,e),a.danIndex++;var t=le(ce(e.text),e.color,e.type);t.style.border="2px solid "+a.option.theme},ue=function(){pe.classList.contains("dplayer-comment-setting-open")&&pe.classList.remove("dplayer-comment-setting-open")},ge=function(){pe.classList.contains("dplayer-comment-setting-open")?pe.classList.remove("dplayer-comment-setting-open"):pe.classList.add("dplayer-comment-setting-open")},fe=0,be=function(){se.classList.contains("dplayer-comment-box-open")&&(se.classList.remove("dplayer-comment-box-open"),j.classList.remove("dplayer-mask-show"),clearInterval(fe),a.element.classList.remove("dplayer-show-controller"),ue())},he=function(){se.classList.add("dplayer-comment-box-open"),j.classList.add("dplayer-mask-show"),fe=setInterval(function(){clearTimeout(F)},1e3),a.element.classList.add("dplayer-show-controller")};j.addEventListener("click",function(){be()}),ie.addEventListener("click",function(){he(),setTimeout(function(){oe.focus()},300)}),de.addEventListener("click",function(){ge()}),this.element.getElementsByClassName("dplayer-comment-setting-color")[0].addEventListener("click",function(){var e=a.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked+span');e&&(de.getElementsByClassName("dplayer-fill")[0].style.fill=a.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked').value)}),oe.addEventListener("click",function(){ue()}),oe.addEventListener("keydown",function(e){var t=e||window.event;13===t.keyCode&&ye()}),me.addEventListener("click",ye);var ve=function(){K=_.offsetWidth;for(var e=a.element.getElementsByClassName("dplayer-danmaku-item"),t=0;t0?e:0,e=e<1?e:1,this.updateBar("volume",e,"width"),this.video.volume=e,this.video.muted&&(this.video.muted=!1),this.switchVolumeIcon()}},{key:"toggle",value:function(){this.video.paused?this.play():this.pause()}},{key:"on",value:function(e,t){"function"==typeof t&&this.event[e].push(t)}},{key:"_readAllEndpoints",value:function(e,t){for(var a=[],n=0,r=function(r){return function(l,o){if(++n,l?(l.response?alert(l.response.msg):console.log("Request was unsuccessful: "+l.status),a[r]=[]):a[r]=o,n==e.length)return t(a)}},l=0;l',this.danTunnel={right:{},top:{},bottom:{}},this.itemDemo=this.element.getElementsByClassName("dplayer-danmaku-item")[0],this.option.danmaku=t,this.readDanmaku())}}]),e}();e.exports=s},function(e,t,a){var n=a(2);"string"==typeof n&&(n=[[e.id,n,""]]);a(4)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,a){t=e.exports=a(3)(),t.push([e.id,'.dplayer{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:1}.dplayer:-webkit-full-screen{width:100%;height:100%;background:#000}.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-top.dplayer-danmaku-move{-webkit-animation:danmaku-center 6s linear;animation:danmaku-center 6s linear;-webkit-animation-play-state:paused;animation-play-state:paused}.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move{-webkit-animation:danmaku 8s linear;animation:danmaku 8s linear;-webkit-animation-play-state:paused;animation-play-state:paused}.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box{height:60px}.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-comment,.dplayer.dplayer-no-danmaku .dplayer-danmaku{display:none}.dplayer.dplayer-playing .dplayer-danmaku .dplayer-danmaku-move{-webkit-animation-play-state:running!important;animation-play-state:running!important}@media (min-width:900px){.dplayer.dplayer-playing .dplayer-controller,.dplayer.dplayer-playing .dplayer-controller-mask{opacity:0}.dplayer.dplayer-playing:hover .dplayer-controller,.dplayer.dplayer-playing:hover .dplayer-controller-mask{opacity:1}}.dplayer.dplayer-loading .dplayer-bezel .diplayer-loading-icon{display:block}.dplayer.dplayer-loading .dplayer-danmaku .dplayer-danmaku-move{-webkit-animation-play-state:paused!important;animation-play-state:paused!important}.dplayer.dplayer-hide-controller .dplayer-controller,.dplayer.dplayer-hide-controller .dplayer-controller-mask{opacity:0;-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}.dplayer.dplayer-show-controller .dplayer-controller,.dplayer.dplayer-show-controller .dplayer-controller-mask{opacity:1}.dplayer .dplayer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.dplayer .dplayer-mask.dplayer-mask-show{display:block}.dplayer .dplayer-video-wrap{position:relative;background:#000;font-size:0;width:100%;height:100%}.dplayer .dplayer-video-wrap .dplayer-video{width:100%;height:100%}.dplayer .dplayer-danmaku{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff}.dplayer .dplayer-danmaku .dplayer-danmaku-item{display:inline-block;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;white-space:nowrap;font-weight:bolder;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.dplayer .dplayer-danmaku .dplayer-danmaku-item--demo{position:absolute;visibility:hidden}.dplayer .dplayer-danmaku .dplayer-danmaku-right{position:absolute;right:0;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.dplayer .dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move{will-change:transform;-webkit-animation:danmaku 5s linear;animation:danmaku 5s linear;-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes danmaku{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes danmaku{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.dplayer .dplayer-danmaku .dplayer-danmaku-bottom,.dplayer .dplayer-danmaku .dplayer-danmaku-top{position:absolute;width:100%;text-align:center;visibility:hidden}.dplayer .dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.dplayer .dplayer-danmaku .dplayer-danmaku-top.dplayer-danmaku-move{will-change:visibility;-webkit-animation:danmaku-center 4s linear;animation:danmaku-center 4s linear;-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes danmaku-center{0%{visibility:visible}to{visibility:visible}}@keyframes danmaku-center{0%{visibility:visible}to{visibility:visible}}.dplayer .dplayer-bezel{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.dplayer .dplayer-bezel .dplayer-fill{fill:hsla(0,0%,100%,.8)}.dplayer .dplayer-bezel .dplayer-bezel-icon{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.5);-webkit-border-radius:50%;border-radius:50%;opacity:0;pointer-events:none}.dplayer .dplayer-bezel .dplayer-bezel-icon.dplayer-bezel-transition{-webkit-animation:bezel-hide .5s linear;animation:bezel-hide .5s linear}@-webkit-keyframes bezel-hide{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(2);transform:scale(2)}}@keyframes bezel-hide{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(2);transform:scale(2)}}.dplayer .dplayer-bezel .dplayer-danloading{position:absolute;top:50%;margin-top:-7px;width:100%;text-align:center;font-size:14px;line-height:14px;-webkit-animation:my-face 5s infinite ease-in-out;animation:my-face 5s infinite ease-in-out}.dplayer .dplayer-bezel .diplayer-loading-icon{display:none;position:absolute;top:50%;left:50%;margin:-18px 0 0 -18px;height:36px;width:36px;pointer-events:none}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-hide{display:none}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot{-webkit-animation:diplayer-loading-dot-fade .8s ease infinite;animation:diplayer-loading-dot-fade .8s ease infinite;opacity:0;fill:#fff;-webkit-transform-origin:4px 4px;-ms-transform-origin:4px 4px;transform-origin:4px 4px}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-7{-webkit-animation-delay:.7s;animation-delay:.7s}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-6{-webkit-animation-delay:.6s;animation-delay:.6s}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-5{-webkit-animation-delay:.5s;animation-delay:.5s}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-4{-webkit-animation-delay:.4s;animation-delay:.4s}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-3{-webkit-animation-delay:.3s;animation-delay:.3s}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-2{-webkit-animation-delay:.2s;animation-delay:.2s}.dplayer .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-1{-webkit-animation-delay:.1s;animation-delay:.1s}@-webkit-keyframes diplayer-loading-dot-fade{0%{opacity:.7;-webkit-transform:scale(1.2);transform:scale(1.2)}50%{opacity:.25;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:.25;-webkit-transform:scale(.85);transform:scale(.85)}}@keyframes diplayer-loading-dot-fade{0%{opacity:.7;-webkit-transform:scale(1.2);transform:scale(1.2)}50%{opacity:.25;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:.25;-webkit-transform:scale(.85);transform:scale(.85)}}.dplayer .dplayer-controller-mask{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%}.dplayer .dplayer-controller,.dplayer .dplayer-controller-mask{position:absolute;bottom:0;-webkit-transition:all .3s ease;transition:all .3s ease}.dplayer .dplayer-controller{left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dplayer .dplayer-controller .dplayer-bar-wrap{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:-webkit-calc(100% - 40px);width:calc(100% - 40px);height:3px}.dplayer .dplayer-controller .dplayer-bar-wrap:hover .dplayer-thumb{-webkit-transform:scale(1)!important;-ms-transform:scale(1)!important;transform:scale(1)!important}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer!important}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:hsla(0,0%,100%,.4);height:3px;-webkit-transition:all .5s ease;transition:all .5s ease;will-change:width}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;-webkit-border-radius:50%;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.dplayer .dplayer-controller .dplayer-icons{height:38px;position:absolute;bottom:0}.dplayer .dplayer-controller .dplayer-icons.dplayer-icons-left .dplayer-icon{padding:7px}.dplayer .dplayer-controller .dplayer-icons.dplayer-icons-right{right:20px}.dplayer .dplayer-controller .dplayer-icons.dplayer-icons-right .dplayer-icon{padding:8px}.dplayer .dplayer-controller .dplayer-icons #dplayer-menu{stroke:#ddd;stroke-width:1px}.dplayer .dplayer-controller .dplayer-icons .dplayer-time{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.dplayer .dplayer-controller .dplayer-icons .dplayer-icon{width:46px;height:100%;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}.dplayer .dplayer-controller .dplayer-icons .dplayer-icon:hover{opacity:1}.dplayer .dplayer-controller .dplayer-icons .dplayer-icon.dplayer-comment-icon{padding:10px 9px 9px}.dplayer .dplayer-controller .dplayer-icons .dplayer-icon.dplayer-setting-icon{padding-top:8.5px}.dplayer .dplayer-controller .dplayer-icons .dplayer-fill{fill:#fff}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume{position:relative;display:inline-block;cursor:pointer!important;height:100%}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar{width:45px!important}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-thumb{-webkit-transform:scale(1)!important;-ms-transform:scale(1)!important;transform:scale(1)!important}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar{width:45px!important}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-thumb{-webkit-transform:scale(1)!important;-ms-transform:scale(1)!important;transform:scale(1)!important}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap{display:inline-block;margin:0 5px 0 -5px;vertical-align:middle;height:100%}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar{position:relative;top:17px;width:0;height:3px;background:#aaa;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner{position:absolute;bottom:0;left:0;height:100%;-webkit-transition:all .1s ease;transition:all .1s ease;will-change:width}.dplayer .dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;-webkit-border-radius:50%;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting{display:inline-block;height:100%}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box{position:absolute;right:0;bottom:50px;-webkit-transform:translateX(170px);-ms-transform:translateX(170px);transform:translateX(170px);width:150px;height:120px;-webkit-border-radius:2px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;z-index:2}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-open{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-narrow{width:70px;height:180px;text-align:center}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item,.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item{height:30px;padding:5px 10px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item:hover,.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku{padding:5px 0}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-label{padding:0 10px;display:inline}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-label{display:none}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-label{display:none}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap{padding:0 10px;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;vertical-align:middle;height:100%;width:100%}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar{position:relative;top:8.5px;width:100%;height:3px;background:#fff;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar .dplayer-danmaku-bar-inner{position:absolute;bottom:0;left:0;height:100%;-webkit-transition:all .1s ease;transition:all .1s ease;background:#aaa;will-change:width}.dplayer .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar .dplayer-danmaku-bar-inner .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;-webkit-border-radius:50%;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;background:#aaa}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment{display:inline-block;height:100%}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box{position:absolute;right:0;bottom:50px;-webkit-transform:translateX(382px);-ms-transform:translateX(382px);transform:translateX(382px);-webkit-border-radius:2px;border-radius:2px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;z-index:2}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box.dplayer-comment-box-open{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-icon{height:24px;width:24px;position:absolute;top:5px;left:7px;padding:0;opacity:1}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-icon:hover .dplayer-fill{fill:#aaa}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-icon .dplayer-fill{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;fill:#ddd}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box{position:absolute;background:#fff;bottom:40px;left:-93px;-webkit-box-shadow:0 0 25px rgba(0,0,0,.3);box-shadow:0 0 25px rgba(0,0,0,.3);-webkit-border-radius:4px;border-radius:4px;padding:10px 10px 16px;font-size:14px;width:204px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box.dplayer-comment-setting-open{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box:after{content:\'\';position:absolute;top:100%;left:50%;margin-left:-12px;background:url(\'data:image/svg+xml;utf8,\');width:24px;height:12px}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box input[type=radio]{display:none}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box label{cursor:pointer}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-title{font-size:14px;color:#555;padding:6px}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type{font-size:0}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(2) span{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(4) span{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type span{width:33%;padding:4px 6px;line-height:16px;display:inline-block;font-size:12px;color:#555;border:1px solid #e4e4e6;margin-right:-1px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;cursor:pointer}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type input:checked+span{background:#e4e4e6}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color{font-size:0}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color label{font-size:0;padding:6px;display:inline-block}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span{width:22px;height:22px;display:inline-block;-webkit-border-radius:50%;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span:hover{-webkit-animation:my-face 5s infinite ease-in-out;animation:my-face 5s infinite ease-in-out;-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color input:checked+span{-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);border:none!important}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-input{outline:none;border:none;padding:8px 31px;font-size:14px;line-height:18px;text-align:center;-webkit-border-radius:4px;border-radius:4px;width:300px;background:#fff;margin:0;height:auto}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-send-icon{height:22px;width:22px;position:absolute;top:6px;right:7px;padding:0;opacity:1}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-send-icon:hover .dplayer-fill{fill:#aaa}.dplayer .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-send-icon .dplayer-fill{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;fill:#ddd}.dplayer .dplayer-controller .dplayer-icons .dplayer-label{color:#eee;font-size:13px;display:inline-block;vertical-align:middle}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle{width:32px;height:100%;text-align:center;display:inline-block;font-size:0;vertical-align:middle;float:right}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input{max-height:0;max-width:0;display:none}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input+label{display:inline-block;position:relative;-webkit-box-shadow:#dfdfdf 0 0 0 0 inset;box-shadow:inset 0 0 0 0 #dfdfdf;border:1px solid #dfdfdf;height:20px;width:32px;-webkit-border-radius:10px;border-radius:10px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input+label:after,.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input+label:before{content:"";position:absolute;display:block;height:18px;width:18px;top:0;left:0;-webkit-border-radius:15px;border-radius:15px;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input+label:after{background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.4);box-shadow:0 1px 3px rgba(0,0,0,.4)}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label{border-color:hsla(0,0%,100%,.5)}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:before{width:30px;background:hsla(0,0%,100%,.5)}.dplayer .dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:after{left:12px}.dplayer .dplayer-menu{position:absolute;width:150px;-webkit-border-radius:2px;border-radius:2px;background:rgba(28,28,28,.9);padding:5px 0;overflow:hidden;z-index:3;display:none}.dplayer .dplayer-menu.dplayer-menu-show{display:block}.dplayer .dplayer-menu .dplayer-menu-item{height:30px;padding:5px 10px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.dplayer .dplayer-menu .dplayer-menu-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer .dplayer-menu .dplayer-menu-item .dplayer-menu-label a{color:#eee;font-size:13px;display:inline-block;vertical-align:middle}@-webkit-keyframes my-face{2%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}4%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}6%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}8%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}10%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}12%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}14%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}16%{-webkit-transform:translateY(-.5px) rotate(-1.5deg);transform:translateY(-.5px) rotate(-1.5deg)}18%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}20%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}22%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}24%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}26%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}28%{-webkit-transform:translateY(.5px) rotate(1.5deg);transform:translateY(.5px) rotate(1.5deg)}30%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}32%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}34%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}36%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}38%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}40%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}42%{-webkit-transform:translateY(2.5px) rotate(-1.5deg);transform:translateY(2.5px) rotate(-1.5deg)}44%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}46%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}48%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}50%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}52%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}54%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}56%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}58%{-webkit-transform:translateY(.5px) rotate(2.5deg);transform:translateY(.5px) rotate(2.5deg)}60%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}62%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}64%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}66%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}68%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}70%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}72%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}74%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}76%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}78%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}80%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}82%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}84%{-webkit-transform:translateY(1.5px) rotate(2.5deg);transform:translateY(1.5px) rotate(2.5deg)}86%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}88%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}90%{-webkit-transform:translateY(2.5px) rotate(-.5deg);transform:translateY(2.5px) rotate(-.5deg)}92%{-webkit-transform:translateY(.5px) rotate(-.5deg);transform:translateY(.5px) rotate(-.5deg)}94%{-webkit-transform:translateY(2.5px) rotate(.5deg);transform:translateY(2.5px) rotate(.5deg)}96%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}98%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}0%,to{-webkit-transform:translate(0) rotate(0deg);transform:translate(0) rotate(0deg)}}@keyframes my-face{2%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}4%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}6%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}8%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}10%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}12%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}14%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}16%{-webkit-transform:translateY(-.5px) rotate(-1.5deg);transform:translateY(-.5px) rotate(-1.5deg)}18%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}20%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}22%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}24%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}26%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}28%{-webkit-transform:translateY(.5px) rotate(1.5deg);transform:translateY(.5px) rotate(1.5deg)}30%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}32%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}34%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}36%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}38%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}40%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}42%{-webkit-transform:translateY(2.5px) rotate(-1.5deg);transform:translateY(2.5px) rotate(-1.5deg)}44%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}46%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}48%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}50%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}52%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}54%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}56%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}58%{-webkit-transform:translateY(.5px) rotate(2.5deg);transform:translateY(.5px) rotate(2.5deg)}60%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}62%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}64%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}66%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}68%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}70%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}72%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}74%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}76%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}78%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}80%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}82%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}84%{-webkit-transform:translateY(1.5px) rotate(2.5deg);transform:translateY(1.5px) rotate(2.5deg)}86%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}88%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}90%{-webkit-transform:translateY(2.5px) rotate(-.5deg);transform:translateY(2.5px) rotate(-.5deg)}92%{-webkit-transform:translateY(.5px) rotate(-.5deg);transform:translateY(.5px) rotate(-.5deg)}94%{-webkit-transform:translateY(2.5px) rotate(.5deg);transform:translateY(2.5px) rotate(.5deg)}96%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}98%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}0%,to{-webkit-transform:translate(0) rotate(0deg);transform:translate(0) rotate(0deg)}}',""]); +},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&v.splice(t,1)}function i(e){var t=document.createElement("style");return t.type="text/css",l(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",l(e,t),t}function d(e,t){var a,n,r;if(t.singleton){var l=h++;a=b||(b=i(t)),n=p.bind(null,a,l,!1),r=p.bind(null,a,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=s(t),n=c.bind(null,a),r=function(){o(a),a.href&&URL.revokeObjectURL(a.href)}):(a=i(t),n=m.bind(null,a),r=function(){o(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}function p(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,r);else{var l=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(l,o[t]):e.appendChild(l)}}function m(e,t){var a=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}function c(e,t){var a=t.css,n=t.sourceMap;n&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var r=new Blob([a],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(r),l&&URL.revokeObjectURL(l)}var y={},u=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},g=u(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),f=u(function(){return document.head||document.getElementsByTagName("head")[0]}),b=null,h=0,v=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=g()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var a=r(e);return n(a,t),function(e){for(var l=[],o=0;o=200&&a.status<300||304===a.status){var e=JSON.parse(a.responseText);1!==e.code?alert(e.msg):console.log("Post danmaku: ",JSON.parse(a.responseText))}else console.log("Request was unsuccessful: "+a.status)},a.open("post",e,!0),a.send(JSON.stringify(t))},t.read=function(e,t){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(4===a.readyState){if(a.status>=200&&a.status<300||304===a.status){var e=JSON.parse(a.responseText);return 1!==e.code?t({status:a.status,response:e}):t(null,e.danmaku)}return t({status:a.status,response:null})}},a.open("get",e,!0),a.send(null)}}])}); +//# sourceMappingURL=DPlayer.min.js.map \ No newline at end of file diff --git a/dist/DPlayer.min.js.map b/dist/DPlayer.min.js.map new file mode 100644 index 0000000..701dc2c --- /dev/null +++ b/dist/DPlayer.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///DPlayer.min.js","webpack:///webpack/bootstrap 35807cd715be7a8876ad","webpack:///./src/DPlayer.js","webpack:///./src/DPlayer.scss?8fa9","webpack:///./src/DPlayer.scss","webpack:///./~/css-loader/lib/css-base.js","webpack:///./~/style-loader/addStyles.js","webpack:///./src/api.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","obj","constructor","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","console","log","defaultApiBackend","index","DPlayer","option","_this","svg","play","pause","volume-up","volume-down","volume-off","loop","full","setting","right","comment","comment-off","send","menu","camera","getSVG","type","isMobile","test","window","navigator","userAgent","autoplay","defaultOption","element","document","getElementsByClassName","theme","lang","language","indexOf","screenshot","hotkey","preload","apiBackend","defaultKey","hasOwnProperty","tranZH","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!","Set danmaku color","Set danmaku type","Danmaku","getTran","text","updateBar","percentage","direction","bar","style","eventTypes","event","trigger","_i","danmaku","classList","add","innerHTML","video","pic","url","arrow","offsetWidth","arrowStyle","createElement","head","appendChild","exec","Hls","isSupported","display","hls","attachMedia","on","Events","MEDIA_ATTACHED","loadSource","MANIFEST_PARSED","data","levels","flvjs","flvPlayer","createPlayer","attachMediaElement","load","bezel","addEventListener","remove","playButton","shouldpause","toggle","videoWrap","conMask","toggleController","contains","secondToTime","second","add0","num","min","parseInt","sec","getElementViewLeft","actualLeft","offsetLeft","current","offsetParent","elementScrollLeft","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","body","scrollLeft","documentElement","playedBar","loadedBar","pbar","barWidth","_i2","dan","time","currentTime","danIndex","lastPlayPos","currentPlayPos","bufferingDetected","danmakuTime","setTime","playedTime","setInterval","paused","duration","item","parseFloat","danmakuIn","color","clearTime","clearInterval","e","clientWidth","clientX","width","thumbMove","thumbUp","removeEventListener","volumeBar","volumeEle","volumeBarWrapWrap","volumeBarWrap","volumeicon","vWidth","switchVolumeIcon","volume","volumeMove","volumeUp","muted","hideTime","hideController","clearTimeout","setTimeout","played","closeSetting","closeComment","danOpacity","localStorage","getItem","settingHTML","original","speed","settingIcon","settingBox","mask","settingEvent","openSetting","danContainer","showdan","loopEle","loopToggle","checked","showDanEle","showDanToggle","_i3","danTunnel","top","bottom","itemDemo","speedEle","speedItem","_loop","_i4","playbackRate","dataset","danmakuBar","danmakuBarWrapWrap","danmakuBarWrap","danmakuSettingBox","dWidth","danmakuMove","items","_i5","opacity","setItem","danmakuUp","_i6","buffered","end","ended","itemHeight","danWidth","danHeight","itemY","danItemRight","ele","getBoundingClientRect","danSpeed","getTunnel","tmp","_loop2","_i7","splice","v","j","danRight","push","_ret4","offsetHeight","removeChild","itemWidth","transform","error","readDanmaku","commentInput","commentIcon","commentBox","commentSettingIcon","commentSettingBox","commentSendIcon","htmlEncode","str","replace","sendComment","blur","value","alert","danmakuData","token","player","author","querySelector","api","border","closeCommentSetting","toggleCommentSetting","disableHide","openComment","focus","sele","fill","keyCode","resetAnimation","_i8","cancelFullScreen","mozCancelFullScreen","webkitCancelFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","handleKeyDown","tag","activeElement","tagName","toUpperCase","editable","getAttribute","preventDefault","left","clientY","camareIcon","canvas","videoWidth","height","videoHeight","getContext","drawImage","href","toDataURL","download","toString","name","func","endpoints","finish","results","readCount","cbk","err","response","msg","status","read","_this2","apiurl","maximum","addition","slice","_readAllEndpoints","concat","apply","sort","a","b","src","poster","content","locals","list","result","join","mediaQuery","alreadyImportedModules","addStylesToDom","styles","options","domStyle","stylesInDom","refs","parts","addStyle","listToStyles","newStyles","css","media","sourceMap","part","insertStyleElement","styleElement","getHeadElement","lastStyleElementInsertedAtTop","styleElementsInsertedAtTop","insertAt","nextSibling","insertBefore","firstChild","Error","removeStyleElement","parentNode","idx","createStyleElement","createLinkElement","linkElement","rel","update","singleton","styleIndex","singletonCounter","singletonElement","applyToSingletonTag","bind","URL","createObjectURL","revokeObjectURL","Blob","btoa","updateLink","applyToTag","newObj","styleSheet","cssText","replaceText","cssNode","createTextNode","childNodes","setAttribute","unescape","encodeURIComponent","JSON","stringify","blob","oldSrc","memoize","fn","memo","arguments","isOldIE","toLowerCase","getElementsByTagName","newList","mayRemove","textStore","replacement","filter","Boolean","endpoint","xhr","XMLHttpRequest","onreadystatechange","readyState","parse","responseText","code","open"],"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,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,E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ACA,GAAAoB,KAEA,iBAAAnZ,EAAAoZ,GAEA,MADAD,GAAAnZ,GAAAoZ,EACAD,EAAAE,OAAAC,SAAA1E,KAAA,WNi4CM,SAAStX,EAAQD,GAEtB,YAEAkC,QAAOC,eAAenC,EAAS,cAC7B4S,OAAO,GOnkDG5S,GAAA2D,KAAO,SAACuY,EAAUpJ,GAC7B,GAAMqJ,GAAM,GAAIC,eAChBD,GAAIE,mBAAqB,WACvB,GAAuB,IAAnBF,EAAIG,WACN,GAAIH,EAAI/F,QAAU,KAAO+F,EAAI/F,OAAS,KAAsB,MAAf+F,EAAI/F,OAAgB,CAC/D,GAAMF,GAAW+E,KAAKsB,MAAMJ,EAAIK,aACV,KAAlBtG,EAASuG,KACX5J,MAAMqD,EAASC,KAGf3T,QAAQC,IAAI,iBAAkBwY,KAAKsB,MAAMJ,EAAIK,mBAI/Cha,SAAQC,IAAI,6BAA+B0Z,EAAI/F,SAIrD+F,EAAIO,KAAK,OAAQR,GAAU,GAC3BC,EAAIxY,KAAKsX,KAAKC,UAAUpI,KAGb9S,EAAAqW,KAAO,SAAC6F,EAAUlG,GAC7B,GAAMmG,GAAM,GAAIC,eAChBD,GAAIE,mBAAqB,WACvB,GAAuB,IAAnBF,EAAIG,WAAkB,CACxB,GAAIH,EAAI/F,QAAU,KAAO+F,EAAI/F,OAAS,KAAsB,MAAf+F,EAAI/F,OAAgB,CAC/D,GAAMF,GAAW+E,KAAKsB,MAAMJ,EAAIK,aAChC,OAAsB,KAAlBtG,EAASuG,KACJzG,GAAMI,OAAQ+F,EAAI/F,OAAQF,aAG1BF,EAAI,KAAME,EAASlP,SAI5B,MAAOgP,IAAMI,OAAQ+F,EAAI/F,OAAQF,SAAU,SAIjDiG,EAAIO,KAAK,MAAOR,GAAU,GAC1BC,EAAIxY,KAAK","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})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(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})(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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tconsole.log(\"\\n %c DPlayer 1.1.2 %c http://dplayer.js.org \\n\\n\", \"color: #fadfa3; background: #030307; padding:5px 0;\", \"background: #fadfa3; padding:5px 0;\");\n\t\n\t__webpack_require__(1);\n\tvar defaultApiBackend = __webpack_require__(5);\n\t\n\tvar index = 0;\n\t\n\tvar DPlayer = function () {\n\t /**\n\t * DPlayer constructor function\n\t *\n\t * @param {Object} option - See README\n\t * @constructor\n\t */\n\t\n\t function DPlayer(option) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, DPlayer);\n\t\n\t var svg = {\n\t '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'],\n\t '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'],\n\t '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.056zM29.728 16q0 4.096-2.272 7.552t-6.048 5.056q-0.224 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.64 0.704-1.056 0.128-0.064 0.384-0.192t0.416-0.192q0.8-0.448 1.44-0.896 2.208-1.632 3.456-4.064t1.216-5.152-1.216-5.152-3.456-4.064q-0.64-0.448-1.44-0.896-0.128-0.096-0.416-0.192t-0.384-0.192q-0.704-0.416-0.704-1.056 0-0.448 0.32-0.8t0.832-0.352q0.224 0 0.448 0.096 3.776 1.632 6.048 5.056t2.272 7.552z'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t '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'],\n\t 'menu': ['0 0 22 32', 'M20.8 14.4q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2zM1.6 11.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2zM20.8 20.8q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2z'],\n\t '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']\n\t };\n\t this.getSVG = function (type) {\n\t return \"\\n \\n \\n \\n \\n \";\n\t };\n\t\n\t this.option = option;\n\t\n\t var isMobile = /mobile/i.test(window.navigator.userAgent);\n\t // compatibility: some mobile browsers don't suppose autoplay\n\t if (isMobile) {\n\t this.option.autoplay = false;\n\t }\n\t\n\t // default options\n\t var defaultOption = {\n\t element: document.getElementsByClassName('dplayer')[0],\n\t autoplay: false,\n\t theme: '#b7daff',\n\t loop: false,\n\t lang: navigator.language.indexOf('zh') !== -1 ? 'zh' : 'en',\n\t screenshot: false,\n\t hotkey: true,\n\t preload: 'auto',\n\t apiBackend: defaultApiBackend\n\t };\n\t for (var defaultKey in defaultOption) {\n\t if (defaultOption.hasOwnProperty(defaultKey) && !this.option.hasOwnProperty(defaultKey)) {\n\t this.option[defaultKey] = defaultOption[defaultKey];\n\t }\n\t }\n\t\n\t var tranZH = {\n\t 'Danmaku is loading': '弹幕加载中',\n\t 'Top': '顶部',\n\t 'Bottom': '底部',\n\t 'Rolling': '滚动',\n\t 'Input danmaku, hit Enter': '输入弹幕,回车发送',\n\t 'About author': '关于作者',\n\t 'DPlayer feedback': '播放器意见反馈',\n\t 'About DPlayer': '关于 DPlay 播放器',\n\t 'Loop': '洗脑循环',\n\t 'Speed': '速度',\n\t 'Opacity for danmaku': '弹幕透明度',\n\t 'Normal': '正常',\n\t 'Please input danmaku!': '要输入弹幕内容啊喂!',\n\t 'Set danmaku color': '设置弹幕颜色',\n\t 'Set danmaku type': '设置弹幕类型',\n\t 'Danmaku': '弹幕'\n\t };\n\t var getTran = function getTran(text) {\n\t if (_this.option.lang === 'en') {\n\t return text;\n\t } else if (_this.option.lang === 'zh') {\n\t return tranZH[text];\n\t }\n\t };\n\t\n\t /**\n\t * Update progress bar, including loading progress bar and play progress bar\n\t *\n\t * @param {String} type - Point out which bar it is, should be played loaded or volume\n\t * @param {Number} percentage\n\t * @param {String} direction - Point out the direction of this bar, Should be height or width\n\t */\n\t this.updateBar = function (type, percentage, direction) {\n\t percentage = percentage > 0 ? percentage : 0;\n\t percentage = percentage < 1 ? percentage : 1;\n\t bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n\t };\n\t\n\t // define DPlayer events\n\t var eventTypes = ['play', 'pause', 'canplay', 'playing', 'ended', 'error'];\n\t this.event = {};\n\t for (var i = 0; i < eventTypes.length; i++) {\n\t this.event[eventTypes[i]] = [];\n\t }\n\t this.trigger = function (type) {\n\t for (var _i = 0; _i < _this.event[type].length; _i++) {\n\t _this.event[type][_i]();\n\t }\n\t };\n\t\n\t this.element = this.option.element;\n\t if (!this.option.danmaku) {\n\t this.element.classList.add('dplayer-no-danmaku');\n\t }\n\t\n\t this.element.innerHTML = \"\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n \\n \" + (this.option.danmaku ? \"\" + getTran('Danmaku is loading') + \"\" : \"\") + \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n \\n
\\n \\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n 0:00 / 0:00\\n
\\n
\\n \" + (this.option.screenshot ? \"\\n \" + this.getSVG('camera') + \" \\n \" : \"\") + \"\\n
\\n \\n
\\n \\n
\\n
\\n
\" + getTran('Set danmaku color') + \"
\\n \\n \\n \\n \\n \\n \\n
\\n
\\n
\" + getTran('Set danmaku type') + \"
\\n \\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n \\n \");\n\t\n\t // arrow style\n\t var arrow = this.element.offsetWidth <= 500;\n\t if (arrow) {\n\t var arrowStyle = document.createElement('style');\n\t arrowStyle.innerHTML = \".dplayer .dplayer-danmaku{font-size:18px}\";\n\t document.head.appendChild(arrowStyle);\n\t }\n\t\n\t // get this video object\n\t this.video = this.element.getElementsByClassName('dplayer-video')[0];\n\t\n\t // Support HTTP Live Streaming\n\t if (/(m3u8\\?|m3u8$)/i.exec(this.option.video.url) && Hls.isSupported()) {\n\t (function () {\n\t _this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none';\n\t var hls = new Hls();\n\t hls.attachMedia(_this.video);\n\t hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n\t hls.loadSource(_this.option.video.url);\n\t hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n\t console.log(\"manifest loaded, found \" + data.levels.length + \" quality level\");\n\t });\n\t });\n\t })();\n\t }\n\t\n\t // Support FLV\n\t if (/(flv\\?|flv$)/i.exec(this.option.video.url) && flvjs.isSupported()) {\n\t var flvPlayer = flvjs.createPlayer({\n\t type: 'flv',\n\t url: this.option.video.url\n\t });\n\t flvPlayer.attachMediaElement(this.video);\n\t flvPlayer.load();\n\t }\n\t\n\t this.bezel = this.element.getElementsByClassName('dplayer-bezel-icon')[0];\n\t this.bezel.addEventListener('animationend', function () {\n\t _this.bezel.classList.remove('dplayer-bezel-transition');\n\t });\n\t\n\t // play and pause button\n\t this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n\t this.shouldpause = true;\n\t this.playButton.addEventListener('click', function () {\n\t _this.toggle();\n\t });\n\t\n\t var videoWrap = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n\t var conMask = this.element.getElementsByClassName('dplayer-controller-mask')[0];\n\t if (!isMobile) {\n\t videoWrap.addEventListener('click', function () {\n\t _this.toggle();\n\t });\n\t conMask.addEventListener('click', function () {\n\t _this.toggle();\n\t });\n\t } else {\n\t var toggleController = function toggleController() {\n\t if (_this.element.classList.contains('dplayer-hide-controller')) {\n\t _this.element.classList.remove('dplayer-hide-controller');\n\t } else {\n\t _this.element.classList.add('dplayer-hide-controller');\n\t }\n\t };\n\t videoWrap.addEventListener('click', toggleController);\n\t conMask.addEventListener('click', toggleController);\n\t }\n\t\n\t /**\n\t * Parse second to 00:00 format\n\t *\n\t * @param {Number} second\n\t * @return {String} 00:00 format\n\t */\n\t var secondToTime = function secondToTime(second) {\n\t var add0 = function add0(num) {\n\t return num < 10 ? '0' + num : '' + num;\n\t };\n\t var min = parseInt(second / 60);\n\t var sec = parseInt(second - min * 60);\n\t return add0(min) + ':' + add0(sec);\n\t };\n\t\n\t /**\n\t * control play progress\n\t */\n\t // get element's view position\n\t var getElementViewLeft = function getElementViewLeft(element) {\n\t var actualLeft = element.offsetLeft;\n\t var current = element.offsetParent;\n\t var elementScrollLeft = void 0;\n\t if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n\t while (current !== null) {\n\t actualLeft += current.offsetLeft;\n\t current = current.offsetParent;\n\t }\n\t } else {\n\t while (current !== null && current !== _this.element) {\n\t actualLeft += current.offsetLeft;\n\t current = current.offsetParent;\n\t }\n\t }\n\t elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n\t return actualLeft - elementScrollLeft;\n\t };\n\t\n\t var getElementViewTop = function getElementViewTop(element) {\n\t var actualTop = element.offsetTop;\n\t var current = element.offsetParent;\n\t var elementScrollTop = void 0;\n\t if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n\t while (current !== null) {\n\t actualTop += current.offsetTop;\n\t current = current.offsetParent;\n\t }\n\t } else {\n\t while (current !== null && current !== _this.element) {\n\t actualTop += current.offsetTop;\n\t current = current.offsetParent;\n\t }\n\t }\n\t elementScrollTop = document.body.scrollTop + document.documentElement.scrollTop;\n\t return actualTop - elementScrollTop;\n\t };\n\t\n\t var bar = {};\n\t bar.playedBar = this.element.getElementsByClassName('dplayer-played')[0];\n\t bar.loadedBar = this.element.getElementsByClassName('dplayer-loaded')[0];\n\t var pbar = this.element.getElementsByClassName('dplayer-bar-wrap')[0];\n\t var barWidth = void 0;\n\t\n\t if (this.option.danmaku) {\n\t this.video.addEventListener('seeking', function () {\n\t for (var _i2 = 0; _i2 < _this.dan.length; _i2++) {\n\t if (_this.dan[_i2].time >= _this.video.currentTime) {\n\t _this.danIndex = _i2;\n\t return;\n\t }\n\t _this.danIndex = _this.dan.length;\n\t }\n\t });\n\t }\n\t\n\t var lastPlayPos = 0;\n\t var currentPlayPos = 0;\n\t var bufferingDetected = false;\n\t var danmakuTime = void 0;\n\t this.setTime = function () {\n\t _this.playedTime = setInterval(function () {\n\t // whether the video is buffering\n\t currentPlayPos = _this.video.currentTime;\n\t if (!bufferingDetected && currentPlayPos < lastPlayPos + 0.01 && !_this.video.paused) {\n\t _this.element.classList.add('dplayer-loading');\n\t bufferingDetected = true;\n\t }\n\t if (bufferingDetected && currentPlayPos > lastPlayPos + 0.01 && !_this.video.paused) {\n\t _this.element.classList.remove('dplayer-loading');\n\t bufferingDetected = false;\n\t }\n\t lastPlayPos = currentPlayPos;\n\t\n\t _this.updateBar('played', _this.video.currentTime / _this.video.duration, 'width');\n\t _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(_this.video.currentTime);\n\t _this.trigger('playing');\n\t }, 100);\n\t if (_this.option.danmaku) {\n\t danmakuTime = setInterval(function () {\n\t var item = _this.dan[_this.danIndex];\n\t while (item && _this.video.currentTime >= parseFloat(item.time)) {\n\t danmakuIn(item.text, item.color, item.type);\n\t item = _this.dan[++_this.danIndex];\n\t }\n\t }, 0);\n\t }\n\t };\n\t this.clearTime = function () {\n\t clearInterval(_this.playedTime);\n\t if (_this.option.danmaku) {\n\t clearInterval(danmakuTime);\n\t }\n\t };\n\t\n\t pbar.addEventListener('click', function (event) {\n\t var e = event || window.event;\n\t barWidth = pbar.clientWidth;\n\t var percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth;\n\t percentage = percentage > 0 ? percentage : 0;\n\t percentage = percentage < 1 ? percentage : 1;\n\t _this.updateBar('played', percentage, 'width');\n\t _this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration;\n\t });\n\t\n\t var thumbMove = function thumbMove(event) {\n\t var e = event || window.event;\n\t var percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth;\n\t percentage = percentage > 0 ? percentage : 0;\n\t percentage = percentage < 1 ? percentage : 1;\n\t _this.updateBar('played', percentage, 'width');\n\t _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(percentage * _this.video.duration);\n\t };\n\t\n\t var thumbUp = function thumbUp() {\n\t document.removeEventListener('mouseup', thumbUp);\n\t document.removeEventListener('mousemove', thumbMove);\n\t _this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration;\n\t _this.setTime();\n\t };\n\t\n\t pbar.addEventListener('mousedown', function () {\n\t barWidth = pbar.clientWidth;\n\t _this.clearTime();\n\t document.addEventListener('mousemove', thumbMove);\n\t document.addEventListener('mouseup', thumbUp);\n\t });\n\t\n\t /**\n\t * control volume\n\t */\n\t bar.volumeBar = this.element.getElementsByClassName('dplayer-volume-bar-inner')[0];\n\t var volumeEle = this.element.getElementsByClassName('dplayer-volume')[0];\n\t var volumeBarWrapWrap = this.element.getElementsByClassName('dplayer-volume-bar-wrap')[0];\n\t var volumeBarWrap = this.element.getElementsByClassName('dplayer-volume-bar')[0];\n\t var volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n\t var vWidth = 35;\n\t\n\t this.switchVolumeIcon = function () {\n\t var volumeicon = _this.element.getElementsByClassName('dplayer-volume-icon')[0];\n\t if (_this.video.volume >= 0.8) {\n\t volumeicon.innerHTML = _this.getSVG('volume-up');\n\t } else if (_this.video.volume > 0) {\n\t volumeicon.innerHTML = _this.getSVG('volume-down');\n\t } else {\n\t volumeicon.innerHTML = _this.getSVG('volume-off');\n\t }\n\t };\n\t var volumeMove = function volumeMove(event) {\n\t var e = event || window.event;\n\t var percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n\t _this.volume(percentage);\n\t };\n\t var volumeUp = function volumeUp() {\n\t document.removeEventListener('mouseup', volumeUp);\n\t document.removeEventListener('mousemove', volumeMove);\n\t volumeEle.classList.remove('dplayer-volume-active');\n\t };\n\t\n\t volumeBarWrapWrap.addEventListener('click', function (event) {\n\t var e = event || window.event;\n\t var percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n\t _this.volume(percentage);\n\t });\n\t volumeBarWrapWrap.addEventListener('mousedown', function () {\n\t document.addEventListener('mousemove', volumeMove);\n\t document.addEventListener('mouseup', volumeUp);\n\t volumeEle.classList.add('dplayer-volume-active');\n\t });\n\t volumeicon.addEventListener('click', function () {\n\t if (_this.video.muted) {\n\t _this.video.muted = false;\n\t _this.switchVolumeIcon();\n\t _this.updateBar('volume', _this.video.volume, 'width');\n\t } else {\n\t _this.video.muted = true;\n\t volumeicon.innerHTML = _this.getSVG('volume-off');\n\t _this.updateBar('volume', 0, 'width');\n\t }\n\t });\n\t\n\t /**\n\t * auto hide controller\n\t */\n\t var hideTime = 0;\n\t if (!isMobile) {\n\t var hideController = function hideController() {\n\t _this.element.classList.remove('dplayer-hide-controller');\n\t clearTimeout(hideTime);\n\t hideTime = setTimeout(function () {\n\t if (_this.video.played.length) {\n\t _this.element.classList.add('dplayer-hide-controller');\n\t closeSetting();\n\t closeComment();\n\t }\n\t }, 2000);\n\t };\n\t this.element.addEventListener('mousemove', hideController);\n\t this.element.addEventListener('click', hideController);\n\t }\n\t\n\t /***\n\t * setting\n\t */\n\t var danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n\t var settingHTML = {\n\t 'original': \"\\n
\\n \" + getTran('Speed') + \"\\n
\" + this.getSVG('right') + (\"
\\n
\\n
\\n \" + getTran('Loop') + \"\\n
\\n \\n \\n
\\n
\\n
\\n \" + getTran('Danmaku') + \"\\n
\\n \\n \\n
\\n
\\n
\\n \" + getTran('Opacity for danmaku') + \"\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\"),\n\t 'speed': \"\\n
\\n 0.5\\n
\\n
\\n 0.75\\n
\\n
\\n \" + getTran('Normal') + \"\\n
\\n
\\n 1.25\\n
\\n
\\n 1.5\\n
\\n
\\n 2\\n
\"\n\t };\n\t\n\t // toggle setting box\n\t var settingIcon = this.element.getElementsByClassName('dplayer-setting-icon')[0];\n\t var settingBox = this.element.getElementsByClassName('dplayer-setting-box')[0];\n\t var mask = this.element.getElementsByClassName('dplayer-mask')[0];\n\t settingBox.innerHTML = settingHTML.original;\n\t\n\t var closeSetting = function closeSetting() {\n\t if (settingBox.classList.contains('dplayer-setting-box-open')) {\n\t settingBox.classList.remove('dplayer-setting-box-open');\n\t mask.classList.remove('dplayer-mask-show');\n\t setTimeout(function () {\n\t settingBox.classList.remove('dplayer-setting-box-narrow');\n\t settingBox.innerHTML = settingHTML.original;\n\t settingEvent();\n\t }, 300);\n\t }\n\t };\n\t var openSetting = function openSetting() {\n\t settingBox.classList.add('dplayer-setting-box-open');\n\t mask.classList.add('dplayer-mask-show');\n\t };\n\t\n\t mask.addEventListener('click', function () {\n\t closeSetting();\n\t });\n\t settingIcon.addEventListener('click', function () {\n\t openSetting();\n\t });\n\t\n\t var loop = this.option.loop;\n\t var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n\t var showdan = true;\n\t var settingEvent = function settingEvent() {\n\t // loop control\n\t var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n\t var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n\t\n\t loopToggle.checked = loop;\n\t\n\t loopEle.addEventListener('click', function () {\n\t loopToggle.checked = !loopToggle.checked;\n\t if (loopToggle.checked) {\n\t loop = true;\n\t _this.video.loop = loop;\n\t } else {\n\t loop = false;\n\t _this.video.loop = loop;\n\t }\n\t closeSetting();\n\t });\n\t\n\t // show danmaku control\n\t var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n\t var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n\t\n\t showDanToggle.checked = showdan;\n\t\n\t showDanEle.addEventListener('click', function () {\n\t showDanToggle.checked = !showDanToggle.checked;\n\t if (showDanToggle.checked) {\n\t showdan = true;\n\t if (_this.option.danmaku) {\n\t for (var _i3 = 0; _i3 < _this.dan.length; _i3++) {\n\t if (_this.dan[_i3].time >= _this.video.currentTime) {\n\t _this.danIndex = _i3;\n\t break;\n\t }\n\t _this.danIndex = _this.dan.length;\n\t }\n\t danmakuTime = setInterval(function () {\n\t var item = _this.dan[_this.danIndex];\n\t while (item && _this.video.currentTime >= parseFloat(item.time)) {\n\t danmakuIn(item.text, item.color, item.type);\n\t item = _this.dan[++_this.danIndex];\n\t }\n\t }, 0);\n\t }\n\t } else {\n\t showdan = false;\n\t if (_this.option.danmaku) {\n\t clearInterval(danmakuTime);\n\t danContainer.innerHTML = \"
\";\n\t _this.danTunnel = {\n\t right: {},\n\t top: {},\n\t bottom: {}\n\t };\n\t _this.itemDemo = _this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\t }\n\t }\n\t closeSetting();\n\t });\n\t\n\t // speed control\n\t var speedEle = _this.element.getElementsByClassName('dplayer-setting-speed')[0];\n\t speedEle.addEventListener('click', function () {\n\t settingBox.classList.add('dplayer-setting-box-narrow');\n\t settingBox.innerHTML = settingHTML.speed;\n\t\n\t var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n\t\n\t var _loop = function _loop(_i4) {\n\t speedItem[_i4].addEventListener('click', function () {\n\t _this.video.playbackRate = speedItem[_i4].dataset.speed;\n\t closeSetting();\n\t });\n\t };\n\t\n\t for (var _i4 = 0; _i4 < speedItem.length; _i4++) {\n\t _loop(_i4);\n\t }\n\t });\n\t\n\t if (_this.option.danmaku) {\n\t (function () {\n\t // danmaku opacity\n\t bar.danmakuBar = _this.element.getElementsByClassName('dplayer-danmaku-bar-inner')[0];\n\t var danmakuBarWrapWrap = _this.element.getElementsByClassName('dplayer-danmaku-bar-wrap')[0];\n\t var danmakuBarWrap = _this.element.getElementsByClassName('dplayer-danmaku-bar')[0];\n\t var danmakuSettingBox = _this.element.getElementsByClassName('dplayer-setting-danmaku')[0];\n\t var dWidth = 130;\n\t _this.updateBar('danmaku', danOpacity, 'width');\n\t\n\t var danmakuMove = function danmakuMove(event) {\n\t var e = event || window.event;\n\t var percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth;\n\t percentage = percentage > 0 ? percentage : 0;\n\t percentage = percentage < 1 ? percentage : 1;\n\t _this.updateBar('danmaku', percentage, 'width');\n\t var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n\t for (var _i5 = 0; _i5 < items.length; _i5++) {\n\t items[_i5].style.opacity = percentage;\n\t }\n\t danOpacity = percentage;\n\t localStorage.setItem('DPlayer-opacity', danOpacity);\n\t };\n\t var danmakuUp = function danmakuUp() {\n\t document.removeEventListener('mouseup', danmakuUp);\n\t document.removeEventListener('mousemove', danmakuMove);\n\t danmakuSettingBox.classList.remove('dplayer-setting-danmaku-active');\n\t };\n\t\n\t danmakuBarWrapWrap.addEventListener('click', function (event) {\n\t var e = event || window.event;\n\t var percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth;\n\t percentage = percentage > 0 ? percentage : 0;\n\t percentage = percentage < 1 ? percentage : 1;\n\t _this.updateBar('danmaku', percentage, 'width');\n\t var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n\t for (var _i6 = 0; _i6 < items.length; _i6++) {\n\t items[_i6].style.opacity = percentage;\n\t }\n\t danOpacity = percentage;\n\t localStorage.setItem('DPlayer-opacity', danOpacity);\n\t });\n\t danmakuBarWrapWrap.addEventListener('mousedown', function () {\n\t document.addEventListener('mousemove', danmakuMove);\n\t document.addEventListener('mouseup', danmakuUp);\n\t danmakuSettingBox.classList.add('dplayer-setting-danmaku-active');\n\t });\n\t })();\n\t }\n\t };\n\t settingEvent();\n\t\n\t /**\n\t * video events\n\t */\n\t // show video time: the metadata has loaded or changed\n\t this.video.addEventListener('durationchange', function () {\n\t if (_this.video.duration !== 1) {\n\t // compatibility: Android browsers will output 1 at first\n\t _this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = secondToTime(_this.video.duration);\n\t }\n\t });\n\t\n\t // show video loaded bar: to inform interested parties of progress downloading the media\n\t this.video.addEventListener('progress', function () {\n\t var percentage = _this.video.buffered.length ? _this.video.buffered.end(_this.video.buffered.length - 1) / _this.video.duration : 0;\n\t _this.updateBar('loaded', percentage, 'width');\n\t });\n\t\n\t // video download error: an error occurs\n\t this.video.addEventListener('error', function () {\n\t _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = \"Error happens ╥﹏╥\";\n\t _this.trigger('pause');\n\t });\n\t\n\t // video can play: enough data is available that the media can be played\n\t this.video.addEventListener('canplay', function () {\n\t _this.trigger('canplay');\n\t });\n\t\n\t // music end\n\t this.ended = false;\n\t this.video.addEventListener('ended', function () {\n\t _this.updateBar('played', 1, 'width');\n\t if (!loop) {\n\t _this.ended = true;\n\t _this.pause();\n\t _this.trigger('ended');\n\t }\n\t });\n\t\n\t // control volume\n\t this.video.volume = parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100;\n\t\n\t // loop\n\t this.video.loop = loop;\n\t\n\t // set duration time\n\t if (this.video.duration !== 1) {\n\t // compatibility: Android browsers will output 1 at first\n\t this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? secondToTime(this.video.duration) : '00:00';\n\t }\n\t\n\t /**\n\t * danmaku display\n\t */\n\t var itemHeight = arrow ? 24 : 30;\n\t var danWidth = void 0;\n\t var danHeight = void 0;\n\t var itemY = void 0;\n\t this.danTunnel = {\n\t right: {},\n\t top: {},\n\t bottom: {}\n\t };\n\t\n\t var danItemRight = function danItemRight(ele) {\n\t return danContainer.getBoundingClientRect().right - ele.getBoundingClientRect().right;\n\t };\n\t\n\t var danSpeed = function danSpeed(width) {\n\t return (danWidth + width) / 5;\n\t };\n\t\n\t var getTunnel = function getTunnel(ele, type, width) {\n\t var tmp = danWidth / danSpeed(width);\n\t\n\t var _loop2 = function _loop2(_i7) {\n\t var item = _this.danTunnel[type][_i7 + ''];\n\t if (item && item.length) {\n\t for (var j = 0; j < item.length; j++) {\n\t var danRight = danItemRight(item[j]) - 10;\n\t if (danRight <= danWidth - tmp * danSpeed(item[j].offsetWidth) || danRight <= 0) {\n\t break;\n\t }\n\t if (j === item.length - 1) {\n\t _this.danTunnel[type][_i7 + ''].push(ele);\n\t ele.addEventListener('animationend', function () {\n\t _this.danTunnel[type][_i7 + ''].splice(0, 1);\n\t });\n\t return {\n\t v: _i7 % itemY\n\t };\n\t }\n\t }\n\t } else {\n\t _this.danTunnel[type][_i7 + ''] = [ele];\n\t ele.addEventListener('animationend', function () {\n\t _this.danTunnel[type][_i7 + ''].splice(0, 1);\n\t });\n\t return {\n\t v: _i7 % itemY\n\t };\n\t }\n\t };\n\t\n\t for (var _i7 = 0;; _i7++) {\n\t var _ret4 = _loop2(_i7);\n\t\n\t if ((typeof _ret4 === \"undefined\" ? \"undefined\" : _typeof(_ret4)) === \"object\") return _ret4.v;\n\t }\n\t };\n\t\n\t this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\t\n\t var danmakuIn = function danmakuIn(text, color, type) {\n\t danWidth = danContainer.offsetWidth;\n\t danHeight = danContainer.offsetHeight;\n\t itemY = parseInt(danHeight / itemHeight);\n\t var item = document.createElement(\"div\");\n\t item.classList.add(\"dplayer-danmaku-item\");\n\t item.classList.add(\"dplayer-danmaku-\" + type);\n\t item.innerHTML = text;\n\t item.style.opacity = danOpacity;\n\t item.style.color = color;\n\t item.addEventListener('animationend', function () {\n\t danContainer.removeChild(item);\n\t });\n\t\n\t // measure\n\t _this.itemDemo.innerHTML = text;\n\t var itemWidth = _this.itemDemo.offsetWidth;\n\t\n\t // adjust\n\t switch (type) {\n\t case 'right':\n\t item.style.top = itemHeight * getTunnel(item, type, itemWidth) + 'px';\n\t item.style.width = itemWidth + 1 + 'px';\n\t item.style.transform = \"translateX(-\" + danWidth + \"px)\";\n\t break;\n\t case 'top':\n\t item.style.top = itemHeight * getTunnel(item, type) + 'px';\n\t break;\n\t case 'bottom':\n\t item.style.bottom = itemHeight * getTunnel(item, type) + 'px';\n\t break;\n\t default:\n\t console.error(\"Can't handled danmaku type: \" + type);\n\t }\n\t\n\t // insert\n\t danContainer.appendChild(item);\n\t\n\t // move\n\t item.classList.add(\"dplayer-danmaku-move\");\n\t\n\t return item;\n\t };\n\t\n\t // danmaku\n\t if (this.option.danmaku) {\n\t this.danIndex = 0;\n\t this.readDanmaku();\n\t } else {\n\t // autoplay\n\t if (this.option.autoplay && !isMobile) {\n\t this.play();\n\t } else if (isMobile) {\n\t this.pause();\n\t }\n\t }\n\t\n\t /**\n\t * comment\n\t */\n\t var commentInput = this.element.getElementsByClassName('dplayer-comment-input')[0];\n\t var commentIcon = this.element.getElementsByClassName('dplayer-comment-icon')[0];\n\t var commentBox = this.element.getElementsByClassName('dplayer-comment-box')[0];\n\t var commentSettingIcon = this.element.getElementsByClassName('dplayer-comment-setting-icon')[0];\n\t var commentSettingBox = this.element.getElementsByClassName('dplayer-comment-setting-box')[0];\n\t var commentSendIcon = this.element.getElementsByClassName('dplayer-send-icon')[0];\n\t\n\t var htmlEncode = function htmlEncode(str) {\n\t return str.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/\\//g, \"/\");\n\t };\n\t\n\t var sendComment = function sendComment() {\n\t commentInput.blur();\n\t\n\t // text can't be empty\n\t if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n\t alert(getTran('Please input danmaku!'));\n\t return;\n\t }\n\t\n\t var danmakuData = {\n\t token: _this.option.danmaku.token,\n\t player: _this.option.danmaku.id,\n\t author: 'DIYgod',\n\t time: _this.video.currentTime,\n\t text: commentInput.value,\n\t color: _this.element.querySelector('.dplayer-comment-setting-color input:checked').value,\n\t type: _this.element.querySelector('.dplayer-comment-setting-type input:checked').value\n\t };\n\t _this.option.apiBackend.send(_this.option.danmaku.api, danmakuData);\n\t\n\t commentInput.value = '';\n\t closeComment();\n\t _this.dan.splice(_this.danIndex, 0, danmakuData);\n\t _this.danIndex++;\n\t var item = danmakuIn(htmlEncode(danmakuData.text), danmakuData.color, danmakuData.type);\n\t item.style.border = \"2px solid \" + _this.option.theme;\n\t };\n\t\n\t var closeCommentSetting = function closeCommentSetting() {\n\t if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n\t commentSettingBox.classList.remove('dplayer-comment-setting-open');\n\t }\n\t };\n\t var toggleCommentSetting = function toggleCommentSetting() {\n\t if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n\t commentSettingBox.classList.remove('dplayer-comment-setting-open');\n\t } else {\n\t commentSettingBox.classList.add('dplayer-comment-setting-open');\n\t }\n\t };\n\t\n\t var disableHide = 0;\n\t var closeComment = function closeComment() {\n\t if (commentBox.classList.contains('dplayer-comment-box-open')) {\n\t commentBox.classList.remove('dplayer-comment-box-open');\n\t mask.classList.remove('dplayer-mask-show');\n\t clearInterval(disableHide);\n\t _this.element.classList.remove('dplayer-show-controller');\n\t closeCommentSetting();\n\t }\n\t };\n\t var openComment = function openComment() {\n\t commentBox.classList.add('dplayer-comment-box-open');\n\t mask.classList.add('dplayer-mask-show');\n\t disableHide = setInterval(function () {\n\t clearTimeout(hideTime);\n\t }, 1000);\n\t _this.element.classList.add('dplayer-show-controller');\n\t };\n\t\n\t mask.addEventListener('click', function () {\n\t closeComment();\n\t });\n\t commentIcon.addEventListener('click', function () {\n\t openComment();\n\t setTimeout(function () {\n\t commentInput.focus();\n\t }, 300);\n\t });\n\t commentSettingIcon.addEventListener('click', function () {\n\t toggleCommentSetting();\n\t });\n\t\n\t // comment setting box\n\t this.element.getElementsByClassName('dplayer-comment-setting-color')[0].addEventListener('click', function () {\n\t var sele = _this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked+span');\n\t if (sele) {\n\t commentSettingIcon.getElementsByClassName('dplayer-fill')[0].style.fill = _this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked').value;\n\t }\n\t });\n\t\n\t commentInput.addEventListener('click', function () {\n\t closeCommentSetting();\n\t });\n\t commentInput.addEventListener('keydown', function (e) {\n\t var event = e || window.event;\n\t if (event.keyCode === 13) {\n\t sendComment();\n\t }\n\t });\n\t\n\t commentSendIcon.addEventListener('click', sendComment);\n\t\n\t /**\n\t * full screen\n\t */\n\t var resetAnimation = function resetAnimation() {\n\t danWidth = danContainer.offsetWidth;\n\t var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n\t for (var _i8 = 0; _i8 < items.length; _i8++) {\n\t items[_i8].style.transform = \"translateX(-\" + danWidth + \"px)\";\n\t }\n\t };\n\t\n\t this.element.addEventListener('fullscreenchange', function () {\n\t resetAnimation();\n\t console.log(danContainer.offsetHeight);\n\t });\n\t this.element.addEventListener('mozfullscreenchange', function () {\n\t resetAnimation();\n\t console.log(danContainer.offsetHeight);\n\t });\n\t this.element.addEventListener('webkitfullscreenchange', function () {\n\t resetAnimation();\n\t console.log(danContainer.offsetHeight);\n\t });\n\t this.element.getElementsByClassName('dplayer-full-icon')[0].addEventListener('click', function () {\n\t if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n\t if (_this.element.requestFullscreen) {\n\t _this.element.requestFullscreen();\n\t } else if (_this.element.mozRequestFullScreen) {\n\t _this.element.mozRequestFullScreen();\n\t } else if (_this.element.webkitRequestFullscreen) {\n\t _this.element.webkitRequestFullscreen();\n\t }\n\t } else {\n\t if (document.cancelFullScreen) {\n\t document.cancelFullScreen();\n\t } else if (document.mozCancelFullScreen) {\n\t document.mozCancelFullScreen();\n\t } else if (document.webkitCancelFullScreen) {\n\t document.webkitCancelFullScreen();\n\t }\n\t }\n\t resetAnimation();\n\t });\n\t\n\t /**\n\t * hot key\n\t */\n\t var handleKeyDown = function handleKeyDown(e) {\n\t var tag = document.activeElement.tagName.toUpperCase();\n\t var editable = document.activeElement.getAttribute('contenteditable');\n\t if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n\t var event = e || window.event;\n\t var percentage = void 0;\n\t switch (event.keyCode) {\n\t case 32:\n\t event.preventDefault();\n\t _this.toggle();\n\t break;\n\t case 37:\n\t event.preventDefault();\n\t _this.video.currentTime = _this.video.currentTime - 5;\n\t break;\n\t case 39:\n\t event.preventDefault();\n\t _this.video.currentTime = _this.video.currentTime + 5;\n\t break;\n\t case 38:\n\t event.preventDefault();\n\t percentage = _this.video.volume + 0.1;\n\t _this.volume(percentage);\n\t break;\n\t case 40:\n\t event.preventDefault();\n\t percentage = _this.video.volume - 0.1;\n\t _this.volume(percentage);\n\t break;\n\t }\n\t }\n\t };\n\t if (this.option.hotkey) {\n\t document.addEventListener('keydown', handleKeyDown);\n\t }\n\t\n\t /**\n\t * right key\n\t */\n\t var menu = this.element.getElementsByClassName('dplayer-menu')[0];\n\t this.element.addEventListener('contextmenu', function (e) {\n\t var event = e || window.event;\n\t event.preventDefault();\n\t menu.style.left = event.clientX - _this.element.getBoundingClientRect().left + 'px';\n\t menu.style.top = event.clientY - _this.element.getBoundingClientRect().top + 'px';\n\t menu.classList.add('dplayer-menu-show');\n\t\n\t mask.classList.add('dplayer-mask-show');\n\t mask.addEventListener('click', function () {\n\t mask.classList.remove('dplayer-mask-show');\n\t menu.classList.remove('dplayer-menu-show');\n\t });\n\t });\n\t\n\t /**\n\t * Screenshot\n\t */\n\t if (this.option.screenshot) {\n\t (function () {\n\t var camareIcon = _this.element.getElementsByClassName('dplayer-camera-icon')[0];\n\t camareIcon.addEventListener('click', function () {\n\t var canvas = document.createElement(\"canvas\");\n\t canvas.width = _this.video.videoWidth;\n\t canvas.height = _this.video.videoHeight;\n\t canvas.getContext('2d').drawImage(_this.video, 0, 0, canvas.width, canvas.height);\n\t\n\t camareIcon.href = canvas.toDataURL();\n\t camareIcon.download = \"DPlayer.png\";\n\t });\n\t })();\n\t }\n\t\n\t index++;\n\t }\n\t\n\t /**\n\t * Play music\n\t */\n\t\n\t\n\t _createClass(DPlayer, [{\n\t key: \"play\",\n\t value: function play(time) {\n\t if (Object.prototype.toString.call(time) === '[object Number]') {\n\t this.video.currentTime = time;\n\t }\n\t if (this.video.paused) {\n\t this.shouldpause = false;\n\t\n\t this.bezel.innerHTML = this.getSVG('play');\n\t this.bezel.classList.add('dplayer-bezel-transition');\n\t\n\t this.playButton.innerHTML = this.getSVG('pause');\n\t\n\t this.video.play();\n\t if (this.playedTime) {\n\t this.clearTime();\n\t }\n\t this.setTime();\n\t this.element.classList.add('dplayer-playing');\n\t this.trigger('play');\n\t }\n\t }\n\t\n\t /**\n\t * Pause music\n\t */\n\t\n\t }, {\n\t key: \"pause\",\n\t value: function pause() {\n\t if (!this.shouldpause || this.ended) {\n\t this.shouldpause = true;\n\t this.element.classList.remove('dplayer-loading');\n\t\n\t this.bezel.innerHTML = this.getSVG('pause');\n\t this.bezel.classList.add('dplayer-bezel-transition');\n\t\n\t this.ended = false;\n\t this.playButton.innerHTML = this.getSVG('play');\n\t this.video.pause();\n\t this.clearTime();\n\t this.element.classList.remove('dplayer-playing');\n\t this.trigger('pause');\n\t }\n\t }\n\t\n\t /**\n\t * Set volume\n\t */\n\t\n\t }, {\n\t key: \"volume\",\n\t value: function volume(percentage) {\n\t percentage = percentage > 0 ? percentage : 0;\n\t percentage = percentage < 1 ? percentage : 1;\n\t this.updateBar('volume', percentage, 'width');\n\t this.video.volume = percentage;\n\t if (this.video.muted) {\n\t this.video.muted = false;\n\t }\n\t this.switchVolumeIcon();\n\t }\n\t\n\t /**\n\t * Toggle between play and pause\n\t */\n\t\n\t }, {\n\t key: \"toggle\",\n\t value: function toggle() {\n\t if (this.video.paused) {\n\t this.play();\n\t } else {\n\t this.pause();\n\t }\n\t }\n\t\n\t /**\n\t * attach event\n\t */\n\t\n\t }, {\n\t key: \"on\",\n\t value: function on(name, func) {\n\t if (typeof func === 'function') {\n\t this.event[name].push(func);\n\t }\n\t }\n\t\n\t /**\n\t * Asynchronously read danmaku from all API endpoints\n\t */\n\t\n\t }, {\n\t key: \"_readAllEndpoints\",\n\t value: function _readAllEndpoints(endpoints, finish) {\n\t var results = [];\n\t var readCount = 0;\n\t var cbk = function cbk(i) {\n\t return function (err, data) {\n\t ++readCount;\n\t if (err) {\n\t if (err.response) alert(err.response.msg);else console.log('Request was unsuccessful: ' + err.status);\n\t results[i] = [];\n\t } else {\n\t results[i] = data;\n\t }\n\t if (readCount == endpoints.length) {\n\t return finish(results);\n\t }\n\t };\n\t };\n\t\n\t for (var i = 0; i < endpoints.length; ++i) {\n\t this.option.apiBackend.read(endpoints[i], cbk(i));\n\t }\n\t }\n\t\n\t /**\n\t * Read danmaku from API\n\t */\n\t\n\t }, {\n\t key: \"readDanmaku\",\n\t value: function readDanmaku() {\n\t var _this2 = this;\n\t\n\t var isMobile = /mobile/i.test(window.navigator.userAgent);\n\t var apiurl = void 0;\n\t if (this.option.danmaku.maximum) {\n\t apiurl = this.option.danmaku.api + \"?id=\" + this.option.danmaku.id + \"&max=\" + this.option.danmaku.maximum;\n\t } else {\n\t apiurl = this.option.danmaku.api + \"?id=\" + this.option.danmaku.id;\n\t }\n\t var endpoints = (this.option.danmaku.addition || []).slice(0);\n\t endpoints.push(apiurl);\n\t\n\t this._readAllEndpoints(endpoints, function (results) {\n\t _this2.danIndex = 0;\n\t _this2.dan = [].concat.apply([], results).sort(function (a, b) {\n\t return a.time - b.time;\n\t });\n\t _this2.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n\t\n\t // autoplay\n\t if (_this2.option.autoplay && !isMobile) {\n\t _this2.play();\n\t } else if (isMobile) {\n\t _this2.pause();\n\t }\n\t });\n\t }\n\t\n\t /**\n\t * Switch to a new video\n\t *\n\t * @param {Object} video - new video info\n\t * @param {Object} danmaku - new danmaku info\n\t */\n\t\n\t }, {\n\t key: \"switchVideo\",\n\t value: function switchVideo(video, danmaku) {\n\t this.video.src = video.url;\n\t this.video.poster = video.pic ? video.pic : '';\n\t this.video.currentTime = 0;\n\t this.pause();\n\t if (danmaku) {\n\t this.dan = [];\n\t this.danIndex = 0;\n\t this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'block';\n\t this.updateBar('played', 0, 'width');\n\t this.updateBar('loaded', 0, 'width');\n\t this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = '00:00';\n\t this.element.getElementsByClassName('dplayer-danmaku')[0].innerHTML = \"
\";\n\t this.danTunnel = {\n\t right: {},\n\t top: {},\n\t bottom: {}\n\t };\n\t this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\t this.option.danmaku = danmaku;\n\t this.readDanmaku();\n\t }\n\t }\n\t }]);\n\t\n\t return DPlayer;\n\t}();\n\t\n\tmodule.exports = DPlayer;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// style-loader: Adds some css to the DOM by adding a