diff --git a/.eslintrc b/.eslintrc index bf0396a4b..160be46dd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,6 @@ "no-implicit-globals": 1, "no-labels": 1, "no-multi-str": 1, - "no-unused-expressions": 1, "comma-spacing": 1, "comma-style": 1, "func-call-spacing": 1, diff --git a/demo/index.html b/demo/index.html index c5794e059..5e05bae02 100644 --- a/demo/index.html +++ b/demo/index.html @@ -46,7 +46,6 @@ -

DPlayer

Wow, such a lovely HTML5 danmaku video player

@@ -61,6 +60,8 @@

Live Video (HTTP Live Streaming, M3U8 format) support

FLV format support

+

Segmented videos

+
@@ -180,6 +181,28 @@

FLV format support

} }); + // Segmented videos + var dp5 = new DPlayer({ + element: document.getElementById('dplayer5'), + autoplay: false, + theme: '#FADFA3', + loop: true, + screenshot: true, + hotkey: true, + preload: 'metadata', + video: { + url: ['http://devtest.qiniudn.com/若能绽放光芒0.mp4', 'http://devtest.qiniudn.com/若能绽放光芒1.mp4', 'http://devtest.qiniudn.com/若能绽放光芒2.mp4', 'http://devtest.qiniudn.com/若能绽放光芒3.mp4', 'http://devtest.qiniudn.com/若能绽放光芒4.mp4', 'http://devtest.qiniudn.com/若能绽放光芒5.mp4', 'http://devtest.qiniudn.com/若能绽放光芒6.mp4', 'http://devtest.qiniudn.com/若能绽放光芒7.mp4', 'http://devtest.qiniudn.com/若能绽放光芒8.mp4'], + pic: 'http://devtest.qiniudn.com/若能绽放光芒.png', + type: 'normal', + }, + danmaku: { + id: '9E2E3368B56CDBB40', + api: 'https://api.prprpr.me/dplayer/', + token: 'tokendemo', + maximum: 3000 + } + }); + // stats.js: JavaScript Performance Monitor var stats = new Stats(); stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom @@ -193,5 +216,6 @@

FLV format support

} requestAnimationFrame(animate); + \ No newline at end of file diff --git a/dist/DPlayer.min.css b/dist/DPlayer.min.css index b47fa6b72..33e3c9f18 100644 --- a/dist/DPlayer.min.css +++ b/dist/DPlayer.min.css @@ -1,2 +1,2 @@ -.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;position:fixed;z-index:100000;left:0;top:0}.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-comment,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-danmaku,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-showdan,.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%);transform:translateY(100%)}.dplayer.dplayer-show-controller .dplayer-controller,.dplayer.dplayer-show-controller .dplayer-controller-mask{opacity:1}.dplayer.dplayer-fulled{position:fixed;z-index:100000;left:0;top:0;width:100%;height:100%}.dplayer.dplayer-mobile .dplayer-camera-icon,.dplayer.dplayer-mobile .dplayer-volume{display:none!important}.dplayer.dplayer-mobile .dplayer-full-in-icon{position:static!important;display:inline-block!important}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-input{width:200px}.dplayer.dplayer-mobile .dplayer-comment-setting-title{display:none}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box{left:17px}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-icon{width:40px}.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;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%);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);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;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:calc(100% - 40px);height:3px}.dplayer .dplayer-controller .dplayer-bar-wrap:hover .dplayer-thumb{-webkit-transform:scale(1)!important;transform:scale(1)!important}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar-time{position:absolute;left:0;top:-20px;width:30px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;-webkit-transition:left opacity .1s ease-in-out;transition:left opacity .1s ease-in-out}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden{opacity:0}.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;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-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;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;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;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-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);transform:translateX(170px);width:150px;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);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;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-full{display:inline-block;height:100%;position:relative}.dplayer .dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon{display:block}.dplayer .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:absolute;top:-30px;z-index:1;display:none}.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);transform:translateX(382px);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);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);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);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);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{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{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;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;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;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;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;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)}} +.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;position:fixed;z-index:100000;left:0;top:0}.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-comment,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-danmaku,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-showdan,.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%);transform:translateY(100%)}.dplayer.dplayer-show-controller .dplayer-controller,.dplayer.dplayer-show-controller .dplayer-controller-mask{opacity:1}.dplayer.dplayer-fulled{position:fixed;z-index:100000;left:0;top:0;width:100%;height:100%}.dplayer.dplayer-mobile .dplayer-camera-icon,.dplayer.dplayer-mobile .dplayer-volume{display:none!important}.dplayer.dplayer-mobile .dplayer-full-in-icon{position:static!important;display:inline-block!important}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-input{width:200px}.dplayer.dplayer-mobile .dplayer-comment-setting-title{display:none}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-comment .dplayer-comment-box .dplayer-comment-setting-box{left:17px}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-icon{width:40px}.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%;display:none}.dplayer .dplayer-video-wrap .dplayer-video-current{display:block}.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;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%);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);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;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:calc(100% - 40px);height:3px}.dplayer .dplayer-controller .dplayer-bar-wrap:hover .dplayer-thumb{-webkit-transform:scale(1)!important;transform:scale(1)!important}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar-time{position:absolute;left:0;top:-20px;width:30px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;-webkit-transition:left opacity .1s ease-in-out;transition:left opacity .1s ease-in-out}.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden{opacity:0}.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;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-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;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;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;border-radius:50%;cursor:pointer!important;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-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);transform:translateX(170px);width:150px;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);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;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-full{display:inline-block;height:100%;position:relative}.dplayer .dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon{display:block}.dplayer .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:absolute;top:-30px;z-index:1;display:none}.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);transform:translateX(382px);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);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);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);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);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{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{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;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;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;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;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;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)}} /*# sourceMappingURL=DPlayer.min.css.map*/ \ No newline at end of file diff --git a/dist/DPlayer.min.js b/dist/DPlayer.min.js index aaa2f470a..08e1f792b 100644 --- a/dist/DPlayer.min.js +++ b/dist/DPlayer.min.js @@ -1,2 +1,2 @@ -(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DPlayer",[],t):"object"==typeof exports?exports.DPlayer=t():e.DPlayer=t()})(this,function(){return function(e){function t(a){if(n[a])return n[a].exports;var s=n[a]={i:a,l:!1,exports:{}};return e[a].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";var a={play:["0 0 16 32","M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"],pause:["0 0 17 32","M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"],"volume-up":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.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"],"volume-down":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"],"volume-off":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"],loop:["0 0 32 32","M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z"],full:["0 0 32 33","M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z"],"full-in":["0 0 32 33","M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z"],setting:["0 0 32 28","M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z"],right:["0 0 32 32","M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"],comment:["0 0 32 32","M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z"],"comment-off":["0 0 32 32","M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z"],send:["0 0 32 32","M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z"],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"],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"]};e.exports=function(e){return'\n \n \n \n \n'}},function(e,t,n){"use strict";var a=n(0);e.exports={main:function(e,t,n){return'\n
\n
\n \n
\n
\n
\n
\n \n '+(e.danmaku?''+n("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 '+(e.screenshot?'\n \n '+a("camera")+"\n \n ":"")+'\n
\n \n
\n \n
\n
\n
'+n("Set danmaku color")+'
\n \n \n \n \n \n \n
\n
\n
'+n("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
\n
\n
\n
'+n("About author")+'
\n
'+n("DPlayer feedback")+'
\n
'+n("About DPlayer")+"
\n
\n "},setting:function(e){return{original:'\n
\n '+e("Speed")+'\n
\n '+a("right")+'\n
\n
\n
\n '+e("Loop")+'\n
\n \n \n
\n
\n
\n '+e("Danmaku")+'\n
\n \n \n
\n
\n
\n '+e("Opacity for danmaku")+'\n
\n
\n
\n \n
\n
\n
\n
',speed:'\n
\n 0.5\n
\n
\n 0.75\n
\n
\n '+e("Normal")+'\n
\n
\n 1.25\n
\n
\n 1.5\n
\n
\n 2\n
'}}}},function(e,t,n){"use strict";var a={"Danmaku is loading":"弹幕加载中",Top:"顶部",Bottom:"底部",Rolling:"滚动","Input danmaku, hit Enter":"输入弹幕,回车发送","About author":"关于作者","DPlayer feedback":"播放器意见反馈","About DPlayer":"关于 DPlayer 播放器",Loop:"洗脑循环",Speed:"速度","Opacity for danmaku":"弹幕透明度",Normal:"正常","Please input danmaku!":"要输入弹幕内容啊喂!","Set danmaku color":"设置弹幕颜色","Set danmaku type":"设置弹幕类型",Danmaku:"弹幕"};e.exports=function(e){var t=this;this.lang=e,this.tran=function(e){return"en"===t.lang?e:"zh"===t.lang?a[e]:void 0}}},function(e,t,n){"use strict";var a=n(6);e.exports=function(e){/mobile/i.test(window.navigator.userAgent)&&(e.autoplay=!1);var t={element:document.getElementsByClassName("dplayer")[0],autoplay:!1,theme:"#b7daff",loop:!1,lang:-1!==navigator.language.indexOf("zh")?"zh":"en",screenshot:!1,hotkey:!0,preload:"auto",apiBackend:a};for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n]);return e.video&&!e.video.hasOwnProperty("type")&&(e.video.type="auto"),e.danmaku&&!e.danmaku.hasOwnProperty("user")&&(e.danmaku.user="DIYgod"),e}},function(e,t){},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(){function e(e,t){for(var n=0;n0?t:0,t=t<1?t:1,E[e+"Bar"].style[n]=100*t+"%"};var l=["play","pause","canplay","playing","ended","error"];this.event={};for(var m=0;m=n.video.currentTime)return void(n.danIndex=e);n.danIndex=n.dan.length}});var B=0,T=0,C=!1,M=void 0;this.setTime=function(){n.playedTime=setInterval(function(){T=n.video.currentTime,!C&&TB+.01&&!n.video.paused&&(n.element.classList.remove("dplayer-loading"),C=!1),B=T,n.updateBar("played",n.video.currentTime/n.video.duration,"width"),n.element.getElementsByClassName("dplayer-ptime")[0].innerHTML=k(n.video.currentTime),n.trigger("playing")},100),n.option.danmaku&&V&&(M=setInterval(function(){if(n.dan)for(var e=n.dan[n.danIndex];e&&n.video.currentTime>parseFloat(e.time);)n.pushDanmaku(e.text,e.color,e.type),e=n.dan[++n.danIndex]},100))},this.clearTime=function(){clearInterval(n.playedTime),n.option.danmaku&&clearInterval(M)},L.addEventListener("click",function(e){var t=e||window.event;x=L.clientWidth;var a=(t.clientX-b(L))/x;a=a>0?a:0,a=a<1?a:1,n.updateBar("played",a,"width"),n.video.currentTime=parseFloat(E.playedBar.style.width)/100*n.video.duration}),this.isTipsShow=!1,this.timeTipsHandler=this.timeTipsHandler(L,w,k).bind(this),L.addEventListener("mousemove",this.timeTipsHandler),L.addEventListener("mouseover",this.timeTipsHandler),L.addEventListener("mouseenter",this.timeTipsHandler),L.addEventListener("mouseout",this.timeTipsHandler),L.addEventListener("mouseleave",this.timeTipsHandler);var N=function(e){var t=e||window.event,a=(t.clientX-b(L))/x;a=a>0?a:0,a=a<1?a:1,n.updateBar("played",a,"width"),n.element.getElementsByClassName("dplayer-ptime")[0].innerHTML=k(a*n.video.duration)},z=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",N),n.video.currentTime=parseFloat(E.playedBar.style.width)/100*n.video.duration,n.setTime()};L.addEventListener("mousedown",function(){x=L.clientWidth,n.clearTime(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",z)}),E.volumeBar=this.element.getElementsByClassName("dplayer-volume-bar-inner")[0];var q=this.element.getElementsByClassName("dplayer-volume")[0],D=this.element.getElementsByClassName("dplayer-volume-bar-wrap")[0],S=this.element.getElementsByClassName("dplayer-volume-bar")[0],I=this.element.getElementsByClassName("dplayer-volume-icon")[0];this.switchVolumeIcon=function(){var e=n.element.getElementsByClassName("dplayer-volume-icon")[0];n.video.volume>=.8?e.innerHTML=i("volume-up"):n.video.volume>0?e.innerHTML=i("volume-down"):e.innerHTML=i("volume-off")};var H=function(e){var t=e||window.event,a=(t.clientX-b(S)-5.5)/35;n.volume(a)},P=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",H),q.classList.remove("dplayer-volume-active")};D.addEventListener("click",function(e){var t=e||window.event,a=(t.clientX-b(S)-5.5)/35;n.volume(a)}),D.addEventListener("mousedown",function(){document.addEventListener("mousemove",H),document.addEventListener("mouseup",P),q.classList.add("dplayer-volume-active")}),I.addEventListener("click",function(){n.video.muted?(n.video.muted=!1,n.switchVolumeIcon(),n.updateBar("volume",n.video.volume,"width")):(n.video.muted=!0,I.innerHTML=i("volume-off"),n.updateBar("volume",0,"width"))});var F=0;if(!c){var O=function(){n.element.classList.remove("dplayer-hide-controller"),clearTimeout(F),F=setTimeout(function(){n.video.played.length&&(n.element.classList.add("dplayer-hide-controller"),W(),de())},2e3)};this.element.addEventListener("mousemove",O),this.element.addEventListener("click",O)}this.danOpacity=localStorage.getItem("DPlayer-opacity")||.7;var R=r.setting(s),A=this.element.getElementsByClassName("dplayer-setting-icon")[0],X=this.element.getElementsByClassName("dplayer-setting-box")[0],j=this.element.getElementsByClassName("dplayer-mask")[0];X.innerHTML=R.original;var W=function(){X.classList.contains("dplayer-setting-box-open")&&(X.classList.remove("dplayer-setting-box-open"),j.classList.remove("dplayer-mask-show"),setTimeout(function(){X.classList.remove("dplayer-setting-box-narrow"),X.innerHTML=R.original,U()},300))},_=function(){X.classList.add("dplayer-setting-box-open"),j.classList.add("dplayer-mask-show")};j.addEventListener("click",function(){W()}),A.addEventListener("click",function(){_()});var Y=this.option.loop,$=this.element.getElementsByClassName("dplayer-danmaku")[0],V=!0,U=function(){var e=n.element.getElementsByClassName("dplayer-setting-loop")[0],t=e.getElementsByClassName("dplayer-toggle-setting-input")[0];t.checked=Y,e.addEventListener("click",function(){t.checked=!t.checked,t.checked?(Y=!0,n.video.loop=Y):(Y=!1,n.video.loop=Y),W()});var a=n.element.getElementsByClassName("dplayer-setting-showdan")[0],s=a.getElementsByClassName("dplayer-showdan-setting-input")[0];if(s.checked=V,a.addEventListener("click",function(){if(s.checked=!s.checked,s.checked){if(V=!0,n.option.danmaku){for(var e=0;e=n.video.currentTime){n.danIndex=e;break}n.danIndex=n.dan.length}M=setInterval(function(){for(var e=n.dan[n.danIndex];e&&n.video.currentTime>=parseFloat(e.time);)n.pushDanmaku(e.text,e.color,e.type),e=n.dan[++n.danIndex]},0)}}else V=!1,n.option.danmaku&&(clearInterval(M),$.innerHTML='
',n.danTunnel={right:{},top:{},bottom:{}},n.itemDemo=n.element.getElementsByClassName("dplayer-danmaku-item")[0]);W()}),n.element.getElementsByClassName("dplayer-setting-speed")[0].addEventListener("click",function(){X.classList.add("dplayer-setting-box-narrow"),X.innerHTML=R.speed;for(var e=X.getElementsByClassName("dplayer-setting-speed-item"),t=0;t0?a:0,a=a<1?a:1,n.updateBar("danmaku",a,"width");for(var s=n.element.getElementsByClassName("dplayer-danmaku-item"),l=0;l0?a:0,a=a<1?a:1,n.updateBar("danmaku",a,"width");for(var s=n.element.getElementsByClassName("dplayer-danmaku-item"),l=0;l/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},ne=function(){if(J.blur(),!J.value.replace(/^\s+|\s+$/g,""))return void alert(s("Please input danmaku!"));var e={token:n.option.danmaku.token,player:n.option.danmaku.id,author:n.option.danmaku.user,time:n.video.currentTime,text:J.value,color:n.element.querySelector(".dplayer-comment-setting-color input:checked").value,type:n.element.querySelector(".dplayer-comment-setting-type input:checked").value};n.option.apiBackend.send(n.option.danmaku.api,e),J.value="",de(),n.dan.splice(n.danIndex,0,e),n.danIndex++,n.pushDanmaku(te(e.text),e.color,e.type).style.border="2px solid "+n.option.theme},ae=function(){Z.classList.contains("dplayer-comment-setting-open")&&Z.classList.remove("dplayer-comment-setting-open")},se=function(){Z.classList.contains("dplayer-comment-setting-open")?Z.classList.remove("dplayer-comment-setting-open"):Z.classList.add("dplayer-comment-setting-open")},le=0,ie=0,de=function(){K.classList.contains("dplayer-comment-box-open")&&(K.classList.remove("dplayer-comment-box-open"),j.classList.remove("dplayer-mask-show"),n.element.classList.remove("dplayer-show-controller"),clearInterval(le),clearTimeout(ie),ae())},oe=function(){K.classList.contains("dplayer-comment-box-open")||(K.classList.add("dplayer-comment-box-open"),j.classList.add("dplayer-mask-show"),n.element.classList.add("dplayer-show-controller"),le=setInterval(function(){clearTimeout(F)},1e3),ie=setTimeout(function(){J.focus()},300))};j.addEventListener("click",function(){de()}),G.addEventListener("click",function(){oe()}),Q.addEventListener("click",function(){se()}),this.element.getElementsByClassName("dplayer-comment-setting-color")[0].addEventListener("click",function(){n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked+span')&&(Q.getElementsByClassName("dplayer-fill")[0].style.fill=n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked').value)}),J.addEventListener("click",function(){ae()}),J.addEventListener("keydown",function(e){13===(e||window.event).keyCode&&ne()}),ee.addEventListener("click",ne);var re=function(){for(var e=$.offsetWidth,t=n.element.getElementsByClassName("dplayer-danmaku-item"),a=0;a=a.width?(pe.style.right=a.width-s+"px",pe.style.left="initial"):(pe.style.left=t.clientX-n.element.getBoundingClientRect().left+"px",pe.style.right="initial"),l+pe.offsetHeight>=a.height?(pe.style.bottom=a.height-l+"px",pe.style.top="initial"):(pe.style.top=t.clientY-n.element.getBoundingClientRect().top+"px",pe.style.bottom="initial"),j.classList.add("dplayer-mask-show"),j.addEventListener("click",function(){j.classList.remove("dplayer-mask-show"),pe.classList.remove("dplayer-menu-show")})}),this.option.screenshot){var me=this.element.getElementsByClassName("dplayer-camera-icon")[0];me.addEventListener("click",function(){var e=document.createElement("canvas");e.width=n.video.videoWidth,e.height=n.video.videoHeight,e.getContext("2d").drawImage(n.video,0,0,e.width,e.height),me.href=e.toDataURL(),me.download="DPlayer.png"})}p++}return l(e,[{key:"play",value:function(e){"[object Number]"===Object.prototype.toString.call(e)&&(this.video.currentTime=e),this.paused=!1,this.video.paused&&(this.bezel.innerHTML=i("play"),this.bezel.classList.add("dplayer-bezel-transition")),this.playButton.innerHTML=i("pause"),this.video.play(),this.playedTime&&this.clearTime(),this.setTime(),this.element.classList.add("dplayer-playing"),this.trigger("play")}},{key:"pause",value:function(){this.paused=!0,this.element.classList.remove("dplayer-loading"),this.video.paused||(this.bezel.innerHTML=i("pause"),this.bezel.classList.add("dplayer-bezel-transition")),this.ended=!1,this.playButton.innerHTML=i("play"),this.video.pause(),this.clearTime(),this.element.classList.remove("dplayer-playing"),this.trigger("pause")}},{key:"volume",value:function(e){e=e>0?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 n=[],a=0,s=0;s',this.danTunnel={right:{},top:{},bottom:{}},this.itemDemo=this.element.getElementsByClassName("dplayer-danmaku-item")[0],this.option.danmaku=t,this.readDanmaku())}},{key:"timeTipsHandler",value:function(e,t,n){var a=this,s=function(e){var t=0,n=0;do{t+=e.offsetTop||0,n+=e.offsetLeft||0,e=e.offsetParent}while(e);return{top:t,left:n}};return function(l){if(a.video.duration){var i=l.clientX,d=s(e).left,o=i-d;switch(t.innerText=n(a.video.duration*(o/e.offsetWidth)),t.style.left=o-20+"px",l.type){case"mouseenter":case"mouseover":case"mousemove":if(a.isTipsShow)return;t.classList.remove("hidden"),a.isTipsShow=!0;break;case"mouseleave":case"mouseout":if(!a.isTipsShow)return;t.classList.add("hidden"),a.isTipsShow=!1}}}}}]),e}();e.exports=m},function(e,t,n){"use strict";var a=function(e,t,n,a,s){var l=new XMLHttpRequest;l.onreadystatechange=function(){if(4===l.readyState){if(l.status>=200&&l.status<300||304===l.status){var e=JSON.parse(l.responseText);return 1!==e.code?a(l,e):n(l,e)}s(l)}},l.open(null!==t?"POST":"GET",e,!0),l.send(null!==t?JSON.stringify(t):null)};e.exports={send:function(e,t){a(e,t,function(e,t){console.log("Post danmaku: ",t)},function(e,t){alert(t.msg)},function(e){console.log("Request was unsuccessful: "+e.status)})},read:function(e,t){a(e,null,function(e,n){t(null,n.danmaku)},function(e,n){t({status:e.status,response:n})},function(e){t({status:e.status,response:null})})}}}])}); +(function(e,t){"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(a){if(n[a])return n[a].exports;var i=n[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,n){"use strict";var a={play:["0 0 16 32","M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"],pause:["0 0 17 32","M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"],"volume-up":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.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"],"volume-down":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"],"volume-off":["0 0 21 32","M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"],loop:["0 0 32 32","M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z"],full:["0 0 32 33","M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z"],"full-in":["0 0 32 33","M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z"],setting:["0 0 32 28","M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z"],right:["0 0 32 32","M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"],comment:["0 0 32 32","M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z"],"comment-off":["0 0 32 32","M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z"],send:["0 0 32 32","M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z"],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"],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"]};e.exports=function(e){return'\n \n \n \n \n'}},function(e,t,n){"use strict";var a=n(0);e.exports={main:function(e,t,n){for(var i="",s=0;s';return'\n
\n
\n '+i+'\n
\n
\n
\n
\n \n '+(e.danmaku?''+n("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 '+(e.screenshot?'\n \n '+a("camera")+"\n \n ":"")+'\n
\n \n
\n \n
\n
\n
'+n("Set danmaku color")+'
\n \n \n \n \n \n \n
\n
\n
'+n("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
\n
\n "},setting:function(e){return{original:'\n
\n '+e("Speed")+'\n
\n '+a("right")+'\n
\n
\n
\n '+e("Loop")+'\n
\n \n \n
\n
\n
\n '+e("Danmaku")+'\n
\n \n \n
\n
\n
\n '+e("Opacity for danmaku")+'\n
\n
\n
\n \n
\n
\n
\n
',speed:'\n
\n 0.5\n
\n
\n 0.75\n
\n
\n '+e("Normal")+'\n
\n
\n 1.25\n
\n
\n 1.5\n
\n
\n 2\n
'}}}},function(e,t,n){"use strict";var a={"Danmaku is loading":"弹幕加载中",Top:"顶部",Bottom:"底部",Rolling:"滚动","Input danmaku, hit Enter":"输入弹幕,回车发送","About author":"关于作者","DPlayer feedback":"播放器意见反馈","About DPlayer":"关于 DPlayer 播放器",Loop:"洗脑循环",Speed:"速度","Opacity for danmaku":"弹幕透明度",Normal:"正常","Please input danmaku!":"要输入弹幕内容啊喂!","Set danmaku color":"设置弹幕颜色","Set danmaku type":"设置弹幕类型",Danmaku:"弹幕"};e.exports=function(e){var t=this;this.lang=e,this.tran=function(e){return"en"===t.lang?e:"zh"===t.lang?a[e]:void 0}}},function(e,t,n){"use strict";var a=n(8);e.exports=function(e){/mobile/i.test(window.navigator.userAgent)&&(e.autoplay=!1);var t={element:document.getElementsByClassName("dplayer")[0],autoplay:!1,theme:"#b7daff",loop:!1,lang:-1!==navigator.language.indexOf("zh")?"zh":"en",screenshot:!1,hotkey:!0,preload:"auto",apiBackend:a};for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n]);return"[object Array]"!==Object.prototype.toString.call(e.video.url)&&(e.video.url=[e.video.url]),e.video&&!e.video.hasOwnProperty("type")&&(e.video.type="auto"),e.danmaku&&!e.danmaku.hasOwnProperty("user")&&(e.danmaku.user="DIYgod"),e}},function(e,t,n){"use strict";e.exports={secondToTime:function(e){var t=function(e){return e<10?"0"+e:""+e},n=parseInt(e/60),a=parseInt(e-60*n);return t(n)+":"+t(a)},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,a=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==(void 0).element;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-a}}},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n1,this.index=0,this.current=this.videos[this.index],this.duration=0,this.durationArr=[],this.eventAll=[],this.eventCurrent=[],this.on("all","durationchange",function(e,t){1!==t.duration&&(n.durationArr[e]=t.duration,n.duration=n.durationArr.reduce(function(e,t){return e+t}))}),this.on("current","end",function(){n.switch(n.index+1)})}return i(e,[{key:"switch",value:function(e,t){this.index!==e?(this.videos[e].classList.add("dplayer-video-current"),this.current.paused||this.videos[e].play(),this.current.classList.remove("dplayer-video-current"),this.current.pause(),this.index=e,this.current=this.videos[this.index],this.videos[e].currentTime=t||0):this.videos[e].currentTime=t||0}},{key:"on",value:function(e,t,n){var a=this;if("function"==typeof n&&("all"===e?(this.eventAll[t]||(this.eventAll[t]=[]),this.eventAll[t].push(n)):(this.eventCurrent[t]||(this.eventCurrent[t]=[]),this.eventCurrent[t].push(n)),-1===["seeking"].indexOf(t)))for(var i=0;i0?t:0,t=t<1?t:1,E[e+"Bar"].style[n]=100*t+"%"};var s=["play","pause","canplay","playing","ended","error"];this.event={};for(var v=0;v=n.video.currentTime())return void(n.danIndex=e);n.danIndex=n.dan.length}});var T=0,B=0,C=!1,M=void 0;this.setTime=function(){n.playedTime=setInterval(function(){B=n.video.currentTime(),!C&&BT+.01&&!n.video.attr("paused")&&(n.element.classList.remove("dplayer-loading"),C=!1),T=B,n.updateBar("played",n.video.currentTime()/n.video.duration,"width"),n.element.getElementsByClassName("dplayer-ptime")[0].innerHTML=l.secondToTime(n.video.currentTime()),n.trigger("playing")},100),n.option.danmaku&&$&&(M=setInterval(function(){if(n.dan)for(var e=n.dan[n.danIndex];e&&n.video.currentTime()>parseFloat(e.time);)n.pushDanmaku(e.text,e.color,e.type),e=n.dan[++n.danIndex]},100))},this.clearTime=function(){clearInterval(n.playedTime),n.option.danmaku&&clearInterval(M)},L.addEventListener("click",function(e){var t=e||window.event;x=L.clientWidth;var a=(t.clientX-l.getElementViewLeft(L))/x;a=a>0?a:0,a=a<1?a:1,n.updateBar("played",a,"width"),n.video.seek(parseFloat(E.playedBar.style.width)/100*n.video.duration)}),this.isTipsShow=!1,this.timeTipsHandler=this.timeTipsHandler(L,w).bind(this),L.addEventListener("mousemove",this.timeTipsHandler),L.addEventListener("mouseover",this.timeTipsHandler),L.addEventListener("mouseenter",this.timeTipsHandler),L.addEventListener("mouseout",this.timeTipsHandler),L.addEventListener("mouseleave",this.timeTipsHandler);var N=function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(L))/x;a=a>0?a:0,a=a<1?a:1,n.updateBar("played",a,"width"),n.element.getElementsByClassName("dplayer-ptime")[0].innerHTML=l.secondToTime(a*n.video.duration)},z=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",N),n.video.seek(parseFloat(E.playedBar.style.width)/100*n.video.duration),n.setTime()};L.addEventListener("mousedown",function(){x=L.clientWidth,n.clearTime(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",z)}),E.volumeBar=this.element.getElementsByClassName("dplayer-volume-bar-inner")[0];var q=this.element.getElementsByClassName("dplayer-volume")[0],D=this.element.getElementsByClassName("dplayer-volume-bar-wrap")[0],S=this.element.getElementsByClassName("dplayer-volume-bar")[0],I=this.element.getElementsByClassName("dplayer-volume-icon")[0];this.switchVolumeIcon=function(){var e=n.element.getElementsByClassName("dplayer-volume-icon")[0];n.video.attr("volume")>=.8?e.innerHTML=o("volume-up"):n.video.attr("volume")>0?e.innerHTML=o("volume-down"):e.innerHTML=o("volume-off")};var H=function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(S)-5.5)/35;n.volume(a)},P=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",H),q.classList.remove("dplayer-volume-active")};D.addEventListener("click",function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(S)-5.5)/35;n.volume(a)}),D.addEventListener("mousedown",function(){document.addEventListener("mousemove",H),document.addEventListener("mouseup",P),q.classList.add("dplayer-volume-active")}),I.addEventListener("click",function(){n.video.attr("muted")?(n.video.attr("muted",!1),n.switchVolumeIcon(),n.updateBar("volume",n.video.attr("volume"),"width")):(n.video.attr("muted",!0),I.innerHTML=o("volume-off"),n.updateBar("volume",0,"width"))});var A=0;if(!p){var F=function(){n.element.classList.remove("dplayer-hide-controller"),clearTimeout(A),A=setTimeout(function(){n.video.attr("played").length&&(n.element.classList.add("dplayer-hide-controller"),V(),oe())},2e3)};this.element.addEventListener("mousemove",F),this.element.addEventListener("click",F)}this.danOpacity=localStorage.getItem("DPlayer-opacity")||.7;var O=c.setting(i),R=this.element.getElementsByClassName("dplayer-setting-icon")[0],j=this.element.getElementsByClassName("dplayer-setting-box")[0],X=this.element.getElementsByClassName("dplayer-mask")[0];j.innerHTML=O.original;var V=function(){j.classList.contains("dplayer-setting-box-open")&&(j.classList.remove("dplayer-setting-box-open"),X.classList.remove("dplayer-mask-show"),setTimeout(function(){j.classList.remove("dplayer-setting-box-narrow"),j.innerHTML=O.original,U()},300))},W=function(){j.classList.add("dplayer-setting-box-open"),X.classList.add("dplayer-mask-show")};X.addEventListener("click",function(){V()}),R.addEventListener("click",function(){W()});var _=this.option.loop,Y=this.element.getElementsByClassName("dplayer-danmaku")[0],$=!0,U=function(){var e=n.element.getElementsByClassName("dplayer-setting-loop")[0],t=e.getElementsByClassName("dplayer-toggle-setting-input")[0];t.checked=_,e.addEventListener("click",function(){t.checked=!t.checked,_=!!t.checked,V()});var a=n.element.getElementsByClassName("dplayer-setting-showdan")[0],i=a.getElementsByClassName("dplayer-showdan-setting-input")[0];if(i.checked=$,a.addEventListener("click",function(){if(i.checked=!i.checked,i.checked){if($=!0,n.option.danmaku){for(var e=0;e=n.video.currentTime()){n.danIndex=e;break}n.danIndex=n.dan.length}M=setInterval(function(){for(var e=n.dan[n.danIndex];e&&n.video.currentTime()>=parseFloat(e.time);)n.pushDanmaku(e.text,e.color,e.type),e=n.dan[++n.danIndex]},0)}}else $=!1,n.option.danmaku&&(clearInterval(M),Y.innerHTML='
',n.danTunnel={right:{},top:{},bottom:{}},n.itemDemo=n.element.getElementsByClassName("dplayer-danmaku-item")[0]);V()}),n.element.getElementsByClassName("dplayer-setting-speed")[0].addEventListener("click",function(){j.classList.add("dplayer-setting-box-narrow"),j.innerHTML=O.speed;for(var e=j.getElementsByClassName("dplayer-setting-speed-item"),t=0;t0?a:0,a=a<1?a:1,n.updateBar("danmaku",a,"width");for(var i=n.element.getElementsByClassName("dplayer-danmaku-item"),s=0;s0?a:0,a=a<1?a:1,n.updateBar("danmaku",a,"width");for(var i=n.element.getElementsByClassName("dplayer-danmaku-item"),s=0;s/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},ne=function(){if(J.blur(),!J.value.replace(/^\s+|\s+$/g,""))return void alert(i("Please input danmaku!"));var e={token:n.option.danmaku.token,player:n.option.danmaku.id,author:n.option.danmaku.user,time:n.video.currentTime(),text:J.value,color:n.element.querySelector(".dplayer-comment-setting-color input:checked").value,type:n.element.querySelector(".dplayer-comment-setting-type input:checked").value};n.option.apiBackend.send(n.option.danmaku.api,e),J.value="",oe(),n.dan.splice(n.danIndex,0,e),n.danIndex++,n.pushDanmaku(te(e.text),e.color,e.type).style.border="2px solid "+n.option.theme},ae=function(){Z.classList.contains("dplayer-comment-setting-open")&&Z.classList.remove("dplayer-comment-setting-open")},ie=function(){Z.classList.contains("dplayer-comment-setting-open")?Z.classList.remove("dplayer-comment-setting-open"):Z.classList.add("dplayer-comment-setting-open")},se=0,le=0,oe=function(){K.classList.contains("dplayer-comment-box-open")&&(K.classList.remove("dplayer-comment-box-open"),X.classList.remove("dplayer-mask-show"),n.element.classList.remove("dplayer-show-controller"),clearInterval(se),clearTimeout(le),ae())},re=function(){K.classList.contains("dplayer-comment-box-open")||(K.classList.add("dplayer-comment-box-open"),X.classList.add("dplayer-mask-show"),n.element.classList.add("dplayer-show-controller"),se=setInterval(function(){clearTimeout(A)},1e3),le=setTimeout(function(){J.focus()},300))};X.addEventListener("click",function(){oe()}),G.addEventListener("click",function(){re()}),Q.addEventListener("click",function(){ie()}),this.element.getElementsByClassName("dplayer-comment-setting-color")[0].addEventListener("click",function(){n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked+span')&&(Q.getElementsByClassName("dplayer-fill")[0].style.fill=n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked').value)}),J.addEventListener("click",function(){ae()}),J.addEventListener("keydown",function(e){13===(e||window.event).keyCode&&ne()}),ee.addEventListener("click",ne);var de=function(){for(var e=Y.offsetWidth,t=n.element.getElementsByClassName("dplayer-danmaku-item"),a=0;a=a.width?(ue.style.right=a.width-i+"px",ue.style.left="initial"):(ue.style.left=t.clientX-n.element.getBoundingClientRect().left+"px",ue.style.right="initial"),s+ue.offsetHeight>=a.height?(ue.style.bottom=a.height-s+"px",ue.style.top="initial"):(ue.style.top=t.clientY-n.element.getBoundingClientRect().top+"px",ue.style.bottom="initial"),X.classList.add("dplayer-mask-show"),X.addEventListener("click",function(){X.classList.remove("dplayer-mask-show"),ue.classList.remove("dplayer-menu-show")})}),this.option.screenshot){var pe=this.element.getElementsByClassName("dplayer-camera-icon")[0];pe.addEventListener("click",function(){var e=document.createElement("canvas");e.width=n.video.attr("videoWidth"),e.height=n.video.attr("videoHeight"),e.getContext("2d").drawImage(n.video.current,0,0,e.width,e.height),pe.href=e.toDataURL(),pe.download="DPlayer.png"})}m++}return s(e,[{key:"play",value:function(e){"[object Number]"===Object.prototype.toString.call(e)&&this.video.seek(e),this.paused=!1,this.video.attr("paused")&&(this.bezel.innerHTML=o("play"),this.bezel.classList.add("dplayer-bezel-transition")),this.playButton.innerHTML=o("pause"),this.video.play(),this.playedTime&&this.clearTime(),this.setTime(),this.element.classList.add("dplayer-playing"),this.trigger("play")}},{key:"pause",value:function(){this.paused=!0,this.element.classList.remove("dplayer-loading"),this.video.attr("paused")||(this.bezel.innerHTML=o("pause"),this.bezel.classList.add("dplayer-bezel-transition")),this.ended=!1,this.playButton.innerHTML=o("play"),this.video.pause(),this.clearTime(),this.element.classList.remove("dplayer-playing"),this.trigger("pause")}},{key:"volume",value:function(e){e=e>0?e:0,e=e<1?e:1,this.updateBar("volume",e,"width"),this.video.attr("volume",e),this.video.attr("muted")&&this.video.attr("muted",!1),this.switchVolumeIcon()}},{key:"toggle",value:function(){this.video.attr("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 n=[],a=0,i=0;i',this.danTunnel={right:{},top:{},bottom:{}},this.itemDemo=this.element.getElementsByClassName("dplayer-danmaku-item")[0],this.option.danmaku=t,this.readDanmaku())}},{key:"timeTipsHandler",value:function(e,t){var n=this,a=function(e){var t=0,n=0;do{t+=e.offsetTop||0,n+=e.offsetLeft||0,e=e.offsetParent}while(e);return{top:t,left:n}};return function(i){if(n.video.duration){var s=i.clientX,o=a(e).left,r=s-o;switch(t.innerText=l.secondToTime(n.video.duration*(r/e.offsetWidth)),t.style.left=r-20+"px",i.type){case"mouseenter":case"mouseover":case"mousemove":if(n.isTipsShow)return;t.classList.remove("hidden"),n.isTipsShow=!0;break;case"mouseleave":case"mouseout":if(!n.isTipsShow)return;t.classList.add("hidden"),n.isTipsShow=!1}}}}}]),e}();e.exports=v},function(e,t,n){"use strict";var a=function(e,t,n,a,i){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState){if(s.status>=200&&s.status<300||304===s.status){var e=JSON.parse(s.responseText);return 1!==e.code?a(s,e):n(s,e)}i(s)}},s.open(null!==t?"POST":"GET",e,!0),s.send(null!==t?JSON.stringify(t):null)};e.exports={send:function(e,t){a(e,t,function(e,t){console.log("Post danmaku: ",t)},function(e,t){alert(t.msg)},function(e){console.log("Request was unsuccessful: "+e.status)})},read:function(e,t){a(e,null,function(e,n){t(null,n.danmaku)},function(e,n){t({status:e.status,response:n})},function(e){t({status:e.status,response:null})})}}}])}); //# 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 index e8f28549e..63de55451 100644 --- a/dist/DPlayer.min.js.map +++ b/dist/DPlayer.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///DPlayer.min.js","webpack:///webpack/bootstrap c318e8d43134641b8428","webpack:///./src/svg.js","webpack:///./src/html.js","webpack:///./src/i18n.js","webpack:///./src/option.js","webpack:///./src/DPlayer.js","webpack:///./src/api.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","svgSource","play","pause","volume-up","volume-down","volume-off","loop","full","full-in","setting","right","comment","comment-off","send","menu","camera","type","svg","main","option","index","tran","video","pic","screenshot","preload","url","danmaku","theme","original","localStorage","getItem","speed","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","lang","_this","text","defaultApiBackend","test","window","navigator","userAgent","autoplay","defaultOption","element","document","getElementsByClassName","language","indexOf","hotkey","apiBackend","defaultKey","user","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","obj","constructor","_createClass","defineProperties","target","props","length","descriptor","writable","key","protoProps","staticProps","console","log","handleOption","i18n","html","isMobile","DPlayer","updateBar","percentage","direction","bar","style","eventTypes","event","trigger","classList","add","innerHTML","arrow","offsetWidth","arrowStyle","createElement","head","appendChild","exec","Hls","isSupported","hls","attachMedia","on","Events","MEDIA_ATTACHED","loadSource","MANIFEST_PARSED","data","levels","flvjs","flvPlayer","createPlayer","attachMediaElement","load","bezel","addEventListener","remove","playButton","paused","toggle","videoWrap","conMask","toggleController","contains","secondToTime","second","add0","num","min","parseInt","sec","getElementViewLeft","actualLeft","offsetLeft","current","offsetParent","elementScrollLeft","body","scrollLeft","documentElement","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","playedBar","loadedBar","pbar","pbarTimeTips","barWidth","dan","time","currentTime","danIndex","lastPlayPos","currentPlayPos","bufferingDetected","danmakuTime","setTime","playedTime","setInterval","duration","showdan","item","parseFloat","pushDanmaku","color","clearTime","clearInterval","e","clientWidth","clientX","width","isTipsShow","timeTipsHandler","bind","thumbMove","thumbUp","removeEventListener","volumeBar","volumeEle","volumeBarWrapWrap","volumeBarWrap","volumeicon","switchVolumeIcon","volume","volumeMove","volumeUp","muted","hideTime","hideController","clearTimeout","setTimeout","played","closeSetting","closeComment","danOpacity","settingHTML","settingIcon","settingBox","mask","settingEvent","openSetting","danContainer","loopEle","loopToggle","checked","showDanEle","showDanToggle","danTunnel","top","bottom","itemDemo","speedItem","playbackRate","dataset","danmakuBar","danmakuBarWrapWrap","danmakuBarWrap","danmakuSettingBox","danmakuMove","items","opacity","setItem","danmakuUp","buffered","end","ended","readDanmaku","commentInput","commentIcon","commentBox","commentSettingIcon","commentSettingBox","commentSendIcon","htmlEncode","str","replace","sendComment","blur","alert","danmakuData","token","player","id","author","querySelector","api","splice","border","closeCommentSetting","toggleCommentSetting","disableHide","commentFocusTimeout","openComment","focus","fill","keyCode","resetAnimation","danWidth","transform","cancelFullScreen","mozCancelFullScreen","webkitCancelFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","webkitEnterFullscreen","handleKeyDown","tag","activeElement","tagName","toUpperCase","editable","getAttribute","preventDefault","clientRect","getBoundingClientRect","menuLeft","left","menuTop","clientY","offsetHeight","height","camareIcon","canvas","videoWidth","videoHeight","getContext","drawImage","href","toDataURL","download","toString","func","push","endpoints","finish","results","readCount","read","err","response","msg","status","_this2","apiurl","maximum","addition","slice","_readAllEndpoints","concat","apply","sort","a","b","display","_this3","itemHeight","danHeight","itemY","danItemRight","ele","danSpeed","getTunnel","tmp","_ret2","v","j","danRight","removeChild","itemWidth","error","src","poster","timeTips","_this4","cumulativeOffset","offsetTop","px","tx","innerText","SendXMLHttpRequest","success","fail","xhr","XMLHttpRequest","onreadystatechange","readyState","JSON","parse","responseText","code","open","string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,UAAUrP,GAAQ,MAGpDzJ,GAAOD,SACH6C,KAAM,SAACmW,EAAUlH,GACbqG,EAAmBa,EAAUlH,EAAa,SAACwG,EAAK3C,GAC5CnO,QAAQC,IAAI,iBAAkBkO,IAC/B,SAAC2C,EAAK3C,GACL9D,MAAM8D,EAASC,MAChB,SAAC0C,GACA9Q,QAAQC,IAAI,6BAA+B6Q,EAAIzC,WAIvDJ,KAAM,SAACuD,EAAUC,GACbd,EAAmBa,EAAU,KAAM,SAACV,EAAK3C,GACrCsD,EAAI,KAAMtD,EAAShS,UACpB,SAAC2U,EAAK3C,GACLsD,GAAMpD,OAAQyC,EAAIzC,OAAQF,cAC3B,SAAC2C,GACAW,GAAMpD,OAAQyC,EAAIzC,OAAQF,SAAU","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","(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/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n* SVG used by DPlayer\n*/\n\nvar svgSource = {\n '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 '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 '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 '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 '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 '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 '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 'full-in': ['0 0 32 33', 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'],\n '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 '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 '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 '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 '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 '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 '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};\n\nmodule.exports = function (type) {\n return '\\n \\n \\n \\n \\n';\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar svg = __webpack_require__(0);\n\nmodule.exports = {\n main: function main(option, index, tran) {\n return '\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n \\n ' + (option.danmaku ? '' + tran('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 ' + (option.screenshot ? '\\n \\n ' + svg('camera') + '\\n \\n ' : '') + '\\n
\\n \\n
\\n \\n
\\n
\\n
' + tran('Set danmaku color') + '
\\n \\n \\n \\n \\n \\n \\n
\\n
\\n
' + tran('Set danmaku type') + '
\\n \\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
00:00
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n \\n ';\n },\n\n setting: function setting(tran) {\n return {\n 'original': '\\n
\\n ' + tran('Speed') + '\\n
\\n ' + svg('right') + '\\n
\\n
\\n
\\n ' + tran('Loop') + '\\n
\\n \\n \\n
\\n
\\n
\\n ' + tran('Danmaku') + '\\n
\\n \\n \\n
\\n
\\n
\\n ' + tran('Opacity for danmaku') + '\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
',\n 'speed': '\\n
\\n 0.5\\n
\\n
\\n 0.75\\n
\\n
\\n ' + tran('Normal') + '\\n
\\n
\\n 1.25\\n
\\n
\\n 1.5\\n
\\n
\\n 2\\n
'\n };\n }\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕,回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku!': '要输入弹幕内容啊喂!',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕'\n};\n\nmodule.exports = function (lang) {\n var _this = this;\n\n this.lang = lang;\n this.tran = function (text) {\n if (_this.lang === 'en') {\n return text;\n } else if (_this.lang === 'zh') {\n return tranZH[text];\n }\n };\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar defaultApiBackend = __webpack_require__(6);\n\nmodule.exports = function (option) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n // compatibility: some mobile browsers don't suppose autoplay\n if (isMobile) {\n option.autoplay = false;\n }\n\n // default options\n var defaultOption = {\n element: document.getElementsByClassName('dplayer')[0],\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: navigator.language.indexOf('zh') !== -1 ? 'zh' : 'en',\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n apiBackend: defaultApiBackend\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !option.hasOwnProperty(defaultKey)) {\n option[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (option.video && !option.video.hasOwnProperty('type')) {\n option.video.type = 'auto';\n }\n if (option.danmaku && !option.danmaku.hasOwnProperty('user')) {\n option.danmaku.user = 'DIYgod';\n }\n\n return option;\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nconsole.log('\\n %c DPlayer 1.2.0 %c http://dplayer.js.org \\n\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\n\n__webpack_require__(4);\nvar svg = __webpack_require__(0);\nvar handleOption = __webpack_require__(3);\nvar i18n = __webpack_require__(2);\nvar html = __webpack_require__(1);\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\n\nvar index = 0;\n\nvar DPlayer = function () {\n\n /**\n * DPlayer constructor function\n *\n * @param {Object} option - See README\n * @constructor\n */\n function DPlayer(option) {\n var _this = this;\n\n _classCallCheck(this, DPlayer);\n\n this.option = handleOption(option);\n\n var tran = new i18n(this.option.lang).tran;\n\n /**\n * Update progress bar, including loading progress bar and play progress bar\n *\n * @param {String} type - Point out which bar it is, should be played loaded or volume\n * @param {Number} percentage\n * @param {String} direction - Point out the direction of this bar, Should be height or width\n */\n this.updateBar = function (type, percentage, direction) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n };\n\n // define DPlayer events\n var eventTypes = ['play', 'pause', 'canplay', 'playing', 'ended', 'error'];\n this.event = {};\n for (var i = 0; i < eventTypes.length; i++) {\n this.event[eventTypes[i]] = [];\n }\n this.trigger = function (type) {\n for (var _i = 0; _i < _this.event[type].length; _i++) {\n _this.event[type][_i]();\n }\n };\n\n this.element = this.option.element;\n if (!this.option.danmaku) {\n this.element.classList.add('dplayer-no-danmaku');\n }\n if (isMobile) {\n this.element.classList.add('dplayer-mobile');\n }\n\n this.element.innerHTML = html.main(option, index, tran);\n\n // arrow style\n this.arrow = this.element.offsetWidth <= 500;\n if (this.arrow) {\n var arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = '.dplayer .dplayer-danmaku{font-size:18px}';\n document.head.appendChild(arrowStyle);\n }\n\n // get this video object\n this.video = this.element.getElementsByClassName('dplayer-video')[0];\n\n // Support HTTP Live Streaming\n var enablehls = void 0;\n if (this.option.video.type === 'auto') {\n enablehls = /m3u8(#|\\?|$)/i.exec(this.option.video.url);\n } else if (this.option.video.type === 'hls') {\n enablehls = true;\n } else {\n enablehls = false;\n }\n if (enablehls && Hls.isSupported()) {\n // this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none';\n var hls = new Hls();\n hls.attachMedia(this.video);\n hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n hls.loadSource(_this.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n console.log(\"manifest loaded, found \" + data.levels.length + \" quality level\");\n });\n });\n }\n\n // Support FLV\n var enableflv = void 0;\n if (this.option.video.type === 'auto') {\n enableflv = /.flv(#|\\?|$)/i.exec(this.option.video.url);\n } else if (this.option.video.type === 'flv') {\n enableflv = true;\n } else {\n enableflv = false;\n }\n if (enableflv && flvjs.isSupported()) {\n var flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: this.option.video.url\n });\n flvPlayer.attachMediaElement(this.video);\n flvPlayer.load();\n }\n\n this.bezel = this.element.getElementsByClassName('dplayer-bezel-icon')[0];\n this.bezel.addEventListener('animationend', function () {\n _this.bezel.classList.remove('dplayer-bezel-transition');\n });\n\n // play and pause button\n this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', function () {\n _this.toggle();\n });\n\n var videoWrap = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n var conMask = this.element.getElementsByClassName('dplayer-controller-mask')[0];\n if (!isMobile) {\n videoWrap.addEventListener('click', function () {\n _this.toggle();\n });\n conMask.addEventListener('click', function () {\n _this.toggle();\n });\n } else {\n var toggleController = function toggleController() {\n if (_this.element.classList.contains('dplayer-hide-controller')) {\n _this.element.classList.remove('dplayer-hide-controller');\n } else {\n _this.element.classList.add('dplayer-hide-controller');\n }\n };\n videoWrap.addEventListener('click', toggleController);\n conMask.addEventListener('click', toggleController);\n }\n\n /**\n * Parse second to 00:00 format\n *\n * @param {Number} second\n * @return {String} 00:00 format\n */\n var secondToTime = function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n };\n\n /**\n * control play progress\n */\n // get element's view position\n var getElementViewLeft = function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== _this.element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n };\n\n var bar = {};\n bar.playedBar = this.element.getElementsByClassName('dplayer-played')[0];\n bar.loadedBar = this.element.getElementsByClassName('dplayer-loaded')[0];\n var pbar = this.element.getElementsByClassName('dplayer-bar-wrap')[0];\n var pbarTimeTips = this.element.getElementsByClassName('dplayer-bar-time')[0];\n var barWidth = void 0;\n\n if (this.option.danmaku) {\n this.video.addEventListener('seeking', function () {\n for (var _i2 = 0; _i2 < _this.dan.length; _i2++) {\n if (_this.dan[_i2].time >= _this.video.currentTime) {\n _this.danIndex = _i2;\n return;\n }\n _this.danIndex = _this.dan.length;\n }\n });\n }\n\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n var danmakuTime = void 0;\n this.setTime = function () {\n _this.playedTime = setInterval(function () {\n // whether the video is buffering\n currentPlayPos = _this.video.currentTime;\n if (!bufferingDetected && currentPlayPos < lastPlayPos + 0.01 && !_this.video.paused) {\n _this.element.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos + 0.01 && !_this.video.paused) {\n _this.element.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n\n _this.updateBar('played', _this.video.currentTime / _this.video.duration, 'width');\n _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(_this.video.currentTime);\n _this.trigger('playing');\n }, 100);\n if (_this.option.danmaku && showdan) {\n danmakuTime = setInterval(function () {\n if (_this.dan) {\n var item = _this.dan[_this.danIndex];\n while (item && _this.video.currentTime > parseFloat(item.time)) {\n _this.pushDanmaku(item.text, item.color, item.type);\n item = _this.dan[++_this.danIndex];\n }\n }\n }, 100);\n }\n };\n this.clearTime = function () {\n clearInterval(_this.playedTime);\n if (_this.option.danmaku) {\n clearInterval(danmakuTime);\n }\n };\n\n pbar.addEventListener('click', function (event) {\n var e = event || window.event;\n barWidth = pbar.clientWidth;\n var percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration;\n });\n\n this.isTipsShow = false;\n this.timeTipsHandler = this.timeTipsHandler(pbar, pbarTimeTips, secondToTime).bind(this);\n pbar.addEventListener('mousemove', this.timeTipsHandler);\n pbar.addEventListener('mouseover', this.timeTipsHandler);\n pbar.addEventListener('mouseenter', this.timeTipsHandler);\n pbar.addEventListener('mouseout', this.timeTipsHandler);\n pbar.addEventListener('mouseleave', this.timeTipsHandler);\n\n var thumbMove = function thumbMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(percentage * _this.video.duration);\n };\n\n var thumbUp = function thumbUp() {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n _this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration;\n _this.setTime();\n };\n\n pbar.addEventListener('mousedown', function () {\n barWidth = pbar.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n\n /**\n * control volume\n */\n bar.volumeBar = this.element.getElementsByClassName('dplayer-volume-bar-inner')[0];\n var volumeEle = this.element.getElementsByClassName('dplayer-volume')[0];\n var volumeBarWrapWrap = this.element.getElementsByClassName('dplayer-volume-bar-wrap')[0];\n var volumeBarWrap = this.element.getElementsByClassName('dplayer-volume-bar')[0];\n var volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n var vWidth = 35;\n\n this.switchVolumeIcon = function () {\n var volumeicon = _this.element.getElementsByClassName('dplayer-volume-icon')[0];\n if (_this.video.volume >= 0.8) {\n volumeicon.innerHTML = svg('volume-up');\n } else if (_this.video.volume > 0) {\n volumeicon.innerHTML = svg('volume-down');\n } else {\n volumeicon.innerHTML = svg('volume-off');\n }\n };\n var volumeMove = function volumeMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n };\n var volumeUp = function volumeUp() {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n volumeEle.classList.remove('dplayer-volume-active');\n };\n\n volumeBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n });\n volumeBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n volumeEle.classList.add('dplayer-volume-active');\n });\n volumeicon.addEventListener('click', function () {\n if (_this.video.muted) {\n _this.video.muted = false;\n _this.switchVolumeIcon();\n _this.updateBar('volume', _this.video.volume, 'width');\n } else {\n _this.video.muted = true;\n volumeicon.innerHTML = svg('volume-off');\n _this.updateBar('volume', 0, 'width');\n }\n });\n\n /**\n * auto hide controller\n */\n var hideTime = 0;\n if (!isMobile) {\n var hideController = function hideController() {\n _this.element.classList.remove('dplayer-hide-controller');\n clearTimeout(hideTime);\n hideTime = setTimeout(function () {\n if (_this.video.played.length) {\n _this.element.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n this.element.addEventListener('mousemove', hideController);\n this.element.addEventListener('click', hideController);\n }\n\n /**\n * setting\n */\n this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n var settingHTML = html.setting(tran);\n\n // toggle setting box\n var settingIcon = this.element.getElementsByClassName('dplayer-setting-icon')[0];\n var settingBox = this.element.getElementsByClassName('dplayer-setting-box')[0];\n var mask = this.element.getElementsByClassName('dplayer-mask')[0];\n settingBox.innerHTML = settingHTML.original;\n\n var closeSetting = function closeSetting() {\n if (settingBox.classList.contains('dplayer-setting-box-open')) {\n settingBox.classList.remove('dplayer-setting-box-open');\n mask.classList.remove('dplayer-mask-show');\n setTimeout(function () {\n settingBox.classList.remove('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.original;\n settingEvent();\n }, 300);\n }\n };\n var openSetting = function openSetting() {\n settingBox.classList.add('dplayer-setting-box-open');\n mask.classList.add('dplayer-mask-show');\n };\n\n mask.addEventListener('click', function () {\n closeSetting();\n });\n settingIcon.addEventListener('click', function () {\n openSetting();\n });\n\n var loop = this.option.loop;\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var showdan = true;\n var settingEvent = function settingEvent() {\n // loop control\n var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n\n loopToggle.checked = loop;\n\n loopEle.addEventListener('click', function () {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n loop = true;\n _this.video.loop = loop;\n } else {\n loop = false;\n _this.video.loop = loop;\n }\n closeSetting();\n });\n\n // show danmaku control\n var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n\n showDanToggle.checked = showdan;\n\n showDanEle.addEventListener('click', function () {\n showDanToggle.checked = !showDanToggle.checked;\n if (showDanToggle.checked) {\n showdan = true;\n if (_this.option.danmaku) {\n for (var _i3 = 0; _i3 < _this.dan.length; _i3++) {\n if (_this.dan[_i3].time >= _this.video.currentTime) {\n _this.danIndex = _i3;\n break;\n }\n _this.danIndex = _this.dan.length;\n }\n danmakuTime = setInterval(function () {\n var item = _this.dan[_this.danIndex];\n while (item && _this.video.currentTime >= parseFloat(item.time)) {\n _this.pushDanmaku(item.text, item.color, item.type);\n item = _this.dan[++_this.danIndex];\n }\n }, 0);\n }\n } else {\n showdan = false;\n if (_this.option.danmaku) {\n clearInterval(danmakuTime);\n danContainer.innerHTML = '
';\n _this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n _this.itemDemo = _this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n }\n }\n closeSetting();\n });\n\n // speed control\n var speedEle = _this.element.getElementsByClassName('dplayer-setting-speed')[0];\n speedEle.addEventListener('click', function () {\n settingBox.classList.add('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.speed;\n\n var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n\n var _loop = function _loop(_i4) {\n speedItem[_i4].addEventListener('click', function () {\n _this.video.playbackRate = speedItem[_i4].dataset.speed;\n closeSetting();\n });\n };\n\n for (var _i4 = 0; _i4 < speedItem.length; _i4++) {\n _loop(_i4);\n }\n });\n\n if (_this.option.danmaku) {\n // danmaku opacity\n bar.danmakuBar = _this.element.getElementsByClassName('dplayer-danmaku-bar-inner')[0];\n var danmakuBarWrapWrap = _this.element.getElementsByClassName('dplayer-danmaku-bar-wrap')[0];\n var danmakuBarWrap = _this.element.getElementsByClassName('dplayer-danmaku-bar')[0];\n var danmakuSettingBox = _this.element.getElementsByClassName('dplayer-setting-danmaku')[0];\n var dWidth = 130;\n _this.updateBar('danmaku', _this.danOpacity, 'width');\n\n var danmakuMove = function danmakuMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('danmaku', percentage, 'width');\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i5 = 0; _i5 < items.length; _i5++) {\n items[_i5].style.opacity = percentage;\n }\n _this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', _this.danOpacity);\n };\n var danmakuUp = function danmakuUp() {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n danmakuSettingBox.classList.remove('dplayer-setting-danmaku-active');\n };\n\n danmakuBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('danmaku', percentage, 'width');\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i6 = 0; _i6 < items.length; _i6++) {\n items[_i6].style.opacity = percentage;\n }\n _this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', _this.danOpacity);\n });\n danmakuBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n danmakuSettingBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n };\n settingEvent();\n\n /**\n * video events\n */\n // show video time: the metadata has loaded or changed\n this.video.addEventListener('durationchange', function () {\n if (_this.video.duration !== 1) {\n // compatibility: Android browsers will output 1 at first\n _this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = secondToTime(_this.video.duration);\n }\n });\n\n // show video loaded bar: to inform interested parties of progress downloading the media\n this.video.addEventListener('progress', function () {\n var percentage = _this.video.buffered.length ? _this.video.buffered.end(_this.video.buffered.length - 1) / _this.video.duration : 0;\n _this.updateBar('loaded', percentage, 'width');\n });\n\n // video download error: an error occurs\n this.video.addEventListener('error', function () {\n _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = 'Error happens \\u2565\\uFE4F\\u2565';\n _this.trigger('pause');\n });\n\n // video can play: enough data is available that the media can be played\n this.video.addEventListener('canplay', function () {\n _this.trigger('canplay');\n });\n\n // music end\n this.ended = false;\n this.video.addEventListener('ended', function () {\n _this.updateBar('played', 1, 'width');\n if (!loop) {\n _this.ended = true;\n _this.pause();\n _this.trigger('ended');\n }\n });\n\n this.video.addEventListener('play', function () {\n if (_this.paused) {\n _this.play();\n }\n });\n\n this.video.addEventListener('pause', function () {\n if (!_this.paused) {\n _this.pause();\n }\n });\n\n // control volume\n this.video.volume = parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100;\n\n // loop\n this.video.loop = loop;\n\n // set duration time\n if (this.video.duration !== 1) {\n // compatibility: Android browsers will output 1 at first\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? secondToTime(this.video.duration) : '00:00';\n }\n\n // danmaku\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n } else {\n // autoplay\n if (this.option.autoplay && !isMobile) {\n this.play();\n } else if (isMobile) {\n this.pause();\n }\n }\n\n /**\n * comment\n */\n var commentInput = this.element.getElementsByClassName('dplayer-comment-input')[0];\n var commentIcon = this.element.getElementsByClassName('dplayer-comment-icon')[0];\n var commentBox = this.element.getElementsByClassName('dplayer-comment-box')[0];\n var commentSettingIcon = this.element.getElementsByClassName('dplayer-comment-setting-icon')[0];\n var commentSettingBox = this.element.getElementsByClassName('dplayer-comment-setting-box')[0];\n var commentSendIcon = this.element.getElementsByClassName('dplayer-send-icon')[0];\n\n var htmlEncode = function htmlEncode(str) {\n return str.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/\\//g, \"/\");\n };\n\n var sendComment = function sendComment() {\n commentInput.blur();\n\n // text can't be empty\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n alert(tran('Please input danmaku!'));\n return;\n }\n\n var danmakuData = {\n token: _this.option.danmaku.token,\n player: _this.option.danmaku.id,\n author: _this.option.danmaku.user,\n time: _this.video.currentTime,\n text: commentInput.value,\n color: _this.element.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: _this.element.querySelector('.dplayer-comment-setting-type input:checked').value\n };\n _this.option.apiBackend.send(_this.option.danmaku.api, danmakuData);\n\n commentInput.value = '';\n closeComment();\n _this.dan.splice(_this.danIndex, 0, danmakuData);\n _this.danIndex++;\n var item = _this.pushDanmaku(htmlEncode(danmakuData.text), danmakuData.color, danmakuData.type);\n item.style.border = '2px solid ' + _this.option.theme;\n };\n\n var closeCommentSetting = function closeCommentSetting() {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n var toggleCommentSetting = function toggleCommentSetting() {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n } else {\n commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n\n var disableHide = 0;\n var commentFocusTimeout = 0;\n var closeComment = function closeComment() {\n if (!commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n _this.element.classList.remove('dplayer-show-controller');\n\n clearInterval(disableHide);\n clearTimeout(commentFocusTimeout);\n closeCommentSetting();\n };\n var openComment = function openComment() {\n if (commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n _this.element.classList.add('dplayer-show-controller');\n\n disableHide = setInterval(function () {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(function () {\n commentInput.focus();\n }, 300);\n };\n\n mask.addEventListener('click', function () {\n closeComment();\n });\n commentIcon.addEventListener('click', function () {\n openComment();\n });\n commentSettingIcon.addEventListener('click', function () {\n toggleCommentSetting();\n });\n\n // comment setting box\n this.element.getElementsByClassName('dplayer-comment-setting-color')[0].addEventListener('click', function () {\n var sele = _this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked+span');\n if (sele) {\n commentSettingIcon.getElementsByClassName('dplayer-fill')[0].style.fill = _this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked').value;\n }\n });\n\n commentInput.addEventListener('click', function () {\n closeCommentSetting();\n });\n commentInput.addEventListener('keydown', function (e) {\n var event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n\n commentSendIcon.addEventListener('click', sendComment);\n\n /**\n * full screen\n */\n var resetAnimation = function resetAnimation() {\n var danWidth = danContainer.offsetWidth;\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i7 = 0; _i7 < items.length; _i7++) {\n items[_i7].style.transform = 'translateX(-' + danWidth + 'px)';\n }\n };\n\n this.element.addEventListener('fullscreenchange', function () {\n resetAnimation();\n });\n this.element.addEventListener('mozfullscreenchange', function () {\n resetAnimation();\n });\n this.element.addEventListener('webkitfullscreenchange', function () {\n resetAnimation();\n });\n // browser full screen\n this.element.getElementsByClassName('dplayer-full-icon')[0].addEventListener('click', function () {\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n if (_this.element.requestFullscreen) {\n _this.element.requestFullscreen();\n } else if (_this.element.mozRequestFullScreen) {\n _this.element.mozRequestFullScreen();\n } else if (_this.element.webkitRequestFullscreen) {\n _this.element.webkitRequestFullscreen();\n } else if (_this.video.webkitEnterFullscreen) {\n // Safari for iOS\n _this.video.webkitEnterFullscreen();\n }\n } else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n resetAnimation();\n });\n // web full screen\n this.element.getElementsByClassName('dplayer-full-in-icon')[0].addEventListener('click', function () {\n if (_this.element.classList.contains('dplayer-fulled')) {\n _this.element.classList.remove('dplayer-fulled');\n } else {\n _this.element.classList.add('dplayer-fulled');\n resetAnimation();\n }\n });\n\n /**\n * hot key\n */\n var handleKeyDown = function handleKeyDown(e) {\n var tag = document.activeElement.tagName.toUpperCase();\n var editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n var event = e || window.event;\n var percentage = void 0;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n _this.toggle();\n break;\n case 37:\n event.preventDefault();\n _this.video.currentTime = _this.video.currentTime - 5;\n break;\n case 39:\n event.preventDefault();\n _this.video.currentTime = _this.video.currentTime + 5;\n break;\n case 38:\n event.preventDefault();\n percentage = _this.video.volume + 0.1;\n _this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = _this.video.volume - 0.1;\n _this.volume(percentage);\n break;\n }\n }\n };\n if (this.option.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', function (e) {\n // Press ESC to quit web full screen\n var event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (_this.element.classList.contains('dplayer-fulled')) {\n _this.element.classList.remove('dplayer-fulled');\n resetAnimation();\n }\n break;\n }\n });\n\n /**\n * right key\n */\n var menu = this.element.getElementsByClassName('dplayer-menu')[0];\n this.element.addEventListener('contextmenu', function (e) {\n var event = e || window.event;\n event.preventDefault();\n\n menu.classList.add('dplayer-menu-show');\n\n var clientRect = _this.element.getBoundingClientRect();\n var menuLeft = event.clientX - clientRect.left;\n var menuTop = event.clientY - clientRect.top;\n if (menuLeft + menu.offsetWidth >= clientRect.width) {\n menu.style.right = clientRect.width - menuLeft + 'px';\n menu.style.left = 'initial';\n } else {\n menu.style.left = event.clientX - _this.element.getBoundingClientRect().left + 'px';\n menu.style.right = 'initial';\n }\n if (menuTop + menu.offsetHeight >= clientRect.height) {\n menu.style.bottom = clientRect.height - menuTop + 'px';\n menu.style.top = 'initial';\n } else {\n menu.style.top = event.clientY - _this.element.getBoundingClientRect().top + 'px';\n menu.style.bottom = 'initial';\n }\n\n mask.classList.add('dplayer-mask-show');\n mask.addEventListener('click', function () {\n mask.classList.remove('dplayer-mask-show');\n menu.classList.remove('dplayer-menu-show');\n });\n });\n\n /**\n * Screenshot\n */\n if (this.option.screenshot) {\n var camareIcon = this.element.getElementsByClassName('dplayer-camera-icon')[0];\n camareIcon.addEventListener('click', function () {\n var canvas = document.createElement(\"canvas\");\n canvas.width = _this.video.videoWidth;\n canvas.height = _this.video.videoHeight;\n canvas.getContext('2d').drawImage(_this.video, 0, 0, canvas.width, canvas.height);\n\n camareIcon.href = canvas.toDataURL();\n camareIcon.download = \"DPlayer.png\";\n });\n }\n\n index++;\n }\n\n /**\n * Play music\n */\n\n\n _createClass(DPlayer, [{\n key: 'play',\n value: function play(time) {\n if (Object.prototype.toString.call(time) === '[object Number]') {\n this.video.currentTime = time;\n }\n this.paused = false;\n if (this.video.paused) {\n this.bezel.innerHTML = svg('play');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.playButton.innerHTML = svg('pause');\n\n this.video.play();\n if (this.playedTime) {\n this.clearTime();\n }\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n\n /**\n * Pause music\n */\n\n }, {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n\n if (!this.video.paused) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.ended = false;\n this.playButton.innerHTML = svg('play');\n this.video.pause();\n this.clearTime();\n this.element.classList.remove('dplayer-playing');\n this.trigger('pause');\n }\n\n /**\n * Set volume\n */\n\n }, {\n key: 'volume',\n value: function volume(percentage) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('volume', percentage, 'width');\n this.video.volume = percentage;\n if (this.video.muted) {\n this.video.muted = false;\n }\n this.switchVolumeIcon();\n }\n\n /**\n * Toggle between play and pause\n */\n\n }, {\n key: 'toggle',\n value: function toggle() {\n if (this.video.paused) {\n this.play();\n } else {\n this.pause();\n }\n }\n\n /**\n * attach event\n */\n\n }, {\n key: 'on',\n value: function on(name, func) {\n if (typeof func === 'function') {\n this.event[name].push(func);\n }\n }\n\n /**\n * Asynchronously read danmaku from all API endpoints\n */\n\n }, {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, finish) {\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n console.log(err.response.msg);\n } else {\n console.log('Request was unsuccessful: ' + err.status);\n }\n results[i] = [];\n } else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return finish(results);\n }\n };\n };\n\n for (var i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n\n /**\n * Read danmaku from API\n */\n\n }, {\n key: 'readDanmaku',\n value: function readDanmaku() {\n var _this2 = this;\n\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n var apiurl = void 0;\n if (this.option.danmaku.maximum) {\n apiurl = this.option.danmaku.api + '?id=' + this.option.danmaku.id + '&max=' + this.option.danmaku.maximum;\n } else {\n apiurl = this.option.danmaku.api + '?id=' + this.option.danmaku.id;\n }\n var endpoints = (this.option.danmaku.addition || []).slice(0);\n endpoints.push(apiurl);\n\n this._readAllEndpoints(endpoints, function (results) {\n _this2.danIndex = 0;\n _this2.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n _this2.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n\n // autoplay\n if (_this2.option.autoplay && !isMobile) {\n _this2.play();\n } else if (isMobile) {\n _this2.pause();\n }\n });\n }\n\n /**\n * Push a danmaku into DPlayer\n *\n * @param {String} text - danmaku content\n * @param {String} color - danmaku color, default: `#fff`\n * @param {String} type - danmaku type, `right` `top` `bottom`, default: `right`\n */\n\n }, {\n key: 'pushDanmaku',\n value: function pushDanmaku(text, color, type) {\n var _this3 = this;\n\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var itemHeight = this.arrow ? 24 : 30;\n var danWidth = danContainer.offsetWidth;\n var danHeight = danContainer.offsetHeight;\n var itemY = parseInt(danHeight / itemHeight);\n\n var danItemRight = function danItemRight(ele) {\n return danContainer.getBoundingClientRect().right - ele.getBoundingClientRect().right;\n };\n\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n\n var _loop2 = function _loop2(i) {\n var item = _this3.danTunnel[type][i + ''];\n if (item && item.length) {\n for (var j = 0; j < item.length; j++) {\n var danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(item[j].offsetWidth) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this3.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this3.danTunnel[type][i + ''].splice(0, 1);\n });\n return {\n v: i % itemY\n };\n }\n }\n } else {\n _this3.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this3.danTunnel[type][i + ''].splice(0, 1);\n });\n return {\n v: i % itemY\n };\n }\n };\n\n for (var i = 0;; i++) {\n var _ret2 = _loop2(i);\n\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === \"object\") return _ret2.v;\n }\n };\n\n if (!type) {\n type = 'right';\n }\n if (!color) {\n color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + type);\n item.innerHTML = text;\n item.style.opacity = this.danOpacity;\n item.style.color = color;\n item.addEventListener('animationend', function () {\n danContainer.removeChild(item);\n });\n\n // measure\n this.itemDemo.innerHTML = text;\n var itemWidth = this.itemDemo.offsetWidth;\n\n // adjust\n switch (type) {\n case 'right':\n item.style.top = itemHeight * getTunnel(item, type, itemWidth) + 'px';\n item.style.width = itemWidth + 1 + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, type) + 'px';\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + type);\n }\n\n // insert\n danContainer.appendChild(item);\n\n // move\n item.classList.add('dplayer-danmaku-move');\n\n return item;\n }\n\n /**\n * Switch to a new video\n *\n * @param {Object} video - new video info\n * @param {Object} danmaku - new danmaku info\n */\n\n }, {\n key: 'switchVideo',\n value: function switchVideo(video, danmaku) {\n this.video.src = video.url;\n this.video.poster = video.pic ? video.pic : '';\n this.video.currentTime = 0;\n this.pause();\n if (danmaku) {\n this.dan = [];\n this.danIndex = 0;\n this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'block';\n this.updateBar('played', 0, 'width');\n this.updateBar('loaded', 0, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = '00:00';\n this.element.getElementsByClassName('dplayer-danmaku')[0].innerHTML = '
';\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n }, {\n key: 'timeTipsHandler',\n value: function timeTipsHandler(pbar, timeTips, secondToTime) {\n var _this4 = this;\n\n // http://stackoverflow.com/questions/1480133/how-can-i-get-an-objects-absolute-position-on-the-page-in-javascript\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0,\n left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n\n return {\n top: top,\n left: left\n };\n };\n\n return function (e) {\n if (!_this4.video.duration) {\n return;\n }\n var clientX = e.clientX;\n\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n timeTips.innerText = secondToTime(_this4.video.duration * (tx / pbar.offsetWidth));\n timeTips.style.left = tx - 20 + 'px';\n switch (e.type) {\n case 'mouseenter':\n case 'mouseover':\n case 'mousemove':\n if (_this4.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n _this4.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!_this4.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n _this4.isTipsShow = false;\n break;\n }\n };\n }\n }]);\n\n return DPlayer;\n}();\n\nmodule.exports = DPlayer;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\n * xhr.status ---> fail\n * response.code === 1 ---> success\n * response.code !== 1 ---> error\n * */\n\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n\n if (response.code !== 1) {\n return error(xhr, response);\n }\n\n return success(xhr, response);\n }\n\n fail(xhr);\n }\n };\n\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\n\nmodule.exports = {\n send: function send(endpoint, danmakuData) {\n SendXMLHttpRequest(endpoint, danmakuData, function (xhr, response) {\n console.log('Post danmaku: ', response);\n }, function (xhr, response) {\n alert(response.msg);\n }, function (xhr) {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n\n read: function read(endpoint, cbk) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n cbk(null, response.danmaku);\n }, function (xhr, response) {\n cbk({ status: xhr.status, response: response });\n }, function (xhr) {\n cbk({ status: xhr.status, response: null });\n });\n }\n};\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// DPlayer.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c318e8d43134641b8428","/**\n* SVG used by DPlayer\n*/\n\nconst svgSource = {\n '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 '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 '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 '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 '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 '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 '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 'full-in': ['0 0 32 33', 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'],\n '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 '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 '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 '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 '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 '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 '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};\n\nmodule.exports = (type) => `\n \n \n \n \n`;\n\n\n// WEBPACK FOOTER //\n// ./src/svg.js","const svg = require('./svg.js');\n\nmodule.exports = {\n main: (option, index, tran) => `\n
\n
\n \n
\n
\n
\n
\n \n ${option.danmaku ? `${tran('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 ${option.screenshot ? `\n \n ${svg('camera')}\n \n ` : ``}\n
\n \n
\n \n
\n
\n
${tran('Set danmaku color')}
\n \n \n \n \n \n \n
\n
\n
${tran('Set danmaku type')}
\n \n \n \n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
00:00
\n
\n
\n
\n \n
\n
\n
\n
\n \n `,\n\n setting: (tran) => ({\n 'original': `\n
\n ${tran('Speed')}\n
\n ${svg('right')}\n
\n
\n
\n ${tran('Loop')}\n
\n \n \n
\n
\n
\n ${tran('Danmaku')}\n
\n \n \n
\n
\n
\n ${tran('Opacity for danmaku')}\n
\n
\n
\n \n
\n
\n
\n
`,\n 'speed': `\n
\n 0.5\n
\n
\n 0.75\n
\n
\n ${tran('Normal')}\n
\n
\n 1.25\n
\n
\n 1.5\n
\n
\n 2\n
`\n }) \n};\n\n\n// WEBPACK FOOTER //\n// ./src/html.js","const tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕,回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku!': '要输入弹幕内容啊喂!',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕'\n};\n\nmodule.exports = function (lang) {\n this.lang = lang;\n this.tran = (text) => {\n if (this.lang === 'en') {\n return text;\n }\n else if (this.lang === 'zh') {\n return tranZH[text];\n }\n };\n};\n\n\n// WEBPACK FOOTER //\n// ./src/i18n.js","const defaultApiBackend = require('./api.js');\n\nmodule.exports = (option) => {\n const isMobile = /mobile/i.test(window.navigator.userAgent);\n // compatibility: some mobile browsers don't suppose autoplay\n if (isMobile) {\n option.autoplay = false;\n }\n\n // default options\n const defaultOption = {\n element: document.getElementsByClassName('dplayer')[0],\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: navigator.language.indexOf('zh') !== -1 ? 'zh' : 'en',\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n apiBackend: defaultApiBackend\n };\n for (const defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !option.hasOwnProperty(defaultKey)) {\n option[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (option.video && !option.video.hasOwnProperty('type')) {\n option.video.type = 'auto';\n }\n if (option.danmaku && !option.danmaku.hasOwnProperty('user')) {\n option.danmaku.user = 'DIYgod';\n }\n\n return option;\n};\n\n\n// WEBPACK FOOTER //\n// ./src/option.js","console.log('\\n %c DPlayer 1.2.0 %c http://dplayer.js.org \\n\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\n\nrequire('./DPlayer.scss');\nconst svg = require('./svg.js');\nconst handleOption = require('./option.js');\nconst i18n = require('./i18n.js');\nconst html = require('./html.js');\nconst isMobile = /mobile/i.test(window.navigator.userAgent);\n\nlet index = 0;\n\nclass DPlayer {\n \n /**\n * DPlayer constructor function\n *\n * @param {Object} option - See README\n * @constructor\n */\n constructor (option) {\n this.option = handleOption(option);\n\n const tran = new i18n(this.option.lang).tran;\n\n /**\n * Update progress bar, including loading progress bar and play progress bar\n *\n * @param {String} type - Point out which bar it is, should be played loaded or volume\n * @param {Number} percentage\n * @param {String} direction - Point out the direction of this bar, Should be height or width\n */\n this.updateBar = (type, percentage, direction) => {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n };\n\n // define DPlayer events\n const eventTypes = ['play', 'pause', 'canplay', 'playing', 'ended', 'error'];\n this.event = {};\n for (let i = 0; i < eventTypes.length; i++) {\n this.event[eventTypes[i]] = [];\n }\n this.trigger = (type) => {\n for (let i = 0; i < this.event[type].length; i++) {\n this.event[type][i]();\n }\n };\n\n this.element = this.option.element;\n if (!this.option.danmaku) {\n this.element.classList.add('dplayer-no-danmaku');\n }\n if (isMobile) {\n this.element.classList.add('dplayer-mobile');\n }\n\n this.element.innerHTML = html.main(option, index, tran);\n\n // arrow style\n this.arrow = this.element.offsetWidth <= 500;\n if (this.arrow) {\n const arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = `.dplayer .dplayer-danmaku{font-size:18px}`;\n document.head.appendChild(arrowStyle);\n }\n\n // get this video object\n this.video = this.element.getElementsByClassName('dplayer-video')[0];\n\n // Support HTTP Live Streaming\n let enablehls;\n if (this.option.video.type === 'auto') {\n enablehls = /m3u8(#|\\?|$)/i.exec(this.option.video.url);\n }\n else if (this.option.video.type === 'hls') {\n enablehls = true;\n }\n else {\n enablehls = false;\n }\n if (enablehls && Hls.isSupported()) {\n // this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none';\n const hls = new Hls();\n hls.attachMedia(this.video);\n hls.on(Hls.Events.MEDIA_ATTACHED, () => {\n hls.loadSource(this.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n console.log(\"manifest loaded, found \" + data.levels.length + \" quality level\");\n });\n });\n }\n\n // Support FLV\n let enableflv;\n if (this.option.video.type === 'auto') {\n enableflv = /.flv(#|\\?|$)/i.exec(this.option.video.url);\n }\n else if (this.option.video.type === 'flv') {\n enableflv = true;\n }\n else {\n enableflv = false;\n }\n if (enableflv && flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: this.option.video.url\n });\n flvPlayer.attachMediaElement(this.video);\n flvPlayer.load();\n }\n\n this.bezel = this.element.getElementsByClassName('dplayer-bezel-icon')[0];\n this.bezel.addEventListener('animationend', () => {\n this.bezel.classList.remove('dplayer-bezel-transition');\n });\n\n // play and pause button\n this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', () => {\n this.toggle();\n });\n\n const videoWrap = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n const conMask = this.element.getElementsByClassName('dplayer-controller-mask')[0];\n if (!isMobile) {\n videoWrap.addEventListener('click', () => {\n this.toggle();\n });\n conMask.addEventListener('click', () => {\n this.toggle();\n });\n }\n else {\n const toggleController = () => {\n if (this.element.classList.contains('dplayer-hide-controller')) {\n this.element.classList.remove('dplayer-hide-controller');\n }\n else {\n this.element.classList.add('dplayer-hide-controller');\n }\n };\n videoWrap.addEventListener('click', toggleController);\n conMask.addEventListener('click', toggleController);\n }\n\n\n /**\n * Parse second to 00:00 format\n *\n * @param {Number} second\n * @return {String} 00:00 format\n */\n const secondToTime = (second) => {\n const add0 = (num) => num < 10 ? '0' + num : '' + num;\n const min = parseInt(second / 60);\n const sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n };\n\n /**\n * control play progress\n */\n // get element's view position\n const getElementViewLeft = (element) => {\n let actualLeft = element.offsetLeft;\n let current = element.offsetParent;\n const elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n else {\n while (current !== null && current !== this.element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n };\n\n const bar = {};\n bar.playedBar = this.element.getElementsByClassName('dplayer-played')[0];\n bar.loadedBar = this.element.getElementsByClassName('dplayer-loaded')[0];\n const pbar = this.element.getElementsByClassName('dplayer-bar-wrap')[0];\n const pbarTimeTips = this.element.getElementsByClassName('dplayer-bar-time')[0];\n let barWidth;\n\n if (this.option.danmaku) {\n this.video.addEventListener('seeking', () => {\n for (let i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.video.currentTime) {\n this.danIndex = i;\n return;\n }\n this.danIndex = this.dan.length;\n }\n });\n }\n\n let lastPlayPos = 0;\n let currentPlayPos = 0;\n let bufferingDetected = false;\n let danmakuTime;\n this.setTime = () => {\n this.playedTime = setInterval(() => {\n // whether the video is buffering\n currentPlayPos = this.video.currentTime;\n if (!bufferingDetected\n && currentPlayPos < lastPlayPos + 0.01\n && !this.video.paused) {\n this.element.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected\n && currentPlayPos > lastPlayPos + 0.01\n && !this.video.paused) {\n this.element.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n\n this.updateBar('played', this.video.currentTime / this.video.duration, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(this.video.currentTime);\n this.trigger('playing');\n }, 100);\n if (this.option.danmaku && showdan) {\n danmakuTime = setInterval(() => {\n if (this.dan) {\n let item = this.dan[this.danIndex];\n while (item && this.video.currentTime > parseFloat(item.time)) {\n this.pushDanmaku(item.text, item.color, item.type);\n item = this.dan[++this.danIndex];\n }\n }\n }, 100);\n }\n };\n this.clearTime = () => {\n clearInterval(this.playedTime);\n if (this.option.danmaku) {\n clearInterval(danmakuTime);\n }\n };\n\n pbar.addEventListener('click', (event) => {\n const e = event || window.event;\n barWidth = pbar.clientWidth;\n let percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('played', percentage, 'width');\n this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * this.video.duration;\n });\n\n this.isTipsShow = false;\n this.timeTipsHandler = this.timeTipsHandler(\n pbar, pbarTimeTips, secondToTime).bind(this);\n pbar.addEventListener('mousemove', this.timeTipsHandler);\n pbar.addEventListener('mouseover', this.timeTipsHandler);\n pbar.addEventListener('mouseenter', this.timeTipsHandler);\n pbar.addEventListener('mouseout', this.timeTipsHandler);\n pbar.addEventListener('mouseleave', this.timeTipsHandler);\n\n const thumbMove = (event) => {\n const e = event || window.event;\n let percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('played', percentage, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(percentage * this.video.duration);\n };\n\n const thumbUp = () => {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * this.video.duration;\n this.setTime();\n };\n\n pbar.addEventListener('mousedown', () => {\n barWidth = pbar.clientWidth;\n this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n\n\n /**\n * control volume\n */\n bar.volumeBar = this.element.getElementsByClassName('dplayer-volume-bar-inner')[0];\n const volumeEle = this.element.getElementsByClassName('dplayer-volume')[0];\n const volumeBarWrapWrap = this.element.getElementsByClassName('dplayer-volume-bar-wrap')[0];\n const volumeBarWrap = this.element.getElementsByClassName('dplayer-volume-bar')[0];\n const volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n const vWidth = 35;\n\n this.switchVolumeIcon = () => {\n const volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n if (this.video.volume >= 0.8) {\n volumeicon.innerHTML = svg('volume-up');\n }\n else if (this.video.volume > 0) {\n volumeicon.innerHTML = svg('volume-down');\n }\n else {\n volumeicon.innerHTML = svg('volume-off');\n }\n };\n const volumeMove = (event) => {\n const e = event || window.event;\n const percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n this.volume(percentage);\n };\n const volumeUp = () => {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n volumeEle.classList.remove('dplayer-volume-active');\n };\n\n volumeBarWrapWrap.addEventListener('click', (event) => {\n const e = event || window.event;\n const percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n this.volume(percentage);\n });\n volumeBarWrapWrap.addEventListener('mousedown', () => {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n volumeEle.classList.add('dplayer-volume-active');\n });\n volumeicon.addEventListener('click', () => {\n if (this.video.muted) {\n this.video.muted = false;\n this.switchVolumeIcon();\n this.updateBar('volume', this.video.volume, 'width');\n }\n else {\n this.video.muted = true;\n volumeicon.innerHTML = svg('volume-off');\n this.updateBar('volume', 0, 'width');\n }\n });\n\n\n /**\n * auto hide controller\n */\n let hideTime = 0;\n if (!isMobile) {\n const hideController = () => {\n this.element.classList.remove('dplayer-hide-controller');\n clearTimeout(hideTime);\n hideTime = setTimeout(() => {\n if (this.video.played.length) {\n this.element.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n this.element.addEventListener('mousemove', hideController);\n this.element.addEventListener('click', hideController);\n }\n\n\n /**\n * setting\n */\n this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n const settingHTML = html.setting(tran);\n\n // toggle setting box\n const settingIcon = this.element.getElementsByClassName('dplayer-setting-icon')[0];\n const settingBox = this.element.getElementsByClassName('dplayer-setting-box')[0];\n const mask = this.element.getElementsByClassName('dplayer-mask')[0];\n settingBox.innerHTML = settingHTML.original;\n\n const closeSetting = () => {\n if (settingBox.classList.contains('dplayer-setting-box-open')) {\n settingBox.classList.remove('dplayer-setting-box-open');\n mask.classList.remove('dplayer-mask-show');\n setTimeout(() => {\n settingBox.classList.remove('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.original;\n settingEvent();\n }, 300);\n }\n };\n const openSetting = () => {\n settingBox.classList.add('dplayer-setting-box-open');\n mask.classList.add('dplayer-mask-show');\n };\n\n mask.addEventListener('click', () => {\n closeSetting();\n });\n settingIcon.addEventListener('click', () => {\n openSetting();\n });\n\n let loop = this.option.loop;\n const danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n let showdan = true;\n const settingEvent = () => {\n // loop control\n const loopEle = this.element.getElementsByClassName('dplayer-setting-loop')[0];\n const loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n\n loopToggle.checked = loop;\n\n loopEle.addEventListener('click', () => {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n loop = true;\n this.video.loop = loop;\n }\n else {\n loop = false;\n this.video.loop = loop;\n }\n closeSetting();\n });\n\n // show danmaku control\n const showDanEle = this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n const showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n\n showDanToggle.checked = showdan;\n\n showDanEle.addEventListener('click', () => {\n showDanToggle.checked = !showDanToggle.checked;\n if (showDanToggle.checked) {\n showdan = true;\n if (this.option.danmaku) {\n for (let i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.video.currentTime) {\n this.danIndex = i;\n break;\n }\n this.danIndex = this.dan.length;\n }\n danmakuTime = setInterval(() => {\n let item = this.dan[this.danIndex];\n while (item && this.video.currentTime >= parseFloat(item.time)) {\n this.pushDanmaku(item.text, item.color, item.type);\n item = this.dan[++this.danIndex];\n }\n }, 0);\n }\n }\n else {\n showdan = false;\n if (this.option.danmaku) {\n clearInterval(danmakuTime);\n danContainer.innerHTML = `
`;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n }\n }\n closeSetting();\n });\n\n // speed control\n const speedEle = this.element.getElementsByClassName('dplayer-setting-speed')[0];\n speedEle.addEventListener('click', () => {\n settingBox.classList.add('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.speed;\n\n const speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n for (let i = 0; i < speedItem.length; i++) {\n speedItem[i].addEventListener('click', () => {\n this.video.playbackRate = speedItem[i].dataset.speed;\n closeSetting();\n });\n }\n });\n\n if (this.option.danmaku) {\n // danmaku opacity\n bar.danmakuBar = this.element.getElementsByClassName('dplayer-danmaku-bar-inner')[0];\n const danmakuBarWrapWrap = this.element.getElementsByClassName('dplayer-danmaku-bar-wrap')[0];\n const danmakuBarWrap = this.element.getElementsByClassName('dplayer-danmaku-bar')[0];\n const danmakuSettingBox = this.element.getElementsByClassName('dplayer-setting-danmaku')[0];\n const dWidth = 130;\n this.updateBar('danmaku', this.danOpacity, 'width');\n\n const danmakuMove = (event) => {\n const e = event || window.event;\n let percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('danmaku', percentage, 'width');\n const items = this.element.getElementsByClassName('dplayer-danmaku-item');\n for (let i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', this.danOpacity);\n };\n const danmakuUp = () => {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n danmakuSettingBox.classList.remove('dplayer-setting-danmaku-active');\n };\n\n danmakuBarWrapWrap.addEventListener('click', (event) => {\n const e = event || window.event;\n let percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('danmaku', percentage, 'width');\n const items = this.element.getElementsByClassName('dplayer-danmaku-item');\n for (let i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', this.danOpacity);\n });\n danmakuBarWrapWrap.addEventListener('mousedown', () => {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n danmakuSettingBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n };\n settingEvent();\n\n\n /**\n * video events\n */\n // show video time: the metadata has loaded or changed\n this.video.addEventListener('durationchange', () => {\n if (this.video.duration !== 1) { // compatibility: Android browsers will output 1 at first\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = secondToTime(this.video.duration);\n }\n });\n\n // show video loaded bar: to inform interested parties of progress downloading the media\n this.video.addEventListener('progress', () => {\n const percentage = this.video.buffered.length ? this.video.buffered.end(this.video.buffered.length - 1) / this.video.duration : 0;\n this.updateBar('loaded', percentage, 'width');\n });\n\n // video download error: an error occurs\n this.video.addEventListener('error', () => {\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = `Error happens ╥﹏╥`;\n this.trigger('pause');\n });\n\n // video can play: enough data is available that the media can be played\n this.video.addEventListener('canplay', () => {\n this.trigger('canplay');\n });\n\n // music end\n this.ended = false;\n this.video.addEventListener('ended', () => {\n this.updateBar('played', 1, 'width');\n if (!loop) {\n this.ended = true;\n this.pause();\n this.trigger('ended');\n }\n });\n\n this.video.addEventListener('play', () => {\n if (this.paused) {\n this.play();\n }\n });\n\n this.video.addEventListener('pause', () => {\n if (!this.paused) {\n this.pause();\n }\n });\n\n // control volume\n this.video.volume = parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100;\n\n // loop\n this.video.loop = loop;\n\n // set duration time\n if (this.video.duration !== 1) { // compatibility: Android browsers will output 1 at first\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? secondToTime(this.video.duration) : '00:00';\n }\n\n // danmaku\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n }\n else {\n // autoplay\n if (this.option.autoplay && !isMobile) {\n this.play();\n }\n else if (isMobile) {\n this.pause();\n }\n }\n\n\n /**\n * comment\n */\n const commentInput = this.element.getElementsByClassName('dplayer-comment-input')[0];\n const commentIcon = this.element.getElementsByClassName('dplayer-comment-icon')[0];\n const commentBox = this.element.getElementsByClassName('dplayer-comment-box')[0];\n const commentSettingIcon = this.element.getElementsByClassName('dplayer-comment-setting-icon')[0];\n const commentSettingBox = this.element.getElementsByClassName('dplayer-comment-setting-box')[0];\n const commentSendIcon = this.element.getElementsByClassName('dplayer-send-icon')[0];\n\n const htmlEncode = (str) => str.\n replace(/&/g, \"&\").\n replace(//g, \">\").\n replace(/\"/g, \""\").\n replace(/'/g, \"'\").\n replace(/\\//g, \"/\");\n\n const sendComment = () => {\n commentInput.blur();\n\n // text can't be empty\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n alert(tran('Please input danmaku!'));\n return;\n }\n\n const danmakuData = {\n token: this.option.danmaku.token,\n player: this.option.danmaku.id,\n author: this.option.danmaku.user,\n time: this.video.currentTime,\n text: commentInput.value,\n color: this.element.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: this.element.querySelector('.dplayer-comment-setting-type input:checked').value\n };\n this.option.apiBackend.send(this.option.danmaku.api, danmakuData);\n\n commentInput.value = '';\n closeComment();\n this.dan.splice(this.danIndex, 0, danmakuData);\n this.danIndex++;\n const item = this.pushDanmaku(htmlEncode(danmakuData.text), danmakuData.color, danmakuData.type);\n item.style.border = `2px solid ${this.option.theme}`;\n };\n\n const closeCommentSetting = () => {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n const toggleCommentSetting = () => {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n else {\n commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n\n let disableHide = 0;\n let commentFocusTimeout = 0;\n const closeComment = () => {\n if (!commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n this.element.classList.remove('dplayer-show-controller');\n\n clearInterval(disableHide);\n clearTimeout(commentFocusTimeout);\n closeCommentSetting();\n };\n const openComment = () => {\n if (commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n this.element.classList.add('dplayer-show-controller');\n\n disableHide = setInterval(() => {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(() => {\n commentInput.focus();\n }, 300);\n };\n\n mask.addEventListener('click', () => {\n closeComment();\n });\n commentIcon.addEventListener('click', () => {\n openComment();\n });\n commentSettingIcon.addEventListener('click', () => {\n toggleCommentSetting();\n });\n\n // comment setting box\n this.element.getElementsByClassName('dplayer-comment-setting-color')[0].addEventListener('click', () => {\n const sele = this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked+span');\n if (sele) {\n commentSettingIcon.getElementsByClassName('dplayer-fill')[0].style.fill = this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked').value;\n }\n });\n\n commentInput.addEventListener('click', () => {\n closeCommentSetting();\n });\n commentInput.addEventListener('keydown', (e) => {\n const event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n\n commentSendIcon.addEventListener('click', sendComment);\n\n\n /**\n * full screen\n */\n const resetAnimation = () => {\n const danWidth = danContainer.offsetWidth;\n const items = this.element.getElementsByClassName('dplayer-danmaku-item');\n for (let i = 0; i < items.length; i++) {\n items[i].style.transform = `translateX(-${danWidth}px)`;\n }\n };\n\n this.element.addEventListener('fullscreenchange', () => {\n resetAnimation();\n });\n this.element.addEventListener('mozfullscreenchange', () => {\n resetAnimation();\n });\n this.element.addEventListener('webkitfullscreenchange', () => {\n resetAnimation();\n });\n // browser full screen\n this.element.getElementsByClassName('dplayer-full-icon')[0].addEventListener('click', () => {\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n if (this.element.requestFullscreen) {\n this.element.requestFullscreen();\n }\n else if (this.element.mozRequestFullScreen) {\n this.element.mozRequestFullScreen();\n }\n else if (this.element.webkitRequestFullscreen) {\n this.element.webkitRequestFullscreen();\n }\n else if (this.video.webkitEnterFullscreen) { // Safari for iOS\n this.video.webkitEnterFullscreen();\n }\n }\n else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n }\n else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n resetAnimation();\n });\n // web full screen\n this.element.getElementsByClassName('dplayer-full-in-icon')[0].addEventListener('click', () => {\n if (this.element.classList.contains('dplayer-fulled')) {\n this.element.classList.remove('dplayer-fulled');\n }\n else {\n this.element.classList.add('dplayer-fulled');\n resetAnimation();\n }\n });\n\n /**\n * hot key\n */\n const handleKeyDown = (e) => {\n const tag = document.activeElement.tagName.toUpperCase();\n const editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n const event = e || window.event;\n let percentage;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n this.toggle();\n break;\n case 37:\n event.preventDefault();\n this.video.currentTime = this.video.currentTime - 5;\n break;\n case 39:\n event.preventDefault();\n this.video.currentTime = this.video.currentTime + 5;\n break;\n case 38:\n event.preventDefault();\n percentage = this.video.volume + 0.1;\n this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = this.video.volume - 0.1;\n this.volume(percentage);\n break;\n }\n }\n };\n if (this.option.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', (e) => { // Press ESC to quit web full screen\n const event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (this.element.classList.contains('dplayer-fulled')) {\n this.element.classList.remove('dplayer-fulled');\n resetAnimation();\n }\n break;\n }\n });\n\n /**\n * right key\n */\n const menu = this.element.getElementsByClassName('dplayer-menu')[0];\n this.element.addEventListener('contextmenu', (e) => {\n const event = e || window.event;\n event.preventDefault();\n\n menu.classList.add('dplayer-menu-show');\n\n const clientRect = this.element.getBoundingClientRect();\n const menuLeft = event.clientX - clientRect.left;\n const menuTop = event.clientY - clientRect.top;\n if (menuLeft + menu.offsetWidth >= clientRect.width) {\n menu.style.right = clientRect.width - menuLeft + 'px';\n menu.style.left = 'initial';\n }\n else {\n menu.style.left = event.clientX - this.element.getBoundingClientRect().left + 'px';\n menu.style.right = 'initial';\n }\n if (menuTop + menu.offsetHeight >= clientRect.height) {\n menu.style.bottom = clientRect.height - menuTop + 'px';\n menu.style.top = 'initial';\n }\n else {\n menu.style.top = event.clientY - this.element.getBoundingClientRect().top + 'px';\n menu.style.bottom = 'initial';\n }\n\n mask.classList.add('dplayer-mask-show');\n mask.addEventListener('click', () => {\n mask.classList.remove('dplayer-mask-show');\n menu.classList.remove('dplayer-menu-show');\n });\n });\n\n /**\n * Screenshot\n */\n if (this.option.screenshot) {\n const camareIcon = this.element.getElementsByClassName('dplayer-camera-icon')[0];\n camareIcon.addEventListener('click', () => {\n const canvas = document.createElement(\"canvas\");\n canvas.width = this.video.videoWidth;\n canvas.height = this.video.videoHeight;\n canvas.getContext('2d').drawImage(this.video, 0, 0, canvas.width, canvas.height);\n\n camareIcon.href = canvas.toDataURL();\n camareIcon.download = \"DPlayer.png\";\n });\n }\n\n index++;\n }\n\n /**\n * Play music\n */\n play (time) {\n if (Object.prototype.toString.call(time) === '[object Number]') {\n this.video.currentTime = time;\n }\n this.paused = false;\n if (this.video.paused) {\n this.bezel.innerHTML = svg('play');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.playButton.innerHTML = svg('pause');\n\n this.video.play();\n if (this.playedTime) {\n this.clearTime();\n }\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n\n /**\n * Pause music\n */\n pause () {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n\n if (!this.video.paused) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.ended = false;\n this.playButton.innerHTML = svg('play');\n this.video.pause();\n this.clearTime();\n this.element.classList.remove('dplayer-playing');\n this.trigger('pause');\n }\n\n /**\n * Set volume\n */\n volume (percentage) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('volume', percentage, 'width');\n this.video.volume = percentage;\n if (this.video.muted) {\n this.video.muted = false;\n }\n this.switchVolumeIcon();\n }\n\n /**\n * Toggle between play and pause\n */\n toggle () {\n if (this.video.paused) {\n this.play();\n }\n else {\n this.pause();\n }\n }\n\n /**\n * attach event\n */\n on (name, func) {\n if (typeof func === 'function') {\n this.event[name].push(func);\n }\n }\n\n /**\n * Asynchronously read danmaku from all API endpoints\n */\n _readAllEndpoints (endpoints, finish) {\n const results = [];\n let readCount = 0;\n const cbk = (i) => (err, data) => {\n ++readCount;\n if (err) {\n if (err.response) {\n console.log(err.response.msg); \n }\n else {\n console.log('Request was unsuccessful: ' + err.status); \n }\n results[i] = [];\n }\n else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return finish(results);\n }\n };\n\n for (let i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n\n /**\n * Read danmaku from API\n */\n readDanmaku () {\n const isMobile = /mobile/i.test(window.navigator.userAgent);\n let apiurl;\n if (this.option.danmaku.maximum) {\n apiurl = `${this.option.danmaku.api}?id=${this.option.danmaku.id}&max=${this.option.danmaku.maximum}`;\n }\n else {\n apiurl = `${this.option.danmaku.api}?id=${this.option.danmaku.id}`;\n }\n const endpoints = (this.option.danmaku.addition || []).slice(0);\n endpoints.push(apiurl);\n\n this._readAllEndpoints(endpoints, (results) => {\n this.danIndex = 0;\n this.dan = [].concat.apply([], results).sort((a, b) => a.time - b.time);\n this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n\n // autoplay\n if (this.option.autoplay && !isMobile) {\n this.play();\n }\n else if (isMobile) {\n this.pause();\n }\n });\n }\n\n /**\n * Push a danmaku into DPlayer\n *\n * @param {String} text - danmaku content\n * @param {String} color - danmaku color, default: `#fff`\n * @param {String} type - danmaku type, `right` `top` `bottom`, default: `right`\n */\n pushDanmaku (text, color, type) {\n const danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n const itemHeight = this.arrow ? 24 : 30;\n const danWidth = danContainer.offsetWidth;\n const danHeight = danContainer.offsetHeight;\n const itemY = parseInt(danHeight / itemHeight);\n\n const danItemRight = (ele) => danContainer.getBoundingClientRect().right - ele.getBoundingClientRect().right;\n\n const danSpeed = (width) => (danWidth + width) / 5;\n\n const getTunnel = (ele, type, width) => {\n const tmp = danWidth / danSpeed(width);\n\n for (let i = 0; ; i++) {\n const item = this.danTunnel[type][i + ''];\n if (item && item.length) {\n for (let j = 0; j < item.length; j++) {\n const danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(item[j].offsetWidth) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n this.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', () => {\n this.danTunnel[type][i + ''].splice(0, 1);\n });\n return i % itemY;\n }\n }\n }\n else {\n this.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', () => {\n this.danTunnel[type][i + ''].splice(0, 1);\n });\n return i % itemY;\n }\n }\n };\n\n if (!type) {\n type = 'right';\n }\n if (!color) {\n color = '#fff';\n }\n const item = document.createElement(`div`);\n item.classList.add(`dplayer-danmaku-item`);\n item.classList.add(`dplayer-danmaku-${type}`);\n item.innerHTML = text;\n item.style.opacity = this.danOpacity;\n item.style.color = color;\n item.addEventListener('animationend', () => {\n danContainer.removeChild(item);\n });\n\n // measure\n this.itemDemo.innerHTML = text;\n const itemWidth = this.itemDemo.offsetWidth;\n\n // adjust\n switch (type) {\n case 'right':\n item.style.top = itemHeight * getTunnel(item, type, itemWidth) + 'px';\n item.style.width = itemWidth + 1 + 'px';\n item.style.transform = `translateX(-${danWidth}px)`;\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, type) + 'px';\n break;\n default:\n console.error(`Can't handled danmaku type: ${type}`);\n }\n\n // insert\n danContainer.appendChild(item);\n\n // move\n item.classList.add(`dplayer-danmaku-move`);\n\n return item;\n }\n\n /**\n * Switch to a new video\n *\n * @param {Object} video - new video info\n * @param {Object} danmaku - new danmaku info\n */\n switchVideo (video, danmaku) {\n this.video.src = video.url;\n this.video.poster = video.pic ? video.pic : '';\n this.video.currentTime = 0;\n this.pause();\n if (danmaku) {\n this.dan = [];\n this.danIndex = 0;\n this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'block';\n this.updateBar('played', 0, 'width');\n this.updateBar('loaded', 0, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = '00:00';\n this.element.getElementsByClassName('dplayer-danmaku')[0].innerHTML = `
`;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n\n timeTipsHandler (pbar, timeTips, secondToTime) {\n // http://stackoverflow.com/questions/1480133/how-can-i-get-an-objects-absolute-position-on-the-page-in-javascript\n const cumulativeOffset = (element) => {\n let top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n\n return {\n top: top,\n left: left\n };\n };\n\n return (e) => {\n if (!this.video.duration) {\n return;\n }\n const { clientX } = e;\n const px = cumulativeOffset(pbar).left;\n const tx = clientX - px;\n timeTips.innerText = secondToTime(this.video.duration * (tx / pbar.offsetWidth));\n timeTips.style.left = `${(tx - 20)}px`;\n switch (e.type) {\n case 'mouseenter':\n case 'mouseover':\n case 'mousemove':\n if (this.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n this.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!this.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n this.isTipsShow = false;\n break;\n }\n };\n }\n}\n\nmodule.exports = DPlayer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/DPlayer.js","/*\n * xhr.status ---> fail\n * response.code === 1 ---> success\n * response.code !== 1 ---> error\n * */\n\nconst SendXMLHttpRequest = (url, data, success, error, fail) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = () => {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n const response = JSON.parse(xhr.responseText);\n\n if (response.code !== 1) {\n return error(xhr, response);\n }\n\n return success(xhr, response);\n }\n\n fail(xhr);\n }\n };\n\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\n\nmodule.exports = {\n send: (endpoint, danmakuData) => {\n SendXMLHttpRequest(endpoint, danmakuData, (xhr, response) => {\n console.log('Post danmaku: ', response);\n }, (xhr, response) => {\n alert(response.msg);\n }, (xhr) => {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n\n read: (endpoint, cbk) => {\n SendXMLHttpRequest(endpoint, null, (xhr, response) => {\n cbk(null, response.danmaku);\n }, (xhr, response) => {\n cbk({ status: xhr.status, response });\n }, (xhr) => {\n cbk({ status: xhr.status, response: null });\n });\n }\n};\n\n\n// WEBPACK FOOTER //\n// ./src/api.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///DPlayer.min.js","webpack:///webpack/bootstrap a987d7fac9b0d90da2b3","webpack:///./src/svg.js","webpack:///./src/html.js","webpack:///./src/i18n.js","webpack:///./src/option.js","webpack:///./src/utils.js","webpack:///./src/video.js","webpack:///./src/DPlayer.js","webpack:///./src/api.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","svgSource","play","pause","volume-up","volume-down","volume-off","loop","full","full-in","setting","right","comment","comment-off","send","menu","camera","type","svg","main","option","index","tran","videos","video","url","length","pic","screenshot","preload","danmaku","theme","original","localStorage","getItem","speed","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","lang","_this","text","defaultApiBackend","test","window","navigator","userAgent","autoplay","defaultOption","element","document","getElementsByClassName","language","indexOf","hotkey","apiBackend","defaultKey","toString","user","secondToTime","second","add0","num","min","parseInt","sec","getElementViewLeft","actualLeft","offsetLeft","current","offsetParent","elementScrollLeft","body","scrollLeft","documentElement","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","undefined","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","descriptor","writable","key","protoProps","staticProps","Video","multi","duration","durationArr","eventAll","eventCurrent","on","reduce","sum","cur","switch","time","classList","add","paused","remove","currentTime","event","callback","_this2","push","addEventListener","events","slice","Math","max","tmptime","trigger","_typeof","Symbol","iterator","obj","constructor","console","log","utils","handleOption","i18n","html","isMobile","DPlayer","updateBar","percentage","direction","bar","style","eventTypes","innerHTML","arrow","offsetWidth","arrowStyle","createElement","head","appendChild","exec","Hls","isSupported","hls","attachMedia","Events","MEDIA_ATTACHED","loadSource","MANIFEST_PARSED","data","levels","flvjs","flvPlayer","createPlayer","attachMediaElement","load","bezel","playButton","toggle","videoWrap","conMask","toggleController","contains","playedBar","loadedBar","pbar","pbarTimeTips","barWidth","dan","danIndex","lastPlayPos","currentPlayPos","bufferingDetected","danmakuTime","setTime","playedTime","setInterval","attr","showdan","item","parseFloat","pushDanmaku","color","clearTime","clearInterval","e","clientWidth","clientX","seek","width","isTipsShow","timeTipsHandler","bind","thumbMove","thumbUp","removeEventListener","volumeBar","volumeEle","volumeBarWrapWrap","volumeBarWrap","volumeicon","switchVolumeIcon","volumeMove","volume","volumeUp","hideTime","hideController","clearTimeout","setTimeout","closeSetting","closeComment","danOpacity","settingHTML","settingIcon","settingBox","mask","settingEvent","openSetting","danContainer","loopEle","loopToggle","checked","showDanEle","showDanToggle","danTunnel","top","bottom","itemDemo","speedItem","dataset","danmakuBar","danmakuBarWrapWrap","danmakuBarWrap","danmakuSettingBox","danmakuMove","items","opacity","setItem","danmakuUp","buffered","end","ended","readDanmaku","commentInput","commentIcon","commentBox","commentSettingIcon","commentSettingBox","commentSendIcon","htmlEncode","str","replace","sendComment","blur","alert","danmakuData","token","player","id","author","querySelector","api","splice","border","closeCommentSetting","toggleCommentSetting","disableHide","commentFocusTimeout","openComment","focus","fill","keyCode","resetAnimation","danWidth","transform","cancelFullScreen","mozCancelFullScreen","webkitCancelFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","webkitEnterFullscreen","handleKeyDown","tag","activeElement","tagName","toUpperCase","editable","getAttribute","preventDefault","clientRect","getBoundingClientRect","menuLeft","left","menuTop","clientY","offsetHeight","height","camareIcon","canvas","getContext","drawImage","href","toDataURL","download","endpoints","finish","results","readCount","read","err","response","msg","status","apiurl","maximum","addition","_readAllEndpoints","concat","apply","sort","a","b","display","_this3","itemHeight","danHeight","itemY","danItemRight","ele","danSpeed","getTunnel","tmp","_ret2","v","j","danRight","removeChild","itemWidth","error","src","poster","timeTips","_this4","cumulativeOffset","offsetTop","px","tx","innerText","SendXMLHttpRequest","success","fail","xhr","XMLHttpRequest","onreadystatechange","readyState","JSON","parse","responseText","code","open","stringify","endpoint","cbk"],"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,MACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAV,WAUA,OANAK,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,GAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KA+DA,OAnCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAG,EAAA,SAAAK,GAA2C,MAAAA,IAG3CR,EAAAS,EAAA,SAAAf,EAAAgB,EAAAC,GACAX,EAAAY,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAX,EAAAkB,EAAA,SAAAvB,GACA,GAAAgB,GAAAhB,KAAAwB,WACA,WAA2B,MAAAxB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAK,GAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,IAGtDrB,EAAAwB,EAAA,GAGAxB,IAAAyB,EAAA,KDgBM,SAAU9B,EAAQD,EAASM,GAEjC,YE9EA,IAAM0B,IACFC,MAAS,YAAa,uJACtBC,OAAU,YAAa,4LACvBC,aAAc,YAAa,qsCAC3BC,eAAgB,YAAa,wfAC7BC,cAAe,YAAa,yMAC5BC,MAAS,YAAa,sbACtBC,MAAS,YAAa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X,SAAUhL,EAAQD,EAASM,GAEjC,YS9oDA,IAAM0Y,GAAqB,SAACxV,EAAKgJ,EAAMyM,EAASX,EAAOY,GACnD,GAAMC,GAAM,GAAIC,eAEhBD,GAAIE,mBAAqB,WACrB,GAAuB,IAAnBF,EAAIG,WAAkB,CACtB,GAAIH,EAAIvC,QAAU,KAAOuC,EAAIvC,OAAS,KAAsB,MAAfuC,EAAIvC,OAAgB,CAC7D,GAAMF,GAAW6C,KAAKC,MAAML,EAAIM,aAEhC,OAAsB,KAAlB/C,EAASgD,KACFpB,EAAMa,EAAKzC,GAGfuC,EAAQE,EAAKzC,GAGxBwC,EAAKC,KAIbA,EAAIQ,KAAc,OAATnN,EAAgB,OAAS,MAAOhJ,GAAK,GAC9C2V,EAAItW,KAAc,OAAT2J,EAAgB+M,KAAKK,UAAUpN,GAAQ,MAGpDvM,GAAOD,SACH6C,KAAM,SAACgX,EAAU3G,GACb8F,EAAmBa,EAAU3G,EAAa,SAACiG,EAAKzC,GAC5ChM,QAAQC,IAAI,iBAAkB+L,IAC/B,SAACyC,EAAKzC,GACLzD,MAAMyD,EAASC,MAChB,SAACwC,GACAzO,QAAQC,IAAI,6BAA+BwO,EAAIvC,WAIvDJ,KAAM,SAACqD,EAAUC,GACbd,EAAmBa,EAAU,KAAM,SAACV,EAAKzC,GACrCoD,EAAI,KAAMpD,EAAS7S,UACpB,SAACsV,EAAKzC,GACLoD,GAAMlD,OAAQuC,EAAIvC,OAAQF,cAC3B,SAACyC,GACAW,GAAMlD,OAAQuC,EAAIvC,OAAQF,SAAU","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","(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/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n* SVG used by DPlayer\n*/\n\nvar svgSource = {\n '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 '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 '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 '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 '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 '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 '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 'full-in': ['0 0 32 33', 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'],\n '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 '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 '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 '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 '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 '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 '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};\n\nmodule.exports = function (type) {\n return '\\n \\n \\n \\n \\n';\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar svg = __webpack_require__(0);\n\nmodule.exports = {\n main: function main(option, index, tran) {\n var videos = '';\n for (var i = 0; i < option.video.url.length; i++) {\n videos += '';\n }\n return '\\n
\\n
\\n ' + videos + '\\n
\\n
\\n
\\n
\\n \\n ' + (option.danmaku ? '' + tran('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 ' + (option.screenshot ? '\\n \\n ' + svg('camera') + '\\n \\n ' : '') + '\\n
\\n \\n
\\n \\n
\\n
\\n
' + tran('Set danmaku color') + '
\\n \\n \\n \\n \\n \\n \\n
\\n
\\n
' + tran('Set danmaku type') + '
\\n \\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
00:00
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
\\n ';\n },\n\n setting: function setting(tran) {\n return {\n 'original': '\\n
\\n ' + tran('Speed') + '\\n
\\n ' + svg('right') + '\\n
\\n
\\n
\\n ' + tran('Loop') + '\\n
\\n \\n \\n
\\n
\\n
\\n ' + tran('Danmaku') + '\\n
\\n \\n \\n
\\n
\\n
\\n ' + tran('Opacity for danmaku') + '\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n
',\n 'speed': '\\n
\\n 0.5\\n
\\n
\\n 0.75\\n
\\n
\\n ' + tran('Normal') + '\\n
\\n
\\n 1.25\\n
\\n
\\n 1.5\\n
\\n
\\n 2\\n
'\n };\n }\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕,回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku!': '要输入弹幕内容啊喂!',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕'\n};\n\nmodule.exports = function (lang) {\n var _this = this;\n\n this.lang = lang;\n this.tran = function (text) {\n if (_this.lang === 'en') {\n return text;\n } else if (_this.lang === 'zh') {\n return tranZH[text];\n }\n };\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar defaultApiBackend = __webpack_require__(8);\n\nmodule.exports = function (option) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n // compatibility: some mobile browsers don't suppose autoplay\n if (isMobile) {\n option.autoplay = false;\n }\n\n // default options\n var defaultOption = {\n element: document.getElementsByClassName('dplayer')[0],\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: navigator.language.indexOf('zh') !== -1 ? 'zh' : 'en',\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n apiBackend: defaultApiBackend\n };\n for (var defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !option.hasOwnProperty(defaultKey)) {\n option[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (Object.prototype.toString.call(option.video.url) !== '[object Array]') {\n option.video.url = [option.video.url];\n }\n if (option.video && !option.video.hasOwnProperty('type')) {\n option.video.type = 'auto';\n }\n if (option.danmaku && !option.danmaku.hasOwnProperty('user')) {\n option.danmaku.user = 'DIYgod';\n }\n\n return option;\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n\n /**\n * Parse second to 00:00 format\n *\n * @param {Number} second\n * @return {String} 00:00 format\n */\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n\n /**\n * control play progress\n */\n // get element's view position\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== undefined.element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n }\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Video = function () {\n function Video(videos) {\n var _this = this;\n\n _classCallCheck(this, Video);\n\n this.videos = videos;\n this.multi = this.videos.length > 1;\n this.index = 0;\n this.current = this.videos[this.index];\n\n this.duration = 0;\n this.durationArr = [];\n this.eventAll = [];\n this.eventCurrent = [];\n\n this.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n // some Android browsers will output 1 at first\n _this.durationArr[i] = video.duration;\n _this.duration = _this.durationArr.reduce(function (sum, cur) {\n return sum + cur;\n });\n }\n });\n this.on('current', 'end', function () {\n _this.switch(_this.index + 1);\n });\n }\n\n _createClass(Video, [{\n key: 'switch',\n value: function _switch(index, time) {\n if (this.index !== index) {\n this.videos[index].classList.add('dplayer-video-current');\n if (!this.current.paused) {\n this.videos[index].play();\n }\n this.current.classList.remove('dplayer-video-current');\n this.current.pause();\n\n this.index = index;\n this.current = this.videos[this.index];\n this.videos[index].currentTime = time ? time : 0;\n } else {\n this.videos[index].currentTime = time ? time : 0;\n }\n }\n\n // bind event \n\n }, {\n key: 'on',\n value: function on(type, event, callback) {\n var _this2 = this;\n\n if (typeof callback === 'function') {\n if (type === 'all') {\n if (!this.eventAll[event]) {\n this.eventAll[event] = [];\n }\n this.eventAll[event].push(callback);\n } else {\n if (!this.eventCurrent[event]) {\n this.eventCurrent[event] = [];\n }\n this.eventCurrent[event].push(callback);\n }\n\n if (['seeking'].indexOf(event) === -1) {\n var _loop = function _loop(i) {\n _this2.videos[i].addEventListener(event, function () {\n if (type === 'all' || _this2.videos[i] === _this2.current) {\n callback(i, _this2.videos[i]);\n }\n });\n };\n\n for (var i = 0; i < this.videos.length; i++) {\n _loop(i);\n }\n }\n }\n }\n\n // trigger event\n\n }, {\n key: 'trigger',\n value: function trigger(type, event) {\n var events = type === 'all' ? this.eventAll : this.eventCurrent;\n for (var i = 0; i < events[event].length; i++) {\n events[event][i]();\n }\n }\n }, {\n key: 'currentTime',\n value: function currentTime() {\n if (this.durationArr.slice(0, this.index).length) {\n return this.durationArr.slice(0, this.index).reduce(function (sum, cur) {\n return sum + cur;\n }) + this.current.currentTime;\n } else {\n return this.current.currentTime;\n }\n }\n }, {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n time = Math.min(time, this.duration);\n\n var i = 0;\n var tmptime = 0;\n while (tmptime <= time) {\n tmptime += this.durationArr[i];\n i++;\n }\n\n var currentTime = void 0;\n if (this.durationArr.slice(0, this.index).length) {\n currentTime = time - this.durationArr.slice(0, i - 1).reduce(function (sum, cur) {\n return sum + cur;\n });\n } else {\n currentTime = time;\n }\n\n this.switch(i - 1, currentTime);\n\n this.trigger('all', 'seeking');\n }\n }, {\n key: 'attr',\n value: function attr(option, value) {\n if (value !== undefined) {\n for (var i = 0; i < this.videos.length; i++) {\n this.videos[i][option] = value;\n }\n }\n return this.current[option];\n }\n }, {\n key: 'play',\n value: function play() {\n this.current.play();\n }\n }, {\n key: 'pause',\n value: function pause() {\n this.current.pause();\n }\n }, {\n key: 'toggle',\n value: function toggle() {\n this.current.paused ? this.play() : this.pause();\n }\n }]);\n\n return Video;\n}();\n\nmodule.exports = Video;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nconsole.log('\\n %c DPlayer 1.2.0 %c http://dplayer.js.org \\n\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\n\n__webpack_require__(6);\nvar utils = __webpack_require__(4);\nvar svg = __webpack_require__(0);\nvar handleOption = __webpack_require__(3);\nvar i18n = __webpack_require__(2);\nvar html = __webpack_require__(1);\nvar Video = __webpack_require__(5);\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\n\nvar index = 0;\n\nvar DPlayer = function () {\n\n /**\n * DPlayer constructor function\n *\n * @param {Object} option - See README\n * @constructor\n */\n function DPlayer(option) {\n var _this = this;\n\n _classCallCheck(this, DPlayer);\n\n this.option = handleOption(option);\n\n var tran = new i18n(this.option.lang).tran;\n\n /**\n * Update progress bar, including loading progress bar and play progress bar\n *\n * @param {String} type - Point out which bar it is, should be played loaded or volume\n * @param {Number} percentage\n * @param {String} direction - Point out the direction of this bar, Should be height or width\n */\n this.updateBar = function (type, percentage, direction) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n };\n\n // define DPlayer events\n var eventTypes = ['play', 'pause', 'canplay', 'playing', 'ended', 'error'];\n this.event = {};\n for (var i = 0; i < eventTypes.length; i++) {\n this.event[eventTypes[i]] = [];\n }\n this.trigger = function (type) {\n for (var _i = 0; _i < _this.event[type].length; _i++) {\n _this.event[type][_i]();\n }\n };\n\n this.element = this.option.element;\n if (!this.option.danmaku) {\n this.element.classList.add('dplayer-no-danmaku');\n }\n if (isMobile) {\n this.element.classList.add('dplayer-mobile');\n }\n\n this.element.innerHTML = html.main(option, index, tran);\n\n // arrow style\n this.arrow = this.element.offsetWidth <= 500;\n if (this.arrow) {\n var arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = '.dplayer .dplayer-danmaku{font-size:18px}';\n document.head.appendChild(arrowStyle);\n }\n\n // get this video manager\n this.video = new Video(this.element.getElementsByClassName('dplayer-video'));\n\n // Support HTTP Live Streaming\n var enablehls = void 0;\n if (this.option.video.type === 'auto') {\n enablehls = /m3u8(#|\\?|$)/i.exec(this.option.video.url);\n } else if (this.option.video.type === 'hls') {\n enablehls = true;\n } else {\n enablehls = false;\n }\n if (enablehls && Hls.isSupported()) {\n // this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none';\n var hls = new Hls();\n hls.attachMedia(this.video.current);\n hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n hls.loadSource(_this.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n console.log(\"manifest loaded, found \" + data.levels.length + \" quality level\");\n });\n });\n }\n\n // Support FLV\n var enableflv = void 0;\n if (this.option.video.type === 'auto') {\n enableflv = /.flv(#|\\?|$)/i.exec(this.option.video.url);\n } else if (this.option.video.type === 'flv') {\n enableflv = true;\n } else {\n enableflv = false;\n }\n if (enableflv && flvjs.isSupported()) {\n var flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: this.option.video.url\n });\n flvPlayer.attachMediaElement(this.video.current);\n flvPlayer.load();\n }\n\n this.bezel = this.element.getElementsByClassName('dplayer-bezel-icon')[0];\n this.bezel.addEventListener('animationend', function () {\n _this.bezel.classList.remove('dplayer-bezel-transition');\n });\n\n // play and pause button\n this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', function () {\n _this.toggle();\n });\n\n var videoWrap = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n var conMask = this.element.getElementsByClassName('dplayer-controller-mask')[0];\n if (!isMobile) {\n videoWrap.addEventListener('click', function () {\n _this.toggle();\n });\n conMask.addEventListener('click', function () {\n _this.toggle();\n });\n } else {\n var toggleController = function toggleController() {\n if (_this.element.classList.contains('dplayer-hide-controller')) {\n _this.element.classList.remove('dplayer-hide-controller');\n } else {\n _this.element.classList.add('dplayer-hide-controller');\n }\n };\n videoWrap.addEventListener('click', toggleController);\n conMask.addEventListener('click', toggleController);\n }\n\n var bar = {};\n bar.playedBar = this.element.getElementsByClassName('dplayer-played')[0];\n bar.loadedBar = this.element.getElementsByClassName('dplayer-loaded')[0];\n var pbar = this.element.getElementsByClassName('dplayer-bar-wrap')[0];\n var pbarTimeTips = this.element.getElementsByClassName('dplayer-bar-time')[0];\n var barWidth = void 0;\n\n if (this.option.danmaku) {\n this.video.on('all', 'seeking', function () {\n for (var _i2 = 0; _i2 < _this.dan.length; _i2++) {\n if (_this.dan[_i2].time >= _this.video.currentTime()) {\n _this.danIndex = _i2;\n return;\n }\n _this.danIndex = _this.dan.length;\n }\n });\n }\n\n var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n var danmakuTime = void 0;\n this.setTime = function () {\n _this.playedTime = setInterval(function () {\n // whether the video is buffering\n currentPlayPos = _this.video.currentTime();\n if (!bufferingDetected && currentPlayPos < lastPlayPos + 0.01 && !_this.video.attr('paused')) {\n _this.element.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected && currentPlayPos > lastPlayPos + 0.01 && !_this.video.attr('paused')) {\n _this.element.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n\n _this.updateBar('played', _this.video.currentTime() / _this.video.duration, 'width');\n _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = utils.secondToTime(_this.video.currentTime());\n _this.trigger('playing');\n }, 100);\n if (_this.option.danmaku && showdan) {\n danmakuTime = setInterval(function () {\n if (_this.dan) {\n var item = _this.dan[_this.danIndex];\n while (item && _this.video.currentTime() > parseFloat(item.time)) {\n _this.pushDanmaku(item.text, item.color, item.type);\n item = _this.dan[++_this.danIndex];\n }\n }\n }, 100);\n }\n };\n this.clearTime = function () {\n clearInterval(_this.playedTime);\n if (_this.option.danmaku) {\n clearInterval(danmakuTime);\n }\n };\n\n pbar.addEventListener('click', function (event) {\n var e = event || window.event;\n barWidth = pbar.clientWidth;\n var percentage = (e.clientX - utils.getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.video.seek(parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration);\n });\n\n this.isTipsShow = false;\n this.timeTipsHandler = this.timeTipsHandler(pbar, pbarTimeTips).bind(this);\n pbar.addEventListener('mousemove', this.timeTipsHandler);\n pbar.addEventListener('mouseover', this.timeTipsHandler);\n pbar.addEventListener('mouseenter', this.timeTipsHandler);\n pbar.addEventListener('mouseout', this.timeTipsHandler);\n pbar.addEventListener('mouseleave', this.timeTipsHandler);\n\n var thumbMove = function thumbMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - utils.getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('played', percentage, 'width');\n _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = utils.secondToTime(percentage * _this.video.duration);\n };\n\n var thumbUp = function thumbUp() {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n _this.video.seek(parseFloat(bar.playedBar.style.width) / 100 * _this.video.duration);\n _this.setTime();\n };\n\n pbar.addEventListener('mousedown', function () {\n barWidth = pbar.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n\n /**\n * control volume\n */\n bar.volumeBar = this.element.getElementsByClassName('dplayer-volume-bar-inner')[0];\n var volumeEle = this.element.getElementsByClassName('dplayer-volume')[0];\n var volumeBarWrapWrap = this.element.getElementsByClassName('dplayer-volume-bar-wrap')[0];\n var volumeBarWrap = this.element.getElementsByClassName('dplayer-volume-bar')[0];\n var volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n var vWidth = 35;\n\n this.switchVolumeIcon = function () {\n var volumeicon = _this.element.getElementsByClassName('dplayer-volume-icon')[0];\n if (_this.video.attr('volume') >= 0.8) {\n volumeicon.innerHTML = svg('volume-up');\n } else if (_this.video.attr('volume') > 0) {\n volumeicon.innerHTML = svg('volume-down');\n } else {\n volumeicon.innerHTML = svg('volume-off');\n }\n };\n var volumeMove = function volumeMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - utils.getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n };\n var volumeUp = function volumeUp() {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n volumeEle.classList.remove('dplayer-volume-active');\n };\n\n volumeBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - utils.getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n _this.volume(percentage);\n });\n volumeBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n volumeEle.classList.add('dplayer-volume-active');\n });\n volumeicon.addEventListener('click', function () {\n if (_this.video.attr('muted')) {\n _this.video.attr('muted', false);\n _this.switchVolumeIcon();\n _this.updateBar('volume', _this.video.attr('volume'), 'width');\n } else {\n _this.video.attr('muted', true);\n volumeicon.innerHTML = svg('volume-off');\n _this.updateBar('volume', 0, 'width');\n }\n });\n\n /**\n * auto hide controller\n */\n var hideTime = 0;\n if (!isMobile) {\n var hideController = function hideController() {\n _this.element.classList.remove('dplayer-hide-controller');\n clearTimeout(hideTime);\n hideTime = setTimeout(function () {\n if (_this.video.attr('played').length) {\n _this.element.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n this.element.addEventListener('mousemove', hideController);\n this.element.addEventListener('click', hideController);\n }\n\n /**\n * setting\n */\n this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n var settingHTML = html.setting(tran);\n\n // toggle setting box\n var settingIcon = this.element.getElementsByClassName('dplayer-setting-icon')[0];\n var settingBox = this.element.getElementsByClassName('dplayer-setting-box')[0];\n var mask = this.element.getElementsByClassName('dplayer-mask')[0];\n settingBox.innerHTML = settingHTML.original;\n\n var closeSetting = function closeSetting() {\n if (settingBox.classList.contains('dplayer-setting-box-open')) {\n settingBox.classList.remove('dplayer-setting-box-open');\n mask.classList.remove('dplayer-mask-show');\n setTimeout(function () {\n settingBox.classList.remove('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.original;\n settingEvent();\n }, 300);\n }\n };\n var openSetting = function openSetting() {\n settingBox.classList.add('dplayer-setting-box-open');\n mask.classList.add('dplayer-mask-show');\n };\n\n mask.addEventListener('click', function () {\n closeSetting();\n });\n settingIcon.addEventListener('click', function () {\n openSetting();\n });\n\n var loop = this.option.loop;\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var showdan = true;\n var settingEvent = function settingEvent() {\n // loop control\n var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n\n loopToggle.checked = loop;\n\n loopEle.addEventListener('click', function () {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n loop = true;\n } else {\n loop = false;\n }\n closeSetting();\n });\n\n // show danmaku control\n var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n\n showDanToggle.checked = showdan;\n\n showDanEle.addEventListener('click', function () {\n showDanToggle.checked = !showDanToggle.checked;\n if (showDanToggle.checked) {\n showdan = true;\n if (_this.option.danmaku) {\n for (var _i3 = 0; _i3 < _this.dan.length; _i3++) {\n if (_this.dan[_i3].time >= _this.video.currentTime()) {\n _this.danIndex = _i3;\n break;\n }\n _this.danIndex = _this.dan.length;\n }\n danmakuTime = setInterval(function () {\n var item = _this.dan[_this.danIndex];\n while (item && _this.video.currentTime() >= parseFloat(item.time)) {\n _this.pushDanmaku(item.text, item.color, item.type);\n item = _this.dan[++_this.danIndex];\n }\n }, 0);\n }\n } else {\n showdan = false;\n if (_this.option.danmaku) {\n clearInterval(danmakuTime);\n danContainer.innerHTML = '
';\n _this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n _this.itemDemo = _this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n }\n }\n closeSetting();\n });\n\n // speed control\n var speedEle = _this.element.getElementsByClassName('dplayer-setting-speed')[0];\n speedEle.addEventListener('click', function () {\n settingBox.classList.add('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.speed;\n\n var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n\n var _loop = function _loop(_i4) {\n speedItem[_i4].addEventListener('click', function () {\n _this.video.attr('playbackRate', speedItem[_i4].dataset.speed);\n closeSetting();\n });\n };\n\n for (var _i4 = 0; _i4 < speedItem.length; _i4++) {\n _loop(_i4);\n }\n });\n\n if (_this.option.danmaku) {\n // danmaku opacity\n bar.danmakuBar = _this.element.getElementsByClassName('dplayer-danmaku-bar-inner')[0];\n var danmakuBarWrapWrap = _this.element.getElementsByClassName('dplayer-danmaku-bar-wrap')[0];\n var danmakuBarWrap = _this.element.getElementsByClassName('dplayer-danmaku-bar')[0];\n var danmakuSettingBox = _this.element.getElementsByClassName('dplayer-setting-danmaku')[0];\n var dWidth = 130;\n _this.updateBar('danmaku', _this.danOpacity, 'width');\n\n var danmakuMove = function danmakuMove(event) {\n var e = event || window.event;\n var percentage = (e.clientX - utils.getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('danmaku', percentage, 'width');\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i5 = 0; _i5 < items.length; _i5++) {\n items[_i5].style.opacity = percentage;\n }\n _this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', _this.danOpacity);\n };\n var danmakuUp = function danmakuUp() {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n danmakuSettingBox.classList.remove('dplayer-setting-danmaku-active');\n };\n\n danmakuBarWrapWrap.addEventListener('click', function (event) {\n var e = event || window.event;\n var percentage = (e.clientX - utils.getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n _this.updateBar('danmaku', percentage, 'width');\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i6 = 0; _i6 < items.length; _i6++) {\n items[_i6].style.opacity = percentage;\n }\n _this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', _this.danOpacity);\n });\n danmakuBarWrapWrap.addEventListener('mousedown', function () {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n danmakuSettingBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n };\n settingEvent();\n\n /**\n * video events\n */\n // show video time: the metadata has loaded or changed\n this.video.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n // compatibility: Android browsers will output 1 at first\n _this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(_this.video.duration);\n }\n });\n\n // show video loaded bar: to inform interested parties of progress downloading the media\n this.video.on('current', 'progress', function (i, video) {\n var percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0;\n _this.updateBar('loaded', percentage, 'width');\n });\n\n // video download error: an error occurs\n this.video.on('all', 'error', function () {\n _this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = 'Error happens \\u2565\\uFE4F\\u2565';\n _this.trigger('pause');\n });\n\n // video can play: enough data is available that the media can be played\n this.video.on('current', 'canplay', function () {\n _this.trigger('canplay');\n });\n\n // music end\n this.ended = false;\n this.video.on('all', 'ended', function (i) {\n if (i === _this.video.videos.length - 1) {\n _this.updateBar('played', 1, 'width');\n console.log(loop);\n if (!loop) {\n _this.ended = true;\n _this.pause();\n _this.trigger('ended');\n } else {\n _this.video.switch(0);\n _this.video.play();\n }\n }\n });\n\n this.video.on('current', 'play', function () {\n if (_this.paused) {\n _this.play();\n }\n });\n\n this.video.on('current', 'pause', function () {\n if (!_this.paused) {\n _this.pause();\n }\n });\n\n // control volume\n this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100);\n\n // set duration time\n if (this.video.duration !== 1) {\n // compatibility: Android browsers will output 1 at first\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00';\n }\n\n // danmaku\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n } else {\n // autoplay\n if (this.option.autoplay && !isMobile) {\n this.play();\n } else if (isMobile) {\n this.pause();\n }\n }\n\n /**\n * comment\n */\n var commentInput = this.element.getElementsByClassName('dplayer-comment-input')[0];\n var commentIcon = this.element.getElementsByClassName('dplayer-comment-icon')[0];\n var commentBox = this.element.getElementsByClassName('dplayer-comment-box')[0];\n var commentSettingIcon = this.element.getElementsByClassName('dplayer-comment-setting-icon')[0];\n var commentSettingBox = this.element.getElementsByClassName('dplayer-comment-setting-box')[0];\n var commentSendIcon = this.element.getElementsByClassName('dplayer-send-icon')[0];\n\n var htmlEncode = function htmlEncode(str) {\n return str.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/\\//g, \"/\");\n };\n\n var sendComment = function sendComment() {\n commentInput.blur();\n\n // text can't be empty\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n alert(tran('Please input danmaku!'));\n return;\n }\n\n var danmakuData = {\n token: _this.option.danmaku.token,\n player: _this.option.danmaku.id,\n author: _this.option.danmaku.user,\n time: _this.video.currentTime(),\n text: commentInput.value,\n color: _this.element.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: _this.element.querySelector('.dplayer-comment-setting-type input:checked').value\n };\n _this.option.apiBackend.send(_this.option.danmaku.api, danmakuData);\n\n commentInput.value = '';\n closeComment();\n _this.dan.splice(_this.danIndex, 0, danmakuData);\n _this.danIndex++;\n var item = _this.pushDanmaku(htmlEncode(danmakuData.text), danmakuData.color, danmakuData.type);\n item.style.border = '2px solid ' + _this.option.theme;\n };\n\n var closeCommentSetting = function closeCommentSetting() {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n var toggleCommentSetting = function toggleCommentSetting() {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n } else {\n commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n\n var disableHide = 0;\n var commentFocusTimeout = 0;\n var closeComment = function closeComment() {\n if (!commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n _this.element.classList.remove('dplayer-show-controller');\n\n clearInterval(disableHide);\n clearTimeout(commentFocusTimeout);\n closeCommentSetting();\n };\n var openComment = function openComment() {\n if (commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n _this.element.classList.add('dplayer-show-controller');\n\n disableHide = setInterval(function () {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(function () {\n commentInput.focus();\n }, 300);\n };\n\n mask.addEventListener('click', function () {\n closeComment();\n });\n commentIcon.addEventListener('click', function () {\n openComment();\n });\n commentSettingIcon.addEventListener('click', function () {\n toggleCommentSetting();\n });\n\n // comment setting box\n this.element.getElementsByClassName('dplayer-comment-setting-color')[0].addEventListener('click', function () {\n var sele = _this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked+span');\n if (sele) {\n commentSettingIcon.getElementsByClassName('dplayer-fill')[0].style.fill = _this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked').value;\n }\n });\n\n commentInput.addEventListener('click', function () {\n closeCommentSetting();\n });\n commentInput.addEventListener('keydown', function (e) {\n var event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n\n commentSendIcon.addEventListener('click', sendComment);\n\n /**\n * full screen\n */\n var resetAnimation = function resetAnimation() {\n var danWidth = danContainer.offsetWidth;\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i7 = 0; _i7 < items.length; _i7++) {\n items[_i7].style.transform = 'translateX(-' + danWidth + 'px)';\n }\n };\n\n this.element.addEventListener('fullscreenchange', function () {\n resetAnimation();\n });\n this.element.addEventListener('mozfullscreenchange', function () {\n resetAnimation();\n });\n this.element.addEventListener('webkitfullscreenchange', function () {\n resetAnimation();\n });\n // browser full screen\n this.element.getElementsByClassName('dplayer-full-icon')[0].addEventListener('click', function () {\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n if (_this.element.requestFullscreen) {\n _this.element.requestFullscreen();\n } else if (_this.element.mozRequestFullScreen) {\n _this.element.mozRequestFullScreen();\n } else if (_this.element.webkitRequestFullscreen) {\n _this.element.webkitRequestFullscreen();\n } else if (_this.video.attr('webkitEnterFullscreen')) {\n // Safari for iOS\n _this.video.current.webkitEnterFullscreen();\n }\n } else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n resetAnimation();\n });\n // web full screen\n this.element.getElementsByClassName('dplayer-full-in-icon')[0].addEventListener('click', function () {\n if (_this.element.classList.contains('dplayer-fulled')) {\n _this.element.classList.remove('dplayer-fulled');\n } else {\n _this.element.classList.add('dplayer-fulled');\n resetAnimation();\n }\n });\n\n /**\n * hot key\n */\n var handleKeyDown = function handleKeyDown(e) {\n var tag = document.activeElement.tagName.toUpperCase();\n var editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n var event = e || window.event;\n var percentage = void 0;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n _this.toggle();\n break;\n case 37:\n event.preventDefault();\n _this.video.seek(_this.video.currentTime() - 5);\n break;\n case 39:\n event.preventDefault();\n _this.video.seek(_this.video.currentTime() + 5);\n break;\n case 38:\n event.preventDefault();\n percentage = _this.video.attr('volume') + 0.1;\n _this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = _this.video.attr('volume') - 0.1;\n _this.volume(percentage);\n break;\n }\n }\n };\n if (this.option.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', function (e) {\n // Press ESC to quit web full screen\n var event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (_this.element.classList.contains('dplayer-fulled')) {\n _this.element.classList.remove('dplayer-fulled');\n resetAnimation();\n }\n break;\n }\n });\n\n /**\n * right key\n */\n var menu = this.element.getElementsByClassName('dplayer-menu')[0];\n this.element.addEventListener('contextmenu', function (e) {\n var event = e || window.event;\n event.preventDefault();\n\n menu.classList.add('dplayer-menu-show');\n\n var clientRect = _this.element.getBoundingClientRect();\n var menuLeft = event.clientX - clientRect.left;\n var menuTop = event.clientY - clientRect.top;\n if (menuLeft + menu.offsetWidth >= clientRect.width) {\n menu.style.right = clientRect.width - menuLeft + 'px';\n menu.style.left = 'initial';\n } else {\n menu.style.left = event.clientX - _this.element.getBoundingClientRect().left + 'px';\n menu.style.right = 'initial';\n }\n if (menuTop + menu.offsetHeight >= clientRect.height) {\n menu.style.bottom = clientRect.height - menuTop + 'px';\n menu.style.top = 'initial';\n } else {\n menu.style.top = event.clientY - _this.element.getBoundingClientRect().top + 'px';\n menu.style.bottom = 'initial';\n }\n\n mask.classList.add('dplayer-mask-show');\n mask.addEventListener('click', function () {\n mask.classList.remove('dplayer-mask-show');\n menu.classList.remove('dplayer-menu-show');\n });\n });\n\n /**\n * Screenshot\n */\n if (this.option.screenshot) {\n var camareIcon = this.element.getElementsByClassName('dplayer-camera-icon')[0];\n camareIcon.addEventListener('click', function () {\n var canvas = document.createElement(\"canvas\");\n canvas.width = _this.video.attr('videoWidth');\n canvas.height = _this.video.attr('videoHeight');\n canvas.getContext('2d').drawImage(_this.video.current, 0, 0, canvas.width, canvas.height);\n\n camareIcon.href = canvas.toDataURL();\n camareIcon.download = \"DPlayer.png\";\n });\n }\n\n index++;\n }\n\n /**\n * Play music\n */\n\n\n _createClass(DPlayer, [{\n key: 'play',\n value: function play(time) {\n if (Object.prototype.toString.call(time) === '[object Number]') {\n this.video.seek(time);\n }\n this.paused = false;\n if (this.video.attr('paused')) {\n this.bezel.innerHTML = svg('play');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.playButton.innerHTML = svg('pause');\n\n this.video.play();\n if (this.playedTime) {\n this.clearTime();\n }\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n\n /**\n * Pause music\n */\n\n }, {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n\n if (!this.video.attr('paused')) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.ended = false;\n this.playButton.innerHTML = svg('play');\n this.video.pause();\n this.clearTime();\n this.element.classList.remove('dplayer-playing');\n this.trigger('pause');\n }\n\n /**\n * Set volume\n */\n\n }, {\n key: 'volume',\n value: function volume(percentage) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('volume', percentage, 'width');\n this.video.attr('volume', percentage);\n if (this.video.attr('muted')) {\n this.video.attr('muted', false);\n }\n this.switchVolumeIcon();\n }\n\n /**\n * Toggle between play and pause\n */\n\n }, {\n key: 'toggle',\n value: function toggle() {\n if (this.video.attr('paused')) {\n this.play();\n } else {\n this.pause();\n }\n }\n\n /**\n * attach event\n */\n\n }, {\n key: 'on',\n value: function on(event, callback) {\n if (typeof callback === 'function') {\n this.event[event].push(callback);\n }\n }\n\n /**\n * Asynchronously read danmaku from all API endpoints\n */\n\n }, {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, finish) {\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n console.log(err.response.msg);\n } else {\n console.log('Request was unsuccessful: ' + err.status);\n }\n results[i] = [];\n } else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return finish(results);\n }\n };\n };\n\n for (var i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n\n /**\n * Read danmaku from API\n */\n\n }, {\n key: 'readDanmaku',\n value: function readDanmaku() {\n var _this2 = this;\n\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n var apiurl = void 0;\n if (this.option.danmaku.maximum) {\n apiurl = this.option.danmaku.api + '?id=' + this.option.danmaku.id + '&max=' + this.option.danmaku.maximum;\n } else {\n apiurl = this.option.danmaku.api + '?id=' + this.option.danmaku.id;\n }\n var endpoints = (this.option.danmaku.addition || []).slice(0);\n endpoints.push(apiurl);\n\n this._readAllEndpoints(endpoints, function (results) {\n _this2.danIndex = 0;\n _this2.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n _this2.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n\n // autoplay\n if (_this2.option.autoplay && !isMobile) {\n _this2.play();\n } else if (isMobile) {\n _this2.pause();\n }\n });\n }\n\n /**\n * Push a danmaku into DPlayer\n *\n * @param {String} text - danmaku content\n * @param {String} color - danmaku color, default: `#fff`\n * @param {String} type - danmaku type, `right` `top` `bottom`, default: `right`\n */\n\n }, {\n key: 'pushDanmaku',\n value: function pushDanmaku(text, color, type) {\n var _this3 = this;\n\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var itemHeight = this.arrow ? 24 : 30;\n var danWidth = danContainer.offsetWidth;\n var danHeight = danContainer.offsetHeight;\n var itemY = parseInt(danHeight / itemHeight);\n\n var danItemRight = function danItemRight(ele) {\n return danContainer.getBoundingClientRect().right - ele.getBoundingClientRect().right;\n };\n\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n\n var _loop2 = function _loop2(i) {\n var item = _this3.danTunnel[type][i + ''];\n if (item && item.length) {\n for (var j = 0; j < item.length; j++) {\n var danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(item[j].offsetWidth) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this3.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this3.danTunnel[type][i + ''].splice(0, 1);\n });\n return {\n v: i % itemY\n };\n }\n }\n } else {\n _this3.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this3.danTunnel[type][i + ''].splice(0, 1);\n });\n return {\n v: i % itemY\n };\n }\n };\n\n for (var i = 0;; i++) {\n var _ret2 = _loop2(i);\n\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === \"object\") return _ret2.v;\n }\n };\n\n if (!type) {\n type = 'right';\n }\n if (!color) {\n color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + type);\n item.innerHTML = text;\n item.style.opacity = this.danOpacity;\n item.style.color = color;\n item.addEventListener('animationend', function () {\n danContainer.removeChild(item);\n });\n\n // measure\n this.itemDemo.innerHTML = text;\n var itemWidth = this.itemDemo.offsetWidth;\n\n // adjust\n switch (type) {\n case 'right':\n item.style.top = itemHeight * getTunnel(item, type, itemWidth) + 'px';\n item.style.width = itemWidth + 1 + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, type) + 'px';\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + type);\n }\n\n // insert\n danContainer.appendChild(item);\n\n // move\n item.classList.add('dplayer-danmaku-move');\n\n return item;\n }\n\n /**\n * Switch to a new video\n *\n * @param {Object} video - new video info\n * @param {Object} danmaku - new danmaku info\n */\n // TODO\n\n }, {\n key: 'switchVideo',\n value: function switchVideo(video, danmaku) {\n this.video.src = video.url;\n this.video.poster = video.pic ? video.pic : '';\n this.video.currentTime = 0;\n this.pause();\n if (danmaku) {\n this.dan = [];\n this.danIndex = 0;\n this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'block';\n this.updateBar('played', 0, 'width');\n this.updateBar('loaded', 0, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = '00:00';\n this.element.getElementsByClassName('dplayer-danmaku')[0].innerHTML = '
';\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n }, {\n key: 'timeTipsHandler',\n value: function timeTipsHandler(pbar, timeTips) {\n var _this4 = this;\n\n // http://stackoverflow.com/questions/1480133/how-can-i-get-an-objects-absolute-position-on-the-page-in-javascript\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0,\n left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n\n return {\n top: top,\n left: left\n };\n };\n\n return function (e) {\n if (!_this4.video.duration) {\n return;\n }\n var clientX = e.clientX;\n\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n timeTips.innerText = utils.secondToTime(_this4.video.duration * (tx / pbar.offsetWidth));\n timeTips.style.left = tx - 20 + 'px';\n switch (e.type) {\n case 'mouseenter':\n case 'mouseover':\n case 'mousemove':\n if (_this4.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n _this4.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!_this4.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n _this4.isTipsShow = false;\n break;\n }\n };\n }\n }]);\n\n return DPlayer;\n}();\n\nmodule.exports = DPlayer;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\n * xhr.status ---> fail\n * response.code === 1 ---> success\n * response.code !== 1 ---> error\n * */\n\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n\n if (response.code !== 1) {\n return error(xhr, response);\n }\n\n return success(xhr, response);\n }\n\n fail(xhr);\n }\n };\n\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\n\nmodule.exports = {\n send: function send(endpoint, danmakuData) {\n SendXMLHttpRequest(endpoint, danmakuData, function (xhr, response) {\n console.log('Post danmaku: ', response);\n }, function (xhr, response) {\n alert(response.msg);\n }, function (xhr) {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n\n read: function read(endpoint, cbk) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n cbk(null, response.danmaku);\n }, function (xhr, response) {\n cbk({ status: xhr.status, response: response });\n }, function (xhr) {\n cbk({ status: xhr.status, response: null });\n });\n }\n};\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// DPlayer.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a987d7fac9b0d90da2b3","/**\n* SVG used by DPlayer\n*/\n\nconst svgSource = {\n '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 '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 '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 '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 '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 '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 '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 'full-in': ['0 0 32 33', 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'],\n '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 '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 '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 '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 '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 '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 '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};\n\nmodule.exports = (type) => `\n \n \n \n \n`;\n\n\n// WEBPACK FOOTER //\n// ./src/svg.js","const svg = require('./svg.js');\n\nmodule.exports = {\n main: (option, index, tran) => {\n let videos = ``;\n for (let i = 0; i < option.video.url.length; i++) {\n videos += ``;\n }\n return `\n
\n
\n ${videos}\n
\n
\n
\n
\n \n ${option.danmaku ? `${tran('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 ${option.screenshot ? `\n \n ${svg('camera')}\n \n ` : ``}\n
\n \n
\n \n
\n
\n
${tran('Set danmaku color')}
\n \n \n \n \n \n \n
\n
\n
${tran('Set danmaku type')}
\n \n \n \n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
00:00
\n
\n
\n
\n \n
\n
\n
\n
\n `;\n },\n\n setting: (tran) => ({\n 'original': `\n
\n ${tran('Speed')}\n
\n ${svg('right')}\n
\n
\n
\n ${tran('Loop')}\n
\n \n \n
\n
\n
\n ${tran('Danmaku')}\n
\n \n \n
\n
\n
\n ${tran('Opacity for danmaku')}\n
\n
\n
\n \n
\n
\n
\n
`,\n 'speed': `\n
\n 0.5\n
\n
\n 0.75\n
\n
\n ${tran('Normal')}\n
\n
\n 1.25\n
\n
\n 1.5\n
\n
\n 2\n
`\n }) \n};\n\n\n// WEBPACK FOOTER //\n// ./src/html.js","const tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕,回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku!': '要输入弹幕内容啊喂!',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕'\n};\n\nmodule.exports = function (lang) {\n this.lang = lang;\n this.tran = (text) => {\n if (this.lang === 'en') {\n return text;\n }\n else if (this.lang === 'zh') {\n return tranZH[text];\n }\n };\n};\n\n\n// WEBPACK FOOTER //\n// ./src/i18n.js","const defaultApiBackend = require('./api.js');\n\nmodule.exports = (option) => {\n const isMobile = /mobile/i.test(window.navigator.userAgent);\n // compatibility: some mobile browsers don't suppose autoplay\n if (isMobile) {\n option.autoplay = false;\n }\n\n // default options\n const defaultOption = {\n element: document.getElementsByClassName('dplayer')[0],\n autoplay: false,\n theme: '#b7daff',\n loop: false,\n lang: navigator.language.indexOf('zh') !== -1 ? 'zh' : 'en',\n screenshot: false,\n hotkey: true,\n preload: 'auto',\n apiBackend: defaultApiBackend\n };\n for (const defaultKey in defaultOption) {\n if (defaultOption.hasOwnProperty(defaultKey) && !option.hasOwnProperty(defaultKey)) {\n option[defaultKey] = defaultOption[defaultKey];\n }\n }\n if (Object.prototype.toString.call(option.video.url) !== '[object Array]') {\n option.video.url = [option.video.url];\n }\n if (option.video && !option.video.hasOwnProperty('type')) {\n option.video.type = 'auto';\n }\n if (option.danmaku && !option.danmaku.hasOwnProperty('user')) {\n option.danmaku.user = 'DIYgod';\n }\n\n return option;\n};\n\n\n// WEBPACK FOOTER //\n// ./src/option.js","module.exports = {\n\n /**\n * Parse second to 00:00 format\n *\n * @param {Number} second\n * @return {String} 00:00 format\n */\n secondToTime: (second) => {\n const add0 = (num) => num < 10 ? '0' + num : '' + num;\n const min = parseInt(second / 60);\n const sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n\n /**\n * control play progress\n */\n // get element's view position\n getElementViewLeft: (element) => {\n let actualLeft = element.offsetLeft;\n let current = element.offsetParent;\n const elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n else {\n while (current !== null && current !== this.element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n },\n};\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","class Video {\n constructor (videos) {\n this.videos = videos;\n this.multi = this.videos.length > 1;\n this.index = 0;\n this.current = this.videos[this.index];\n\n this.duration = 0;\n this.durationArr = [];\n this.eventAll = [];\n this.eventCurrent = [];\n\n this.on('all', 'durationchange', (i, video) => {\n if (video.duration !== 1) { // some Android browsers will output 1 at first\n this.durationArr[i] = video.duration;\n this.duration = this.durationArr.reduce((sum, cur) => sum + cur);\n }\n });\n this.on('current', 'end', () => {\n this.switch(this.index + 1);\n });\n }\n\n switch (index, time) {\n if (this.index !== index) {\n this.videos[index].classList.add('dplayer-video-current');\n if (!this.current.paused) {\n this.videos[index].play();\n }\n this.current.classList.remove('dplayer-video-current');\n this.current.pause();\n\n this.index = index;\n this.current = this.videos[this.index];\n this.videos[index].currentTime = time ? time : 0;\n }\n else {\n this.videos[index].currentTime = time ? time : 0;\n }\n }\n\n // bind event \n on (type, event, callback) {\n if (typeof callback === 'function') {\n if (type === 'all') {\n if (!this.eventAll[event]) {\n this.eventAll[event] = [];\n }\n this.eventAll[event].push(callback);\n }\n else {\n if (!this.eventCurrent[event]) {\n this.eventCurrent[event] = [];\n }\n this.eventCurrent[event].push(callback);\n }\n\n if (['seeking'].indexOf(event) === -1) {\n for (let i = 0; i < this.videos.length; i++) {\n this.videos[i].addEventListener(event, () => {\n if (type === 'all' || this.videos[i] === this.current) {\n callback(i, this.videos[i]);\n }\n });\n }\n }\n }\n }\n\n // trigger event\n trigger (type, event) {\n const events = type === 'all' ? this.eventAll : this.eventCurrent;\n for (let i = 0; i < events[event].length; i++) {\n events[event][i]();\n }\n }\n\n currentTime () {\n if (this.durationArr.slice(0, this.index).length) {\n return this.durationArr.slice(0, this.index).reduce((sum, cur) => sum + cur) + this.current.currentTime;\n }\n else {\n return this.current.currentTime;\n }\n }\n\n seek (time) {\n time = Math.max(time, 0);\n time = Math.min(time, this.duration);\n\n let i = 0;\n let tmptime = 0;\n while (tmptime <= time) {\n tmptime += this.durationArr[i];\n i++;\n }\n\n let currentTime;\n if (this.durationArr.slice(0, this.index).length) {\n currentTime = time - this.durationArr.slice(0, i - 1).reduce((sum, cur) => sum + cur);\n }\n else {\n currentTime = time;\n }\n \n this.switch(i - 1, currentTime);\n\n this.trigger('all', 'seeking');\n }\n\n attr (option, value) {\n if (value !== undefined) {\n for (let i = 0; i < this.videos.length; i++) {\n this.videos[i][option] = value;\n }\n }\n return this.current[option];\n }\n\n play () {\n this.current.play();\n }\n\n pause () {\n this.current.pause();\n }\n\n toggle () {\n this.current.paused ? this.play() : this.pause();\n }\n}\n\nmodule.exports = Video;\n\n\n// WEBPACK FOOTER //\n// ./src/video.js","console.log('\\n %c DPlayer 1.2.0 %c http://dplayer.js.org \\n\\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\n\nrequire('./DPlayer.scss');\nconst utils = require('./utils.js');\nconst svg = require('./svg.js');\nconst handleOption = require('./option.js');\nconst i18n = require('./i18n.js');\nconst html = require('./html.js');\nconst Video = require('./video.js');\nconst isMobile = /mobile/i.test(window.navigator.userAgent);\n\nlet index = 0;\n\nclass DPlayer {\n \n /**\n * DPlayer constructor function\n *\n * @param {Object} option - See README\n * @constructor\n */\n constructor (option) {\n this.option = handleOption(option);\n\n const tran = new i18n(this.option.lang).tran;\n\n /**\n * Update progress bar, including loading progress bar and play progress bar\n *\n * @param {String} type - Point out which bar it is, should be played loaded or volume\n * @param {Number} percentage\n * @param {String} direction - Point out the direction of this bar, Should be height or width\n */\n this.updateBar = (type, percentage, direction) => {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n bar[type + 'Bar'].style[direction] = percentage * 100 + '%';\n };\n\n // define DPlayer events\n const eventTypes = ['play', 'pause', 'canplay', 'playing', 'ended', 'error'];\n this.event = {};\n for (let i = 0; i < eventTypes.length; i++) {\n this.event[eventTypes[i]] = [];\n }\n this.trigger = (type) => {\n for (let i = 0; i < this.event[type].length; i++) {\n this.event[type][i]();\n }\n };\n\n this.element = this.option.element;\n if (!this.option.danmaku) {\n this.element.classList.add('dplayer-no-danmaku');\n }\n if (isMobile) {\n this.element.classList.add('dplayer-mobile');\n }\n\n this.element.innerHTML = html.main(option, index, tran);\n\n // arrow style\n this.arrow = this.element.offsetWidth <= 500;\n if (this.arrow) {\n const arrowStyle = document.createElement('style');\n arrowStyle.innerHTML = `.dplayer .dplayer-danmaku{font-size:18px}`;\n document.head.appendChild(arrowStyle);\n }\n\n // get this video manager\n this.video = new Video(this.element.getElementsByClassName('dplayer-video'));\n\n // Support HTTP Live Streaming\n let enablehls;\n if (this.option.video.type === 'auto') {\n enablehls = /m3u8(#|\\?|$)/i.exec(this.option.video.url);\n }\n else if (this.option.video.type === 'hls') {\n enablehls = true;\n }\n else {\n enablehls = false;\n }\n if (enablehls && Hls.isSupported()) {\n // this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none';\n const hls = new Hls();\n hls.attachMedia(this.video.current);\n hls.on(Hls.Events.MEDIA_ATTACHED, () => {\n hls.loadSource(this.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n console.log(\"manifest loaded, found \" + data.levels.length + \" quality level\");\n });\n });\n }\n\n // Support FLV\n let enableflv;\n if (this.option.video.type === 'auto') {\n enableflv = /.flv(#|\\?|$)/i.exec(this.option.video.url);\n }\n else if (this.option.video.type === 'flv') {\n enableflv = true;\n }\n else {\n enableflv = false;\n }\n if (enableflv && flvjs.isSupported()) {\n const flvPlayer = flvjs.createPlayer({\n type: 'flv',\n url: this.option.video.url\n });\n flvPlayer.attachMediaElement(this.video.current);\n flvPlayer.load();\n }\n\n this.bezel = this.element.getElementsByClassName('dplayer-bezel-icon')[0];\n this.bezel.addEventListener('animationend', () => {\n this.bezel.classList.remove('dplayer-bezel-transition');\n });\n\n // play and pause button\n this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', () => {\n this.toggle();\n });\n\n const videoWrap = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n const conMask = this.element.getElementsByClassName('dplayer-controller-mask')[0];\n if (!isMobile) {\n videoWrap.addEventListener('click', () => {\n this.toggle();\n });\n conMask.addEventListener('click', () => {\n this.toggle();\n });\n }\n else {\n const toggleController = () => {\n if (this.element.classList.contains('dplayer-hide-controller')) {\n this.element.classList.remove('dplayer-hide-controller');\n }\n else {\n this.element.classList.add('dplayer-hide-controller');\n }\n };\n videoWrap.addEventListener('click', toggleController);\n conMask.addEventListener('click', toggleController);\n }\n\n const bar = {};\n bar.playedBar = this.element.getElementsByClassName('dplayer-played')[0];\n bar.loadedBar = this.element.getElementsByClassName('dplayer-loaded')[0];\n const pbar = this.element.getElementsByClassName('dplayer-bar-wrap')[0];\n const pbarTimeTips = this.element.getElementsByClassName('dplayer-bar-time')[0];\n let barWidth;\n\n if (this.option.danmaku) {\n this.video.on('all', 'seeking', () => {\n for (let i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.video.currentTime()) {\n this.danIndex = i;\n return;\n }\n this.danIndex = this.dan.length;\n }\n });\n }\n\n let lastPlayPos = 0;\n let currentPlayPos = 0;\n let bufferingDetected = false;\n let danmakuTime;\n this.setTime = () => {\n this.playedTime = setInterval(() => {\n // whether the video is buffering\n currentPlayPos = this.video.currentTime();\n if (!bufferingDetected\n && currentPlayPos < lastPlayPos + 0.01\n && !this.video.attr('paused')) {\n this.element.classList.add('dplayer-loading');\n bufferingDetected = true;\n }\n if (bufferingDetected\n && currentPlayPos > lastPlayPos + 0.01\n && !this.video.attr('paused')) {\n this.element.classList.remove('dplayer-loading');\n bufferingDetected = false;\n }\n lastPlayPos = currentPlayPos;\n\n this.updateBar('played', this.video.currentTime() / this.video.duration, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = utils.secondToTime(this.video.currentTime());\n this.trigger('playing');\n }, 100);\n if (this.option.danmaku && showdan) {\n danmakuTime = setInterval(() => {\n if (this.dan) {\n let item = this.dan[this.danIndex];\n while (item && this.video.currentTime() > parseFloat(item.time)) {\n this.pushDanmaku(item.text, item.color, item.type);\n item = this.dan[++this.danIndex];\n }\n }\n }, 100);\n }\n };\n this.clearTime = () => {\n clearInterval(this.playedTime);\n if (this.option.danmaku) {\n clearInterval(danmakuTime);\n }\n };\n\n pbar.addEventListener('click', (event) => {\n const e = event || window.event;\n barWidth = pbar.clientWidth;\n let percentage = (e.clientX - utils.getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('played', percentage, 'width');\n this.video.seek(parseFloat(bar.playedBar.style.width) / 100 * this.video.duration);\n });\n\n this.isTipsShow = false;\n this.timeTipsHandler = this.timeTipsHandler(\n pbar, pbarTimeTips).bind(this);\n pbar.addEventListener('mousemove', this.timeTipsHandler);\n pbar.addEventListener('mouseover', this.timeTipsHandler);\n pbar.addEventListener('mouseenter', this.timeTipsHandler);\n pbar.addEventListener('mouseout', this.timeTipsHandler);\n pbar.addEventListener('mouseleave', this.timeTipsHandler);\n\n const thumbMove = (event) => {\n const e = event || window.event;\n let percentage = (e.clientX - utils.getElementViewLeft(pbar)) / barWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('played', percentage, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = utils.secondToTime(percentage * this.video.duration);\n };\n\n const thumbUp = () => {\n document.removeEventListener('mouseup', thumbUp);\n document.removeEventListener('mousemove', thumbMove);\n this.video.seek(parseFloat(bar.playedBar.style.width) / 100 * this.video.duration);\n this.setTime();\n };\n\n pbar.addEventListener('mousedown', () => {\n barWidth = pbar.clientWidth;\n this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\n });\n\n\n /**\n * control volume\n */\n bar.volumeBar = this.element.getElementsByClassName('dplayer-volume-bar-inner')[0];\n const volumeEle = this.element.getElementsByClassName('dplayer-volume')[0];\n const volumeBarWrapWrap = this.element.getElementsByClassName('dplayer-volume-bar-wrap')[0];\n const volumeBarWrap = this.element.getElementsByClassName('dplayer-volume-bar')[0];\n const volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n const vWidth = 35;\n\n this.switchVolumeIcon = () => {\n const volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0];\n if (this.video.attr('volume') >= 0.8) {\n volumeicon.innerHTML = svg('volume-up');\n }\n else if (this.video.attr('volume') > 0) {\n volumeicon.innerHTML = svg('volume-down');\n }\n else {\n volumeicon.innerHTML = svg('volume-off');\n }\n };\n const volumeMove = (event) => {\n const e = event || window.event;\n const percentage = (e.clientX - utils.getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n this.volume(percentage);\n };\n const volumeUp = () => {\n document.removeEventListener('mouseup', volumeUp);\n document.removeEventListener('mousemove', volumeMove);\n volumeEle.classList.remove('dplayer-volume-active');\n };\n\n volumeBarWrapWrap.addEventListener('click', (event) => {\n const e = event || window.event;\n const percentage = (e.clientX - utils.getElementViewLeft(volumeBarWrap) - 5.5) / vWidth;\n this.volume(percentage);\n });\n volumeBarWrapWrap.addEventListener('mousedown', () => {\n document.addEventListener('mousemove', volumeMove);\n document.addEventListener('mouseup', volumeUp);\n volumeEle.classList.add('dplayer-volume-active');\n });\n volumeicon.addEventListener('click', () => {\n if (this.video.attr('muted')) {\n this.video.attr('muted', false);\n this.switchVolumeIcon();\n this.updateBar('volume', this.video.attr('volume'), 'width');\n }\n else {\n this.video.attr('muted', true);\n volumeicon.innerHTML = svg('volume-off');\n this.updateBar('volume', 0, 'width');\n }\n });\n\n\n /**\n * auto hide controller\n */\n let hideTime = 0;\n if (!isMobile) {\n const hideController = () => {\n this.element.classList.remove('dplayer-hide-controller');\n clearTimeout(hideTime);\n hideTime = setTimeout(() => {\n if (this.video.attr('played').length) {\n this.element.classList.add('dplayer-hide-controller');\n closeSetting();\n closeComment();\n }\n }, 2000);\n };\n this.element.addEventListener('mousemove', hideController);\n this.element.addEventListener('click', hideController);\n }\n\n\n /**\n * setting\n */\n this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n const settingHTML = html.setting(tran);\n\n // toggle setting box\n const settingIcon = this.element.getElementsByClassName('dplayer-setting-icon')[0];\n const settingBox = this.element.getElementsByClassName('dplayer-setting-box')[0];\n const mask = this.element.getElementsByClassName('dplayer-mask')[0];\n settingBox.innerHTML = settingHTML.original;\n\n const closeSetting = () => {\n if (settingBox.classList.contains('dplayer-setting-box-open')) {\n settingBox.classList.remove('dplayer-setting-box-open');\n mask.classList.remove('dplayer-mask-show');\n setTimeout(() => {\n settingBox.classList.remove('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.original;\n settingEvent();\n }, 300);\n }\n };\n const openSetting = () => {\n settingBox.classList.add('dplayer-setting-box-open');\n mask.classList.add('dplayer-mask-show');\n };\n\n mask.addEventListener('click', () => {\n closeSetting();\n });\n settingIcon.addEventListener('click', () => {\n openSetting();\n });\n\n let loop = this.option.loop;\n const danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n let showdan = true;\n const settingEvent = () => {\n // loop control\n const loopEle = this.element.getElementsByClassName('dplayer-setting-loop')[0];\n const loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n\n loopToggle.checked = loop;\n\n loopEle.addEventListener('click', () => {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n loop = true;\n }\n else {\n loop = false;\n }\n closeSetting();\n });\n\n // show danmaku control\n const showDanEle = this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n const showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n\n showDanToggle.checked = showdan;\n\n showDanEle.addEventListener('click', () => {\n showDanToggle.checked = !showDanToggle.checked;\n if (showDanToggle.checked) {\n showdan = true;\n if (this.option.danmaku) {\n for (let i = 0; i < this.dan.length; i++) {\n if (this.dan[i].time >= this.video.currentTime()) {\n this.danIndex = i;\n break;\n }\n this.danIndex = this.dan.length;\n }\n danmakuTime = setInterval(() => {\n let item = this.dan[this.danIndex];\n while (item && this.video.currentTime() >= parseFloat(item.time)) {\n this.pushDanmaku(item.text, item.color, item.type);\n item = this.dan[++this.danIndex];\n }\n }, 0);\n }\n }\n else {\n showdan = false;\n if (this.option.danmaku) {\n clearInterval(danmakuTime);\n danContainer.innerHTML = `
`;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n }\n }\n closeSetting();\n });\n\n // speed control\n const speedEle = this.element.getElementsByClassName('dplayer-setting-speed')[0];\n speedEle.addEventListener('click', () => {\n settingBox.classList.add('dplayer-setting-box-narrow');\n settingBox.innerHTML = settingHTML.speed;\n\n const speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n for (let i = 0; i < speedItem.length; i++) {\n speedItem[i].addEventListener('click', () => {\n this.video.attr('playbackRate', speedItem[i].dataset.speed);\n closeSetting();\n });\n }\n });\n\n if (this.option.danmaku) {\n // danmaku opacity\n bar.danmakuBar = this.element.getElementsByClassName('dplayer-danmaku-bar-inner')[0];\n const danmakuBarWrapWrap = this.element.getElementsByClassName('dplayer-danmaku-bar-wrap')[0];\n const danmakuBarWrap = this.element.getElementsByClassName('dplayer-danmaku-bar')[0];\n const danmakuSettingBox = this.element.getElementsByClassName('dplayer-setting-danmaku')[0];\n const dWidth = 130;\n this.updateBar('danmaku', this.danOpacity, 'width');\n\n const danmakuMove = (event) => {\n const e = event || window.event;\n let percentage = (e.clientX - utils.getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('danmaku', percentage, 'width');\n const items = this.element.getElementsByClassName('dplayer-danmaku-item');\n for (let i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', this.danOpacity);\n };\n const danmakuUp = () => {\n document.removeEventListener('mouseup', danmakuUp);\n document.removeEventListener('mousemove', danmakuMove);\n danmakuSettingBox.classList.remove('dplayer-setting-danmaku-active');\n };\n\n danmakuBarWrapWrap.addEventListener('click', (event) => {\n const e = event || window.event;\n let percentage = (e.clientX - utils.getElementViewLeft(danmakuBarWrap)) / dWidth;\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('danmaku', percentage, 'width');\n const items = this.element.getElementsByClassName('dplayer-danmaku-item');\n for (let i = 0; i < items.length; i++) {\n items[i].style.opacity = percentage;\n }\n this.danOpacity = percentage;\n localStorage.setItem('DPlayer-opacity', this.danOpacity);\n });\n danmakuBarWrapWrap.addEventListener('mousedown', () => {\n document.addEventListener('mousemove', danmakuMove);\n document.addEventListener('mouseup', danmakuUp);\n danmakuSettingBox.classList.add('dplayer-setting-danmaku-active');\n });\n }\n };\n settingEvent();\n\n\n /**\n * video events\n */\n // show video time: the metadata has loaded or changed\n this.video.on('all', 'durationchange', (i, video) => {\n if (video.duration !== 1) { // compatibility: Android browsers will output 1 at first\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(this.video.duration);\n }\n });\n\n // show video loaded bar: to inform interested parties of progress downloading the media\n this.video.on('current', 'progress', (i, video) => {\n const percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0;\n this.updateBar('loaded', percentage, 'width');\n });\n\n // video download error: an error occurs\n this.video.on('all', 'error', () => {\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = `Error happens ╥﹏╥`;\n this.trigger('pause');\n });\n\n // video can play: enough data is available that the media can be played\n this.video.on('current', 'canplay', () => {\n this.trigger('canplay');\n });\n\n // music end\n this.ended = false;\n this.video.on('all', 'ended', (i) => {\n if (i === this.video.videos.length - 1) {\n this.updateBar('played', 1, 'width');\n console.log(loop);\n if (!loop) {\n this.ended = true;\n this.pause();\n this.trigger('ended');\n }\n else {\n this.video.switch(0);\n this.video.play();\n }\n }\n });\n\n this.video.on('current', 'play', () => {\n if (this.paused) {\n this.play();\n }\n });\n\n this.video.on('current', 'pause', () => {\n if (!this.paused) {\n this.pause();\n }\n });\n\n // control volume\n this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100);\n\n // set duration time\n if (this.video.duration !== 1) { // compatibility: Android browsers will output 1 at first\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00';\n }\n\n // danmaku\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n }\n else {\n // autoplay\n if (this.option.autoplay && !isMobile) {\n this.play();\n }\n else if (isMobile) {\n this.pause();\n }\n }\n\n\n /**\n * comment\n */\n const commentInput = this.element.getElementsByClassName('dplayer-comment-input')[0];\n const commentIcon = this.element.getElementsByClassName('dplayer-comment-icon')[0];\n const commentBox = this.element.getElementsByClassName('dplayer-comment-box')[0];\n const commentSettingIcon = this.element.getElementsByClassName('dplayer-comment-setting-icon')[0];\n const commentSettingBox = this.element.getElementsByClassName('dplayer-comment-setting-box')[0];\n const commentSendIcon = this.element.getElementsByClassName('dplayer-send-icon')[0];\n\n const htmlEncode = (str) => str.\n replace(/&/g, \"&\").\n replace(//g, \">\").\n replace(/\"/g, \""\").\n replace(/'/g, \"'\").\n replace(/\\//g, \"/\");\n\n const sendComment = () => {\n commentInput.blur();\n\n // text can't be empty\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n alert(tran('Please input danmaku!'));\n return;\n }\n\n const danmakuData = {\n token: this.option.danmaku.token,\n player: this.option.danmaku.id,\n author: this.option.danmaku.user,\n time: this.video.currentTime(),\n text: commentInput.value,\n color: this.element.querySelector('.dplayer-comment-setting-color input:checked').value,\n type: this.element.querySelector('.dplayer-comment-setting-type input:checked').value\n };\n this.option.apiBackend.send(this.option.danmaku.api, danmakuData);\n\n commentInput.value = '';\n closeComment();\n this.dan.splice(this.danIndex, 0, danmakuData);\n this.danIndex++;\n const item = this.pushDanmaku(htmlEncode(danmakuData.text), danmakuData.color, danmakuData.type);\n item.style.border = `2px solid ${this.option.theme}`;\n };\n\n const closeCommentSetting = () => {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n };\n const toggleCommentSetting = () => {\n if (commentSettingBox.classList.contains('dplayer-comment-setting-open')) {\n commentSettingBox.classList.remove('dplayer-comment-setting-open');\n }\n else {\n commentSettingBox.classList.add('dplayer-comment-setting-open');\n }\n };\n\n let disableHide = 0;\n let commentFocusTimeout = 0;\n const closeComment = () => {\n if (!commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n this.element.classList.remove('dplayer-show-controller');\n\n clearInterval(disableHide);\n clearTimeout(commentFocusTimeout);\n closeCommentSetting();\n };\n const openComment = () => {\n if (commentBox.classList.contains('dplayer-comment-box-open')) {\n return;\n }\n\n commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n this.element.classList.add('dplayer-show-controller');\n\n disableHide = setInterval(() => {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(() => {\n commentInput.focus();\n }, 300);\n };\n\n mask.addEventListener('click', () => {\n closeComment();\n });\n commentIcon.addEventListener('click', () => {\n openComment();\n });\n commentSettingIcon.addEventListener('click', () => {\n toggleCommentSetting();\n });\n\n // comment setting box\n this.element.getElementsByClassName('dplayer-comment-setting-color')[0].addEventListener('click', () => {\n const sele = this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked+span');\n if (sele) {\n commentSettingIcon.getElementsByClassName('dplayer-fill')[0].style.fill = this.element.querySelector('input[name=\"dplayer-danmaku-color-${index}\"]:checked').value;\n }\n });\n\n commentInput.addEventListener('click', () => {\n closeCommentSetting();\n });\n commentInput.addEventListener('keydown', (e) => {\n const event = e || window.event;\n if (event.keyCode === 13) {\n sendComment();\n }\n });\n\n commentSendIcon.addEventListener('click', sendComment);\n\n\n /**\n * full screen\n */\n const resetAnimation = () => {\n const danWidth = danContainer.offsetWidth;\n const items = this.element.getElementsByClassName('dplayer-danmaku-item');\n for (let i = 0; i < items.length; i++) {\n items[i].style.transform = `translateX(-${danWidth}px)`;\n }\n };\n\n this.element.addEventListener('fullscreenchange', () => {\n resetAnimation();\n });\n this.element.addEventListener('mozfullscreenchange', () => {\n resetAnimation();\n });\n this.element.addEventListener('webkitfullscreenchange', () => {\n resetAnimation();\n });\n // browser full screen\n this.element.getElementsByClassName('dplayer-full-icon')[0].addEventListener('click', () => {\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n if (this.element.requestFullscreen) {\n this.element.requestFullscreen();\n }\n else if (this.element.mozRequestFullScreen) {\n this.element.mozRequestFullScreen();\n }\n else if (this.element.webkitRequestFullscreen) {\n this.element.webkitRequestFullscreen();\n }\n else if (this.video.attr('webkitEnterFullscreen')) { // Safari for iOS\n this.video.current.webkitEnterFullscreen();\n }\n }\n else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n }\n else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n resetAnimation();\n });\n // web full screen\n this.element.getElementsByClassName('dplayer-full-in-icon')[0].addEventListener('click', () => {\n if (this.element.classList.contains('dplayer-fulled')) {\n this.element.classList.remove('dplayer-fulled');\n }\n else {\n this.element.classList.add('dplayer-fulled');\n resetAnimation();\n }\n });\n\n /**\n * hot key\n */\n const handleKeyDown = (e) => {\n const tag = document.activeElement.tagName.toUpperCase();\n const editable = document.activeElement.getAttribute('contenteditable');\n if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true') {\n const event = e || window.event;\n let percentage;\n switch (event.keyCode) {\n case 32:\n event.preventDefault();\n this.toggle();\n break;\n case 37:\n event.preventDefault();\n this.video.seek(this.video.currentTime() - 5);\n break;\n case 39:\n event.preventDefault();\n this.video.seek(this.video.currentTime() + 5);\n break;\n case 38:\n event.preventDefault();\n percentage = this.video.attr('volume') + 0.1;\n this.volume(percentage);\n break;\n case 40:\n event.preventDefault();\n percentage = this.video.attr('volume') - 0.1;\n this.volume(percentage);\n break;\n }\n }\n };\n if (this.option.hotkey) {\n document.addEventListener('keydown', handleKeyDown);\n }\n document.addEventListener('keydown', (e) => { // Press ESC to quit web full screen\n const event = e || window.event;\n switch (event.keyCode) {\n case 27:\n if (this.element.classList.contains('dplayer-fulled')) {\n this.element.classList.remove('dplayer-fulled');\n resetAnimation();\n }\n break;\n }\n });\n\n /**\n * right key\n */\n const menu = this.element.getElementsByClassName('dplayer-menu')[0];\n this.element.addEventListener('contextmenu', (e) => {\n const event = e || window.event;\n event.preventDefault();\n\n menu.classList.add('dplayer-menu-show');\n\n const clientRect = this.element.getBoundingClientRect();\n const menuLeft = event.clientX - clientRect.left;\n const menuTop = event.clientY - clientRect.top;\n if (menuLeft + menu.offsetWidth >= clientRect.width) {\n menu.style.right = clientRect.width - menuLeft + 'px';\n menu.style.left = 'initial';\n }\n else {\n menu.style.left = event.clientX - this.element.getBoundingClientRect().left + 'px';\n menu.style.right = 'initial';\n }\n if (menuTop + menu.offsetHeight >= clientRect.height) {\n menu.style.bottom = clientRect.height - menuTop + 'px';\n menu.style.top = 'initial';\n }\n else {\n menu.style.top = event.clientY - this.element.getBoundingClientRect().top + 'px';\n menu.style.bottom = 'initial';\n }\n\n mask.classList.add('dplayer-mask-show');\n mask.addEventListener('click', () => {\n mask.classList.remove('dplayer-mask-show');\n menu.classList.remove('dplayer-menu-show');\n });\n });\n\n /**\n * Screenshot\n */\n if (this.option.screenshot) {\n const camareIcon = this.element.getElementsByClassName('dplayer-camera-icon')[0];\n camareIcon.addEventListener('click', () => {\n const canvas = document.createElement(\"canvas\");\n canvas.width = this.video.attr('videoWidth');\n canvas.height = this.video.attr('videoHeight');\n canvas.getContext('2d').drawImage(this.video.current, 0, 0, canvas.width, canvas.height);\n\n camareIcon.href = canvas.toDataURL();\n camareIcon.download = \"DPlayer.png\";\n });\n }\n\n index++;\n }\n\n /**\n * Play music\n */\n play (time) {\n if (Object.prototype.toString.call(time) === '[object Number]') {\n this.video.seek(time);\n }\n this.paused = false;\n if (this.video.attr('paused')) {\n this.bezel.innerHTML = svg('play');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.playButton.innerHTML = svg('pause');\n\n this.video.play();\n if (this.playedTime) {\n this.clearTime();\n }\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n\n /**\n * Pause music\n */\n pause () {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n\n if (!this.video.attr('paused')) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\n }\n\n this.ended = false;\n this.playButton.innerHTML = svg('play');\n this.video.pause();\n this.clearTime();\n this.element.classList.remove('dplayer-playing');\n this.trigger('pause');\n }\n\n /**\n * Set volume\n */\n volume (percentage) {\n percentage = percentage > 0 ? percentage : 0;\n percentage = percentage < 1 ? percentage : 1;\n this.updateBar('volume', percentage, 'width');\n this.video.attr('volume', percentage);\n if (this.video.attr('muted')) {\n this.video.attr('muted', false);\n }\n this.switchVolumeIcon();\n }\n\n /**\n * Toggle between play and pause\n */\n toggle () {\n if (this.video.attr('paused')) {\n this.play();\n }\n else {\n this.pause();\n }\n }\n\n /**\n * attach event\n */\n on (event, callback) {\n if (typeof callback === 'function') {\n this.event[event].push(callback);\n }\n }\n\n /**\n * Asynchronously read danmaku from all API endpoints\n */\n _readAllEndpoints (endpoints, finish) {\n const results = [];\n let readCount = 0;\n const cbk = (i) => (err, data) => {\n ++readCount;\n if (err) {\n if (err.response) {\n console.log(err.response.msg); \n }\n else {\n console.log('Request was unsuccessful: ' + err.status); \n }\n results[i] = [];\n }\n else {\n results[i] = data;\n }\n if (readCount === endpoints.length) {\n return finish(results);\n }\n };\n\n for (let i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n\n /**\n * Read danmaku from API\n */\n readDanmaku () {\n const isMobile = /mobile/i.test(window.navigator.userAgent);\n let apiurl;\n if (this.option.danmaku.maximum) {\n apiurl = `${this.option.danmaku.api}?id=${this.option.danmaku.id}&max=${this.option.danmaku.maximum}`;\n }\n else {\n apiurl = `${this.option.danmaku.api}?id=${this.option.danmaku.id}`;\n }\n const endpoints = (this.option.danmaku.addition || []).slice(0);\n endpoints.push(apiurl);\n\n this._readAllEndpoints(endpoints, (results) => {\n this.danIndex = 0;\n this.dan = [].concat.apply([], results).sort((a, b) => a.time - b.time);\n this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n\n // autoplay\n if (this.option.autoplay && !isMobile) {\n this.play();\n }\n else if (isMobile) {\n this.pause();\n }\n });\n }\n\n /**\n * Push a danmaku into DPlayer\n *\n * @param {String} text - danmaku content\n * @param {String} color - danmaku color, default: `#fff`\n * @param {String} type - danmaku type, `right` `top` `bottom`, default: `right`\n */\n pushDanmaku (text, color, type) {\n const danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n const itemHeight = this.arrow ? 24 : 30;\n const danWidth = danContainer.offsetWidth;\n const danHeight = danContainer.offsetHeight;\n const itemY = parseInt(danHeight / itemHeight);\n\n const danItemRight = (ele) => danContainer.getBoundingClientRect().right - ele.getBoundingClientRect().right;\n\n const danSpeed = (width) => (danWidth + width) / 5;\n\n const getTunnel = (ele, type, width) => {\n const tmp = danWidth / danSpeed(width);\n\n for (let i = 0; ; i++) {\n const item = this.danTunnel[type][i + ''];\n if (item && item.length) {\n for (let j = 0; j < item.length; j++) {\n const danRight = danItemRight(item[j]) - 10;\n if (danRight <= danWidth - tmp * danSpeed(item[j].offsetWidth) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n this.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', () => {\n this.danTunnel[type][i + ''].splice(0, 1);\n });\n return i % itemY;\n }\n }\n }\n else {\n this.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', () => {\n this.danTunnel[type][i + ''].splice(0, 1);\n });\n return i % itemY;\n }\n }\n };\n\n if (!type) {\n type = 'right';\n }\n if (!color) {\n color = '#fff';\n }\n const item = document.createElement(`div`);\n item.classList.add(`dplayer-danmaku-item`);\n item.classList.add(`dplayer-danmaku-${type}`);\n item.innerHTML = text;\n item.style.opacity = this.danOpacity;\n item.style.color = color;\n item.addEventListener('animationend', () => {\n danContainer.removeChild(item);\n });\n\n // measure\n this.itemDemo.innerHTML = text;\n const itemWidth = this.itemDemo.offsetWidth;\n\n // adjust\n switch (type) {\n case 'right':\n item.style.top = itemHeight * getTunnel(item, type, itemWidth) + 'px';\n item.style.width = itemWidth + 1 + 'px';\n item.style.transform = `translateX(-${danWidth}px)`;\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, type) + 'px';\n break;\n default:\n console.error(`Can't handled danmaku type: ${type}`);\n }\n\n // insert\n danContainer.appendChild(item);\n\n // move\n item.classList.add(`dplayer-danmaku-move`);\n\n return item;\n }\n\n /**\n * Switch to a new video\n *\n * @param {Object} video - new video info\n * @param {Object} danmaku - new danmaku info\n */\n // TODO\n switchVideo (video, danmaku) {\n this.video.src = video.url;\n this.video.poster = video.pic ? video.pic : '';\n this.video.currentTime = 0;\n this.pause();\n if (danmaku) {\n this.dan = [];\n this.danIndex = 0;\n this.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'block';\n this.updateBar('played', 0, 'width');\n this.updateBar('loaded', 0, 'width');\n this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = '00:00';\n this.element.getElementsByClassName('dplayer-danmaku')[0].innerHTML = `
`;\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.itemDemo = this.element.getElementsByClassName('dplayer-danmaku-item')[0];\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n\n timeTipsHandler (pbar, timeTips) {\n // http://stackoverflow.com/questions/1480133/how-can-i-get-an-objects-absolute-position-on-the-page-in-javascript\n const cumulativeOffset = (element) => {\n let top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n\n return {\n top: top,\n left: left\n };\n };\n\n return (e) => {\n if (!this.video.duration) {\n return;\n }\n const { clientX } = e;\n const px = cumulativeOffset(pbar).left;\n const tx = clientX - px;\n timeTips.innerText = utils.secondToTime(this.video.duration * (tx / pbar.offsetWidth));\n timeTips.style.left = `${(tx - 20)}px`;\n switch (e.type) {\n case 'mouseenter':\n case 'mouseover':\n case 'mousemove':\n if (this.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n this.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!this.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n this.isTipsShow = false;\n break;\n }\n };\n }\n}\n\nmodule.exports = DPlayer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/DPlayer.js","/*\n * xhr.status ---> fail\n * response.code === 1 ---> success\n * response.code !== 1 ---> error\n * */\n\nconst SendXMLHttpRequest = (url, data, success, error, fail) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = () => {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n const response = JSON.parse(xhr.responseText);\n\n if (response.code !== 1) {\n return error(xhr, response);\n }\n\n return success(xhr, response);\n }\n\n fail(xhr);\n }\n };\n\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\n\nmodule.exports = {\n send: (endpoint, danmakuData) => {\n SendXMLHttpRequest(endpoint, danmakuData, (xhr, response) => {\n console.log('Post danmaku: ', response);\n }, (xhr, response) => {\n alert(response.msg);\n }, (xhr) => {\n console.log('Request was unsuccessful: ' + xhr.status);\n });\n },\n\n read: (endpoint, cbk) => {\n SendXMLHttpRequest(endpoint, null, (xhr, response) => {\n cbk(null, response.danmaku);\n }, (xhr, response) => {\n cbk({ status: xhr.status, response });\n }, (xhr) => {\n cbk({ status: xhr.status, response: null });\n });\n }\n};\n\n\n// WEBPACK FOOTER //\n// ./src/api.js"],"sourceRoot":""} \ No newline at end of file diff --git a/src/DPlayer.js b/src/DPlayer.js index 972a0eaee..ba36d73a2 100644 --- a/src/DPlayer.js +++ b/src/DPlayer.js @@ -1,10 +1,12 @@ console.log('\n %c DPlayer 1.2.0 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;'); require('./DPlayer.scss'); +const utils = require('./utils.js'); const svg = require('./svg.js'); const handleOption = require('./option.js'); const i18n = require('./i18n.js'); const html = require('./html.js'); +const Video = require('./video.js'); const isMobile = /mobile/i.test(window.navigator.userAgent); let index = 0; @@ -65,8 +67,8 @@ class DPlayer { document.head.appendChild(arrowStyle); } - // get this video object - this.video = this.element.getElementsByClassName('dplayer-video')[0]; + // get this video manager + this.video = new Video(this.element.getElementsByClassName('dplayer-video')); // Support HTTP Live Streaming let enablehls; @@ -82,7 +84,7 @@ class DPlayer { if (enablehls && Hls.isSupported()) { // this.element.getElementsByClassName('dplayer-time')[0].style.display = 'none'; const hls = new Hls(); - hls.attachMedia(this.video); + hls.attachMedia(this.video.current); hls.on(Hls.Events.MEDIA_ATTACHED, () => { hls.loadSource(this.option.video.url); hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) { @@ -107,7 +109,7 @@ class DPlayer { type: 'flv', url: this.option.video.url }); - flvPlayer.attachMediaElement(this.video); + flvPlayer.attachMediaElement(this.video.current); flvPlayer.load(); } @@ -146,43 +148,6 @@ class DPlayer { conMask.addEventListener('click', toggleController); } - - /** - * Parse second to 00:00 format - * - * @param {Number} second - * @return {String} 00:00 format - */ - const secondToTime = (second) => { - const add0 = (num) => num < 10 ? '0' + num : '' + num; - const min = parseInt(second / 60); - const sec = parseInt(second - min * 60); - return add0(min) + ':' + add0(sec); - }; - - /** - * control play progress - */ - // get element's view position - const getElementViewLeft = (element) => { - let actualLeft = element.offsetLeft; - let current = element.offsetParent; - const elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft; - if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) { - while (current !== null) { - actualLeft += current.offsetLeft; - current = current.offsetParent; - } - } - else { - while (current !== null && current !== this.element) { - actualLeft += current.offsetLeft; - current = current.offsetParent; - } - } - return actualLeft - elementScrollLeft; - }; - const bar = {}; bar.playedBar = this.element.getElementsByClassName('dplayer-played')[0]; bar.loadedBar = this.element.getElementsByClassName('dplayer-loaded')[0]; @@ -191,9 +156,9 @@ class DPlayer { let barWidth; if (this.option.danmaku) { - this.video.addEventListener('seeking', () => { + this.video.on('all', 'seeking', () => { for (let i = 0; i < this.dan.length; i++) { - if (this.dan[i].time >= this.video.currentTime) { + if (this.dan[i].time >= this.video.currentTime()) { this.danIndex = i; return; } @@ -209,30 +174,30 @@ class DPlayer { this.setTime = () => { this.playedTime = setInterval(() => { // whether the video is buffering - currentPlayPos = this.video.currentTime; + currentPlayPos = this.video.currentTime(); if (!bufferingDetected && currentPlayPos < lastPlayPos + 0.01 - && !this.video.paused) { + && !this.video.attr('paused')) { this.element.classList.add('dplayer-loading'); bufferingDetected = true; } if (bufferingDetected && currentPlayPos > lastPlayPos + 0.01 - && !this.video.paused) { + && !this.video.attr('paused')) { this.element.classList.remove('dplayer-loading'); bufferingDetected = false; } lastPlayPos = currentPlayPos; - this.updateBar('played', this.video.currentTime / this.video.duration, 'width'); - this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(this.video.currentTime); + this.updateBar('played', this.video.currentTime() / this.video.duration, 'width'); + this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = utils.secondToTime(this.video.currentTime()); this.trigger('playing'); }, 100); if (this.option.danmaku && showdan) { danmakuTime = setInterval(() => { if (this.dan) { let item = this.dan[this.danIndex]; - while (item && this.video.currentTime > parseFloat(item.time)) { + while (item && this.video.currentTime() > parseFloat(item.time)) { this.pushDanmaku(item.text, item.color, item.type); item = this.dan[++this.danIndex]; } @@ -250,16 +215,16 @@ class DPlayer { pbar.addEventListener('click', (event) => { const e = event || window.event; barWidth = pbar.clientWidth; - let percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth; + let percentage = (e.clientX - utils.getElementViewLeft(pbar)) / barWidth; percentage = percentage > 0 ? percentage : 0; percentage = percentage < 1 ? percentage : 1; this.updateBar('played', percentage, 'width'); - this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * this.video.duration; + this.video.seek(parseFloat(bar.playedBar.style.width) / 100 * this.video.duration); }); this.isTipsShow = false; this.timeTipsHandler = this.timeTipsHandler( - pbar, pbarTimeTips, secondToTime).bind(this); + pbar, pbarTimeTips).bind(this); pbar.addEventListener('mousemove', this.timeTipsHandler); pbar.addEventListener('mouseover', this.timeTipsHandler); pbar.addEventListener('mouseenter', this.timeTipsHandler); @@ -268,17 +233,17 @@ class DPlayer { const thumbMove = (event) => { const e = event || window.event; - let percentage = (e.clientX - getElementViewLeft(pbar)) / barWidth; + let percentage = (e.clientX - utils.getElementViewLeft(pbar)) / barWidth; percentage = percentage > 0 ? percentage : 0; percentage = percentage < 1 ? percentage : 1; this.updateBar('played', percentage, 'width'); - this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(percentage * this.video.duration); + this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = utils.secondToTime(percentage * this.video.duration); }; const thumbUp = () => { document.removeEventListener('mouseup', thumbUp); document.removeEventListener('mousemove', thumbMove); - this.video.currentTime = parseFloat(bar.playedBar.style.width) / 100 * this.video.duration; + this.video.seek(parseFloat(bar.playedBar.style.width) / 100 * this.video.duration); this.setTime(); }; @@ -302,10 +267,10 @@ class DPlayer { this.switchVolumeIcon = () => { const volumeicon = this.element.getElementsByClassName('dplayer-volume-icon')[0]; - if (this.video.volume >= 0.8) { + if (this.video.attr('volume') >= 0.8) { volumeicon.innerHTML = svg('volume-up'); } - else if (this.video.volume > 0) { + else if (this.video.attr('volume') > 0) { volumeicon.innerHTML = svg('volume-down'); } else { @@ -314,7 +279,7 @@ class DPlayer { }; const volumeMove = (event) => { const e = event || window.event; - const percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth; + const percentage = (e.clientX - utils.getElementViewLeft(volumeBarWrap) - 5.5) / vWidth; this.volume(percentage); }; const volumeUp = () => { @@ -325,7 +290,7 @@ class DPlayer { volumeBarWrapWrap.addEventListener('click', (event) => { const e = event || window.event; - const percentage = (e.clientX - getElementViewLeft(volumeBarWrap) - 5.5) / vWidth; + const percentage = (e.clientX - utils.getElementViewLeft(volumeBarWrap) - 5.5) / vWidth; this.volume(percentage); }); volumeBarWrapWrap.addEventListener('mousedown', () => { @@ -334,13 +299,13 @@ class DPlayer { volumeEle.classList.add('dplayer-volume-active'); }); volumeicon.addEventListener('click', () => { - if (this.video.muted) { - this.video.muted = false; + if (this.video.attr('muted')) { + this.video.attr('muted', false); this.switchVolumeIcon(); - this.updateBar('volume', this.video.volume, 'width'); + this.updateBar('volume', this.video.attr('volume'), 'width'); } else { - this.video.muted = true; + this.video.attr('muted', true); volumeicon.innerHTML = svg('volume-off'); this.updateBar('volume', 0, 'width'); } @@ -356,7 +321,7 @@ class DPlayer { this.element.classList.remove('dplayer-hide-controller'); clearTimeout(hideTime); hideTime = setTimeout(() => { - if (this.video.played.length) { + if (this.video.attr('played').length) { this.element.classList.add('dplayer-hide-controller'); closeSetting(); closeComment(); @@ -417,11 +382,9 @@ class DPlayer { loopToggle.checked = !loopToggle.checked; if (loopToggle.checked) { loop = true; - this.video.loop = loop; } else { loop = false; - this.video.loop = loop; } closeSetting(); }); @@ -438,7 +401,7 @@ class DPlayer { showdan = true; if (this.option.danmaku) { for (let i = 0; i < this.dan.length; i++) { - if (this.dan[i].time >= this.video.currentTime) { + if (this.dan[i].time >= this.video.currentTime()) { this.danIndex = i; break; } @@ -446,7 +409,7 @@ class DPlayer { } danmakuTime = setInterval(() => { let item = this.dan[this.danIndex]; - while (item && this.video.currentTime >= parseFloat(item.time)) { + while (item && this.video.currentTime() >= parseFloat(item.time)) { this.pushDanmaku(item.text, item.color, item.type); item = this.dan[++this.danIndex]; } @@ -478,7 +441,7 @@ class DPlayer { const speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item'); for (let i = 0; i < speedItem.length; i++) { speedItem[i].addEventListener('click', () => { - this.video.playbackRate = speedItem[i].dataset.speed; + this.video.attr('playbackRate', speedItem[i].dataset.speed); closeSetting(); }); } @@ -495,7 +458,7 @@ class DPlayer { const danmakuMove = (event) => { const e = event || window.event; - let percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth; + let percentage = (e.clientX - utils.getElementViewLeft(danmakuBarWrap)) / dWidth; percentage = percentage > 0 ? percentage : 0; percentage = percentage < 1 ? percentage : 1; this.updateBar('danmaku', percentage, 'width'); @@ -514,7 +477,7 @@ class DPlayer { danmakuBarWrapWrap.addEventListener('click', (event) => { const e = event || window.event; - let percentage = (e.clientX - getElementViewLeft(danmakuBarWrap)) / dWidth; + let percentage = (e.clientX - utils.getElementViewLeft(danmakuBarWrap)) / dWidth; percentage = percentage > 0 ? percentage : 0; percentage = percentage < 1 ? percentage : 1; this.updateBar('danmaku', percentage, 'width'); @@ -539,61 +502,65 @@ class DPlayer { * video events */ // show video time: the metadata has loaded or changed - this.video.addEventListener('durationchange', () => { - if (this.video.duration !== 1) { // compatibility: Android browsers will output 1 at first - this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = secondToTime(this.video.duration); + this.video.on('all', 'durationchange', (i, video) => { + if (video.duration !== 1) { // compatibility: Android browsers will output 1 at first + this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(this.video.duration); } }); // show video loaded bar: to inform interested parties of progress downloading the media - this.video.addEventListener('progress', () => { - const percentage = this.video.buffered.length ? this.video.buffered.end(this.video.buffered.length - 1) / this.video.duration : 0; + this.video.on('current', 'progress', (i, video) => { + const percentage = video.buffered.length ? video.buffered.end(video.buffered.length - 1) / video.duration : 0; this.updateBar('loaded', percentage, 'width'); }); // video download error: an error occurs - this.video.addEventListener('error', () => { + this.video.on('all', 'error', () => { this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = `Error happens ╥﹏╥`; this.trigger('pause'); }); // video can play: enough data is available that the media can be played - this.video.addEventListener('canplay', () => { + this.video.on('current', 'canplay', () => { this.trigger('canplay'); }); // music end this.ended = false; - this.video.addEventListener('ended', () => { - this.updateBar('played', 1, 'width'); - if (!loop) { - this.ended = true; - this.pause(); - this.trigger('ended'); + this.video.on('all', 'ended', (i) => { + if (i === this.video.videos.length - 1) { + this.updateBar('played', 1, 'width'); + console.log(loop); + if (!loop) { + this.ended = true; + this.pause(); + this.trigger('ended'); + } + else { + this.video.switch(0); + this.video.play(); + } } }); - this.video.addEventListener('play', () => { + this.video.on('current', 'play', () => { if (this.paused) { this.play(); } }); - this.video.addEventListener('pause', () => { + this.video.on('current', 'pause', () => { if (!this.paused) { this.pause(); } }); // control volume - this.video.volume = parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100; - - // loop - this.video.loop = loop; + this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100); // set duration time if (this.video.duration !== 1) { // compatibility: Android browsers will output 1 at first - this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? secondToTime(this.video.duration) : '00:00'; + this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00'; } // danmaku @@ -650,7 +617,7 @@ class DPlayer { token: this.option.danmaku.token, player: this.option.danmaku.id, author: this.option.danmaku.user, - time: this.video.currentTime, + time: this.video.currentTime(), text: commentInput.value, color: this.element.querySelector('.dplayer-comment-setting-color input:checked').value, type: this.element.querySelector('.dplayer-comment-setting-type input:checked').value @@ -774,8 +741,8 @@ class DPlayer { else if (this.element.webkitRequestFullscreen) { this.element.webkitRequestFullscreen(); } - else if (this.video.webkitEnterFullscreen) { // Safari for iOS - this.video.webkitEnterFullscreen(); + else if (this.video.attr('webkitEnterFullscreen')) { // Safari for iOS + this.video.current.webkitEnterFullscreen(); } } else { @@ -818,20 +785,20 @@ class DPlayer { break; case 37: event.preventDefault(); - this.video.currentTime = this.video.currentTime - 5; + this.video.seek(this.video.currentTime() - 5); break; case 39: event.preventDefault(); - this.video.currentTime = this.video.currentTime + 5; + this.video.seek(this.video.currentTime() + 5); break; case 38: event.preventDefault(); - percentage = this.video.volume + 0.1; + percentage = this.video.attr('volume') + 0.1; this.volume(percentage); break; case 40: event.preventDefault(); - percentage = this.video.volume - 0.1; + percentage = this.video.attr('volume') - 0.1; this.volume(percentage); break; } @@ -896,9 +863,9 @@ class DPlayer { const camareIcon = this.element.getElementsByClassName('dplayer-camera-icon')[0]; camareIcon.addEventListener('click', () => { const canvas = document.createElement("canvas"); - canvas.width = this.video.videoWidth; - canvas.height = this.video.videoHeight; - canvas.getContext('2d').drawImage(this.video, 0, 0, canvas.width, canvas.height); + canvas.width = this.video.attr('videoWidth'); + canvas.height = this.video.attr('videoHeight'); + canvas.getContext('2d').drawImage(this.video.current, 0, 0, canvas.width, canvas.height); camareIcon.href = canvas.toDataURL(); camareIcon.download = "DPlayer.png"; @@ -913,10 +880,10 @@ class DPlayer { */ play (time) { if (Object.prototype.toString.call(time) === '[object Number]') { - this.video.currentTime = time; + this.video.seek(time); } this.paused = false; - if (this.video.paused) { + if (this.video.attr('paused')) { this.bezel.innerHTML = svg('play'); this.bezel.classList.add('dplayer-bezel-transition'); } @@ -939,7 +906,7 @@ class DPlayer { this.paused = true; this.element.classList.remove('dplayer-loading'); - if (!this.video.paused) { + if (!this.video.attr('paused')) { this.bezel.innerHTML = svg('pause'); this.bezel.classList.add('dplayer-bezel-transition'); } @@ -959,9 +926,9 @@ class DPlayer { percentage = percentage > 0 ? percentage : 0; percentage = percentage < 1 ? percentage : 1; this.updateBar('volume', percentage, 'width'); - this.video.volume = percentage; - if (this.video.muted) { - this.video.muted = false; + this.video.attr('volume', percentage); + if (this.video.attr('muted')) { + this.video.attr('muted', false); } this.switchVolumeIcon(); } @@ -970,7 +937,7 @@ class DPlayer { * Toggle between play and pause */ toggle () { - if (this.video.paused) { + if (this.video.attr('paused')) { this.play(); } else { @@ -981,9 +948,9 @@ class DPlayer { /** * attach event */ - on (name, func) { - if (typeof func === 'function') { - this.event[name].push(func); + on (event, callback) { + if (typeof callback === 'function') { + this.event[event].push(callback); } } @@ -1147,6 +1114,7 @@ class DPlayer { * @param {Object} video - new video info * @param {Object} danmaku - new danmaku info */ + // TODO switchVideo (video, danmaku) { this.video.src = video.url; this.video.poster = video.pic ? video.pic : ''; @@ -1171,7 +1139,7 @@ class DPlayer { } } - timeTipsHandler (pbar, timeTips, secondToTime) { + timeTipsHandler (pbar, timeTips) { // http://stackoverflow.com/questions/1480133/how-can-i-get-an-objects-absolute-position-on-the-page-in-javascript const cumulativeOffset = (element) => { let top = 0, left = 0; @@ -1194,7 +1162,7 @@ class DPlayer { const { clientX } = e; const px = cumulativeOffset(pbar).left; const tx = clientX - px; - timeTips.innerText = secondToTime(this.video.duration * (tx / pbar.offsetWidth)); + timeTips.innerText = utils.secondToTime(this.video.duration * (tx / pbar.offsetWidth)); timeTips.style.left = `${(tx - 20)}px`; switch (e.type) { case 'mouseenter': diff --git a/src/DPlayer.scss b/src/DPlayer.scss index f74cc0ea4..1abd615ba 100644 --- a/src/DPlayer.scss +++ b/src/DPlayer.scss @@ -161,6 +161,11 @@ .dplayer-video { width: 100%; height: 100%; + display: none; + } + + .dplayer-video-current { + display: block; } } diff --git a/src/html.js b/src/html.js index 907fc93cc..69f5e2bf2 100644 --- a/src/html.js +++ b/src/html.js @@ -1,10 +1,15 @@ const svg = require('./svg.js'); module.exports = { - main: (option, index, tran) => ` + main: (option, index, tran) => { + let videos = ``; + for (let i = 0; i < option.video.url.length; i++) { + videos += ``; + } + return `
- + ${videos}
@@ -154,8 +159,8 @@ module.exports = { -
- `, + `; + }, setting: (tran) => ({ 'original': ` diff --git a/src/option.js b/src/option.js index f60dd4d39..54acb0faa 100644 --- a/src/option.js +++ b/src/option.js @@ -24,6 +24,9 @@ module.exports = (option) => { option[defaultKey] = defaultOption[defaultKey]; } } + if (Object.prototype.toString.call(option.video.url) !== '[object Array]') { + option.video.url = [option.video.url]; + } if (option.video && !option.video.hasOwnProperty('type')) { option.video.type = 'auto'; } diff --git a/src/utils.js b/src/utils.js new file mode 100644 index 000000000..3afe74ac3 --- /dev/null +++ b/src/utils.js @@ -0,0 +1,38 @@ +module.exports = { + + /** + * Parse second to 00:00 format + * + * @param {Number} second + * @return {String} 00:00 format + */ + secondToTime: (second) => { + const add0 = (num) => num < 10 ? '0' + num : '' + num; + const min = parseInt(second / 60); + const sec = parseInt(second - min * 60); + return add0(min) + ':' + add0(sec); + }, + + /** + * control play progress + */ + // get element's view position + getElementViewLeft: (element) => { + let actualLeft = element.offsetLeft; + let current = element.offsetParent; + const elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft; + if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) { + while (current !== null) { + actualLeft += current.offsetLeft; + current = current.offsetParent; + } + } + else { + while (current !== null && current !== this.element) { + actualLeft += current.offsetLeft; + current = current.offsetParent; + } + } + return actualLeft - elementScrollLeft; + }, +}; \ No newline at end of file diff --git a/src/video.js b/src/video.js new file mode 100644 index 000000000..a63c9cd05 --- /dev/null +++ b/src/video.js @@ -0,0 +1,133 @@ +class Video { + constructor (videos) { + this.videos = videos; + this.multi = this.videos.length > 1; + this.index = 0; + this.current = this.videos[this.index]; + + this.duration = 0; + this.durationArr = []; + this.eventAll = []; + this.eventCurrent = []; + + this.on('all', 'durationchange', (i, video) => { + if (video.duration !== 1) { // some Android browsers will output 1 at first + this.durationArr[i] = video.duration; + this.duration = this.durationArr.reduce((sum, cur) => sum + cur); + } + }); + this.on('current', 'end', () => { + this.switch(this.index + 1); + }); + } + + switch (index, time) { + if (this.index !== index) { + this.videos[index].classList.add('dplayer-video-current'); + if (!this.current.paused) { + this.videos[index].play(); + } + this.current.classList.remove('dplayer-video-current'); + this.current.pause(); + + this.index = index; + this.current = this.videos[this.index]; + this.videos[index].currentTime = time ? time : 0; + } + else { + this.videos[index].currentTime = time ? time : 0; + } + } + + // bind event + on (type, event, callback) { + if (typeof callback === 'function') { + if (type === 'all') { + if (!this.eventAll[event]) { + this.eventAll[event] = []; + } + this.eventAll[event].push(callback); + } + else { + if (!this.eventCurrent[event]) { + this.eventCurrent[event] = []; + } + this.eventCurrent[event].push(callback); + } + + if (['seeking'].indexOf(event) === -1) { + for (let i = 0; i < this.videos.length; i++) { + this.videos[i].addEventListener(event, () => { + if (type === 'all' || this.videos[i] === this.current) { + callback(i, this.videos[i]); + } + }); + } + } + } + } + + // trigger event + trigger (type, event) { + const events = type === 'all' ? this.eventAll : this.eventCurrent; + for (let i = 0; i < events[event].length; i++) { + events[event][i](); + } + } + + currentTime () { + if (this.durationArr.slice(0, this.index).length) { + return this.durationArr.slice(0, this.index).reduce((sum, cur) => sum + cur) + this.current.currentTime; + } + else { + return this.current.currentTime; + } + } + + seek (time) { + time = Math.max(time, 0); + time = Math.min(time, this.duration); + + let i = 0; + let tmptime = 0; + while (tmptime <= time) { + tmptime += this.durationArr[i]; + i++; + } + + let currentTime; + if (this.durationArr.slice(0, this.index).length) { + currentTime = time - this.durationArr.slice(0, i - 1).reduce((sum, cur) => sum + cur); + } + else { + currentTime = time; + } + + this.switch(i - 1, currentTime); + + this.trigger('all', 'seeking'); + } + + attr (option, value) { + if (value !== undefined) { + for (let i = 0; i < this.videos.length; i++) { + this.videos[i][option] = value; + } + } + return this.current[option]; + } + + play () { + this.current.play(); + } + + pause () { + this.current.pause(); + } + + toggle () { + this.current.paused ? this.play() : this.pause(); + } +} + +module.exports = Video; \ No newline at end of file