diff --git a/demo/demo.css b/demo/demo.css new file mode 100644 index 000000000..f0190ac64 --- /dev/null +++ b/demo/demo.css @@ -0,0 +1,78 @@ +body { + max-width: 700px; + margin: 0 auto; + padding: 45px; +} + +.example { + position: relative; + margin: 15px 0 0; + padding: 39px 19px 14px; + background-color: #fff; + border-radius: 4px 4px 0 0; + border: 1px solid #ddd; +} + +.example:after { + content: "Example"; + position: absolute; + top: 0; + left: 0; + padding: 2px 8px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + color: #9da0a4; + border-radius: 4px 0 4px 0; +} + +.highlight { + border-radius: 0 0 4px 4px; + border: 1px solid #ddd; + border-top: none; +} + +.btn { + background: #fff; + border: 1px solid #ddd; + border-radius: 4px; + width: 110px; + height: 40px; + font-size: 14px; + margin: 0 0 10px; + cursor: pointer; + outline: none; +} + +/* github-corner */ +.github-corner:hover .octo-arm { + animation: octocat-wave 560ms ease-in-out +} + +@keyframes octocat-wave { + 0%, + 100% { + transform: rotate(0) + } + 20%, + 60% { + transform: rotate(-25deg) + } + 40%, + 80% { + transform: rotate(10deg) + } +} + +@media (max-width:500px) { + .github-corner:hover .octo-arm { + animation: none + } + .github-corner .octo-arm { + animation: octocat-wave 560ms ease-in-out + } +} + +/* modernizr */ +.adownload li.adownload{ color: green; }.canvas li.canvas{ color: green; }.cssanimations li.cssanimations{ color: green; }.csstransforms li.csstransforms{ color: green; }.documentfragment li.documentfragment{ color: green; }.fullscreen li.fullscreen{ color: green; }.localstorage li.localstorage{ color: green; }.svg li.svg{ color: green; }.texttrackapi li.texttrackapi{ color: green; }.track li.track{ color: green; }.todataurljpeg li.todataurljpeg{ color: green; }.todataurlpng li.todataurlpng{ color: green; }.todataurlwebp li.todataurlwebp{ color: green; }.video li.video{ color: green; }.websockets li.websockets{ color: green; }.setclasses li.setclasses{ color: green; } +.no-adownload li.adownload{ color: red; }.no-canvas li.canvas{ color: red; }.no-cssanimations li.cssanimations{ color: red; }.no-csstransforms li.csstransforms{ color: red; }.no-documentfragment li.documentfragment{ color: red; }.no-fullscreen li.fullscreen{ color: red; }.no-localstorage li.localstorage{ color: red; }.no-svg li.svg{ color: red; }.no-texttrackapi li.texttrackapi{ color: red; }.no-track li.track{ color: red; }.no-todataurljpeg li.todataurljpeg{ color: red; }.no-todataurlpng li.todataurlpng{ color: red; }.no-todataurlwebp li.todataurlwebp{ color: red; }.no-video li.video{ color: red; }.no-websockets li.websockets{ color: red; }.no-setclasses li.setclasses{ color: red; } \ No newline at end of file diff --git a/demo/demo.js b/demo/demo.js new file mode 100644 index 000000000..e471d3531 --- /dev/null +++ b/demo/demo.js @@ -0,0 +1,14 @@ +// stats.js: JavaScript Performance Monitor +const stats = new Stats(); +stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom +document.body.appendChild(stats.dom); +function animate () { + stats.begin(); + // monitored code goes here + stats.end(); + + requestAnimationFrame(animate); +} +requestAnimationFrame(animate); + +hljs.initHighlightingOnLoad(); \ No newline at end of file diff --git a/demo/index.html b/demo/index.html index 5cb74bd1b..f25130554 100644 --- a/demo/index.html +++ b/demo/index.html @@ -4,274 +4,308 @@ DPlayer Demo - + + + + + + - -
-

DPlayer

-

Wow, such a lovely HTML5 danmaku video player

-

Made by DIYgod. Available on GitHub. Licensed SATA.

-
-

Normal

-
- - -

Quality switching

-
- -

Live Video (HTTP Live Streaming, M3U8 format) support

-
-

FLV format support

-
-

Bilibili video and danmaku support

-
- -
- - - - - + +
<link rel="stylesheet" href="dist/DPlayer.min.css">
+<div id="dplayer"></div>
+<script src="dist/DPlayer.min.js"></script>
+<script>
+    var dp = new DPlayer({
+        element: document.getElementById('dplayer'),
         video: {
-            url: 'http://devtest.qiniudn.com/若能绽放光芒.mp4',
-            pic: 'http://devtest.qiniudn.com/若能绽放光芒.png',
-            type: 'auto',
+            url: 'demo.mp4',
+            pic: 'demo.png'
         },
         danmaku: {
-            id: '9E2E3368B56CDBB4',
-            api: 'https://api.prprpr.me/dplayer/',
-            token: 'tokendemo',
-            maximum: 3000,
-            user: 'DIYgod的女粉'
-        },
-        contextmenu: [
-            {
-                text: '关于作者',
-                link: 'http://diygod.me'
-            },
-            {
-                text: '播放器意见反馈',
-                link: 'https://github.com/DIYgod/DPlayer/issues'
-            },
-            {
-                text: '关于 DPlayer 播放器',
-                link: 'https://github.com/DIYgod/DPlayer'
-            },
-            {
-                text: '自定义右键菜单demo',
-                link: 'https://github.com/DIYgod/DPlayer'
-            },
-        ]
+            id: 'demo',
+            api: 'https://api.prprpr.me/dplayer/'
+        }
     });
-    function switchDPlayer() {
-        if (dp1.option.danmaku.id !== '5rGf5Y2X55qu6Z2p') {
-            dp1.switchVideo({
-                url: 'http://devtest.qiniudn.com/微小微-江南皮革厂倒闭了.mp4',
-                pic: 'http://devtest.qiniudn.com/微小微-江南皮革厂倒闭了.jpg',
-                type: 'auto',
-            },
-                {
-                    id: '5rGf5Y2X55qu6Z2p',
+</script>
+

Options

+
+ + +
+ +
+
+
{
+    element: document.getElementById('dplayer'),
+    autoplay: false,
+    theme: '#FADFA3',
+    loop: true,
+    screenshot: true,
+    hotkey: true,
+    logo: 'logo.png',
+    video: {
+        url: 'demo.mp4',
+        pic: 'demo.png',
+        type: 'auto',
+    },
+    danmaku: {
+        id: 'demo',
+        api: 'https://api.prprpr.me/dplayer/',
+        token: 'demo',
+        maximum: 3000,
+        user: 'DIYgod'
+    },
+    contextmenu: [
+        {
+            text: 'custom contextmenu',
+            link: 'https://github.com/DIYgod/DPlayer'
+        },
+    ]
+}
+
+

Quality switching

+
+ +
+ +
+
+
{
+    video: {
+        quality: [{
+            name: 'HD',
+            url: 'demo1.mp4'
+        }, {
+            name: 'SD',
+            url: 'demo2.mp4'
+        }],
+        defaultQuality: 0
+    }
+}
+
+

Live Video (HTTP Live Streaming, M3U8 format) support

+
+
+ +
+
+
{
+    video: {
+        url: 'demo.m3u8',
+        pic: 'demo.png',
+        type: 'hls',
     }
+}
+
+

FLV support

+
+
+ +
+
+
{
+    video: {
+        url: 'demo.flv',
+        pic: 'demo.png',
+        type: 'flv',
+    }
+}
+
+

Bilibili video and danmaku support

+
+
+ +
+
+
{
+    screenshot: false,
+    video: {
+        url: 'https://api.prprpr.me/dplayer/video/bilibili?aid=[aid]'
+    },
+    danmaku: {
+        addition: ['https://api.prprpr.me/dplayer/bilibili?aid=[aid]']
+    }
+}
+
+

HTML5 check

+ - // Bilibili video and danmaku support - var dp2 = new DPlayer({ - element: document.getElementById('dplayer2'), - autoplay: false, - theme: '#FADFA3', - loop: true, - screenshot: false, - logo: 'http://devtest.qiniudn.com/DPlayer.png', - video: { - url: 'https://api.prprpr.me/dplayer/video/bilibili?aid=4045652', - pic: 'http://devtest.qiniudn.com/微小微-江南皮革厂倒闭了.jpg', - type: 'auto', - }, - danmaku: { - id: '5rGf5Y2X55qu6Z2p', - api: 'https://api.prprpr.me/dplayer/', - token: 'tokendemo', - maximum: 3000, - addition: ['https://api.prprpr.me/dplayer/bilibili?aid=4045652'] - } - }); - - // Live Video (HTTP Live Streaming, M3U8 format) support - var dp3 = new DPlayer({ - element: document.getElementById('dplayer3'), - autoplay: false, - theme: '#FADFA3', - loop: true, - screenshot: true, - hotkey: true, - logo: 'http://devtest.qiniudn.com/DPlayer.png', - video: { - url: 'http://devtest.qiniudn.com/若能绽放光芒5.m3u8', - pic: 'http://devtest.qiniudn.com/若能绽放光芒.png', - type: 'hls', - }, - danmaku: { - id: '9E2E3368B56CDBB42', - api: 'https://api.prprpr.me/dplayer/', - token: 'tokendemo', - maximum: 3000 - } - }); - - // FLV format support - var dp4 = new DPlayer({ - element: document.getElementById('dplayer4'), - autoplay: false, - theme: '#FADFA3', - loop: true, - screenshot: true, - hotkey: true, - logo: 'http://devtest.qiniudn.com/DPlayer.png', - video: { - url: 'http://devtest.qiniudn.com/【微小微】玖月奇迹-踩踩踩.flv', - pic: 'http://devtest.qiniudn.com/【微小微】玖月奇迹-踩踩踩.jpg', - type: 'flv', - }, - danmaku: { - id: '9E2E3368B56CDBB43', - api: 'https://api.prprpr.me/dplayer/', - token: 'tokendemo', - maximum: 3000 - } - }); - - // 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 - // } - // }); - - // Quality switching - var dp6 = new DPlayer({ - element: document.getElementById('dplayer6'), - autoplay: false, - theme: '#FADFA3', - loop: true, - screenshot: true, - hotkey: true, - logo: 'http://devtest.qiniudn.com/DPlayer.png', - video: { - quality: [{ - name: '高清', - url: 'http://devtest.qiniudn.com/若能绽放光芒.mp4?1' - }, { - name: '超清', - url: 'http://devtest.qiniudn.com/若能绽放光芒.mp4?2' - }], - defaultQuality: 0, - pic: 'http://devtest.qiniudn.com/若能绽放光芒.png', - type: 'auto', - }, - danmaku: { - id: '9E2E3368B56CDBB4', - api: 'https://api.prprpr.me/dplayer/', - token: 'tokendemo', - maximum: 3000, - user: 'DIYgod的女粉' - } - }); - - // stats.js: JavaScript Performance Monitor - var stats = new Stats(); - stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom - document.body.appendChild(stats.dom); - function animate() { - stats.begin(); - // monitored code goes here - stats.end(); + + + + + + + - requestAnimationFrame(animate); - } - requestAnimationFrame(animate); - - + + + + \ No newline at end of file diff --git a/demo/modernizr.js b/demo/modernizr.js new file mode 100644 index 000000000..fb2f5b05a --- /dev/null +++ b/demo/modernizr.js @@ -0,0 +1,1321 @@ +/*! + * modernizr v3.5.0 + * Build https://modernizr.com/download?-adownload-canvas-cssanimations-csstransforms-documentfragment-fullscreen-localstorage-svg-texttrackapi_track-todataurljpeg_todataurlpng_todataurlwebp-video-websockets-setclasses-dontmin + * + * Copyright (c) + * Faruk Ates + * Paul Irish + * Alex Sexton + * Ryan Seddon + * Patrick Kettner + * Stu Cox + * Richard Herrera + + * MIT License + */ + +/* + * Modernizr tests which native CSS3 and HTML5 features are available in the + * current UA and makes the results available to you in two ways: as properties on + * a global `Modernizr` object, and as classes on the `` element. This + * information allows you to progressively enhance your pages with a granular level + * of control over the experience. +*/ + +;(function(window, document, undefined){ + var classes = []; + + + var tests = []; + + + /** + * + * ModernizrProto is the constructor for Modernizr + * + * @class + * @access public + */ + + var ModernizrProto = { + // The current version, dummy + _version: '3.5.0', + + // Any settings that don't work as separate modules + // can go in here as configuration. + _config: { + 'classPrefix': '', + 'enableClasses': true, + 'enableJSClass': true, + 'usePrefixes': true + }, + + // Queue of tests + _q: [], + + // Stub these for people who are listening + on: function(test, cb) { + // I don't really think people should do this, but we can + // safe guard it a bit. + // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests. + // This is in case people listen to synchronous tests. I would leave it out, + // but the code to *disallow* sync tests in the real version of this + // function is actually larger than this. + var self = this; + setTimeout(function() { + cb(self[test]); + }, 0); + }, + + addTest: function(name, fn, options) { + tests.push({name: name, fn: fn, options: options}); + }, + + addAsyncTest: function(fn) { + tests.push({name: null, fn: fn}); + } + }; + + + + // Fake some of Object.create so we can force non test results to be non "own" properties. + var Modernizr = function() {}; + Modernizr.prototype = ModernizrProto; + + // Leak modernizr globally when you `require` it rather than force it here. + // Overwrite name so constructor name is nicer :D + Modernizr = new Modernizr(); + + +/*! +{ + "name": "SVG", + "property": "svg", + "caniuse": "svg", + "tags": ["svg"], + "authors": ["Erik Dahlstrom"], + "polyfills": [ + "svgweb", + "raphael", + "amplesdk", + "canvg", + "svg-boilerplate", + "sie", + "dojogfx", + "fabricjs" + ] +} +!*/ +/* DOC +Detects support for SVG in `` or `` elements. +*/ + + Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect); + +/*! +{ + "name": "WebSockets Support", + "property": "websockets", + "authors": ["Phread [fearphage]", "Mike Sherov [mikesherov]", "Burak Yigit Kaya [BYK]"], + "caniuse": "websockets", + "tags": ["html5"], + "warnings": [ + "This test will reject any old version of WebSockets even if it is not prefixed such as in Safari 5.1" + ], + "notes": [{ + "name": "CLOSING State and Spec", + "href": "https://www.w3.org/TR/websockets/#the-websocket-interface" + }], + "polyfills": [ + "sockjs", + "socketio", + "kaazing-websocket-gateway", + "websocketjs", + "atmosphere", + "graceful-websocket", + "portal", + "datachannel" + ] +} +!*/ + + var supports = false; + try { + supports = 'WebSocket' in window && window.WebSocket.CLOSING === 2; + } catch (e) {} + Modernizr.addTest('websockets', supports); + +/*! +{ + "name": "Local Storage", + "property": "localstorage", + "caniuse": "namevalue-storage", + "tags": ["storage"], + "knownBugs": [], + "notes": [], + "warnings": [], + "polyfills": [ + "joshuabell-polyfill", + "cupcake", + "storagepolyfill", + "amplifyjs", + "yui-cacheoffline" + ] +} +!*/ + + // In FF4, if disabled, window.localStorage should === null. + + // Normally, we could not test that directly and need to do a + // `('localStorage' in window)` test first because otherwise Firefox will + // throw bugzil.la/365772 if cookies are disabled + + // Similarly, in Chrome with "Block third-party cookies and site data" enabled, + // attempting to access `window.sessionStorage` will throw an exception. crbug.com/357625 + + // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem + // will throw the exception: + // QUOTA_EXCEEDED_ERROR DOM Exception 22. + // Peculiarly, getItem and removeItem calls do not throw. + + // Because we are forced to try/catch this, we'll go aggressive. + + // Just FWIW: IE8 Compat mode supports these features completely: + // www.quirksmode.org/dom/html5.html + // But IE8 doesn't support either with local files + + Modernizr.addTest('localstorage', function() { + var mod = 'modernizr'; + try { + localStorage.setItem(mod, mod); + localStorage.removeItem(mod); + return true; + } catch (e) { + return false; + } + }); + + + /** + * is returns a boolean if the typeof an obj is exactly type. + * + * @access private + * @function is + * @param {*} obj - A thing we want to check the type of + * @param {string} type - A string to compare the typeof against + * @returns {boolean} + */ + + function is(obj, type) { + return typeof obj === type; + } + ; + + /** + * Run through all tests and detect their support in the current UA. + * + * @access private + */ + + function testRunner() { + var featureNames; + var feature; + var aliasIdx; + var result; + var nameIdx; + var featureName; + var featureNameSplit; + + for (var featureIdx in tests) { + if (tests.hasOwnProperty(featureIdx)) { + featureNames = []; + feature = tests[featureIdx]; + // run the test, throw the return value into the Modernizr, + // then based on that boolean, define an appropriate className + // and push it into an array of classes we'll join later. + // + // If there is no name, it's an 'async' test that is run, + // but not directly added to the object. That should + // be done with a post-run addTest call. + if (feature.name) { + featureNames.push(feature.name.toLowerCase()); + + if (feature.options && feature.options.aliases && feature.options.aliases.length) { + // Add all the aliases into the names list + for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) { + featureNames.push(feature.options.aliases[aliasIdx].toLowerCase()); + } + } + } + + // Run the test, or use the raw value if it's not a function + result = is(feature.fn, 'function') ? feature.fn() : feature.fn; + + + // Set each of the names on the Modernizr object + for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) { + featureName = featureNames[nameIdx]; + // Support dot properties as sub tests. We don't do checking to make sure + // that the implied parent tests have been added. You must call them in + // order (either in the test, or make the parent test a dependency). + // + // Cap it to TWO to make the logic simple and because who needs that kind of subtesting + // hashtag famous last words + featureNameSplit = featureName.split('.'); + + if (featureNameSplit.length === 1) { + Modernizr[featureNameSplit[0]] = result; + } else { + // cast to a Boolean, if not one already + if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { + Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); + } + + Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result; + } + + classes.push((result ? '' : 'no-') + featureNameSplit.join('-')); + } + } + } + } + ; + + /** + * docElement is a convenience wrapper to grab the root element of the document + * + * @access private + * @returns {HTMLElement|SVGElement} The root element of the document + */ + + var docElement = document.documentElement; + +/*! +{ + "name": "Document Fragment", + "property": "documentfragment", + "notes": [{ + "name": "W3C DOM Level 1 Reference", + "href": "https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-B63ED1A3" + }, { + "name": "SitePoint Reference", + "href": "http://reference.sitepoint.com/javascript/DocumentFragment" + }, { + "name": "QuirksMode Compatibility Tables", + "href": "http://www.quirksmode.org/m/w3c_core.html#t112" + }], + "authors": ["Ron Waldon (@jokeyrhyme)"], + "knownBugs": ["false-positive on Blackberry 9500, see QuirksMode note"], + "tags": [] +} +!*/ +/* DOC +Append multiple elements to the DOM within a single insertion. +*/ + + Modernizr.addTest('documentfragment', function() { + return 'createDocumentFragment' in document && + 'appendChild' in docElement; + }); + + + /** + * A convenience helper to check if the document we are running in is an SVG document + * + * @access private + * @returns {boolean} + */ + + var isSVG = docElement.nodeName.toLowerCase() === 'svg'; + + + /** + * setClasses takes an array of class names and adds them to the root element + * + * @access private + * @function setClasses + * @param {string[]} classes - Array of class names + */ + + // Pass in an and array of class names, e.g.: + // ['no-webp', 'borderradius', ...] + function setClasses(classes) { + var className = docElement.className; + var classPrefix = Modernizr._config.classPrefix || ''; + + if (isSVG) { + className = className.baseVal; + } + + // Change `no-js` to `js` (independently of the `enableClasses` option) + // Handle classPrefix on this too + if (Modernizr._config.enableJSClass) { + var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)'); + className = className.replace(reJS, '$1' + classPrefix + 'js$2'); + } + + if (Modernizr._config.enableClasses) { + // Add the new classes + className += ' ' + classPrefix + classes.join(' ' + classPrefix); + if (isSVG) { + docElement.className.baseVal = className; + } else { + docElement.className = className; + } + } + + } + + ; + + /** + * createElement is a convenience wrapper around document.createElement. Since we + * use createElement all over the place, this allows for (slightly) smaller code + * as well as abstracting away issues with creating elements in contexts other than + * HTML documents (e.g. SVG documents). + * + * @access private + * @function createElement + * @returns {HTMLElement|SVGElement} An HTML or SVG element + */ + + function createElement() { + if (typeof document.createElement !== 'function') { + // This is the case in IE7, where the type of createElement is "object". + // For this reason, we cannot call apply() as Object is not a Function. + return document.createElement(arguments[0]); + } else if (isSVG) { + return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]); + } else { + return document.createElement.apply(document, arguments); + } + } + + ; +/*! +{ + "name": "Canvas", + "property": "canvas", + "caniuse": "canvas", + "tags": ["canvas", "graphics"], + "polyfills": ["flashcanvas", "excanvas", "slcanvas", "fxcanvas"] +} +!*/ +/* DOC +Detects support for the `` element for 2D drawing. +*/ + + // On the S60 and BB Storm, getContext exists, but always returns undefined + // so we actually have to call getContext() to verify + // github.com/Modernizr/Modernizr/issues/issue/97/ + Modernizr.addTest('canvas', function() { + var elem = createElement('canvas'); + return !!(elem.getContext && elem.getContext('2d')); + }); + +/*! +{ + "name": "HTML5 Video", + "property": "video", + "caniuse": "video", + "tags": ["html5"], + "knownBugs": [ + "Without QuickTime, `Modernizr.video.h264` will be `undefined`; https://github.com/Modernizr/Modernizr/issues/546" + ], + "polyfills": [ + "html5media", + "mediaelementjs", + "sublimevideo", + "videojs", + "leanbackplayer", + "videoforeverybody" + ] +} +!*/ +/* DOC +Detects support for the video element, as well as testing what types of content it supports. + +Subproperties are provided to describe support for `ogg`, `h264` and `webm` formats, e.g.: + +```javascript +Modernizr.video // true +Modernizr.video.ogg // 'probably' +``` +*/ + + // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 + // thx to NielsLeenheer and zcorpan + + // Note: in some older browsers, "no" was a return value instead of empty string. + // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2 + // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5 + + Modernizr.addTest('video', function() { + var elem = createElement('video'); + var bool = false; + + // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 + try { + bool = !!elem.canPlayType + if (bool) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ''); + + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ''); + + bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, ''); + + bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, ''); + + bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, ''); + } + } catch (e) {} + + return bool; + }); + +/*! +{ + "name": "a[download] Attribute", + "property": "adownload", + "caniuse" : "download", + "tags": ["media", "attribute"], + "builderAliases": ["a_download"], + "notes": [{ + "name": "WhatWG Reference", + "href": "https://developers.whatwg.org/links.html#downloading-resources" + }] +} +!*/ +/* DOC +When used on an ``, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it. +*/ + + Modernizr.addTest('adownload', !window.externalHost && 'download' in createElement('a')); + +/*! +{ + "name": "canvas.toDataURL type support", + "property": ["todataurljpeg", "todataurlpng", "todataurlwebp"], + "tags": ["canvas"], + "builderAliases": ["canvas_todataurl_type"], + "async" : false, + "notes": [{ + "name": "MDN article", + "href": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement.toDataURL" + }] +} +!*/ + + + var canvas = createElement('canvas'); + + Modernizr.addTest('todataurljpeg', function() { + return !!Modernizr.canvas && canvas.toDataURL('image/jpeg').indexOf('data:image/jpeg') === 0; + }); + Modernizr.addTest('todataurlpng', function() { + return !!Modernizr.canvas && canvas.toDataURL('image/png').indexOf('data:image/png') === 0; + }); + Modernizr.addTest('todataurlwebp', function() { + var supports = false; + + // firefox 3 throws an error when you use an "invalid" toDataUrl + try { + supports = !!Modernizr.canvas && canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0; + } catch (e) {} + + return supports; + }); + + +/*! +{ + "name": "Track element and Timed Text Track", + "property": ["texttrackapi", "track"], + "tags": ["elem"], + "builderAliases": ["elem_track"], + "authors": ["Addy Osmani"], + "notes": [{ + "name": "W3 track Element Spec", + "href": "http://www.w3.org/TR/html5/video.html#the-track-element" + },{ + "name": "W3 track API Spec", + "href": "http://www.w3.org/TR/html5/media-elements.html#text-track-api" + }], + "warnings": ["While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)"] +} +!*/ + + Modernizr.addTest('texttrackapi', typeof (createElement('video').addTextTrack) === 'function'); + + // a more strict test for track including UI support: document.createElement('track').kind === 'subtitles' + Modernizr.addTest('track', 'kind' in createElement('track')); + + + /** + * cssToDOM takes a kebab-case string and converts it to camelCase + * e.g. box-sizing -> boxSizing + * + * @access private + * @function cssToDOM + * @param {string} name - String name of kebab-case prop we want to convert + * @returns {string} The camelCase version of the supplied name + */ + + function cssToDOM(name) { + return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) { + return m1 + m2.toUpperCase(); + }).replace(/^-/, ''); + } + ; + + /** + * If the browsers follow the spec, then they would expose vendor-specific styles as: + * elem.style.WebkitBorderRadius + * instead of something like the following (which is technically incorrect): + * elem.style.webkitBorderRadius + + * WebKit ghosts their properties in lowercase but Opera & Moz do not. + * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ + * erik.eae.net/archives/2008/03/10/21.48.10/ + + * More here: github.com/Modernizr/Modernizr/issues/issue/21 + * + * @access private + * @returns {string} The string representing the vendor-specific style properties + */ + + var omPrefixes = 'Moz O ms Webkit'; + + + var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []); + ModernizrProto._cssomPrefixes = cssomPrefixes; + + + /** + * atRule returns a given CSS property at-rule (eg @keyframes), possibly in + * some prefixed form, or false, in the case of an unsupported rule + * + * @memberof Modernizr + * @name Modernizr.atRule + * @optionName Modernizr.atRule() + * @optionProp atRule + * @access public + * @function atRule + * @param {string} prop - String name of the @-rule to test for + * @returns {string|boolean} The string representing the (possibly prefixed) + * valid version of the @-rule, or `false` when it is unsupported. + * @example + * ```js + * var keyframes = Modernizr.atRule('@keyframes'); + * + * if (keyframes) { + * // keyframes are supported + * // could be `@-webkit-keyframes` or `@keyframes` + * } else { + * // keyframes === `false` + * } + * ``` + * + */ + + var atRule = function(prop) { + var length = prefixes.length; + var cssrule = window.CSSRule; + var rule; + + if (typeof cssrule === 'undefined') { + return undefined; + } + + if (!prop) { + return false; + } + + // remove literal @ from beginning of provided property + prop = prop.replace(/^@/, ''); + + // CSSRules use underscores instead of dashes + rule = prop.replace(/-/g, '_').toUpperCase() + '_RULE'; + + if (rule in cssrule) { + return '@' + prop; + } + + for (var i = 0; i < length; i++) { + // prefixes gives us something like -o-, and we want O_ + var prefix = prefixes[i]; + var thisRule = prefix.toUpperCase() + '_' + rule; + + if (thisRule in cssrule) { + return '@-' + prefix.toLowerCase() + '-' + prop; + } + } + + return false; + }; + + ModernizrProto.atRule = atRule; + + + + /** + * List of JavaScript DOM values used for tests + * + * @memberof Modernizr + * @name Modernizr._domPrefixes + * @optionName Modernizr._domPrefixes + * @optionProp domPrefixes + * @access public + * @example + * + * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather + * than kebab-case properties, all properties are their Capitalized variant + * + * ```js + * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ]; + * ``` + */ + + var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []); + ModernizrProto._domPrefixes = domPrefixes; + + + + /** + * contains checks to see if a string contains another string + * + * @access private + * @function contains + * @param {string} str - The string we want to check for substrings + * @param {string} substr - The substring we want to search the first string for + * @returns {boolean} + */ + + function contains(str, substr) { + return !!~('' + str).indexOf(substr); + } + + ; + + /** + * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill. + * + * @access private + * @function fnBind + * @param {function} fn - a function you want to change `this` reference to + * @param {object} that - the `this` you want to call the function with + * @returns {function} The wrapped version of the supplied function + */ + + function fnBind(fn, that) { + return function() { + return fn.apply(that, arguments); + }; + } + + ; + + /** + * testDOMProps is a generic DOM property test; if a browser supports + * a certain property, it won't return undefined for it. + * + * @access private + * @function testDOMProps + * @param {array.} props - An array of properties to test for + * @param {object} obj - An object or Element you want to use to test the parameters again + * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check + * @returns {false|*} returns false if the prop is unsupported, otherwise the value that is supported + */ + function testDOMProps(props, obj, elem) { + var item; + + for (var i in props) { + if (props[i] in obj) { + + // return the property name as a string + if (elem === false) { + return props[i]; + } + + item = obj[props[i]]; + + // let's bind a function + if (is(item, 'function')) { + // bind to obj unless overriden + return fnBind(item, elem || obj); + } + + // return the unbound function or obj or value + return item; + } + } + return false; + } + + ; + + /** + * Create our "modernizr" element that we do most feature tests on. + * + * @access private + */ + + var modElem = { + elem: createElement('modernizr') + }; + + // Clean up this element + Modernizr._q.push(function() { + delete modElem.elem; + }); + + + + var mStyle = { + style: modElem.elem.style + }; + + // kill ref for gc, must happen before mod.elem is removed, so we unshift on to + // the front of the queue. + Modernizr._q.unshift(function() { + delete mStyle.style; + }); + + + + /** + * domToCSS takes a camelCase string and converts it to kebab-case + * e.g. boxSizing -> box-sizing + * + * @access private + * @function domToCSS + * @param {string} name - String name of camelCase prop we want to convert + * @returns {string} The kebab-case version of the supplied name + */ + + function domToCSS(name) { + return name.replace(/([A-Z])/g, function(str, m1) { + return '-' + m1.toLowerCase(); + }).replace(/^ms-/, '-ms-'); + } + ; + + + /** + * wrapper around getComputedStyle, to fix issues with Firefox returning null when + * called inside of a hidden iframe + * + * @access private + * @function computedStyle + * @param {HTMLElement|SVGElement} - The element we want to find the computed styles of + * @param {string|null} [pseudoSelector]- An optional pseudo element selector (e.g. :before), of null if none + * @returns {CSSStyleDeclaration} + */ + + function computedStyle(elem, pseudo, prop) { + var result; + + if ('getComputedStyle' in window) { + result = getComputedStyle.call(window, elem, pseudo); + var console = window.console; + + if (result !== null) { + if (prop) { + result = result.getPropertyValue(prop); + } + } else { + if (console) { + var method = console.error ? 'error' : 'log'; + console[method].call(console, 'getComputedStyle returning null, its possible modernizr test results are inaccurate'); + } + } + } else { + result = !pseudo && elem.currentStyle && elem.currentStyle[prop]; + } + + return result; + } + + ; + + /** + * getBody returns the body of a document, or an element that can stand in for + * the body if a real body does not exist + * + * @access private + * @function getBody + * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an + * artificially created element that stands in for the body + */ + + function getBody() { + // After page load injecting a fake body doesn't work so check if body exists + var body = document.body; + + if (!body) { + // Can't use the real body create a fake one. + body = createElement(isSVG ? 'svg' : 'body'); + body.fake = true; + } + + return body; + } + + ; + + /** + * injectElementWithStyles injects an element with style element and some CSS rules + * + * @access private + * @function injectElementWithStyles + * @param {string} rule - String representing a css rule + * @param {function} callback - A function that is used to test the injected element + * @param {number} [nodes] - An integer representing the number of additional nodes you want injected + * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes + * @returns {boolean} + */ + + function injectElementWithStyles(rule, callback, nodes, testnames) { + var mod = 'modernizr'; + var style; + var ret; + var node; + var docOverflow; + var div = createElement('div'); + var body = getBody(); + + if (parseInt(nodes, 10)) { + // In order not to give false positives we create a node for each test + // This also allows the method to scale for unspecified uses + while (nodes--) { + node = createElement('div'); + node.id = testnames ? testnames[nodes] : mod + (nodes + 1); + div.appendChild(node); + } + } + + style = createElement('style'); + style.type = 'text/css'; + style.id = 's' + mod; + + // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. + // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 + (!body.fake ? div : body).appendChild(style); + body.appendChild(div); + + if (style.styleSheet) { + style.styleSheet.cssText = rule; + } else { + style.appendChild(document.createTextNode(rule)); + } + div.id = mod; + + if (body.fake) { + //avoid crashing IE8, if background image is used + body.style.background = ''; + //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible + body.style.overflow = 'hidden'; + docOverflow = docElement.style.overflow; + docElement.style.overflow = 'hidden'; + docElement.appendChild(body); + } + + ret = callback(div, rule); + // If this is done after page load we don't want to remove the body so check if body exists + if (body.fake) { + body.parentNode.removeChild(body); + docElement.style.overflow = docOverflow; + // Trigger layout so kinetic scrolling isn't disabled in iOS6+ + // eslint-disable-next-line + docElement.offsetHeight; + } else { + div.parentNode.removeChild(div); + } + + return !!ret; + + } + + ; + + /** + * nativeTestProps allows for us to use native feature detection functionality if available. + * some prefixed form, or false, in the case of an unsupported rule + * + * @access private + * @function nativeTestProps + * @param {array} props - An array of property names + * @param {string} value - A string representing the value we want to check via @supports + * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise + */ + + // Accepts a list of property names and a single value + // Returns `undefined` if native detection not available + function nativeTestProps(props, value) { + var i = props.length; + // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface + if ('CSS' in window && 'supports' in window.CSS) { + // Try every prefixed variant of the property + while (i--) { + if (window.CSS.supports(domToCSS(props[i]), value)) { + return true; + } + } + return false; + } + // Otherwise fall back to at-rule (for Opera 12.x) + else if ('CSSSupportsRule' in window) { + // Build a condition string for every prefixed variant + var conditionText = []; + while (i--) { + conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')'); + } + conditionText = conditionText.join(' or '); + return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) { + return computedStyle(node, null, 'position') == 'absolute'; + }); + } + return undefined; + } + ; + + // testProps is a generic CSS / DOM property test. + + // In testing support for a given CSS property, it's legit to test: + // `elem.style[styleName] !== undefined` + // If the property is supported it will return an empty string, + // if unsupported it will return undefined. + + // We'll take advantage of this quick test and skip setting a style + // on our modernizr element, but instead just testing undefined vs + // empty string. + + // Property names can be provided in either camelCase or kebab-case. + + function testProps(props, prefixed, value, skipValueTest) { + skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest; + + // Try native detect first + if (!is(value, 'undefined')) { + var result = nativeTestProps(props, value); + if (!is(result, 'undefined')) { + return result; + } + } + + // Otherwise do it properly + var afterInit, i, propsLength, prop, before; + + // If we don't have a style element, that means we're running async or after + // the core tests, so we'll need to create our own elements to use + + // inside of an SVG element, in certain browsers, the `style` element is only + // defined for valid tags. Therefore, if `modernizr` does not have one, we + // fall back to a less used element and hope for the best. + // for strict XHTML browsers the hardly used samp element is used + var elems = ['modernizr', 'tspan', 'samp']; + while (!mStyle.style && elems.length) { + afterInit = true; + mStyle.modElem = createElement(elems.shift()); + mStyle.style = mStyle.modElem.style; + } + + // Delete the objects if we created them. + function cleanElems() { + if (afterInit) { + delete mStyle.style; + delete mStyle.modElem; + } + } + + propsLength = props.length; + for (i = 0; i < propsLength; i++) { + prop = props[i]; + before = mStyle.style[prop]; + + if (contains(prop, '-')) { + prop = cssToDOM(prop); + } + + if (mStyle.style[prop] !== undefined) { + + // If value to test has been passed in, do a set-and-check test. + // 0 (integer) is a valid property value, so check that `value` isn't + // undefined, rather than just checking it's truthy. + if (!skipValueTest && !is(value, 'undefined')) { + + // Needs a try catch block because of old IE. This is slow, but will + // be avoided in most cases because `skipValueTest` will be used. + try { + mStyle.style[prop] = value; + } catch (e) {} + + // If the property value has changed, we assume the value used is + // supported. If `value` is empty string, it'll fail here (because + // it hasn't changed), which matches how browsers have implemented + // CSS.supports() + if (mStyle.style[prop] != before) { + cleanElems(); + return prefixed == 'pfx' ? prop : true; + } + } + // Otherwise just return true, or the property name if this is a + // `prefixed()` call + else { + cleanElems(); + return prefixed == 'pfx' ? prop : true; + } + } + } + cleanElems(); + return false; + } + + ; + + /** + * testPropsAll tests a list of DOM properties we want to check against. + * We specify literally ALL possible (known and/or likely) properties on + * the element including the non-vendor prefixed one, for forward- + * compatibility. + * + * @access private + * @function testPropsAll + * @param {string} prop - A string of the property to test for + * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip + * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against + * @param {string} [value] - A string of a css value + * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set + * @returns {false|string} returns the string version of the property, or false if it is unsupported + */ + function testPropsAll(prop, prefixed, elem, value, skipValueTest) { + + var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), + props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); + + // did they call .prefixed('boxSizing') or are we just testing a prop? + if (is(prefixed, 'string') || is(prefixed, 'undefined')) { + return testProps(props, prefixed, value, skipValueTest); + + // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) + } else { + props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); + return testDOMProps(props, prefixed, elem); + } + } + + // Modernizr.testAllProps() investigates whether a given style property, + // or any of its vendor-prefixed variants, is recognized + // + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testAllProps('boxSizing') + ModernizrProto.testAllProps = testPropsAll; + + + + /** + * prefixed returns the prefixed or nonprefixed property name variant of your input + * + * @memberof Modernizr + * @name Modernizr.prefixed + * @optionName Modernizr.prefixed() + * @optionProp prefixed + * @access public + * @function prefixed + * @param {string} prop - String name of the property to test for + * @param {object} [obj] - An object to test for the prefixed properties on + * @param {HTMLElement} [elem] - An element used to test specific properties against + * @returns {string|false} The string representing the (possibly prefixed) valid + * version of the property, or `false` when it is unsupported. + * @example + * + * Modernizr.prefixed takes a string css value in the DOM style camelCase (as + * opposed to the css style kebab-case) form and returns the (possibly prefixed) + * version of that property that the browser actually supports. + * + * For example, in older Firefox... + * ```js + * prefixed('boxSizing') + * ``` + * returns 'MozBoxSizing' + * + * In newer Firefox, as well as any other browser that support the unprefixed + * version would simply return `boxSizing`. Any browser that does not support + * the property at all, it will return `false`. + * + * By default, prefixed is checked against a DOM element. If you want to check + * for a property on another object, just pass it as a second argument + * + * ```js + * var rAF = prefixed('requestAnimationFrame', window); + * + * raf(function() { + * renderFunction(); + * }) + * ``` + * + * Note that this will return _the actual function_ - not the name of the function. + * If you need the actual name of the property, pass in `false` as a third argument + * + * ```js + * var rAFProp = prefixed('requestAnimationFrame', window, false); + * + * rafProp === 'WebkitRequestAnimationFrame' // in older webkit + * ``` + * + * One common use case for prefixed is if you're trying to determine which transition + * end event to bind to, you might do something like... + * ```js + * var transEndEventNames = { + * 'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser + * 'MozTransition' : 'transitionend', * only for FF < 15 + * 'transition' : 'transitionend' * IE10, Opera, Chrome, FF 15+, Saf 7+ + * }; + * + * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; + * ``` + * + * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss). + */ + + var prefixed = ModernizrProto.prefixed = function(prop, obj, elem) { + if (prop.indexOf('@') === 0) { + return atRule(prop); + } + + if (prop.indexOf('-') != -1) { + // Convert kebab-case to camelCase + prop = cssToDOM(prop); + } + if (!obj) { + return testPropsAll(prop, 'pfx'); + } else { + // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame' + return testPropsAll(prop, obj, elem); + } + }; + + +/*! +{ + "name": "Fullscreen API", + "property": "fullscreen", + "caniuse": "fullscreen", + "notes": [{ + "name": "MDN documentation", + "href": "https://developer.mozilla.org/en/API/Fullscreen" + }], + "polyfills": ["screenfulljs"], + "builderAliases": ["fullscreen_api"] +} +!*/ +/* DOC +Detects support for the ability to make the current website take over the user's entire screen +*/ + + // github.com/Modernizr/Modernizr/issues/739 + Modernizr.addTest('fullscreen', !!(prefixed('exitFullscreen', document, false) || prefixed('cancelFullScreen', document, false))); + + + /** + * testAllProps determines whether a given CSS property is supported in the browser + * + * @memberof Modernizr + * @name Modernizr.testAllProps + * @optionName Modernizr.testAllProps() + * @optionProp testAllProps + * @access public + * @function testAllProps + * @param {string} prop - String naming the property to test (either camelCase or kebab-case) + * @param {string} [value] - String of the value to test + * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection + * @example + * + * testAllProps determines whether a given CSS property, in some prefixed form, + * is supported by the browser. + * + * ```js + * testAllProps('boxSizing') // true + * ``` + * + * It can optionally be given a CSS value in string form to test if a property + * value is valid + * + * ```js + * testAllProps('display', 'block') // true + * testAllProps('display', 'penguin') // false + * ``` + * + * A boolean can be passed as a third parameter to skip the value check when + * native detection (@supports) isn't available. + * + * ```js + * testAllProps('shapeOutside', 'content-box', true); + * ``` + */ + + function testAllProps(prop, value, skipValueTest) { + return testPropsAll(prop, undefined, undefined, value, skipValueTest); + } + ModernizrProto.testAllProps = testAllProps; + +/*! +{ + "name": "CSS Animations", + "property": "cssanimations", + "caniuse": "css-animation", + "polyfills": ["transformie", "csssandpaper"], + "tags": ["css"], + "warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"], + "notes": [{ + "name" : "Article: 'Dispelling the Android CSS animation myths'", + "href": "https://goo.gl/OGw5Gm" + }] +} +!*/ +/* DOC +Detects whether or not elements can be animated using CSS +*/ + + Modernizr.addTest('cssanimations', testAllProps('animationName', 'a', true)); + +/*! +{ + "name": "CSS Transforms", + "property": "csstransforms", + "caniuse": "transforms2d", + "tags": ["css"] +} +!*/ + + Modernizr.addTest('csstransforms', function() { + // Android < 3.0 is buggy, so we sniff and blacklist + // http://git.io/hHzL7w + return navigator.userAgent.indexOf('Android 2.') === -1 && + testAllProps('transform', 'scale(1)', true); + }); + + + // Run each test + testRunner(); + + // Remove the "no-js" class if it exists + setClasses(classes); + + delete ModernizrProto.addTest; + delete ModernizrProto.addAsyncTest; + + // Run the things that are supposed to run after the tests + for (var i = 0; i < Modernizr._q.length; i++) { + Modernizr._q[i](); + } + + // Leak Modernizr namespace + window.Modernizr = Modernizr; + + +; + +})(window, document); \ No newline at end of file diff --git a/dist/DPlayer.min.css b/dist/DPlayer.min.css index d67139330..cdabe0923 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%;display:none}.dplayer .dplayer-video-wrap .dplayer-video-current{display:block}.dplayer .dplayer-video-wrap .dplayer-video-prepare{display:none}.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:opacity .1s ease-in-out;transition: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:40px;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-quality-icon{color:#fff;width:auto;line-height:22px;font-size:14px}.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-quality{position:relative;display:inline-block;height:100%;z-index:2}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list,.dplayer .dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask{display:block}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask{display:none;position:absolute;bottom:38px;left:-18px;width:80px;padding-bottom:12px}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-list{display:none;font-size:12px;width:80px;border-radius:2px;background:rgba(28,28,28,.9);padding:5px 0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;color:#fff;text-align:center}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item{height:25px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;line-height:25px}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.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}.dplayer .dplayer-logo{pointer-events:none;position:absolute;left:20px;top:20px;max-width:50px;max-height:50px}.dplayer .dplayer-logo img{max-width:100%;max-height:100%}.dplayer .dplayer-notice{opacity:0;position:absolute;bottom:60px;left:20px;font-size:14px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 20px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none}@-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-box-sizing:content-box;box-sizing:content-box}.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-video-wrap .dplayer-video-prepare{display:none}.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:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;word-wrap:normal}.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:40px;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-quality-icon{color:#fff;width:auto;line-height:22px;font-size:14px}.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-quality{position:relative;display:inline-block;height:100%;z-index:2}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list,.dplayer .dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask{display:block}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask{display:none;position:absolute;bottom:38px;left:-18px;width:80px;padding-bottom:12px}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-list{display:none;font-size:12px;width:80px;border-radius:2px;background:rgba(28,28,28,.9);padding:5px 0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;color:#fff;text-align:center}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item{height:25px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;line-height:25px}.dplayer .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.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}.dplayer .dplayer-logo{pointer-events:none;position:absolute;left:20px;top:20px;max-width:50px;max-height:50px}.dplayer .dplayer-logo img{max-width:100%;max-height:100%;background:none}.dplayer .dplayer-notice{opacity:0;position:absolute;bottom:60px;left:20px;font-size:14px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 20px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none}@-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 6b453a07b..1847679eb 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 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.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=1)}([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'}},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"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n0?t:0,t=t<1?t:1,g[e+"Bar"].style[n]=100*t+"%"};var i=["play","pause","canplay","playing","ended","error"];this.event={};for(var s=0;sL+.01&&!n.video.attr("paused")&&(n.element.classList.remove("dplayer-loading"),x=!1),L=E},100)},q=function(){clearInterval(n.checkLoading)};this.animationFrame=function(){if(n.playedTime&&(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")),n.danmakuTime&&n.option.danmaku&&Q&&n.dan){for(var e=n.dan[n.danIndex],t=[];e&&n.video.currentTime()>parseFloat(e.time);)t.push(e),e=n.dan[++n.danIndex];n.pushDanmaku(t)}window.requestAnimationFrame(n.animationFrame)},window.requestAnimationFrame(this.animationFrame),this.setTime=function(e){e?(n[e+"Time"]=!0,"played"===e&&T()):(n.danmakuTime=!0,n.playedTime=!0,T())},this.clearTime=function(e){e?(n[e+"Time"]=!1,"played"===e&&q()):(n.danmakuTime=!1,n.playedTime=!1,q())},k.addEventListener("click",function(e){var t=e||window.event;w=k.clientWidth;var a=(t.clientX-l.getElementViewLeft(k))/w;a=a>0?a:0,a=a<1?a:1,n.updateBar("played",a,"width"),n.video.seek(parseFloat(g.playedBar.style.width)/100*n.video.duration)}),this.isTipsShow=!1,this.timeTipsHandler=this.timeTipsHandler(k,b).bind(this),k.addEventListener("mousemove",this.timeTipsHandler),k.addEventListener("mouseover",this.timeTipsHandler),k.addEventListener("mouseenter",this.timeTipsHandler),k.addEventListener("mouseout",this.timeTipsHandler),k.addEventListener("mouseleave",this.timeTipsHandler);var B=function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(k))/w;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)},C=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",B),n.video.seek(parseFloat(g.playedBar.style.width)/100*n.video.duration),n.setTime()};k.addEventListener("mousedown",function(){w=k.clientWidth,n.clearTime(),document.addEventListener("mousemove",B),document.addEventListener("mouseup",C)}),g.volumeBar=this.element.getElementsByClassName("dplayer-volume-bar-inner")[0];var M=this.element.getElementsByClassName("dplayer-volume")[0],N=this.element.getElementsByClassName("dplayer-volume-bar-wrap")[0],z=this.element.getElementsByClassName("dplayer-volume-bar")[0],S=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 D=function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(z)-5.5)/35;n.volume(a)},I=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",D),M.classList.remove("dplayer-volume-active")};N.addEventListener("click",function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(z)-5.5)/35;n.volume(a)}),N.addEventListener("mousedown",function(){document.addEventListener("mousemove",D),document.addEventListener("mouseup",I),M.classList.add("dplayer-volume-active")}),S.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),S.innerHTML=o("volume-off"),n.updateBar("volume",0,"width"))});var H=0;if(!p){var A=function(){n.element.classList.remove("dplayer-hide-controller"),clearTimeout(H),H=setTimeout(function(){n.video.attr("played").length&&(n.element.classList.add("dplayer-hide-controller"),R(),le())},2e3)};this.element.addEventListener("mousemove",A),this.element.addEventListener("click",A)}this.danOpacity=localStorage.getItem("DPlayer-opacity")||.7;var F=c.setting(this.tran),P=this.element.getElementsByClassName("dplayer-setting-icon")[0],O=this.element.getElementsByClassName("dplayer-setting-box")[0],V=this.element.getElementsByClassName("dplayer-mask")[0];O.innerHTML=F.original;var R=function(){O.classList.contains("dplayer-setting-box-open")&&(O.classList.remove("dplayer-setting-box-open"),V.classList.remove("dplayer-mask-show"),setTimeout(function(){O.classList.remove("dplayer-setting-box-narrow"),O.innerHTML=F.original,W()},300))},j=function(){O.classList.add("dplayer-setting-box-open"),V.classList.add("dplayer-mask-show")};V.addEventListener("click",function(){R()}),P.addEventListener("click",function(){j()}),this.loop=this.option.loop;var X=this.element.getElementsByClassName("dplayer-danmaku")[0],Q=!0,W=function(){var e=n.element.getElementsByClassName("dplayer-setting-loop")[0],t=e.getElementsByClassName("dplayer-toggle-setting-input")[0];t.checked=n.loop,e.addEventListener("click",function(){t.checked=!t.checked,t.checked?n.loop=!0:n.loop=!1,R()});var a=n.element.getElementsByClassName("dplayer-setting-showdan")[0],i=a.getElementsByClassName("dplayer-showdan-setting-input")[0];if(i.checked=Q,a.addEventListener("click",function(){if(i.checked=!i.checked,i.checked){if(Q=!0,n.option.danmaku){for(var e=0;e=n.video.currentTime()){n.danIndex=e;break}n.danIndex=n.dan.length}n.paused||n.setTime("danmaku")}}else Q=!1,n.option.danmaku&&(n.clearTime("danmaku"),X.innerHTML="",n.danTunnel={right:{},top:{},bottom:{}});R()}),n.element.getElementsByClassName("dplayer-setting-speed")[0].addEventListener("click",function(){O.classList.add("dplayer-setting-box-narrow"),O.innerHTML=F.speed;for(var e=O.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,"/")},te=function(){if($.blur(),!$.value.replace(/^\s+|\s+$/g,""))return void n.notice(n.tran("Please input danmaku content!"));var e={token:n.option.danmaku.token,player:n.option.danmaku.id,author:n.option.danmaku.user,time:n.video.currentTime(),text:$.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),$.value="",le(),n.dan.splice(n.danIndex,0,e),n.danIndex++;var t={text:ee(e.text),color:e.color,type:e.type,border:"2px solid "+n.option.theme};n.pushDanmaku(t)},ne=function(){K.classList.contains("dplayer-comment-setting-open")&&K.classList.remove("dplayer-comment-setting-open")},ae=function(){K.classList.contains("dplayer-comment-setting-open")?K.classList.remove("dplayer-comment-setting-open"):K.classList.add("dplayer-comment-setting-open")},ie=0,se=0,le=function(){J.classList.contains("dplayer-comment-box-open")&&(J.classList.remove("dplayer-comment-box-open"),V.classList.remove("dplayer-mask-show"),n.element.classList.remove("dplayer-show-controller"),clearInterval(ie),clearTimeout(se),ne())},oe=function(){J.classList.contains("dplayer-comment-box-open")||(J.classList.add("dplayer-comment-box-open"),V.classList.add("dplayer-mask-show"),n.element.classList.add("dplayer-show-controller"),ie=setInterval(function(){clearTimeout(H)},1e3),se=setTimeout(function(){$.focus()},300))};V.addEventListener("click",function(){le()}),U.addEventListener("click",function(){oe()}),G.addEventListener("click",function(){ae()}),this.element.getElementsByClassName("dplayer-comment-setting-color")[0].addEventListener("click",function(){n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked+span')&&(G.getElementsByClassName("dplayer-fill")[0].style.fill=n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked').value)}),$.addEventListener("click",function(){ne()}),$.addEventListener("keydown",function(e){13===(e||window.event).keyCode&&te()}),Z.addEventListener("click",te);var re=function(){for(var e=X.offsetWidth,t=n.element.getElementsByClassName("dplayer-danmaku-item"),a=0;a=a.width?(ce.style.right=a.width-i+"px",ce.style.left="initial"):(ce.style.left=t.clientX-n.element.getBoundingClientRect().left+"px",ce.style.right="initial"),s+ce.offsetHeight>=a.height?(ce.style.bottom=a.height-s+"px",ce.style.top="initial"):(ce.style.top=t.clientY-n.element.getBoundingClientRect().top+"px",ce.style.bottom="initial"),V.classList.add("dplayer-mask-show"),V.addEventListener("click",function(){V.classList.remove("dplayer-mask-show"),ce.classList.remove("dplayer-menu-show")})}),this.option.video.quality&&this.element.getElementsByClassName("dplayer-quality-list")[0].addEventListener("click",function(e){e.target.classList.contains("dplayer-quality-item")&&n.switchQuality(e.target.dataset.index)}),this.option.screenshot){var ue=this.element.getElementsByClassName("dplayer-camera-icon")[0];ue.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),ue.href=e.toDataURL(),ue.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.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=this,a=[],i=0,s=0;s=e.video.currentTime())return void(e.danIndex=t);e.danIndex=e.dan.length}}),this.video.on("all","durationchange",function(t,n){1!==n.duration&&(e.element.getElementsByClassName("dplayer-dtime")[0].innerHTML=l.secondToTime(e.video.duration))}),this.video.on("current","progress",function(t,n){var a=n.buffered.length?n.buffered.end(n.buffered.length-1)/n.duration:0;e.updateBar("loaded",a,"width")}),this.video.on("all","error",function(){e.notice(e.tran("This video fails to load"),-1),e.trigger("pause")}),this.video.on("current","canplay",function(){e.trigger("canplay")}),this.ended=!1,this.video.on("all","ended",function(t){t===e.video.videos.length-1&&(e.updateBar("played",1,"width"),e.loop?(e.video.switch(0),e.video.play()):(e.ended=!0,e.pause(),e.trigger("ended")),e.danIndex=0)}),this.video.on("current","play",function(){e.paused&&e.play()}),this.video.on("current","pause",function(){e.paused||e.pause()}),this.video.attr("volume",parseInt(this.element.getElementsByClassName("dplayer-volume-bar-inner")[0].style.width)/100)}},{key:"switchQuality",value:function(e){var t=this;if(this.qualityIndex!==e&&!this.switchingQuality){this.qualityIndex=e,this.switchingQuality=!0,this.quality=this.option.video.quality[e],this.element.getElementsByClassName("dplayer-quality-icon")[0].innerHTML=this.quality.name,this.video.pause();var n=c.video(!1,null,this.option.screenshot,"auto",this.quality.url),a=(new DOMParser).parseFromString(n,"text/html").body.firstChild,i=this.element.getElementsByClassName("dplayer-video-wrap")[0];i.insertBefore(a,i.getElementsByTagName("div")[0]),this.prevVideo=this.video,this.video=new u([a],this.prevVideo.duration),this.initVideo(),this.video.seek(this.prevVideo.currentTime()),this.notice(this.tran("Switching to")+" "+this.quality.name+" "+this.tran("quality"),-1),this.video.on("current","canplay",function(){if(t.prevVideo){if(t.video.currentTime()!==t.prevVideo.currentTime())return void t.video.seek(t.prevVideo.currentTime());i.removeChild(t.prevVideo.current),t.video.current.classList.add("dplayer-video-current"),t.video.play(),t.prevVideo=null,t.notice(t.tran("Switched to")+" "+t.quality.name+" "+t.tran("quality")),t.switchingQuality=!1}})}}},{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}}}}},{key:"notice",value:function(e,t){var n=this.element.getElementsByClassName("dplayer-notice")[0];n.innerHTML=e,n.style.opacity=1,this.noticeTime&&clearTimeout(this.noticeTime),t&&t<0||(this.noticeTime=setTimeout(function(){n.style.opacity=0},t||2e3))}}]),e}();e.exports=v},function(e,t){},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!==e;)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";var a=n(5);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,contextmenu:[{text:"关于作者",link:"http://diygod.me"},{text:"播放器意见反馈",link:"https://github.com/DIYgod/DPlayer/issues"},{text:"关于 DPlayer 播放器",link:"https://github.com/DIYgod/DPlayer"}]};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.video.quality&&(e.video.url=[e.video.quality[e.video.defaultQuality].url]),e}},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})})}}},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 content!":"要输入弹幕内容啊喂!","Set danmaku color":"设置弹幕颜色","Set danmaku type":"设置弹幕类型",Danmaku:"弹幕","This video fails to load":"视频加载失败","Switching to":"正在切换至","Switched to":"已经切换至",quality:"画质"};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(0),i={main:function(e,t,n){for(var s="",l=0;l
'+s+(e.logo?'':"")+'
'+(e.danmaku?''+n("Danmaku is loading")+"":"")+'
0:00 / 0:00
'+(e.video.quality?'
'+i.qualityList(e.video.quality)+"
":"")+(e.screenshot?'
'+a("camera")+"":"")+'
'+n("Set danmaku color")+'
'+n("Set danmaku type")+'
'+i.contextmenuList(e.contextmenu)+'
'},contextmenuList:function(e){for(var t='";return t+=""},qualityList:function(e){for(var t='
',n=0;n'+e[n].name+"
";return t+=""},video:function(e,t,n,a,i){return''},setting:function(e){return{original:'
'+e("Speed")+'
'+a("right")+'
'+e("Loop")+'
'+e("Danmaku")+'
'+e("Opacity for danmaku")+'
',speed:'
0.5
0.75
'+e("Normal")+'
1.25
1.5
2
'}}};e.exports=i},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=n||0,this.durationArr=[],this.eventAll=[],this.eventCurrent=[],this.on("all","durationchange",function(e,t){1!==t.duration&&(i.durationArr[e]=t.duration,n||(i.duration=i.durationArr.reduce(function(e,t){return e+t})))}),this.on("current","end",function(){i.switch(i.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;i\n'}},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"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n0?t:0,t=t<1?t:1,g[e+"Bar"].style[n]=100*t+"%"};var i=["play","pause","canplay","playing","ended","error"];this.event={};for(var s=0;sL+.01&&!n.video.attr("paused")&&(n.element.classList.remove("dplayer-loading"),x=!1),L=E},100)},q=function(){clearInterval(n.checkLoading)};this.animationFrame=function(){if(n.playedTime&&(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")),n.danmakuTime&&n.option.danmaku&&Q&&n.dan){for(var e=n.dan[n.danIndex],t=[];e&&n.video.currentTime()>parseFloat(e.time);)t.push(e),e=n.dan[++n.danIndex];n.pushDanmaku(t)}window.requestAnimationFrame(n.animationFrame)},window.requestAnimationFrame(this.animationFrame),this.setTime=function(e){e?(n[e+"Time"]=!0,"played"===e&&T()):(n.danmakuTime=!0,n.playedTime=!0,T())},this.clearTime=function(e){e?(n[e+"Time"]=!1,"played"===e&&q()):(n.danmakuTime=!1,n.playedTime=!1,q())},k.addEventListener("click",function(e){var t=e||window.event;w=k.clientWidth;var a=(t.clientX-l.getElementViewLeft(k))/w;a=a>0?a:0,a=a<1?a:1,n.updateBar("played",a,"width"),n.video.seek(parseFloat(g.playedBar.style.width)/100*n.video.duration)}),this.isTipsShow=!1,this.timeTipsHandler=this.timeTipsHandler(k,b).bind(this),k.addEventListener("mousemove",this.timeTipsHandler),k.addEventListener("mouseover",this.timeTipsHandler),k.addEventListener("mouseenter",this.timeTipsHandler),k.addEventListener("mouseout",this.timeTipsHandler),k.addEventListener("mouseleave",this.timeTipsHandler);var B=function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(k))/w;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)},C=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",B),n.video.seek(parseFloat(g.playedBar.style.width)/100*n.video.duration),n.setTime()};k.addEventListener("mousedown",function(){w=k.clientWidth,n.clearTime(),document.addEventListener("mousemove",B),document.addEventListener("mouseup",C)}),g.volumeBar=this.element.getElementsByClassName("dplayer-volume-bar-inner")[0];var M=this.element.getElementsByClassName("dplayer-volume")[0],N=this.element.getElementsByClassName("dplayer-volume-bar-wrap")[0],z=this.element.getElementsByClassName("dplayer-volume-bar")[0],S=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 D=function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(z)-5.5)/35;n.volume(a)},I=function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",D),M.classList.remove("dplayer-volume-active")};N.addEventListener("click",function(e){var t=e||window.event,a=(t.clientX-l.getElementViewLeft(z)-5.5)/35;n.volume(a)}),N.addEventListener("mousedown",function(){document.addEventListener("mousemove",D),document.addEventListener("mouseup",I),M.classList.add("dplayer-volume-active")}),S.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),S.innerHTML=o("volume-off"),n.updateBar("volume",0,"width"))});var H=0;if(!p){var A=function(){n.element.classList.remove("dplayer-hide-controller"),clearTimeout(H),H=setTimeout(function(){n.video.attr("played").length&&(n.element.classList.add("dplayer-hide-controller"),R(),le())},2e3)};this.element.addEventListener("mousemove",A),this.element.addEventListener("click",A)}this.danOpacity=localStorage.getItem("DPlayer-opacity")||.7;var F=c.setting(this.tran),P=this.element.getElementsByClassName("dplayer-setting-icon")[0],O=this.element.getElementsByClassName("dplayer-setting-box")[0],V=this.element.getElementsByClassName("dplayer-mask")[0];O.innerHTML=F.original;var R=function(){O.classList.contains("dplayer-setting-box-open")&&(O.classList.remove("dplayer-setting-box-open"),V.classList.remove("dplayer-mask-show"),setTimeout(function(){O.classList.remove("dplayer-setting-box-narrow"),O.innerHTML=F.original,W()},300))},j=function(){O.classList.add("dplayer-setting-box-open"),V.classList.add("dplayer-mask-show")};V.addEventListener("click",function(){R()}),P.addEventListener("click",function(){j()}),this.loop=this.option.loop;var X=this.element.getElementsByClassName("dplayer-danmaku")[0],Q=!0,W=function(){var e=n.element.getElementsByClassName("dplayer-setting-loop")[0],t=e.getElementsByClassName("dplayer-toggle-setting-input")[0];t.checked=n.loop,e.addEventListener("click",function(){t.checked=!t.checked,t.checked?n.loop=!0:n.loop=!1,R()});var a=n.element.getElementsByClassName("dplayer-setting-showdan")[0],i=a.getElementsByClassName("dplayer-showdan-setting-input")[0];if(i.checked=Q,a.addEventListener("click",function(){if(i.checked=!i.checked,i.checked){if(Q=!0,n.option.danmaku){for(var e=0;e=n.video.currentTime()){n.danIndex=e;break}n.danIndex=n.dan.length}n.paused||n.setTime("danmaku")}}else Q=!1,n.option.danmaku&&(n.clearTime("danmaku"),X.innerHTML="",n.danTunnel={right:{},top:{},bottom:{}});R()}),n.element.getElementsByClassName("dplayer-setting-speed")[0].addEventListener("click",function(){O.classList.add("dplayer-setting-box-narrow"),O.innerHTML=F.speed;for(var e=O.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,"/")},te=function(){if($.blur(),!$.value.replace(/^\s+|\s+$/g,""))return void n.notice(n.tran("Please input danmaku content!"));var e={token:n.option.danmaku.token,player:n.option.danmaku.id,author:n.option.danmaku.user,time:n.video.currentTime(),text:$.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),$.value="",le(),n.dan.splice(n.danIndex,0,e),n.danIndex++;var t={text:ee(e.text),color:e.color,type:e.type,border:"2px solid "+n.option.theme};n.pushDanmaku(t)},ne=function(){K.classList.contains("dplayer-comment-setting-open")&&K.classList.remove("dplayer-comment-setting-open")},ae=function(){K.classList.contains("dplayer-comment-setting-open")?K.classList.remove("dplayer-comment-setting-open"):K.classList.add("dplayer-comment-setting-open")},ie=0,se=0,le=function(){J.classList.contains("dplayer-comment-box-open")&&(J.classList.remove("dplayer-comment-box-open"),V.classList.remove("dplayer-mask-show"),n.element.classList.remove("dplayer-show-controller"),clearInterval(ie),clearTimeout(se),ne())},oe=function(){J.classList.contains("dplayer-comment-box-open")||(J.classList.add("dplayer-comment-box-open"),V.classList.add("dplayer-mask-show"),n.element.classList.add("dplayer-show-controller"),ie=setInterval(function(){clearTimeout(H)},1e3),se=setTimeout(function(){$.focus()},300))};V.addEventListener("click",function(){le()}),U.addEventListener("click",function(){oe()}),G.addEventListener("click",function(){ae()}),this.element.getElementsByClassName("dplayer-comment-setting-color")[0].addEventListener("click",function(){n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked+span')&&(G.getElementsByClassName("dplayer-fill")[0].style.fill=n.element.querySelector('input[name="dplayer-danmaku-color-${index}"]:checked').value)}),$.addEventListener("click",function(){ne()}),$.addEventListener("keydown",function(e){13===(e||window.event).keyCode&&te()}),Z.addEventListener("click",te);var re=function(){for(var e=X.offsetWidth,t=n.element.getElementsByClassName("dplayer-danmaku-item"),a=0;a=a.width?(ce.style.right=a.width-i+"px",ce.style.left="initial"):(ce.style.left=t.clientX-n.element.getBoundingClientRect().left+"px",ce.style.right="initial"),s+ce.offsetHeight>=a.height?(ce.style.bottom=a.height-s+"px",ce.style.top="initial"):(ce.style.top=t.clientY-n.element.getBoundingClientRect().top+"px",ce.style.bottom="initial"),V.classList.add("dplayer-mask-show"),V.addEventListener("click",function(){V.classList.remove("dplayer-mask-show"),ce.classList.remove("dplayer-menu-show")})}),this.option.video.quality&&this.element.getElementsByClassName("dplayer-quality-list")[0].addEventListener("click",function(e){e.target.classList.contains("dplayer-quality-item")&&n.switchQuality(e.target.dataset.index)}),this.option.screenshot){var ue=this.element.getElementsByClassName("dplayer-camera-icon")[0];ue.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),ue.href=e.toDataURL(),ue.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.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=this,a=[],i=0,s=0;s=e.video.currentTime())return void(e.danIndex=t);e.danIndex=e.dan.length}}),this.video.on("all","durationchange",function(t,n){1!==n.duration&&(e.element.getElementsByClassName("dplayer-dtime")[0].innerHTML=l.secondToTime(e.video.duration))}),this.video.on("current","progress",function(t,n){var a=n.buffered.length?n.buffered.end(n.buffered.length-1)/n.duration:0;e.updateBar("loaded",a,"width")}),this.video.on("all","error",function(){e.notice(e.tran("This video fails to load"),-1),e.trigger("pause")}),this.video.on("current","canplay",function(){e.trigger("canplay")}),this.ended=!1,this.video.on("all","ended",function(t){t===e.video.videos.length-1&&(e.updateBar("played",1,"width"),e.loop?(e.video.switch(0),e.video.play()):(e.ended=!0,e.pause(),e.trigger("ended")),e.danIndex=0)}),this.video.on("current","play",function(){e.paused&&e.play()}),this.video.on("current","pause",function(){e.paused||e.pause()}),this.video.attr("volume",parseInt(this.element.getElementsByClassName("dplayer-volume-bar-inner")[0].style.width)/100)}},{key:"switchQuality",value:function(e){var t=this;if(this.qualityIndex!==e&&!this.switchingQuality){this.qualityIndex=e,this.switchingQuality=!0,this.quality=this.option.video.quality[e],this.element.getElementsByClassName("dplayer-quality-icon")[0].innerHTML=this.quality.name,this.video.pause();var n=c.video(!1,null,this.option.screenshot,"auto",this.quality.url),a=(new DOMParser).parseFromString(n,"text/html").body.firstChild,i=this.element.getElementsByClassName("dplayer-video-wrap")[0];i.insertBefore(a,i.getElementsByTagName("div")[0]),this.prevVideo=this.video,this.video=new u([a],this.prevVideo.duration),this.initVideo(),this.video.seek(this.prevVideo.currentTime()),this.notice(this.tran("Switching to")+" "+this.quality.name+" "+this.tran("quality"),-1),this.video.on("current","canplay",function(){if(t.prevVideo){if(t.video.currentTime()!==t.prevVideo.currentTime())return void t.video.seek(t.prevVideo.currentTime());i.removeChild(t.prevVideo.current),t.video.current.classList.add("dplayer-video-current"),t.video.play(),t.prevVideo=null,t.notice(t.tran("Switched to")+" "+t.quality.name+" "+t.tran("quality")),t.switchingQuality=!1}})}}},{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}}}}},{key:"notice",value:function(e,t){var n=this.element.getElementsByClassName("dplayer-notice")[0];n.innerHTML=e,n.style.opacity=1,this.noticeTime&&clearTimeout(this.noticeTime),t&&t<0||(this.noticeTime=setTimeout(function(){n.style.opacity=0},t||2e3))}}]),e}();e.exports=v},function(e,t){},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!==e;)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";var a=n(5);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:!0,hotkey:!0,preload:"auto",apiBackend:a,contextmenu:[{text:"关于作者",link:"http://diygod.me"},{text:"播放器意见反馈",link:"https://github.com/DIYgod/DPlayer/issues"},{text:"关于 DPlayer 播放器",link:"https://github.com/DIYgod/DPlayer"}]};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.video.quality&&(e.video.url=[e.video.quality[e.video.defaultQuality].url]),e}},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})})}}},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 content!":"要输入弹幕内容啊喂!","Set danmaku color":"设置弹幕颜色","Set danmaku type":"设置弹幕类型",Danmaku:"弹幕","This video fails to load":"视频加载失败","Switching to":"正在切换至","Switched to":"已经切换至",quality:"画质"};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(0),i={main:function(e,t,n){for(var s="",l=0;l
'+s+(e.logo?'':"")+'
'+(e.danmaku?''+n("Danmaku is loading")+"":"")+'
0:00 / 0:00
'+(e.video.quality?'
'+i.qualityList(e.video.quality)+"
":"")+(e.screenshot?''+a("camera")+"":"")+'
'+n("Set danmaku color")+'
'+n("Set danmaku type")+'
'+i.contextmenuList(e.contextmenu)+'
'},contextmenuList:function(e){for(var t='";return t+=""},qualityList:function(e){for(var t='
',n=0;n'+e[n].name+"
";return t+=""},video:function(e,t,n,a,i){return''},setting:function(e){return{original:'
'+e("Speed")+'
'+a("right")+'
'+e("Loop")+'
'+e("Danmaku")+'
'+e("Opacity for danmaku")+'
',speed:'
0.5
0.75
'+e("Normal")+'
1.25
1.5
2
'}}};e.exports=i},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=n||0,this.durationArr=[],this.eventAll=[],this.eventCurrent=[],this.on("all","durationchange",function(e,t){1!==t.duration&&(i.durationArr[e]=t.duration,n||(i.duration=i.durationArr.reduce(function(e,t){return e+t})))}),this.on("current","end",function(){i.switch(i.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;i\\n';\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nconsole.log('%c DPlayer 1.4.3 %c http://dplayer.js.org ', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\n__webpack_require__(2);\nvar utils = __webpack_require__(3);\nvar svg = __webpack_require__(0);\nvar handleOption = __webpack_require__(4);\nvar i18n = __webpack_require__(6);\nvar html = __webpack_require__(7);\nvar Video = __webpack_require__(8);\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\nvar index = 0;\nvar DPlayer = function () {\n function DPlayer(option) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.option = handleOption(option);\n this.option.element.classList.add('dplayer');\n if (this.option.video.quality) {\n this.qualityIndex = this.option.video.defaultQuality;\n this.quality = this.option.video.quality[this.option.video.defaultQuality];\n }\n this.tran = new i18n(this.option.lang).tran;\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 var eventTypes = [\n 'play',\n 'pause',\n 'canplay',\n 'playing',\n 'ended',\n 'error'\n ];\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 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 this.element.innerHTML = html.main(option, index, this.tran);\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 this.video = new Video(this.element.getElementsByClassName('dplayer-video-current'));\n this.initVideo();\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 this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', function () {\n _this.toggle();\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 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 var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n this.danmakuTime = false;\n this.playedTime = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime();\n if (!bufferingDetected && currentPlayPos < lastPlayPos + 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 }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.animationFrame = function () {\n if (_this.playedTime) {\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 }\n if (_this.danmakuTime && _this.option.danmaku && showdan && _this.dan) {\n var item = _this.dan[_this.danIndex];\n var danmakus = [];\n while (item && _this.video.currentTime() > parseFloat(item.time)) {\n danmakus.push(item);\n item = _this.dan[++_this.danIndex];\n }\n _this.pushDanmaku(danmakus);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.danmakuTime = true;\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.danmakuTime = false;\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\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 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 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 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 pbar.addEventListener('mousedown', function () {\n barWidth = pbar.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\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 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 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 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 this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n var settingHTML = html.setting(this.tran);\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 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 mask.addEventListener('click', function () {\n closeSetting();\n });\n settingIcon.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.option.loop;\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var showdan = true;\n var settingEvent = function settingEvent() {\n var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n loopToggle.checked = _this.loop;\n loopEle.addEventListener('click', function () {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n showDanToggle.checked = showdan;\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 _i2 = 0; _i2 < _this.dan.length; _i2++) {\n if (_this.dan[_i2].time >= _this.video.currentTime()) {\n _this.danIndex = _i2;\n break;\n }\n _this.danIndex = _this.dan.length;\n }\n if (!_this.paused) {\n _this.setTime('danmaku');\n }\n }\n } else {\n showdan = false;\n if (_this.option.danmaku) {\n _this.clearTime('danmaku');\n danContainer.innerHTML = '';\n _this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n }\n }\n closeSetting();\n });\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 var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n var _loop = function _loop(_i3) {\n speedItem[_i3].addEventListener('click', function () {\n _this.video.attr('playbackRate', speedItem[_i3].dataset.speed);\n closeSetting();\n });\n };\n for (var _i3 = 0; _i3 < speedItem.length; _i3++) {\n _loop(_i3);\n }\n });\n if (_this.option.danmaku) {\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 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 _i4 = 0; _i4 < items.length; _i4++) {\n items[_i4].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 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 _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 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 if (this.video.duration !== 1) {\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00';\n }\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n var measureStyle = getComputedStyle(this.element.getElementsByClassName('dplayer-danmaku-item')[0], null);\n var context = document.createElement('canvas').getContext('2d');\n context.font = measureStyle.getPropertyValue('font-size') + ' ' + measureStyle.getPropertyValue('font-family');\n this.danmakuMeasure = function (text) {\n return context.measureText(text).width;\n };\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n } else {\n if (this.option.autoplay && !isMobile) {\n this.play();\n } else if (isMobile) {\n this.pause();\n }\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 var htmlEncode = function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n };\n var sendComment = function sendComment() {\n commentInput.blur();\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\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 commentInput.value = '';\n closeComment();\n _this.dan.splice(_this.danIndex, 0, danmakuData);\n _this.danIndex++;\n var danmaku = {\n text: htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + _this.option.theme\n };\n _this.pushDanmaku(danmaku);\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 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 commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n _this.element.classList.remove('dplayer-show-controller');\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 commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n _this.element.classList.add('dplayer-show-controller');\n disableHide = setInterval(function () {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(function () {\n commentInput.focus();\n }, 300);\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 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 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 commentSendIcon.addEventListener('click', sendComment);\n var resetAnimation = function resetAnimation() {\n var danWidth = danContainer.offsetWidth;\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i6 = 0; _i6 < items.length; _i6++) {\n items[_i6].style.transform = 'translateX(-' + danWidth + 'px)';\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 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 _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 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 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 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 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 menu.classList.add('dplayer-menu-show');\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 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 if (this.option.video.quality) {\n this.element.getElementsByClassName('dplayer-quality-list')[0].addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.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 camareIcon.href = canvas.toDataURL();\n camareIcon.download = 'DPlayer.png';\n });\n }\n index++;\n }\n _createClass(DPlayer, [\n {\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 this.playButton.innerHTML = svg('pause');\n this.video.play();\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n if (!this.video.attr('paused')) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\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 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 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 key: 'on',\n value: function on(event, callback) {\n if (typeof callback === 'function') {\n this.event[event].push(callback);\n }\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, finish) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.notice(err.response.msg);\n } else {\n _this2.notice('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 for (var i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'readDanmaku',\n value: function readDanmaku() {\n var _this3 = this;\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 this._readAllEndpoints(endpoints, function (results) {\n _this3.danIndex = 0;\n _this3.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n _this3.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n if (_this3.option.autoplay && !isMobile) {\n _this3.play();\n } else if (isMobile) {\n _this3.pause();\n }\n });\n }\n },\n {\n key: 'pushDanmaku',\n value: function pushDanmaku(danmaku) {\n var _this4 = this;\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 var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || danContainer.getBoundingClientRect().right + eleWidth;\n return danContainer.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop2 = function _loop2(i) {\n var item = _this4.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(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0;; i++) {\n var _ret2 = _loop2(i);\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === 'object')\n return _ret2.v;\n }\n };\n if (Object.prototype.toString.call(danmaku) !== '[object Array]') {\n danmaku = [danmaku];\n }\n var docFragment = document.createDocumentFragment();\n var _loop3 = function _loop3(i) {\n if (!danmaku[i].type) {\n danmaku[i].type = 'right';\n }\n if (!danmaku[i].color) {\n danmaku[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + danmaku[i].type);\n item.innerHTML = danmaku[i].text;\n item.style.opacity = _this4.danOpacity;\n item.style.color = danmaku[i].color;\n item.style.border = danmaku[i].border;\n item.addEventListener('animationend', function () {\n danContainer.removeChild(item);\n });\n var itemWidth = _this4.danmakuMeasure(danmaku[i].text);\n switch (danmaku[i].type) {\n case 'right':\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type, itemWidth) + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + danmaku[i].type);\n }\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n };\n for (var i = 0; i < danmaku.length; i++) {\n _loop3(i);\n }\n danContainer.appendChild(docFragment);\n return docFragment;\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmaku) {\n this.video.attr('poster', video.pic ? video.pic : '');\n this.video.attr('src', video.url);\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.danTuel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo() {\n var _this5 = this;\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 var hls = new Hls();\n hls.attachMedia(this.video.current);\n hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n hls.loadSource(_this5.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n this.notice('manifest loaded, found ' + data.levels.length + ' quality level');\n });\n });\n }\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 if (this.option.danmaku) {\n this.video.on('all', 'seeking', function () {\n for (var i = 0; i < _this5.dan.length; i++) {\n if (_this5.dan[i].time >= _this5.video.currentTime()) {\n _this5.danIndex = i;\n return;\n }\n _this5.danIndex = _this5.dan.length;\n }\n });\n }\n this.video.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this5.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(_this5.video.duration);\n }\n });\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 _this5.updateBar('loaded', percentage, 'width');\n });\n this.video.on('all', 'error', function () {\n _this5.notice(_this5.tran('This video fails to load'), -1);\n _this5.trigger('pause');\n });\n this.video.on('current', 'canplay', function () {\n _this5.trigger('canplay');\n });\n this.ended = false;\n this.video.on('all', 'ended', function (i) {\n if (i === _this5.video.videos.length - 1) {\n _this5.updateBar('played', 1, 'width');\n if (!_this5.loop) {\n _this5.ended = true;\n _this5.pause();\n _this5.trigger('ended');\n } else {\n _this5.video.switch(0);\n _this5.video.play();\n }\n _this5.danIndex = 0;\n }\n });\n this.video.on('current', 'play', function () {\n if (_this5.paused) {\n _this5.play();\n }\n });\n this.video.on('current', 'pause', function () {\n if (!_this5.paused) {\n _this5.pause();\n }\n });\n this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100);\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this6 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.option.video.quality[index];\n this.element.getElementsByClassName('dplayer-quality-icon')[0].innerHTML = this.quality.name;\n this.video.pause();\n var videoHTML = html.video(false, null, this.option.screenshot, 'auto', this.quality.url);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n var parent = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n parent.insertBefore(videoEle, parent.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = new Video([videoEle], this.prevVideo.duration);\n this.initVideo();\n this.video.seek(this.prevVideo.currentTime());\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.video.on('current', 'canplay', function () {\n if (_this6.prevVideo) {\n if (_this6.video.currentTime() !== _this6.prevVideo.currentTime()) {\n _this6.video.seek(_this6.prevVideo.currentTime());\n return;\n }\n parent.removeChild(_this6.prevVideo.current);\n _this6.video.current.classList.add('dplayer-video-current');\n _this6.video.play();\n _this6.prevVideo = null;\n _this6.notice(_this6.tran('Switched to') + ' ' + _this6.quality.name + ' ' + _this6.tran('quality'));\n _this6.switchingQuality = false;\n }\n });\n }\n },\n {\n key: 'timeTipsHandler',\n value: function timeTipsHandler(pbar, timeTips) {\n var _this7 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this7.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n timeTips.innerText = utils.secondToTime(_this7.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 (_this7.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n _this7.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!_this7.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n _this7.isTipsShow = false;\n break;\n }\n };\n }\n },\n {\n key: 'notice',\n value: function notice(text, time) {\n var noticeEle = this.element.getElementsByClassName('dplayer-notice')[0];\n noticeEle.innerHTML = text;\n noticeEle.style.opacity = 1;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n if (time && time < 0) {\n return;\n }\n this.noticeTime = setTimeout(function () {\n noticeEle.style.opacity = 0;\n }, time || 2000);\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n }\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar defaultApiBackend = __webpack_require__(5);\nmodule.exports = function (option) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n option.autoplay = false;\n }\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 contextmenu: [\n {\n text: '关于作者',\n link: 'http://diygod.me'\n },\n {\n text: '播放器意见反馈',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: '关于 DPlayer 播放器',\n link: 'https://github.com/DIYgod/DPlayer'\n }\n ]\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 if (option.video.quality) {\n option.video.url = [option.video.quality[option.video.defaultQuality].url];\n }\n return option;\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData) {\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 read: function read(endpoint, cbk) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n cbk(null, response.danmaku);\n }, function (xhr, response) {\n cbk({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n cbk({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质'\n};\nmodule.exports = function (lang) {\n var _this = this;\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/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar svg = __webpack_require__(0);\nvar html = {\n main: function main(option, index, tran) {\n var videos = '';\n for (var i = 0; i < option.video.url.length; i++) {\n videos += html.video(i === 0, option.video.pic, option.screenshot, option.video.url.length ? 'metadata' : option.preload, option.video.url[i]);\n }\n return '
' + videos + '' + (option.logo ? '
' : '') + '
' + (option.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
0:00 / 0:00
' + (option.video.quality ? '
' + html.qualityList(option.video.quality) + '
' : '') + '' + (option.screenshot ? '' + svg('camera') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
00:00
' + html.contextmenuList(option.contextmenu) + '
';\n },\n contextmenuList: function contextmenuList(contextmenu) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n },\n qualityList: function qualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n },\n video: function video(current, pic, screenshot, preload, url) {\n return '';\n },\n setting: function setting(tran) {\n return {\n 'original': '
' + tran('Speed') + '
' + svg('right') + '
' + tran('Loop') + '
' + tran('Danmaku') + '
' + tran('Opacity for danmaku') + '
',\n 'speed': '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
'\n };\n }\n};\nmodule.exports = html;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Video = function () {\n function Video(videos, duration) {\n var _this = this;\n _classCallCheck(this, Video);\n this.videos = videos;\n this.multi = this.videos.length > 1;\n this.index = 0;\n this.current = this.videos[this.index];\n this.duration = duration || 0;\n this.durationArr = [];\n this.eventAll = [];\n this.eventCurrent = [];\n this.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this.durationArr[i] = video.duration;\n if (!duration) {\n _this.duration = _this.durationArr.reduce(function (sum, cur) {\n return sum + cur;\n });\n }\n }\n });\n this.on('current', 'end', function () {\n _this.switch(_this.index + 1);\n });\n }\n _createClass(Video, [\n {\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 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 {\n key: 'on',\n value: function on(type, event, callback) {\n var _this2 = this;\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 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 for (var i = 0; i < this.videos.length; i++) {\n _loop(i);\n }\n }\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(type, event) {\n var events = type === 'all' ? this.eventAll : this.eventCurrent;\n if (events[event]) {\n for (var i = 0; i < events[event].length; i++) {\n events[event][i]();\n }\n }\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 {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n time = Math.min(time, this.duration);\n var i = 0;\n var tmptime = 0;\n while (tmptime <= time) {\n tmptime += this.durationArr[i];\n i++;\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 this.switch(i - 1, currentTime);\n this.trigger('all', 'seeking');\n }\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 {\n key: 'play',\n value: function play() {\n this.current.play();\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.current.pause();\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n this.current.paused ? this.play() : this.pause();\n }\n }\n ]);\n return Video;\n}();\nmodule.exports = Video;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// DPlayer.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap fcdef9a07be13741278e","'use strict';\nvar svgSource = {\n 'play': [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n 'pause': [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.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 ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n 'loop': [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n 'full': [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n 'setting': [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n 'right': [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n 'comment': [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n 'send': [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n 'menu': [\n '0 0 22 32',\n '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 ],\n 'camera': [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ]\n};\nmodule.exports = function (type) {\n return '\\n';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg.js\n// module id = 0\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nconsole.log('%c DPlayer 1.4.3 %c http://dplayer.js.org ', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nrequire('./DPlayer.scss');\nvar utils = require('./utils.js');\nvar svg = require('./svg.js');\nvar handleOption = require('./option.js');\nvar i18n = require('./i18n.js');\nvar html = require('./html.js');\nvar Video = require('./video.js');\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\nvar index = 0;\nvar DPlayer = function () {\n function DPlayer(option) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.option = handleOption(option);\n this.option.element.classList.add('dplayer');\n if (this.option.video.quality) {\n this.qualityIndex = this.option.video.defaultQuality;\n this.quality = this.option.video.quality[this.option.video.defaultQuality];\n }\n this.tran = new i18n(this.option.lang).tran;\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 var eventTypes = [\n 'play',\n 'pause',\n 'canplay',\n 'playing',\n 'ended',\n 'error'\n ];\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 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 this.element.innerHTML = html.main(option, index, this.tran);\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 this.video = new Video(this.element.getElementsByClassName('dplayer-video-current'));\n this.initVideo();\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 this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', function () {\n _this.toggle();\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 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 var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n this.danmakuTime = false;\n this.playedTime = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime();\n if (!bufferingDetected && currentPlayPos < lastPlayPos + 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 }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.animationFrame = function () {\n if (_this.playedTime) {\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 }\n if (_this.danmakuTime && _this.option.danmaku && showdan && _this.dan) {\n var item = _this.dan[_this.danIndex];\n var danmakus = [];\n while (item && _this.video.currentTime() > parseFloat(item.time)) {\n danmakus.push(item);\n item = _this.dan[++_this.danIndex];\n }\n _this.pushDanmaku(danmakus);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.danmakuTime = true;\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.danmakuTime = false;\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\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 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 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 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 pbar.addEventListener('mousedown', function () {\n barWidth = pbar.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\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 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 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 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 this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n var settingHTML = html.setting(this.tran);\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 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 mask.addEventListener('click', function () {\n closeSetting();\n });\n settingIcon.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.option.loop;\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var showdan = true;\n var settingEvent = function settingEvent() {\n var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n loopToggle.checked = _this.loop;\n loopEle.addEventListener('click', function () {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n showDanToggle.checked = showdan;\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 _i2 = 0; _i2 < _this.dan.length; _i2++) {\n if (_this.dan[_i2].time >= _this.video.currentTime()) {\n _this.danIndex = _i2;\n break;\n }\n _this.danIndex = _this.dan.length;\n }\n if (!_this.paused) {\n _this.setTime('danmaku');\n }\n }\n } else {\n showdan = false;\n if (_this.option.danmaku) {\n _this.clearTime('danmaku');\n danContainer.innerHTML = '';\n _this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n }\n }\n closeSetting();\n });\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 var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n var _loop = function _loop(_i3) {\n speedItem[_i3].addEventListener('click', function () {\n _this.video.attr('playbackRate', speedItem[_i3].dataset.speed);\n closeSetting();\n });\n };\n for (var _i3 = 0; _i3 < speedItem.length; _i3++) {\n _loop(_i3);\n }\n });\n if (_this.option.danmaku) {\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 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 _i4 = 0; _i4 < items.length; _i4++) {\n items[_i4].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 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 _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 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 if (this.video.duration !== 1) {\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00';\n }\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n var measureStyle = getComputedStyle(this.element.getElementsByClassName('dplayer-danmaku-item')[0], null);\n var context = document.createElement('canvas').getContext('2d');\n context.font = measureStyle.getPropertyValue('font-size') + ' ' + measureStyle.getPropertyValue('font-family');\n this.danmakuMeasure = function (text) {\n return context.measureText(text).width;\n };\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n } else {\n if (this.option.autoplay && !isMobile) {\n this.play();\n } else if (isMobile) {\n this.pause();\n }\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 var htmlEncode = function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n };\n var sendComment = function sendComment() {\n commentInput.blur();\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\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 commentInput.value = '';\n closeComment();\n _this.dan.splice(_this.danIndex, 0, danmakuData);\n _this.danIndex++;\n var danmaku = {\n text: htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + _this.option.theme\n };\n _this.pushDanmaku(danmaku);\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 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 commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n _this.element.classList.remove('dplayer-show-controller');\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 commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n _this.element.classList.add('dplayer-show-controller');\n disableHide = setInterval(function () {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(function () {\n commentInput.focus();\n }, 300);\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 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 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 commentSendIcon.addEventListener('click', sendComment);\n var resetAnimation = function resetAnimation() {\n var danWidth = danContainer.offsetWidth;\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i6 = 0; _i6 < items.length; _i6++) {\n items[_i6].style.transform = 'translateX(-' + danWidth + 'px)';\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 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 _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 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 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 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 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 menu.classList.add('dplayer-menu-show');\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 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 if (this.option.video.quality) {\n this.element.getElementsByClassName('dplayer-quality-list')[0].addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.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 camareIcon.href = canvas.toDataURL();\n camareIcon.download = 'DPlayer.png';\n });\n }\n index++;\n }\n _createClass(DPlayer, [\n {\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 this.playButton.innerHTML = svg('pause');\n this.video.play();\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n if (!this.video.attr('paused')) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\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 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 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 key: 'on',\n value: function on(event, callback) {\n if (typeof callback === 'function') {\n this.event[event].push(callback);\n }\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, finish) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.notice(err.response.msg);\n } else {\n _this2.notice('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 for (var i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'readDanmaku',\n value: function readDanmaku() {\n var _this3 = this;\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 this._readAllEndpoints(endpoints, function (results) {\n _this3.danIndex = 0;\n _this3.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n _this3.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n if (_this3.option.autoplay && !isMobile) {\n _this3.play();\n } else if (isMobile) {\n _this3.pause();\n }\n });\n }\n },\n {\n key: 'pushDanmaku',\n value: function pushDanmaku(danmaku) {\n var _this4 = this;\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 var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || danContainer.getBoundingClientRect().right + eleWidth;\n return danContainer.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop2 = function _loop2(i) {\n var item = _this4.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(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0;; i++) {\n var _ret2 = _loop2(i);\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === 'object')\n return _ret2.v;\n }\n };\n if (Object.prototype.toString.call(danmaku) !== '[object Array]') {\n danmaku = [danmaku];\n }\n var docFragment = document.createDocumentFragment();\n var _loop3 = function _loop3(i) {\n if (!danmaku[i].type) {\n danmaku[i].type = 'right';\n }\n if (!danmaku[i].color) {\n danmaku[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + danmaku[i].type);\n item.innerHTML = danmaku[i].text;\n item.style.opacity = _this4.danOpacity;\n item.style.color = danmaku[i].color;\n item.style.border = danmaku[i].border;\n item.addEventListener('animationend', function () {\n danContainer.removeChild(item);\n });\n var itemWidth = _this4.danmakuMeasure(danmaku[i].text);\n switch (danmaku[i].type) {\n case 'right':\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type, itemWidth) + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + danmaku[i].type);\n }\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n };\n for (var i = 0; i < danmaku.length; i++) {\n _loop3(i);\n }\n danContainer.appendChild(docFragment);\n return docFragment;\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmaku) {\n this.video.attr('poster', video.pic ? video.pic : '');\n this.video.attr('src', video.url);\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.danTuel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo() {\n var _this5 = this;\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 var hls = new Hls();\n hls.attachMedia(this.video.current);\n hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n hls.loadSource(_this5.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n this.notice('manifest loaded, found ' + data.levels.length + ' quality level');\n });\n });\n }\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 if (this.option.danmaku) {\n this.video.on('all', 'seeking', function () {\n for (var i = 0; i < _this5.dan.length; i++) {\n if (_this5.dan[i].time >= _this5.video.currentTime()) {\n _this5.danIndex = i;\n return;\n }\n _this5.danIndex = _this5.dan.length;\n }\n });\n }\n this.video.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this5.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(_this5.video.duration);\n }\n });\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 _this5.updateBar('loaded', percentage, 'width');\n });\n this.video.on('all', 'error', function () {\n _this5.notice(_this5.tran('This video fails to load'), -1);\n _this5.trigger('pause');\n });\n this.video.on('current', 'canplay', function () {\n _this5.trigger('canplay');\n });\n this.ended = false;\n this.video.on('all', 'ended', function (i) {\n if (i === _this5.video.videos.length - 1) {\n _this5.updateBar('played', 1, 'width');\n if (!_this5.loop) {\n _this5.ended = true;\n _this5.pause();\n _this5.trigger('ended');\n } else {\n _this5.video.switch(0);\n _this5.video.play();\n }\n _this5.danIndex = 0;\n }\n });\n this.video.on('current', 'play', function () {\n if (_this5.paused) {\n _this5.play();\n }\n });\n this.video.on('current', 'pause', function () {\n if (!_this5.paused) {\n _this5.pause();\n }\n });\n this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100);\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this6 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.option.video.quality[index];\n this.element.getElementsByClassName('dplayer-quality-icon')[0].innerHTML = this.quality.name;\n this.video.pause();\n var videoHTML = html.video(false, null, this.option.screenshot, 'auto', this.quality.url);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n var parent = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n parent.insertBefore(videoEle, parent.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = new Video([videoEle], this.prevVideo.duration);\n this.initVideo();\n this.video.seek(this.prevVideo.currentTime());\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.video.on('current', 'canplay', function () {\n if (_this6.prevVideo) {\n if (_this6.video.currentTime() !== _this6.prevVideo.currentTime()) {\n _this6.video.seek(_this6.prevVideo.currentTime());\n return;\n }\n parent.removeChild(_this6.prevVideo.current);\n _this6.video.current.classList.add('dplayer-video-current');\n _this6.video.play();\n _this6.prevVideo = null;\n _this6.notice(_this6.tran('Switched to') + ' ' + _this6.quality.name + ' ' + _this6.tran('quality'));\n _this6.switchingQuality = false;\n }\n });\n }\n },\n {\n key: 'timeTipsHandler',\n value: function timeTipsHandler(pbar, timeTips) {\n var _this7 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this7.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n timeTips.innerText = utils.secondToTime(_this7.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 (_this7.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n _this7.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!_this7.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n _this7.isTipsShow = false;\n break;\n }\n };\n }\n },\n {\n key: 'notice',\n value: function notice(text, time) {\n var noticeEle = this.element.getElementsByClassName('dplayer-notice')[0];\n noticeEle.innerHTML = text;\n noticeEle.style.opacity = 1;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n if (time && time < 0) {\n return;\n }\n this.noticeTime = setTimeout(function () {\n noticeEle.style.opacity = 0;\n }, time || 2000);\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DPlayer.js\n// module id = 1\n// module chunks = 0","'use strict';\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 3\n// module chunks = 0","'use strict';\nvar defaultApiBackend = require('./api.js');\nmodule.exports = function (option) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n option.autoplay = false;\n }\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 contextmenu: [\n {\n text: '关于作者',\n link: 'http://diygod.me'\n },\n {\n text: '播放器意见反馈',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: '关于 DPlayer 播放器',\n link: 'https://github.com/DIYgod/DPlayer'\n }\n ]\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 if (option.video.quality) {\n option.video.url = [option.video.quality[option.video.defaultQuality].url];\n }\n return option;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/option.js\n// module id = 4\n// module chunks = 0","'use strict';\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData) {\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 read: function read(endpoint, cbk) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n cbk(null, response.danmaku);\n }, function (xhr, response) {\n cbk({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n cbk({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 5\n// module chunks = 0","'use strict';\nvar tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质'\n};\nmodule.exports = function (lang) {\n var _this = this;\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//////////////////\n// WEBPACK FOOTER\n// ./src/i18n.js\n// module id = 6\n// module chunks = 0","'use strict';\nvar svg = require('./svg.js');\nvar html = {\n main: function main(option, index, tran) {\n var videos = '';\n for (var i = 0; i < option.video.url.length; i++) {\n videos += html.video(i === 0, option.video.pic, option.screenshot, option.video.url.length ? 'metadata' : option.preload, option.video.url[i]);\n }\n return '
' + videos + '' + (option.logo ? '
' : '') + '
' + (option.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
0:00 / 0:00
' + (option.video.quality ? '
' + html.qualityList(option.video.quality) + '
' : '') + '' + (option.screenshot ? '' + svg('camera') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
00:00
' + html.contextmenuList(option.contextmenu) + '
';\n },\n contextmenuList: function contextmenuList(contextmenu) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n },\n qualityList: function qualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n },\n video: function video(current, pic, screenshot, preload, url) {\n return '';\n },\n setting: function setting(tran) {\n return {\n 'original': '
' + tran('Speed') + '
' + svg('right') + '
' + tran('Loop') + '
' + tran('Danmaku') + '
' + tran('Opacity for danmaku') + '
',\n 'speed': '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
'\n };\n }\n};\nmodule.exports = html;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/html.js\n// module id = 7\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Video = function () {\n function Video(videos, duration) {\n var _this = this;\n _classCallCheck(this, Video);\n this.videos = videos;\n this.multi = this.videos.length > 1;\n this.index = 0;\n this.current = this.videos[this.index];\n this.duration = duration || 0;\n this.durationArr = [];\n this.eventAll = [];\n this.eventCurrent = [];\n this.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this.durationArr[i] = video.duration;\n if (!duration) {\n _this.duration = _this.durationArr.reduce(function (sum, cur) {\n return sum + cur;\n });\n }\n }\n });\n this.on('current', 'end', function () {\n _this.switch(_this.index + 1);\n });\n }\n _createClass(Video, [\n {\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 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 {\n key: 'on',\n value: function on(type, event, callback) {\n var _this2 = this;\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 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 for (var i = 0; i < this.videos.length; i++) {\n _loop(i);\n }\n }\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(type, event) {\n var events = type === 'all' ? this.eventAll : this.eventCurrent;\n if (events[event]) {\n for (var i = 0; i < events[event].length; i++) {\n events[event][i]();\n }\n }\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 {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n time = Math.min(time, this.duration);\n var i = 0;\n var tmptime = 0;\n while (tmptime <= time) {\n tmptime += this.durationArr[i];\n i++;\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 this.switch(i - 1, currentTime);\n this.trigger('all', 'seeking');\n }\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 {\n key: 'play',\n value: function play() {\n this.current.play();\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.current.pause();\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n this.current.paused ? this.play() : this.pause();\n }\n }\n ]);\n return Video;\n}();\nmodule.exports = Video;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/video.js\n// module id = 8\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///DPlayer.min.js","webpack:///webpack/bootstrap 39cffe2b7123e39230a0","webpack:///./src/svg.js","webpack:///./src/DPlayer.js","webpack:///./src/utils.js","webpack:///./src/option.js","webpack:///./src/api.js","webpack:///./src/i18n.js","webpack:///./src/html.js","webpack:///./src/video.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","svgSource","play","pause","volume-up","volume-down","volume-off","loop","full","full-in","setting","right","comment","comment-off","send","menu","camera","type","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","obj","constructor","_createClass","defineProperties","target","props","length","descriptor","writable","key","protoProps","staticProps","console","log","utils","svg","handleOption","i18n","html","Video","isMobile","test","window","navigator","userAgent","index","DPlayer","option","_this","element","classList","add","video","quality","qualityIndex","defaultQuality","tran","lang","updateBar","percentage","direction","bar","style","eventTypes","event","trigger","_i","danmaku","innerHTML","main","arrow","offsetWidth","arrowStyle","document","createElement","head","appendChild","getElementsByClassName","initVideo","bezel","addEventListener","remove","playButton","paused","toggle","videoWrap","conMask","toggleController","contains","playedBar","loadedBar","pbar","pbarTimeTips","barWidth","lastPlayPos","currentPlayPos","bufferingDetected","danmakuTime","playedTime","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","setCheckLoadingTime","checkLoading","setInterval","currentTime","attr","clearCheckLoadingTime","clearInterval","animationFrame","duration","secondToTime","showdan","dan","item","danIndex","danmakus","parseFloat","time","push","pushDanmaku","setTime","clearTime","e","clientWidth","clientX","getElementViewLeft","seek","width","isTipsShow","timeTipsHandler","bind","thumbMove","thumbUp","removeEventListener","volumeBar","volumeEle","volumeBarWrapWrap","volumeBarWrap","volumeicon","switchVolumeIcon","volumeMove","volume","volumeUp","hideTime","hideController","clearTimeout","closeSetting","closeComment","danOpacity","localStorage","getItem","settingHTML","settingIcon","settingBox","mask","original","settingEvent","openSetting","danContainer","loopEle","loopToggle","checked","showDanEle","showDanToggle","_i2","danTunnel","top","bottom","speed","speedItem","_i3","dataset","danmakuBar","danmakuBarWrapWrap","danmakuBarWrap","danmakuSettingBox","danmakuMove","items","_i4","opacity","setItem","danmakuUp","_i5","measureStyle","getComputedStyle","context","getContext","font","getPropertyValue","danmakuMeasure","text","measureText","readDanmaku","autoplay","commentInput","commentIcon","commentBox","commentSettingIcon","commentSettingBox","commentSendIcon","htmlEncode","str","replace","sendComment","blur","value","notice","danmakuData","token","player","id","author","user","color","querySelector","apiBackend","api","splice","border","theme","closeCommentSetting","toggleCommentSetting","disableHide","commentFocusTimeout","openComment","focus","fill","keyCode","resetAnimation","danWidth","_i6","transform","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","cancelFullScreen","mozCancelFullScreen","webkitCancelFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","current","webkitEnterFullscreen","handleKeyDown","tag","activeElement","tagName","toUpperCase","editable","getAttribute","preventDefault","hotkey","clientRect","getBoundingClientRect","menuLeft","left","menuTop","clientY","offsetHeight","height","switchQuality","screenshot","camareIcon","canvas","drawImage","href","toDataURL","download","toString","ended","endpoints","finish","_this2","results","readCount","read","err","data","response","msg","status","_this3","apiurl","maximum","addition","slice","_readAllEndpoints","concat","apply","sort","a","b","display","_this4","itemHeight","danHeight","itemY","parseInt","danItemRight","ele","eleWidth","eleRight","danSpeed","getTunnel","tmp","_ret2","v","j","danRight","docFragment","createDocumentFragment","removeChild","itemWidth","error","pic","url","danTuel","_this5","exec","Hls","isSupported","hls","attachMedia","on","Events","MEDIA_ATTACHED","loadSource","MANIFEST_PARSED","levels","flvjs","flvPlayer","createPlayer","attachMediaElement","load","buffered","end","videos","switch","_this6","switchingQuality","videoHTML","videoEle","DOMParser","parseFromString","body","firstChild","parent","insertBefore","getElementsByTagName","prevVideo","timeTips","_this7","cumulativeOffset","offsetTop","offsetLeft","offsetParent","px","tx","innerText","noticeEle","noticeTime","second","add0","num","min","sec","actualLeft","elementScrollLeft","scrollLeft","documentElement","defaultApiBackend","defaultOption","language","indexOf","preload","contextmenu","link","defaultKey","SendXMLHttpRequest","success","fail","xhr","XMLHttpRequest","onreadystatechange","readyState","JSON","parse","responseText","code","open","stringify","endpoint","alert","cbk","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 content!","Set danmaku color","Set danmaku type","Danmaku","This video fails to load","Switching to","Switched to","logo","qualityList","contextmenuList","result","multi","durationArr","eventAll","eventCurrent","reduce","sum","cur","events","Math","max","tmptime","undefined"],"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,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAtB,GACA,GAAAe,GAAAf,KAAAuB,WACA,WAA2B,MAAAvB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAK,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDpB,EAAAuB,EAAA,GAGAvB,IAAAwB,EAAA,KDgBM,SAAU7B,EAAQD,EAASM,GAEjC,YE9EA,IAAAyB,IACAC,MACA,YACA,uJAEAC,OACA,YACA,4LAEAC,aACA,YACA,qsCAEAC,eACA,YACA,wfAEAC,cACA,YACA,yMAEAC,MACA,YACA,sbAEAC,MACA,YACA,irBAEAC,WACA,YACA,s+BAEAC,SACA,YACA,2zGAE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AA5T,EAAA,GAAAqc,OAAA,SAAAC,EAAAC,GACA,MAAAD,GAAAC,IAGAnT,EAEAzJ,KAAAqX,OAAAhX,EAAA,EAAAuI,GACA5I,KAAAgG,QAAA,oBAIApC,IAAA,OACAqL,MAAA,SAAAnK,EAAAmK,GACA,OAAAgO,KAAAhO,EACA,OAAA5O,GAAA,EAAmCA,EAAAL,KAAAoX,OAAA3T,OAAwBpD,IAC3DL,KAAAoX,OAAA/W,GAAAyE,GAAAmK,CAGA,OAAAjP,MAAAqR,QAAAvM,MAIAlB,IAAA,OACAqL,MAAA,WACAjP,KAAAqR,QAAAzP,UAIAgC,IAAA,QACAqL,MAAA,WACAjP,KAAAqR,QAAAxP,WAIA+B,IAAA,SACAqL,MAAA,WACAjP,KAAAqR,QAAAnK,OAAAlH,KAAA4B,OAAA5B,KAAA6B,YAIAyC,IAEAzE,GAAAD,QAAA0E","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// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar svgSource = {\n 'play': [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n 'pause': [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.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 ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n 'loop': [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n 'full': [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n 'setting': [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n 'right': [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n 'comment': [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n 'send': [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n 'menu': [\n '0 0 22 32',\n '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 ],\n 'camera': [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ]\n};\nmodule.exports = function (type) {\n return '\\n';\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nconsole.log('%c DPlayer 1.5.0 %c http://dplayer.js.org ', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\n__webpack_require__(2);\nvar utils = __webpack_require__(3);\nvar svg = __webpack_require__(0);\nvar handleOption = __webpack_require__(4);\nvar i18n = __webpack_require__(6);\nvar html = __webpack_require__(7);\nvar Video = __webpack_require__(8);\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\nvar index = 0;\nvar DPlayer = function () {\n function DPlayer(option) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.option = handleOption(option);\n this.option.element.classList.add('dplayer');\n if (this.option.video.quality) {\n this.qualityIndex = this.option.video.defaultQuality;\n this.quality = this.option.video.quality[this.option.video.defaultQuality];\n }\n this.tran = new i18n(this.option.lang).tran;\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 var eventTypes = [\n 'play',\n 'pause',\n 'canplay',\n 'playing',\n 'ended',\n 'error'\n ];\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 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 this.element.innerHTML = html.main(option, index, this.tran);\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 this.video = new Video(this.element.getElementsByClassName('dplayer-video-current'));\n this.initVideo();\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 this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', function () {\n _this.toggle();\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 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 var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n this.danmakuTime = false;\n this.playedTime = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime();\n if (!bufferingDetected && currentPlayPos < lastPlayPos + 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 }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.animationFrame = function () {\n if (_this.playedTime) {\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 }\n if (_this.danmakuTime && _this.option.danmaku && showdan && _this.dan) {\n var item = _this.dan[_this.danIndex];\n var danmakus = [];\n while (item && _this.video.currentTime() > parseFloat(item.time)) {\n danmakus.push(item);\n item = _this.dan[++_this.danIndex];\n }\n _this.pushDanmaku(danmakus);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.danmakuTime = true;\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.danmakuTime = false;\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\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 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 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 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 pbar.addEventListener('mousedown', function () {\n barWidth = pbar.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\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 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 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 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 this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n var settingHTML = html.setting(this.tran);\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 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 mask.addEventListener('click', function () {\n closeSetting();\n });\n settingIcon.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.option.loop;\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var showdan = true;\n var settingEvent = function settingEvent() {\n var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n loopToggle.checked = _this.loop;\n loopEle.addEventListener('click', function () {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n showDanToggle.checked = showdan;\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 _i2 = 0; _i2 < _this.dan.length; _i2++) {\n if (_this.dan[_i2].time >= _this.video.currentTime()) {\n _this.danIndex = _i2;\n break;\n }\n _this.danIndex = _this.dan.length;\n }\n if (!_this.paused) {\n _this.setTime('danmaku');\n }\n }\n } else {\n showdan = false;\n if (_this.option.danmaku) {\n _this.clearTime('danmaku');\n danContainer.innerHTML = '';\n _this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n }\n }\n closeSetting();\n });\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 var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n var _loop = function _loop(_i3) {\n speedItem[_i3].addEventListener('click', function () {\n _this.video.attr('playbackRate', speedItem[_i3].dataset.speed);\n closeSetting();\n });\n };\n for (var _i3 = 0; _i3 < speedItem.length; _i3++) {\n _loop(_i3);\n }\n });\n if (_this.option.danmaku) {\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 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 _i4 = 0; _i4 < items.length; _i4++) {\n items[_i4].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 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 _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 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 if (this.video.duration !== 1) {\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00';\n }\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n var measureStyle = getComputedStyle(this.element.getElementsByClassName('dplayer-danmaku-item')[0], null);\n var context = document.createElement('canvas').getContext('2d');\n context.font = measureStyle.getPropertyValue('font-size') + ' ' + measureStyle.getPropertyValue('font-family');\n this.danmakuMeasure = function (text) {\n return context.measureText(text).width;\n };\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n } else {\n if (this.option.autoplay && !isMobile) {\n this.play();\n } else if (isMobile) {\n this.pause();\n }\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 var htmlEncode = function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n };\n var sendComment = function sendComment() {\n commentInput.blur();\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\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 commentInput.value = '';\n closeComment();\n _this.dan.splice(_this.danIndex, 0, danmakuData);\n _this.danIndex++;\n var danmaku = {\n text: htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + _this.option.theme\n };\n _this.pushDanmaku(danmaku);\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 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 commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n _this.element.classList.remove('dplayer-show-controller');\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 commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n _this.element.classList.add('dplayer-show-controller');\n disableHide = setInterval(function () {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(function () {\n commentInput.focus();\n }, 300);\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 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 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 commentSendIcon.addEventListener('click', sendComment);\n var resetAnimation = function resetAnimation() {\n var danWidth = danContainer.offsetWidth;\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i6 = 0; _i6 < items.length; _i6++) {\n items[_i6].style.transform = 'translateX(-' + danWidth + 'px)';\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 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 _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 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 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 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 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 menu.classList.add('dplayer-menu-show');\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 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 if (this.option.video.quality) {\n this.element.getElementsByClassName('dplayer-quality-list')[0].addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.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 camareIcon.href = canvas.toDataURL();\n camareIcon.download = 'DPlayer.png';\n });\n }\n index++;\n }\n _createClass(DPlayer, [\n {\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 this.playButton.innerHTML = svg('pause');\n this.video.play();\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n if (!this.video.attr('paused')) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\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 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 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 key: 'on',\n value: function on(event, callback) {\n if (typeof callback === 'function') {\n this.event[event].push(callback);\n }\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, finish) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.notice(err.response.msg);\n } else {\n _this2.notice('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 for (var i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'readDanmaku',\n value: function readDanmaku() {\n var _this3 = this;\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 this._readAllEndpoints(endpoints, function (results) {\n _this3.danIndex = 0;\n _this3.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n _this3.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n if (_this3.option.autoplay && !isMobile) {\n _this3.play();\n } else if (isMobile) {\n _this3.pause();\n }\n });\n }\n },\n {\n key: 'pushDanmaku',\n value: function pushDanmaku(danmaku) {\n var _this4 = this;\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 var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || danContainer.getBoundingClientRect().right + eleWidth;\n return danContainer.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop2 = function _loop2(i) {\n var item = _this4.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(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0;; i++) {\n var _ret2 = _loop2(i);\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === 'object')\n return _ret2.v;\n }\n };\n if (Object.prototype.toString.call(danmaku) !== '[object Array]') {\n danmaku = [danmaku];\n }\n var docFragment = document.createDocumentFragment();\n var _loop3 = function _loop3(i) {\n if (!danmaku[i].type) {\n danmaku[i].type = 'right';\n }\n if (!danmaku[i].color) {\n danmaku[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + danmaku[i].type);\n item.innerHTML = danmaku[i].text;\n item.style.opacity = _this4.danOpacity;\n item.style.color = danmaku[i].color;\n item.style.border = danmaku[i].border;\n item.addEventListener('animationend', function () {\n danContainer.removeChild(item);\n });\n var itemWidth = _this4.danmakuMeasure(danmaku[i].text);\n switch (danmaku[i].type) {\n case 'right':\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type, itemWidth) + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + danmaku[i].type);\n }\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n };\n for (var i = 0; i < danmaku.length; i++) {\n _loop3(i);\n }\n danContainer.appendChild(docFragment);\n return docFragment;\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmaku) {\n this.video.attr('poster', video.pic ? video.pic : '');\n this.video.attr('src', video.url);\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.danTuel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo() {\n var _this5 = this;\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 var hls = new Hls();\n hls.attachMedia(this.video.current);\n hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n hls.loadSource(_this5.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n this.notice('manifest loaded, found ' + data.levels.length + ' quality level');\n });\n });\n }\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 if (this.option.danmaku) {\n this.video.on('all', 'seeking', function () {\n for (var i = 0; i < _this5.dan.length; i++) {\n if (_this5.dan[i].time >= _this5.video.currentTime()) {\n _this5.danIndex = i;\n return;\n }\n _this5.danIndex = _this5.dan.length;\n }\n });\n }\n this.video.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this5.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(_this5.video.duration);\n }\n });\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 _this5.updateBar('loaded', percentage, 'width');\n });\n this.video.on('all', 'error', function () {\n _this5.notice(_this5.tran('This video fails to load'), -1);\n _this5.trigger('pause');\n });\n this.video.on('current', 'canplay', function () {\n _this5.trigger('canplay');\n });\n this.ended = false;\n this.video.on('all', 'ended', function (i) {\n if (i === _this5.video.videos.length - 1) {\n _this5.updateBar('played', 1, 'width');\n if (!_this5.loop) {\n _this5.ended = true;\n _this5.pause();\n _this5.trigger('ended');\n } else {\n _this5.video.switch(0);\n _this5.video.play();\n }\n _this5.danIndex = 0;\n }\n });\n this.video.on('current', 'play', function () {\n if (_this5.paused) {\n _this5.play();\n }\n });\n this.video.on('current', 'pause', function () {\n if (!_this5.paused) {\n _this5.pause();\n }\n });\n this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100);\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this6 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.option.video.quality[index];\n this.element.getElementsByClassName('dplayer-quality-icon')[0].innerHTML = this.quality.name;\n this.video.pause();\n var videoHTML = html.video(false, null, this.option.screenshot, 'auto', this.quality.url);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n var parent = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n parent.insertBefore(videoEle, parent.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = new Video([videoEle], this.prevVideo.duration);\n this.initVideo();\n this.video.seek(this.prevVideo.currentTime());\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.video.on('current', 'canplay', function () {\n if (_this6.prevVideo) {\n if (_this6.video.currentTime() !== _this6.prevVideo.currentTime()) {\n _this6.video.seek(_this6.prevVideo.currentTime());\n return;\n }\n parent.removeChild(_this6.prevVideo.current);\n _this6.video.current.classList.add('dplayer-video-current');\n _this6.video.play();\n _this6.prevVideo = null;\n _this6.notice(_this6.tran('Switched to') + ' ' + _this6.quality.name + ' ' + _this6.tran('quality'));\n _this6.switchingQuality = false;\n }\n });\n }\n },\n {\n key: 'timeTipsHandler',\n value: function timeTipsHandler(pbar, timeTips) {\n var _this7 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this7.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n timeTips.innerText = utils.secondToTime(_this7.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 (_this7.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n _this7.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!_this7.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n _this7.isTipsShow = false;\n break;\n }\n };\n }\n },\n {\n key: 'notice',\n value: function notice(text, time) {\n var noticeEle = this.element.getElementsByClassName('dplayer-notice')[0];\n noticeEle.innerHTML = text;\n noticeEle.style.opacity = 1;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n if (time && time < 0) {\n return;\n }\n this.noticeTime = setTimeout(function () {\n noticeEle.style.opacity = 0;\n }, time || 2000);\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n }\n};\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar defaultApiBackend = __webpack_require__(5);\nmodule.exports = function (option) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n option.autoplay = false;\n }\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: true,\n hotkey: true,\n preload: 'auto',\n apiBackend: defaultApiBackend,\n contextmenu: [\n {\n text: '关于作者',\n link: 'http://diygod.me'\n },\n {\n text: '播放器意见反馈',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: '关于 DPlayer 播放器',\n link: 'https://github.com/DIYgod/DPlayer'\n }\n ]\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 if (option.video.quality) {\n option.video.url = [option.video.quality[option.video.defaultQuality].url];\n }\n return option;\n};\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData) {\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 read: function read(endpoint, cbk) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n cbk(null, response.danmaku);\n }, function (xhr, response) {\n cbk({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n cbk({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质'\n};\nmodule.exports = function (lang) {\n var _this = this;\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/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar svg = __webpack_require__(0);\nvar html = {\n main: function main(option, index, tran) {\n var videos = '';\n for (var i = 0; i < option.video.url.length; i++) {\n videos += html.video(i === 0, option.video.pic, option.screenshot, option.video.url.length ? 'metadata' : option.preload, option.video.url[i]);\n }\n return '
' + videos + '' + (option.logo ? '
' : '') + '
' + (option.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
0:00 / 0:00
' + (option.video.quality ? '
' + html.qualityList(option.video.quality) + '
' : '') + '' + (option.screenshot ? '' + svg('camera') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
00:00
' + html.contextmenuList(option.contextmenu) + '
';\n },\n contextmenuList: function contextmenuList(contextmenu) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n },\n qualityList: function qualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n },\n video: function video(current, pic, screenshot, preload, url) {\n return '';\n },\n setting: function setting(tran) {\n return {\n 'original': '
' + tran('Speed') + '
' + svg('right') + '
' + tran('Loop') + '
' + tran('Danmaku') + '
' + tran('Opacity for danmaku') + '
',\n 'speed': '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
'\n };\n }\n};\nmodule.exports = html;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Video = function () {\n function Video(videos, duration) {\n var _this = this;\n _classCallCheck(this, Video);\n this.videos = videos;\n this.multi = this.videos.length > 1;\n this.index = 0;\n this.current = this.videos[this.index];\n this.duration = duration || 0;\n this.durationArr = [];\n this.eventAll = [];\n this.eventCurrent = [];\n this.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this.durationArr[i] = video.duration;\n if (!duration) {\n _this.duration = _this.durationArr.reduce(function (sum, cur) {\n return sum + cur;\n });\n }\n }\n });\n this.on('current', 'end', function () {\n _this.switch(_this.index + 1);\n });\n }\n _createClass(Video, [\n {\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 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 {\n key: 'on',\n value: function on(type, event, callback) {\n var _this2 = this;\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 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 for (var i = 0; i < this.videos.length; i++) {\n _loop(i);\n }\n }\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(type, event) {\n var events = type === 'all' ? this.eventAll : this.eventCurrent;\n if (events[event]) {\n for (var i = 0; i < events[event].length; i++) {\n events[event][i]();\n }\n }\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 {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n time = Math.min(time, this.duration);\n var i = 0;\n var tmptime = 0;\n while (tmptime <= time) {\n tmptime += this.durationArr[i];\n i++;\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 this.switch(i - 1, currentTime);\n this.trigger('all', 'seeking');\n }\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 {\n key: 'play',\n value: function play() {\n this.current.play();\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.current.pause();\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n this.current.paused ? this.play() : this.pause();\n }\n }\n ]);\n return Video;\n}();\nmodule.exports = Video;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// DPlayer.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 39cffe2b7123e39230a0","'use strict';\nvar svgSource = {\n 'play': [\n '0 0 16 32',\n 'M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z'\n ],\n 'pause': [\n '0 0 17 32',\n 'M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z'\n ],\n 'volume-up': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.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 ],\n 'volume-down': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z'\n ],\n 'volume-off': [\n '0 0 21 32',\n 'M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z'\n ],\n 'loop': [\n '0 0 32 32',\n 'M1.882 16.941c0 4.152 3.221 7.529 7.177 7.529v1.882c-4.996 0-9.060-4.222-9.060-9.412s4.064-9.412 9.060-9.412h7.96l-3.098-3.098 1.331-1.331 5.372 5.37-5.37 5.372-1.333-1.333 3.1-3.098h-7.962c-3.957 0-7.177 3.377-7.177 7.529zM22.94 7.529v1.882c3.957 0 7.177 3.377 7.177 7.529s-3.221 7.529-7.177 7.529h-7.962l3.098-3.098-1.331-1.331-5.37 5.37 5.372 5.372 1.331-1.331-3.1-3.1h7.96c4.998 0 9.062-4.222 9.062-9.412s-4.064-9.412-9.060-9.412z'\n ],\n 'full': [\n '0 0 32 33',\n 'M6.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v4h4c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333zM30.667 28h-5.333c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h4v-4c0-0.8 0.533-1.333 1.333-1.333s1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM30.667 12c-0.8 0-1.333-0.533-1.333-1.333v-4h-4c-0.8 0-1.333-0.533-1.333-1.333s0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333v5.333c0 0.8-0.533 1.333-1.333 1.333zM1.333 12c-0.8 0-1.333-0.533-1.333-1.333v-5.333c0-0.8 0.533-1.333 1.333-1.333h5.333c0.8 0 1.333 0.533 1.333 1.333s-0.533 1.333-1.333 1.333h-4v4c0 0.8-0.533 1.333-1.333 1.333z'\n ],\n 'full-in': [\n '0 0 32 33',\n 'M24.965 24.38h-18.132c-1.366 0-2.478-1.113-2.478-2.478v-11.806c0-1.364 1.111-2.478 2.478-2.478h18.132c1.366 0 2.478 1.113 2.478 2.478v11.806c0 1.364-1.11 2.478-2.478 2.478zM6.833 10.097v11.806h18.134l-0.002-11.806h-18.132zM2.478 28.928h5.952c0.684 0 1.238-0.554 1.238-1.239 0-0.684-0.554-1.238-1.238-1.238h-5.952v-5.802c0-0.684-0.554-1.239-1.238-1.239s-1.239 0.556-1.239 1.239v5.802c0 1.365 1.111 2.478 2.478 2.478zM30.761 19.412c-0.684 0-1.238 0.554-1.238 1.238v5.801h-5.951c-0.686 0-1.239 0.554-1.239 1.238 0 0.686 0.554 1.239 1.239 1.239h5.951c1.366 0 2.478-1.111 2.478-2.478v-5.801c0-0.683-0.554-1.238-1.239-1.238zM0 5.55v5.802c0 0.683 0.554 1.238 1.238 1.238s1.238-0.555 1.238-1.238v-5.802h5.952c0.684 0 1.238-0.554 1.238-1.238s-0.554-1.238-1.238-1.238h-5.951c-1.366-0.001-2.478 1.111-2.478 2.476zM32 11.35v-5.801c0-1.365-1.11-2.478-2.478-2.478h-5.951c-0.686 0-1.239 0.554-1.239 1.238s0.554 1.238 1.239 1.238h5.951v5.801c0 0.683 0.554 1.237 1.238 1.237 0.686 0.002 1.239-0.553 1.239-1.236z'\n ],\n 'setting': [\n '0 0 32 28',\n 'M28.633 17.104c0.035 0.21 0.026 0.463-0.026 0.76s-0.14 0.598-0.262 0.904c-0.122 0.306-0.271 0.581-0.445 0.825s-0.367 0.419-0.576 0.524c-0.209 0.105-0.393 0.157-0.55 0.157s-0.332-0.035-0.524-0.105c-0.175-0.052-0.393-0.1-0.655-0.144s-0.528-0.052-0.799-0.026c-0.271 0.026-0.541 0.083-0.812 0.17s-0.502 0.236-0.694 0.445c-0.419 0.437-0.664 0.934-0.734 1.493s0.009 1.092 0.236 1.598c0.175 0.349 0.148 0.699-0.079 1.048-0.105 0.14-0.271 0.284-0.498 0.432s-0.476 0.284-0.747 0.406-0.555 0.218-0.851 0.288c-0.297 0.070-0.559 0.105-0.786 0.105-0.157 0-0.306-0.061-0.445-0.183s-0.236-0.253-0.288-0.393h-0.026c-0.192-0.541-0.52-1.009-0.982-1.402s-1-0.589-1.611-0.589c-0.594 0-1.131 0.197-1.611 0.589s-0.816 0.851-1.009 1.375c-0.087 0.21-0.218 0.362-0.393 0.458s-0.367 0.144-0.576 0.144c-0.244 0-0.52-0.044-0.825-0.131s-0.611-0.197-0.917-0.327c-0.306-0.131-0.581-0.284-0.825-0.458s-0.428-0.349-0.55-0.524c-0.087-0.122-0.135-0.266-0.144-0.432s0.057-0.397 0.197-0.694c0.192-0.402 0.266-0.86 0.223-1.375s-0.266-0.991-0.668-1.428c-0.244-0.262-0.541-0.432-0.891-0.511s-0.681-0.109-0.995-0.092c-0.367 0.017-0.742 0.087-1.127 0.21-0.244 0.070-0.489 0.052-0.734-0.052-0.192-0.070-0.371-0.231-0.537-0.485s-0.314-0.533-0.445-0.838c-0.131-0.306-0.231-0.62-0.301-0.943s-0.087-0.59-0.052-0.799c0.052-0.384 0.227-0.629 0.524-0.734 0.524-0.21 0.995-0.555 1.415-1.035s0.629-1.017 0.629-1.611c0-0.611-0.21-1.144-0.629-1.598s-0.891-0.786-1.415-0.996c-0.157-0.052-0.288-0.179-0.393-0.38s-0.157-0.406-0.157-0.616c0-0.227 0.035-0.48 0.105-0.76s0.162-0.55 0.275-0.812 0.244-0.502 0.393-0.72c0.148-0.218 0.31-0.38 0.485-0.485 0.14-0.087 0.275-0.122 0.406-0.105s0.275 0.052 0.432 0.105c0.524 0.21 1.070 0.275 1.637 0.197s1.070-0.327 1.506-0.747c0.21-0.209 0.362-0.467 0.458-0.773s0.157-0.607 0.183-0.904c0.026-0.297 0.026-0.568 0-0.812s-0.048-0.419-0.065-0.524c-0.035-0.105-0.066-0.227-0.092-0.367s-0.013-0.262 0.039-0.367c0.105-0.244 0.293-0.458 0.563-0.642s0.563-0.336 0.878-0.458c0.314-0.122 0.62-0.214 0.917-0.275s0.533-0.092 0.707-0.092c0.227 0 0.406 0.074 0.537 0.223s0.223 0.301 0.275 0.458c0.192 0.471 0.507 0.886 0.943 1.244s0.952 0.537 1.546 0.537c0.611 0 1.153-0.17 1.624-0.511s0.803-0.773 0.996-1.297c0.070-0.14 0.179-0.284 0.327-0.432s0.301-0.223 0.458-0.223c0.244 0 0.511 0.035 0.799 0.105s0.572 0.166 0.851 0.288c0.279 0.122 0.537 0.279 0.773 0.472s0.423 0.402 0.563 0.629c0.087 0.14 0.113 0.293 0.079 0.458s-0.070 0.284-0.105 0.354c-0.227 0.506-0.297 1.039-0.21 1.598s0.341 1.048 0.76 1.467c0.419 0.419 0.934 0.651 1.546 0.694s1.179-0.057 1.703-0.301c0.14-0.087 0.31-0.122 0.511-0.105s0.371 0.096 0.511 0.236c0.262 0.244 0.493 0.616 0.694 1.113s0.336 1 0.406 1.506c0.035 0.297-0.013 0.528-0.144 0.694s-0.266 0.275-0.406 0.327c-0.542 0.192-1.004 0.528-1.388 1.009s-0.576 1.026-0.576 1.637c0 0.594 0.162 1.113 0.485 1.559s0.747 0.764 1.27 0.956c0.122 0.070 0.227 0.14 0.314 0.21 0.192 0.157 0.323 0.358 0.393 0.602v0zM16.451 19.462c0.786 0 1.528-0.149 2.227-0.445s1.305-0.707 1.821-1.231c0.515-0.524 0.921-1.131 1.218-1.821s0.445-1.428 0.445-2.214c0-0.786-0.148-1.524-0.445-2.214s-0.703-1.292-1.218-1.808c-0.515-0.515-1.122-0.921-1.821-1.218s-1.441-0.445-2.227-0.445c-0.786 0-1.524 0.148-2.214 0.445s-1.292 0.703-1.808 1.218c-0.515 0.515-0.921 1.118-1.218 1.808s-0.445 1.428-0.445 2.214c0 0.786 0.149 1.524 0.445 2.214s0.703 1.297 1.218 1.821c0.515 0.524 1.118 0.934 1.808 1.231s1.428 0.445 2.214 0.445v0z'\n ],\n 'right': [\n '0 0 32 32',\n 'M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z'\n ],\n 'comment': [\n '0 0 32 32',\n 'M27.128 0.38h-22.553c-2.336 0-4.229 1.825-4.229 4.076v16.273c0 2.251 1.893 4.076 4.229 4.076h4.229v-2.685h8.403l-8.784 8.072 1.566 1.44 7.429-6.827h9.71c2.335 0 4.229-1.825 4.229-4.076v-16.273c0-2.252-1.894-4.076-4.229-4.076zM28.538 19.403c0 1.5-1.262 2.717-2.819 2.717h-8.36l-0.076-0.070-0.076 0.070h-11.223c-1.557 0-2.819-1.217-2.819-2.717v-13.589c0-1.501 1.262-2.718 2.819-2.718h19.734c1.557 0 2.819-0.141 2.819 1.359v14.947zM9.206 10.557c-1.222 0-2.215 0.911-2.215 2.036s0.992 2.035 2.215 2.035c1.224 0 2.216-0.911 2.216-2.035s-0.992-2.036-2.216-2.036zM22.496 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.224 0 2.215-0.911 2.215-2.035s-0.991-2.036-2.215-2.036zM15.852 10.557c-1.224 0-2.215 0.911-2.215 2.036s0.991 2.035 2.215 2.035c1.222 0 2.215-0.911 2.215-2.035s-0.992-2.036-2.215-2.036z'\n ],\n 'comment-off': [\n '0 0 32 32',\n 'M27.090 0.131h-22.731c-2.354 0-4.262 1.839-4.262 4.109v16.401c0 2.269 1.908 4.109 4.262 4.109h4.262v-2.706h8.469l-8.853 8.135 1.579 1.451 7.487-6.88h9.787c2.353 0 4.262-1.84 4.262-4.109v-16.401c0-2.27-1.909-4.109-4.262-4.109v0zM28.511 19.304c0 1.512-1.272 2.738-2.841 2.738h-8.425l-0.076-0.070-0.076 0.070h-11.311c-1.569 0-2.841-1.226-2.841-2.738v-13.696c0-1.513 1.272-2.739 2.841-2.739h19.889c1.569 0 2.841-0.142 2.841 1.37v15.064z'\n ],\n 'send': [\n '0 0 32 32',\n 'M13.725 30l3.9-5.325-3.9-1.125v6.45zM0 17.5l11.050 3.35 13.6-11.55-10.55 12.425 11.8 3.65 6.1-23.375-32 15.5z'\n ],\n 'menu': [\n '0 0 22 32',\n '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 ],\n 'camera': [\n '0 0 32 32',\n 'M16 23c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6zM16 13c-2.206 0-4 1.794-4 4s1.794 4 4 4c2.206 0 4-1.794 4-4s-1.794-4-4-4zM27 28h-22c-1.654 0-3-1.346-3-3v-16c0-1.654 1.346-3 3-3h3c0.552 0 1 0.448 1 1s-0.448 1-1 1h-3c-0.551 0-1 0.449-1 1v16c0 0.552 0.449 1 1 1h22c0.552 0 1-0.448 1-1v-16c0-0.551-0.448-1-1-1h-11c-0.552 0-1-0.448-1-1s0.448-1 1-1h11c1.654 0 3 1.346 3 3v16c0 1.654-1.346 3-3 3zM24 10.5c0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5zM15 4c0 0.552-0.448 1-1 1h-4c-0.552 0-1-0.448-1-1v0c0-0.552 0.448-1 1-1h4c0.552 0 1 0.448 1 1v0z'\n ]\n};\nmodule.exports = function (type) {\n return '\\n';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/svg.js\n// module id = 0\n// module chunks = 0","'use strict';\nvar _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;\n};\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nconsole.log('%c DPlayer 1.5.0 %c http://dplayer.js.org ', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');\nrequire('./DPlayer.scss');\nvar utils = require('./utils.js');\nvar svg = require('./svg.js');\nvar handleOption = require('./option.js');\nvar i18n = require('./i18n.js');\nvar html = require('./html.js');\nvar Video = require('./video.js');\nvar isMobile = /mobile/i.test(window.navigator.userAgent);\nvar index = 0;\nvar DPlayer = function () {\n function DPlayer(option) {\n var _this = this;\n _classCallCheck(this, DPlayer);\n this.option = handleOption(option);\n this.option.element.classList.add('dplayer');\n if (this.option.video.quality) {\n this.qualityIndex = this.option.video.defaultQuality;\n this.quality = this.option.video.quality[this.option.video.defaultQuality];\n }\n this.tran = new i18n(this.option.lang).tran;\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 var eventTypes = [\n 'play',\n 'pause',\n 'canplay',\n 'playing',\n 'ended',\n 'error'\n ];\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 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 this.element.innerHTML = html.main(option, index, this.tran);\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 this.video = new Video(this.element.getElementsByClassName('dplayer-video-current'));\n this.initVideo();\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 this.playButton = this.element.getElementsByClassName('dplayer-play-icon')[0];\n this.paused = true;\n this.playButton.addEventListener('click', function () {\n _this.toggle();\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 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 var lastPlayPos = 0;\n var currentPlayPos = 0;\n var bufferingDetected = false;\n this.danmakuTime = false;\n this.playedTime = false;\n window.requestAnimationFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n var setCheckLoadingTime = function setCheckLoadingTime() {\n _this.checkLoading = setInterval(function () {\n currentPlayPos = _this.video.currentTime();\n if (!bufferingDetected && currentPlayPos < lastPlayPos + 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 }, 100);\n };\n var clearCheckLoadingTime = function clearCheckLoadingTime() {\n clearInterval(_this.checkLoading);\n };\n this.animationFrame = function () {\n if (_this.playedTime) {\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 }\n if (_this.danmakuTime && _this.option.danmaku && showdan && _this.dan) {\n var item = _this.dan[_this.danIndex];\n var danmakus = [];\n while (item && _this.video.currentTime() > parseFloat(item.time)) {\n danmakus.push(item);\n item = _this.dan[++_this.danIndex];\n }\n _this.pushDanmaku(danmakus);\n }\n window.requestAnimationFrame(_this.animationFrame);\n };\n window.requestAnimationFrame(this.animationFrame);\n this.setTime = function (type) {\n if (!type) {\n _this.danmakuTime = true;\n _this.playedTime = true;\n setCheckLoadingTime();\n } else {\n _this[type + 'Time'] = true;\n if (type === 'played') {\n setCheckLoadingTime();\n }\n }\n };\n this.clearTime = function (type) {\n if (!type) {\n _this.danmakuTime = false;\n _this.playedTime = false;\n clearCheckLoadingTime();\n } else {\n _this[type + 'Time'] = false;\n if (type === 'played') {\n clearCheckLoadingTime();\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 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 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 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 pbar.addEventListener('mousedown', function () {\n barWidth = pbar.clientWidth;\n _this.clearTime();\n document.addEventListener('mousemove', thumbMove);\n document.addEventListener('mouseup', thumbUp);\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 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 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 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 this.danOpacity = localStorage.getItem('DPlayer-opacity') || 0.7;\n var settingHTML = html.setting(this.tran);\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 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 mask.addEventListener('click', function () {\n closeSetting();\n });\n settingIcon.addEventListener('click', function () {\n openSetting();\n });\n this.loop = this.option.loop;\n var danContainer = this.element.getElementsByClassName('dplayer-danmaku')[0];\n var showdan = true;\n var settingEvent = function settingEvent() {\n var loopEle = _this.element.getElementsByClassName('dplayer-setting-loop')[0];\n var loopToggle = loopEle.getElementsByClassName('dplayer-toggle-setting-input')[0];\n loopToggle.checked = _this.loop;\n loopEle.addEventListener('click', function () {\n loopToggle.checked = !loopToggle.checked;\n if (loopToggle.checked) {\n _this.loop = true;\n } else {\n _this.loop = false;\n }\n closeSetting();\n });\n var showDanEle = _this.element.getElementsByClassName('dplayer-setting-showdan')[0];\n var showDanToggle = showDanEle.getElementsByClassName('dplayer-showdan-setting-input')[0];\n showDanToggle.checked = showdan;\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 _i2 = 0; _i2 < _this.dan.length; _i2++) {\n if (_this.dan[_i2].time >= _this.video.currentTime()) {\n _this.danIndex = _i2;\n break;\n }\n _this.danIndex = _this.dan.length;\n }\n if (!_this.paused) {\n _this.setTime('danmaku');\n }\n }\n } else {\n showdan = false;\n if (_this.option.danmaku) {\n _this.clearTime('danmaku');\n danContainer.innerHTML = '';\n _this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n }\n }\n closeSetting();\n });\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 var speedItem = settingBox.getElementsByClassName('dplayer-setting-speed-item');\n var _loop = function _loop(_i3) {\n speedItem[_i3].addEventListener('click', function () {\n _this.video.attr('playbackRate', speedItem[_i3].dataset.speed);\n closeSetting();\n });\n };\n for (var _i3 = 0; _i3 < speedItem.length; _i3++) {\n _loop(_i3);\n }\n });\n if (_this.option.danmaku) {\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 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 _i4 = 0; _i4 < items.length; _i4++) {\n items[_i4].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 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 _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 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 if (this.video.duration !== 1) {\n this.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = this.video.duration ? utils.secondToTime(this.video.duration) : '00:00';\n }\n this.danTunnel = {\n right: {},\n top: {},\n bottom: {}\n };\n var measureStyle = getComputedStyle(this.element.getElementsByClassName('dplayer-danmaku-item')[0], null);\n var context = document.createElement('canvas').getContext('2d');\n context.font = measureStyle.getPropertyValue('font-size') + ' ' + measureStyle.getPropertyValue('font-family');\n this.danmakuMeasure = function (text) {\n return context.measureText(text).width;\n };\n if (this.option.danmaku) {\n this.danIndex = 0;\n this.readDanmaku();\n } else {\n if (this.option.autoplay && !isMobile) {\n this.play();\n } else if (isMobile) {\n this.pause();\n }\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 var htmlEncode = function htmlEncode(str) {\n return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');\n };\n var sendComment = function sendComment() {\n commentInput.blur();\n if (!commentInput.value.replace(/^\\s+|\\s+$/g, '')) {\n _this.notice(_this.tran('Please input danmaku content!'));\n return;\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 commentInput.value = '';\n closeComment();\n _this.dan.splice(_this.danIndex, 0, danmakuData);\n _this.danIndex++;\n var danmaku = {\n text: htmlEncode(danmakuData.text),\n color: danmakuData.color,\n type: danmakuData.type,\n border: '2px solid ' + _this.option.theme\n };\n _this.pushDanmaku(danmaku);\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 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 commentBox.classList.remove('dplayer-comment-box-open');\n mask.classList.remove('dplayer-mask-show');\n _this.element.classList.remove('dplayer-show-controller');\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 commentBox.classList.add('dplayer-comment-box-open');\n mask.classList.add('dplayer-mask-show');\n _this.element.classList.add('dplayer-show-controller');\n disableHide = setInterval(function () {\n clearTimeout(hideTime);\n }, 1000);\n commentFocusTimeout = setTimeout(function () {\n commentInput.focus();\n }, 300);\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 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 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 commentSendIcon.addEventListener('click', sendComment);\n var resetAnimation = function resetAnimation() {\n var danWidth = danContainer.offsetWidth;\n var items = _this.element.getElementsByClassName('dplayer-danmaku-item');\n for (var _i6 = 0; _i6 < items.length; _i6++) {\n items[_i6].style.transform = 'translateX(-' + danWidth + 'px)';\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 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 _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 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 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 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 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 menu.classList.add('dplayer-menu-show');\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 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 if (this.option.video.quality) {\n this.element.getElementsByClassName('dplayer-quality-list')[0].addEventListener('click', function (e) {\n if (e.target.classList.contains('dplayer-quality-item')) {\n _this.switchQuality(e.target.dataset.index);\n }\n });\n }\n if (this.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 camareIcon.href = canvas.toDataURL();\n camareIcon.download = 'DPlayer.png';\n });\n }\n index++;\n }\n _createClass(DPlayer, [\n {\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 this.playButton.innerHTML = svg('pause');\n this.video.play();\n this.setTime();\n this.element.classList.add('dplayer-playing');\n this.trigger('play');\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.paused = true;\n this.element.classList.remove('dplayer-loading');\n if (!this.video.attr('paused')) {\n this.bezel.innerHTML = svg('pause');\n this.bezel.classList.add('dplayer-bezel-transition');\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 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 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 key: 'on',\n value: function on(event, callback) {\n if (typeof callback === 'function') {\n this.event[event].push(callback);\n }\n }\n },\n {\n key: '_readAllEndpoints',\n value: function _readAllEndpoints(endpoints, finish) {\n var _this2 = this;\n var results = [];\n var readCount = 0;\n var cbk = function cbk(i) {\n return function (err, data) {\n ++readCount;\n if (err) {\n if (err.response) {\n _this2.notice(err.response.msg);\n } else {\n _this2.notice('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 for (var i = 0; i < endpoints.length; ++i) {\n this.option.apiBackend.read(endpoints[i], cbk(i));\n }\n }\n },\n {\n key: 'readDanmaku',\n value: function readDanmaku() {\n var _this3 = this;\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 this._readAllEndpoints(endpoints, function (results) {\n _this3.danIndex = 0;\n _this3.dan = [].concat.apply([], results).sort(function (a, b) {\n return a.time - b.time;\n });\n _this3.element.getElementsByClassName('dplayer-danloading')[0].style.display = 'none';\n if (_this3.option.autoplay && !isMobile) {\n _this3.play();\n } else if (isMobile) {\n _this3.pause();\n }\n });\n }\n },\n {\n key: 'pushDanmaku',\n value: function pushDanmaku(danmaku) {\n var _this4 = this;\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 var danItemRight = function danItemRight(ele) {\n var eleWidth = ele.offsetWidth || parseInt(ele.style.width);\n var eleRight = ele.getBoundingClientRect().right || danContainer.getBoundingClientRect().right + eleWidth;\n return danContainer.getBoundingClientRect().right - eleRight;\n };\n var danSpeed = function danSpeed(width) {\n return (danWidth + width) / 5;\n };\n var getTunnel = function getTunnel(ele, type, width) {\n var tmp = danWidth / danSpeed(width);\n var _loop2 = function _loop2(i) {\n var item = _this4.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(parseInt(item[j].style.width)) || danRight <= 0) {\n break;\n }\n if (j === item.length - 1) {\n _this4.danTunnel[type][i + ''].push(ele);\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n }\n } else {\n _this4.danTunnel[type][i + ''] = [ele];\n ele.addEventListener('animationend', function () {\n _this4.danTunnel[type][i + ''].splice(0, 1);\n });\n return { v: i % itemY };\n }\n };\n for (var i = 0;; i++) {\n var _ret2 = _loop2(i);\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === 'object')\n return _ret2.v;\n }\n };\n if (Object.prototype.toString.call(danmaku) !== '[object Array]') {\n danmaku = [danmaku];\n }\n var docFragment = document.createDocumentFragment();\n var _loop3 = function _loop3(i) {\n if (!danmaku[i].type) {\n danmaku[i].type = 'right';\n }\n if (!danmaku[i].color) {\n danmaku[i].color = '#fff';\n }\n var item = document.createElement('div');\n item.classList.add('dplayer-danmaku-item');\n item.classList.add('dplayer-danmaku-' + danmaku[i].type);\n item.innerHTML = danmaku[i].text;\n item.style.opacity = _this4.danOpacity;\n item.style.color = danmaku[i].color;\n item.style.border = danmaku[i].border;\n item.addEventListener('animationend', function () {\n danContainer.removeChild(item);\n });\n var itemWidth = _this4.danmakuMeasure(danmaku[i].text);\n switch (danmaku[i].type) {\n case 'right':\n item.style.width = itemWidth + 1 + 'px';\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type, itemWidth) + 'px';\n item.style.transform = 'translateX(-' + danWidth + 'px)';\n break;\n case 'top':\n item.style.top = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n case 'bottom':\n item.style.bottom = itemHeight * getTunnel(item, danmaku[i].type) + 'px';\n break;\n default:\n console.error('Can\\'t handled danmaku type: ' + danmaku[i].type);\n }\n item.classList.add('dplayer-danmaku-move');\n docFragment.appendChild(item);\n };\n for (var i = 0; i < danmaku.length; i++) {\n _loop3(i);\n }\n danContainer.appendChild(docFragment);\n return docFragment;\n }\n },\n {\n key: 'switchVideo',\n value: function switchVideo(video, danmaku) {\n this.video.attr('poster', video.pic ? video.pic : '');\n this.video.attr('src', video.url);\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.danTuel = {\n right: {},\n top: {},\n bottom: {}\n };\n this.option.danmaku = danmaku;\n this.readDanmaku();\n }\n }\n },\n {\n key: 'initVideo',\n value: function initVideo() {\n var _this5 = this;\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 var hls = new Hls();\n hls.attachMedia(this.video.current);\n hls.on(Hls.Events.MEDIA_ATTACHED, function () {\n hls.loadSource(_this5.option.video.url);\n hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {\n this.notice('manifest loaded, found ' + data.levels.length + ' quality level');\n });\n });\n }\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 if (this.option.danmaku) {\n this.video.on('all', 'seeking', function () {\n for (var i = 0; i < _this5.dan.length; i++) {\n if (_this5.dan[i].time >= _this5.video.currentTime()) {\n _this5.danIndex = i;\n return;\n }\n _this5.danIndex = _this5.dan.length;\n }\n });\n }\n this.video.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this5.element.getElementsByClassName('dplayer-dtime')[0].innerHTML = utils.secondToTime(_this5.video.duration);\n }\n });\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 _this5.updateBar('loaded', percentage, 'width');\n });\n this.video.on('all', 'error', function () {\n _this5.notice(_this5.tran('This video fails to load'), -1);\n _this5.trigger('pause');\n });\n this.video.on('current', 'canplay', function () {\n _this5.trigger('canplay');\n });\n this.ended = false;\n this.video.on('all', 'ended', function (i) {\n if (i === _this5.video.videos.length - 1) {\n _this5.updateBar('played', 1, 'width');\n if (!_this5.loop) {\n _this5.ended = true;\n _this5.pause();\n _this5.trigger('ended');\n } else {\n _this5.video.switch(0);\n _this5.video.play();\n }\n _this5.danIndex = 0;\n }\n });\n this.video.on('current', 'play', function () {\n if (_this5.paused) {\n _this5.play();\n }\n });\n this.video.on('current', 'pause', function () {\n if (!_this5.paused) {\n _this5.pause();\n }\n });\n this.video.attr('volume', parseInt(this.element.getElementsByClassName('dplayer-volume-bar-inner')[0].style.width) / 100);\n }\n },\n {\n key: 'switchQuality',\n value: function switchQuality(index) {\n var _this6 = this;\n if (this.qualityIndex === index || this.switchingQuality) {\n return;\n } else {\n this.qualityIndex = index;\n }\n this.switchingQuality = true;\n this.quality = this.option.video.quality[index];\n this.element.getElementsByClassName('dplayer-quality-icon')[0].innerHTML = this.quality.name;\n this.video.pause();\n var videoHTML = html.video(false, null, this.option.screenshot, 'auto', this.quality.url);\n var videoEle = new DOMParser().parseFromString(videoHTML, 'text/html').body.firstChild;\n var parent = this.element.getElementsByClassName('dplayer-video-wrap')[0];\n parent.insertBefore(videoEle, parent.getElementsByTagName('div')[0]);\n this.prevVideo = this.video;\n this.video = new Video([videoEle], this.prevVideo.duration);\n this.initVideo();\n this.video.seek(this.prevVideo.currentTime());\n this.notice(this.tran('Switching to') + ' ' + this.quality.name + ' ' + this.tran('quality'), -1);\n this.video.on('current', 'canplay', function () {\n if (_this6.prevVideo) {\n if (_this6.video.currentTime() !== _this6.prevVideo.currentTime()) {\n _this6.video.seek(_this6.prevVideo.currentTime());\n return;\n }\n parent.removeChild(_this6.prevVideo.current);\n _this6.video.current.classList.add('dplayer-video-current');\n _this6.video.play();\n _this6.prevVideo = null;\n _this6.notice(_this6.tran('Switched to') + ' ' + _this6.quality.name + ' ' + _this6.tran('quality'));\n _this6.switchingQuality = false;\n }\n });\n }\n },\n {\n key: 'timeTipsHandler',\n value: function timeTipsHandler(pbar, timeTips) {\n var _this7 = this;\n var cumulativeOffset = function cumulativeOffset(element) {\n var top = 0, left = 0;\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return {\n top: top,\n left: left\n };\n };\n return function (e) {\n if (!_this7.video.duration) {\n return;\n }\n var clientX = e.clientX;\n var px = cumulativeOffset(pbar).left;\n var tx = clientX - px;\n timeTips.innerText = utils.secondToTime(_this7.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 (_this7.isTipsShow) {\n return;\n }\n timeTips.classList.remove('hidden');\n _this7.isTipsShow = true;\n break;\n case 'mouseleave':\n case 'mouseout':\n if (!_this7.isTipsShow) {\n return;\n }\n timeTips.classList.add('hidden');\n _this7.isTipsShow = false;\n break;\n }\n };\n }\n },\n {\n key: 'notice',\n value: function notice(text, time) {\n var noticeEle = this.element.getElementsByClassName('dplayer-notice')[0];\n noticeEle.innerHTML = text;\n noticeEle.style.opacity = 1;\n if (this.noticeTime) {\n clearTimeout(this.noticeTime);\n }\n if (time && time < 0) {\n return;\n }\n this.noticeTime = setTimeout(function () {\n noticeEle.style.opacity = 0;\n }, time || 2000);\n }\n }\n ]);\n return DPlayer;\n}();\nmodule.exports = DPlayer;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DPlayer.js\n// module id = 1\n// module chunks = 0","'use strict';\nmodule.exports = {\n secondToTime: function secondToTime(second) {\n var add0 = function add0(num) {\n return num < 10 ? '0' + num : '' + num;\n };\n var min = parseInt(second / 60);\n var sec = parseInt(second - min * 60);\n return add0(min) + ':' + add0(sec);\n },\n getElementViewLeft: function getElementViewLeft(element) {\n var actualLeft = element.offsetLeft;\n var current = element.offsetParent;\n var elementScrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft;\n if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {\n while (current !== null) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n } else {\n while (current !== null && current !== element) {\n actualLeft += current.offsetLeft;\n current = current.offsetParent;\n }\n }\n return actualLeft - elementScrollLeft;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 3\n// module chunks = 0","'use strict';\nvar defaultApiBackend = require('./api.js');\nmodule.exports = function (option) {\n var isMobile = /mobile/i.test(window.navigator.userAgent);\n if (isMobile) {\n option.autoplay = false;\n }\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: true,\n hotkey: true,\n preload: 'auto',\n apiBackend: defaultApiBackend,\n contextmenu: [\n {\n text: '关于作者',\n link: 'http://diygod.me'\n },\n {\n text: '播放器意见反馈',\n link: 'https://github.com/DIYgod/DPlayer/issues'\n },\n {\n text: '关于 DPlayer 播放器',\n link: 'https://github.com/DIYgod/DPlayer'\n }\n ]\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 if (option.video.quality) {\n option.video.url = [option.video.quality[option.video.defaultQuality].url];\n }\n return option;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/option.js\n// module id = 4\n// module chunks = 0","'use strict';\nvar SendXMLHttpRequest = function SendXMLHttpRequest(url, data, success, error, fail) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {\n var response = JSON.parse(xhr.responseText);\n if (response.code !== 1) {\n return error(xhr, response);\n }\n return success(xhr, response);\n }\n fail(xhr);\n }\n };\n xhr.open(data !== null ? 'POST' : 'GET', url, true);\n xhr.send(data !== null ? JSON.stringify(data) : null);\n};\nmodule.exports = {\n send: function send(endpoint, danmakuData) {\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 read: function read(endpoint, cbk) {\n SendXMLHttpRequest(endpoint, null, function (xhr, response) {\n cbk(null, response.danmaku);\n }, function (xhr, response) {\n cbk({\n status: xhr.status,\n response: response\n });\n }, function (xhr) {\n cbk({\n status: xhr.status,\n response: null\n });\n });\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/api.js\n// module id = 5\n// module chunks = 0","'use strict';\nvar tranZH = {\n 'Danmaku is loading': '弹幕加载中',\n 'Top': '顶部',\n 'Bottom': '底部',\n 'Rolling': '滚动',\n 'Input danmaku, hit Enter': '输入弹幕\\uFF0C回车发送',\n 'About author': '关于作者',\n 'DPlayer feedback': '播放器意见反馈',\n 'About DPlayer': '关于 DPlayer 播放器',\n 'Loop': '洗脑循环',\n 'Speed': '速度',\n 'Opacity for danmaku': '弹幕透明度',\n 'Normal': '正常',\n 'Please input danmaku content!': '要输入弹幕内容啊喂\\uFF01',\n 'Set danmaku color': '设置弹幕颜色',\n 'Set danmaku type': '设置弹幕类型',\n 'Danmaku': '弹幕',\n 'This video fails to load': '视频加载失败',\n 'Switching to': '正在切换至',\n 'Switched to': '已经切换至',\n 'quality': '画质'\n};\nmodule.exports = function (lang) {\n var _this = this;\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//////////////////\n// WEBPACK FOOTER\n// ./src/i18n.js\n// module id = 6\n// module chunks = 0","'use strict';\nvar svg = require('./svg.js');\nvar html = {\n main: function main(option, index, tran) {\n var videos = '';\n for (var i = 0; i < option.video.url.length; i++) {\n videos += html.video(i === 0, option.video.pic, option.screenshot, option.video.url.length ? 'metadata' : option.preload, option.video.url[i]);\n }\n return '
' + videos + '' + (option.logo ? '
' : '') + '
' + (option.danmaku ? '' + tran('Danmaku is loading') + '' : '') + '
0:00 / 0:00
' + (option.video.quality ? '
' + html.qualityList(option.video.quality) + '
' : '') + '' + (option.screenshot ? '' + svg('camera') + '' : '') + '
' + tran('Set danmaku color') + '
' + tran('Set danmaku type') + '
00:00
' + html.contextmenuList(option.contextmenu) + '
';\n },\n contextmenuList: function contextmenuList(contextmenu) {\n var result = '
';\n for (var i = 0; i < contextmenu.length; i++) {\n result += '';\n }\n result += '
';\n return result;\n },\n qualityList: function qualityList(quality) {\n var result = '
';\n for (var i = 0; i < quality.length; i++) {\n result += '
' + quality[i].name + '
';\n }\n result += '
';\n return result;\n },\n video: function video(current, pic, screenshot, preload, url) {\n return '';\n },\n setting: function setting(tran) {\n return {\n 'original': '
' + tran('Speed') + '
' + svg('right') + '
' + tran('Loop') + '
' + tran('Danmaku') + '
' + tran('Opacity for danmaku') + '
',\n 'speed': '
0.5
0.75
' + tran('Normal') + '
1.25
1.5
2
'\n };\n }\n};\nmodule.exports = html;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/html.js\n// module id = 7\n// module chunks = 0","'use strict';\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\nvar Video = function () {\n function Video(videos, duration) {\n var _this = this;\n _classCallCheck(this, Video);\n this.videos = videos;\n this.multi = this.videos.length > 1;\n this.index = 0;\n this.current = this.videos[this.index];\n this.duration = duration || 0;\n this.durationArr = [];\n this.eventAll = [];\n this.eventCurrent = [];\n this.on('all', 'durationchange', function (i, video) {\n if (video.duration !== 1) {\n _this.durationArr[i] = video.duration;\n if (!duration) {\n _this.duration = _this.durationArr.reduce(function (sum, cur) {\n return sum + cur;\n });\n }\n }\n });\n this.on('current', 'end', function () {\n _this.switch(_this.index + 1);\n });\n }\n _createClass(Video, [\n {\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 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 {\n key: 'on',\n value: function on(type, event, callback) {\n var _this2 = this;\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 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 for (var i = 0; i < this.videos.length; i++) {\n _loop(i);\n }\n }\n }\n }\n },\n {\n key: 'trigger',\n value: function trigger(type, event) {\n var events = type === 'all' ? this.eventAll : this.eventCurrent;\n if (events[event]) {\n for (var i = 0; i < events[event].length; i++) {\n events[event][i]();\n }\n }\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 {\n key: 'seek',\n value: function seek(time) {\n time = Math.max(time, 0);\n time = Math.min(time, this.duration);\n var i = 0;\n var tmptime = 0;\n while (tmptime <= time) {\n tmptime += this.durationArr[i];\n i++;\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 this.switch(i - 1, currentTime);\n this.trigger('all', 'seeking');\n }\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 {\n key: 'play',\n value: function play() {\n this.current.play();\n }\n },\n {\n key: 'pause',\n value: function pause() {\n this.current.pause();\n }\n },\n {\n key: 'toggle',\n value: function toggle() {\n this.current.paused ? this.play() : this.pause();\n }\n }\n ]);\n return Video;\n}();\nmodule.exports = Video;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/video.js\n// module id = 8\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index ad071af9b..6ac569a2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dplayer", - "version": "1.4.3", + "version": "1.5.0", "description": "Wow, such a lovely HTML5 danmaku video player", "main": "dist/DPlayer.min.js", "style": "dist/DPlayer.min.css", @@ -23,7 +23,7 @@ "html5" ], "author": "DIYgod", - "license": "SATA", + "license": "MIT", "bugs": { "url": "https://github.com/DIYgod/DPlayer/issues" }, diff --git a/src/DPlayer.js b/src/DPlayer.js index 34e23c685..e76a1e0ca 100644 --- a/src/DPlayer.js +++ b/src/DPlayer.js @@ -1,4 +1,4 @@ -console.log('\n %c DPlayer 1.4.3 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;'); +console.log('\n %c DPlayer 1.5.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'); diff --git a/src/DPlayer.scss b/src/DPlayer.scss index 101b5c1d3..306248813 100644 --- a/src/DPlayer.scss +++ b/src/DPlayer.scss @@ -4,6 +4,10 @@ user-select: none; line-height: 1; + * { + box-sizing: content-box; + } + &:-webkit-full-screen { width: 100%; height: 100%; @@ -386,6 +390,7 @@ text-align: center; opacity: 1; transition: opacity .1s ease-in-out; + word-wrap: normal; } .dplayer-bar { @@ -1046,6 +1051,7 @@ img { max-width: 100%; max-height: 100%; + background: none; } } diff --git a/src/option.js b/src/option.js index ab22ca6e7..38d7bb410 100644 --- a/src/option.js +++ b/src/option.js @@ -14,7 +14,7 @@ module.exports = (option) => { theme: '#b7daff', loop: false, lang: navigator.language.indexOf('zh') !== -1 ? 'zh' : 'en', - screenshot: false, + screenshot: true, hotkey: true, preload: 'auto', apiBackend: defaultApiBackend,