New file |
| | |
| | | !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() |
| | | }(window, (function () { |
| | | return function (e) { |
| | | var t = {}; |
| | | |
| | | function a(n) { |
| | | if (t[n]) return t[n].exports; |
| | | var o = t[n] = {i: n, l: !1, exports: {}}; |
| | | return e[n].call(o.exports, o, o.exports, a), o.l = !0, o.exports |
| | | } |
| | | |
| | | return a.m = e, a.c = t, a.d = function (e, t, n) { |
| | | a.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: n}) |
| | | }, a.r = function (e) { |
| | | "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0}) |
| | | }, a.t = function (e, t) { |
| | | if (1 & t && (e = a(e)), 8 & t) return e; |
| | | if (4 & t && "object" == typeof e && e && e.__esModule) return e; |
| | | var n = Object.create(null); |
| | | if (a.r(n), Object.defineProperty(n, "default", {enumerable: !0, value: e}), 2 & t && "string" != typeof e) |
| | | for (var o in e) a.d(n, o, function (t) { |
| | | return e[t] |
| | | }.bind(null, o)); |
| | | return n |
| | | }, a.n = function (e) { |
| | | var t = e && e.__esModule ? function () { |
| | | return e.default |
| | | } : function () { |
| | | return e |
| | | }; |
| | | return a.d(t, "a", t), t |
| | | }, a.o = function (e, t) { |
| | | return Object.prototype.hasOwnProperty.call(e, t) |
| | | }, a.p = "/", a(a.s = 57) |
| | | }([function (e, t, a) { |
| | | "use strict"; |
| | | |
| | | function n(e) { |
| | | return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { |
| | | return typeof e |
| | | } : function (e) { |
| | | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e |
| | | })(e) |
| | | } |
| | | |
| | | var o = a(6), |
| | | r = a(41), |
| | | i = Object.prototype.toString; |
| | | |
| | | function l(e) { |
| | | return "[object Array]" === i.call(e) |
| | | } |
| | | |
| | | function s(e) { |
| | | return null !== e && "object" === n(e) |
| | | } |
| | | |
| | | function d(e) { |
| | | return "[object Function]" === i.call(e) |
| | | } |
| | | |
| | | function p(e, t) { |
| | | if (null != e) |
| | | if ("object" !== n(e) && (e = [e]), l(e)) |
| | | for (var a = 0, o = e.length; a < o; a++) t.call(null, e[a], a, e); |
| | | else |
| | | for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.call(null, e[r], r, e) |
| | | } |
| | | |
| | | e.exports = { |
| | | isArray: l, isArrayBuffer: function (e) { |
| | | return "[object ArrayBuffer]" === i.call(e) |
| | | }, isBuffer: r, isFormData: function (e) { |
| | | return "undefined" != typeof FormData && e instanceof FormData |
| | | }, isArrayBufferView: function (e) { |
| | | return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && e.buffer instanceof ArrayBuffer |
| | | }, isString: function (e) { |
| | | return "string" == typeof e |
| | | }, isNumber: function (e) { |
| | | return "number" == typeof e |
| | | }, isObject: s, isUndefined: function (e) { |
| | | return void 0 === e |
| | | }, isDate: function (e) { |
| | | return "[object Date]" === i.call(e) |
| | | }, isFile: function (e) { |
| | | return "[object File]" === i.call(e) |
| | | }, isBlob: function (e) { |
| | | return "[object Blob]" === i.call(e) |
| | | }, isFunction: d, isStream: function (e) { |
| | | return s(e) && d(e.pipe) |
| | | }, isURLSearchParams: function (e) { |
| | | return "undefined" != typeof URLSearchParams && e instanceof URLSearchParams |
| | | }, isStandardBrowserEnv: function () { |
| | | return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && ("undefined" != typeof window && "undefined" != typeof document) |
| | | }, forEach: p, merge: function e() { |
| | | var t = {}; |
| | | |
| | | function a(a, o) { |
| | | "object" === n(t[o]) && "object" === n(a) ? t[o] = e(t[o], a) : t[o] = a |
| | | } |
| | | |
| | | for (var o = 0, r = arguments.length; o < r; o++) p(arguments[o], a); |
| | | return t |
| | | }, deepMerge: function e() { |
| | | var t = {}; |
| | | |
| | | function a(a, o) { |
| | | "object" === n(t[o]) && "object" === n(a) ? t[o] = e(t[o], a) : "object" === n(a) ? t[o] = e({}, a) : t[o] = a |
| | | } |
| | | |
| | | for (var o = 0, r = arguments.length; o < r; o++) p(arguments[o], a); |
| | | return t |
| | | }, extend: function (e, t, a) { |
| | | return p(t, (function (t, n) { |
| | | e[n] = a && "function" == typeof t ? o(t, a) : t |
| | | })), e |
| | | }, trim: function (e) { |
| | | return e.replace(/^\s*/, "").replace(/\s*$/, "") |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | var n = a(14); |
| | | e.exports = function (e) { |
| | | "use strict"; |
| | | var t = "", |
| | | a = (e = e || {}).enableSubtitle, |
| | | o = e.subtitle, |
| | | r = e.current, |
| | | i = e.pic, |
| | | l = n.$escape, |
| | | s = e.screenshot, |
| | | d = e.preload, |
| | | p = e.url; |
| | | a = o && "webvtt" === o.type; |
| | | return t += '\n<video\n class="dplayer-video ', r && (t += "dplayer-video-current"), t += '"\n webkit-playsinline\n playsinline\n ', i && (t += 'poster="', t += l(i), t += '"'), t += "\n ", (s || a) && (t += 'crossorigin="anonymous"'), t += "\n ", d && (t += 'preload="', t += l(d), t += '"'), t += "\n ", p && (t += 'src="', t += l(p), t += '"'), t += "\n >\n ", a && (t += '\n <track kind="metadata" default src="', t += l(o.url), t += '"></track>\n '), t += "\n</video>" |
| | | } |
| | | }, function (e, t, a) { |
| | | e.exports = a(40) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | var t = []; |
| | | return t.toString = function () { |
| | | return this.map((function (t) { |
| | | var a = function (e, t) { |
| | | var a = e[1] || "", |
| | | n = e[3]; |
| | | if (!n) return a; |
| | | if (t && "function" == typeof btoa) { |
| | | var o = (i = n, l = btoa(unescape(encodeURIComponent(JSON.stringify(i)))), s = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l), "/*# ".concat(s, " */")), |
| | | r = n.sources.map((function (e) { |
| | | return "/*# sourceURL=".concat(n.sourceRoot).concat(e, " */") |
| | | })); |
| | | return [a].concat(r).concat([o]).join("\n") |
| | | } |
| | | var i, l, s; |
| | | return [a].join("\n") |
| | | }(t, e); |
| | | return t[2] ? "@media ".concat(t[2], "{").concat(a, "}") : a |
| | | })).join("") |
| | | }, t.i = function (e, a) { |
| | | "string" == typeof e && (e = [ |
| | | [null, e, ""] |
| | | ]); |
| | | for (var n = {}, o = 0; o < this.length; o++) { |
| | | var r = this[o][0]; |
| | | null != r && (n[r] = !0) |
| | | } |
| | | for (var i = 0; i < e.length; i++) { |
| | | var l = e[i]; |
| | | null != l[0] && n[l[0]] || (a && !l[2] ? l[2] = a : a && (l[2] = "(".concat(l[2], ") and (").concat(a, ")")), t.push(l)) |
| | | } |
| | | }, t |
| | | } |
| | | }, function (e, t) { |
| | | function a(e) { |
| | | return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { |
| | | return typeof e |
| | | } : function (e) { |
| | | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e |
| | | })(e) |
| | | } |
| | | |
| | | var n; |
| | | n = function () { |
| | | return this |
| | | }(); |
| | | try { |
| | | n = n || new Function("return this")() |
| | | } catch (e) { |
| | | "object" === ("undefined" == typeof window ? "undefined" : a(window)) && (n = window) |
| | | } |
| | | e.exports = n |
| | | }, function (e, t) { |
| | | var a, n, o = e.exports = {}; |
| | | |
| | | function r() { |
| | | throw new Error("setTimeout has not been defined") |
| | | } |
| | | |
| | | function i() { |
| | | throw new Error("clearTimeout has not been defined") |
| | | } |
| | | |
| | | function l(e) { |
| | | if (a === setTimeout) return setTimeout(e, 0); |
| | | if ((a === r || !a) && setTimeout) return a = setTimeout, setTimeout(e, 0); |
| | | try { |
| | | return a(e, 0) |
| | | } catch (t) { |
| | | try { |
| | | return a.call(null, e, 0) |
| | | } catch (t) { |
| | | return a.call(this, e, 0) |
| | | } |
| | | } |
| | | } |
| | | |
| | | !function () { |
| | | try { |
| | | a = "function" == typeof setTimeout ? setTimeout : r |
| | | } catch (e) { |
| | | a = r |
| | | } |
| | | try { |
| | | n = "function" == typeof clearTimeout ? clearTimeout : i |
| | | } catch (e) { |
| | | n = i |
| | | } |
| | | }(); |
| | | var s, d = [], |
| | | p = !1, |
| | | c = -1; |
| | | |
| | | function u() { |
| | | p && s && (p = !1, s.length ? d = s.concat(d) : c = -1, d.length && y()) |
| | | } |
| | | |
| | | function y() { |
| | | if (!p) { |
| | | var e = l(u); |
| | | p = !0; |
| | | for (var t = d.length; t;) { |
| | | for (s = d, d = []; ++c < t;) s && s[c].run(); |
| | | c = -1, t = d.length |
| | | } |
| | | s = null, p = !1, |
| | | function (e) { |
| | | if (n === clearTimeout) return clearTimeout(e); |
| | | if ((n === i || !n) && clearTimeout) return n = clearTimeout, clearTimeout(e); |
| | | try { |
| | | n(e) |
| | | } catch (t) { |
| | | try { |
| | | return n.call(null, e) |
| | | } catch (t) { |
| | | return n.call(this, e) |
| | | } |
| | | } |
| | | }(e) |
| | | } |
| | | } |
| | | |
| | | function h(e, t) { |
| | | this.fun = e, this.array = t |
| | | } |
| | | |
| | | function m() { |
| | | } |
| | | |
| | | o.nextTick = function (e) { |
| | | var t = new Array(arguments.length - 1); |
| | | if (arguments.length > 1) |
| | | for (var a = 1; a < arguments.length; a++) t[a - 1] = arguments[a]; |
| | | d.push(new h(e, t)), 1 !== d.length || p || l(y) |
| | | }, h.prototype.run = function () { |
| | | this.fun.apply(null, this.array) |
| | | }, o.title = "browser", o.browser = !0, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = m, o.addListener = m, o.once = m, o.off = m, o.removeListener = m, o.removeAllListeners = m, o.emit = m, o.prependListener = m, o.prependOnceListener = m, o.listeners = function (e) { |
| | | return [] |
| | | }, o.binding = function (e) { |
| | | throw new Error("process.binding is not supported") |
| | | }, o.cwd = function () { |
| | | return "/" |
| | | }, o.chdir = function (e) { |
| | | throw new Error("process.chdir is not supported") |
| | | }, o.umask = function () { |
| | | return 0 |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e, t) { |
| | | return function () { |
| | | for (var a = new Array(arguments.length), n = 0; n < a.length; n++) a[n] = arguments[n]; |
| | | return e.apply(t, a) |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | |
| | | function o(e) { |
| | | return encodeURIComponent(e).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]") |
| | | } |
| | | |
| | | e.exports = function (e, t, a) { |
| | | if (!t) return e; |
| | | var r; |
| | | if (a) r = a(t); |
| | | else if (n.isURLSearchParams(t)) r = t.toString(); |
| | | else { |
| | | var i = []; |
| | | n.forEach(t, (function (e, t) { |
| | | null != e && (n.isArray(e) ? t += "[]" : e = [e], n.forEach(e, (function (e) { |
| | | n.isDate(e) ? e = e.toISOString() : n.isObject(e) && (e = JSON.stringify(e)), i.push(o(t) + "=" + o(e)) |
| | | }))) |
| | | })), r = i.join("&") |
| | | } |
| | | if (r) { |
| | | var l = e.indexOf("#"); |
| | | -1 !== l && (e = e.slice(0, l)), e += (-1 === e.indexOf("?") ? "?" : "&") + r |
| | | } |
| | | return e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | return !(!e || !e.__CANCEL__) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | (function (t) { |
| | | var n = a(0), |
| | | o = a(46), |
| | | r = {"Content-Type": "application/x-www-form-urlencoded"}; |
| | | |
| | | function i(e, t) { |
| | | !n.isUndefined(e) && n.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t) |
| | | } |
| | | |
| | | var l, s = { |
| | | adapter: (void 0 !== t && "[object process]" === Object.prototype.toString.call(t) ? l = a(10) : "undefined" != typeof XMLHttpRequest && (l = a(10)), l), |
| | | transformRequest: [function (e, t) { |
| | | return o(t, "Accept"), o(t, "Content-Type"), n.isFormData(e) || n.isArrayBuffer(e) || n.isBuffer(e) || n.isStream(e) || n.isFile(e) || n.isBlob(e) ? e : n.isArrayBufferView(e) ? e.buffer : n.isURLSearchParams(e) ? (i(t, "application/x-www-form-urlencoded;charset=utf-8"), e.toString()) : n.isObject(e) ? (i(t, "application/json;charset=utf-8"), JSON.stringify(e)) : e |
| | | }], |
| | | transformResponse: [function (e) { |
| | | if ("string" == typeof e) try { |
| | | e = JSON.parse(e) |
| | | } catch (e) { |
| | | } |
| | | return e |
| | | }], |
| | | timeout: 0, |
| | | xsrfCookieName: "XSRF-TOKEN", |
| | | xsrfHeaderName: "X-XSRF-TOKEN", |
| | | maxContentLength: -1, |
| | | validateStatus: function (e) { |
| | | return e >= 200 && e < 300 |
| | | } |
| | | }; |
| | | s.headers = {common: {Accept: "application/json, text/plain, */*"}}, n.forEach(["delete", "get", "head"], (function (e) { |
| | | s.headers[e] = {} |
| | | })), n.forEach(["post", "put", "patch"], (function (e) { |
| | | s.headers[e] = n.merge(r) |
| | | })), e.exports = s |
| | | }).call(this, a(5)) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(47), |
| | | r = a(7), |
| | | i = a(49), |
| | | l = a(50), |
| | | s = a(11); |
| | | e.exports = function (e) { |
| | | return new Promise((function (t, d) { |
| | | var p = e.data, |
| | | c = e.headers; |
| | | n.isFormData(p) && delete c["Content-Type"]; |
| | | var u = new XMLHttpRequest; |
| | | if (e.auth) { |
| | | var y = e.auth.username || "", |
| | | h = e.auth.password || ""; |
| | | c.Authorization = "Basic " + btoa(y + ":" + h) |
| | | } |
| | | if (u.open(e.method.toUpperCase(), r(e.url, e.params, e.paramsSerializer), !0), u.timeout = e.timeout, u.onreadystatechange = function () { |
| | | if (u && 4 === u.readyState && (0 !== u.status || u.responseURL && 0 === u.responseURL.indexOf("file:"))) { |
| | | var a = "getAllResponseHeaders" in u ? i(u.getAllResponseHeaders()) : null, |
| | | n = { |
| | | data: e.responseType && "text" !== e.responseType ? u.response : u.responseText, |
| | | status: u.status, |
| | | statusText: u.statusText, |
| | | headers: a, |
| | | config: e, |
| | | request: u |
| | | }; |
| | | o(t, d, n), u = null |
| | | } |
| | | }, u.onabort = function () { |
| | | u && (d(s("Request aborted", e, "ECONNABORTED", u)), u = null) |
| | | }, u.onerror = function () { |
| | | d(s("Network Error", e, null, u)), u = null |
| | | }, u.ontimeout = function () { |
| | | d(s("timeout of " + e.timeout + "ms exceeded", e, "ECONNABORTED", u)), u = null |
| | | }, n.isStandardBrowserEnv()) { |
| | | var m = a(51), |
| | | f = (e.withCredentials || l(e.url)) && e.xsrfCookieName ? m.read(e.xsrfCookieName) : void 0; |
| | | f && (c[e.xsrfHeaderName] = f) |
| | | } |
| | | if ("setRequestHeader" in u && n.forEach(c, (function (e, t) { |
| | | void 0 === p && "content-type" === t.toLowerCase() ? delete c[t] : u.setRequestHeader(t, e) |
| | | })), e.withCredentials && (u.withCredentials = !0), e.responseType) try { |
| | | u.responseType = e.responseType |
| | | } catch (t) { |
| | | if ("json" !== e.responseType) throw t |
| | | } |
| | | "function" == typeof e.onDownloadProgress && u.addEventListener("progress", e.onDownloadProgress), "function" == typeof e.onUploadProgress && u.upload && u.upload.addEventListener("progress", e.onUploadProgress), e.cancelToken && e.cancelToken.promise.then((function (e) { |
| | | u && (u.abort(), d(e), u = null) |
| | | })), void 0 === p && (p = null), u.send(p) |
| | | })) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(48); |
| | | e.exports = function (e, t, a, o, r) { |
| | | var i = new Error(e); |
| | | return n(i, t, a, o, r) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = function (e, t) { |
| | | t = t || {}; |
| | | var a = {}; |
| | | return n.forEach(["url", "method", "params", "data"], (function (e) { |
| | | void 0 !== t[e] && (a[e] = t[e]) |
| | | })), n.forEach(["headers", "auth", "proxy"], (function (o) { |
| | | n.isObject(t[o]) ? a[o] = n.deepMerge(e[o], t[o]) : void 0 !== t[o] ? a[o] = t[o] : n.isObject(e[o]) ? a[o] = n.deepMerge(e[o]) : void 0 !== e[o] && (a[o] = e[o]) |
| | | })), n.forEach(["baseURL", "transformRequest", "transformResponse", "paramsSerializer", "timeout", "withCredentials", "adapter", "responseType", "xsrfCookieName", "xsrfHeaderName", "onUploadProgress", "onDownloadProgress", "maxContentLength", "validateStatus", "maxRedirects", "httpAgent", "httpsAgent", "cancelToken", "socketPath"], (function (n) { |
| | | void 0 !== t[n] ? a[n] = t[n] : void 0 !== e[n] && (a[n] = e[n]) |
| | | })), a |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | |
| | | function n(e) { |
| | | this.message = e |
| | | } |
| | | |
| | | n.prototype.toString = function () { |
| | | return "Cancel" + (this.message ? ": " + this.message : "") |
| | | }, n.prototype.__CANCEL__ = !0, e.exports = n |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = a(56) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | (function (e) { |
| | | var n = a(16); |
| | | |
| | | function o(e) { |
| | | return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { |
| | | return typeof e |
| | | } : function (e) { |
| | | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e |
| | | })(e) |
| | | } |
| | | |
| | | var r = setTimeout; |
| | | |
| | | function i(e) { |
| | | return Boolean(e && void 0 !== e.length) |
| | | } |
| | | |
| | | function l() { |
| | | } |
| | | |
| | | function s(e) { |
| | | if (!(this instanceof s)) throw new TypeError("Promises must be constructed via new"); |
| | | if ("function" != typeof e) throw new TypeError("not a function"); |
| | | this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], h(e, this) |
| | | } |
| | | |
| | | function d(e, t) { |
| | | for (; 3 === e._state;) e = e._value; |
| | | 0 !== e._state ? (e._handled = !0, s._immediateFn((function () { |
| | | var a = 1 === e._state ? t.onFulfilled : t.onRejected; |
| | | if (null !== a) { |
| | | var n; |
| | | try { |
| | | n = a(e._value) |
| | | } catch (e) { |
| | | return void c(t.promise, e) |
| | | } |
| | | p(t.promise, n) |
| | | } else (1 === e._state ? p : c)(t.promise, e._value) |
| | | }))) : e._deferreds.push(t) |
| | | } |
| | | |
| | | function p(e, t) { |
| | | try { |
| | | if (t === e) throw new TypeError("A promise cannot be resolved with itself."); |
| | | if (t && ("object" === o(t) || "function" == typeof t)) { |
| | | var a = t.then; |
| | | if (t instanceof s) return e._state = 3, e._value = t, void u(e); |
| | | if ("function" == typeof a) return void h((n = a, r = t, function () { |
| | | n.apply(r, arguments) |
| | | }), e) |
| | | } |
| | | e._state = 1, e._value = t, u(e) |
| | | } catch (t) { |
| | | c(e, t) |
| | | } |
| | | var n, r |
| | | } |
| | | |
| | | function c(e, t) { |
| | | e._state = 2, e._value = t, u(e) |
| | | } |
| | | |
| | | function u(e) { |
| | | 2 === e._state && 0 === e._deferreds.length && s._immediateFn((function () { |
| | | e._handled || s._unhandledRejectionFn(e._value) |
| | | })); |
| | | for (var t = 0, a = e._deferreds.length; t < a; t++) d(e, e._deferreds[t]); |
| | | e._deferreds = null |
| | | } |
| | | |
| | | function y(e, t, a) { |
| | | this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.promise = a |
| | | } |
| | | |
| | | function h(e, t) { |
| | | var a = !1; |
| | | try { |
| | | e((function (e) { |
| | | a || (a = !0, p(t, e)) |
| | | }), (function (e) { |
| | | a || (a = !0, c(t, e)) |
| | | })) |
| | | } catch (e) { |
| | | if (a) return; |
| | | a = !0, c(t, e) |
| | | } |
| | | } |
| | | |
| | | s.prototype.catch = function (e) { |
| | | return this.then(null, e) |
| | | }, s.prototype.then = function (e, t) { |
| | | var a = new this.constructor(l); |
| | | return d(this, new y(e, t, a)), a |
| | | }, s.prototype.finally = n.a, s.all = function (e) { |
| | | return new s((function (t, a) { |
| | | if (!i(e)) return a(new TypeError("Promise.all accepts an array")); |
| | | var n = Array.prototype.slice.call(e); |
| | | if (0 === n.length) return t([]); |
| | | var r = n.length; |
| | | |
| | | function l(e, i) { |
| | | try { |
| | | if (i && ("object" === o(i) || "function" == typeof i)) { |
| | | var s = i.then; |
| | | if ("function" == typeof s) return void s.call(i, (function (t) { |
| | | l(e, t) |
| | | }), a) |
| | | } |
| | | n[e] = i, 0 == --r && t(n) |
| | | } catch (e) { |
| | | a(e) |
| | | } |
| | | } |
| | | |
| | | for (var s = 0; s < n.length; s++) l(s, n[s]) |
| | | })) |
| | | }, s.resolve = function (e) { |
| | | return e && "object" === o(e) && e.constructor === s ? e : new s((function (t) { |
| | | t(e) |
| | | })) |
| | | }, s.reject = function (e) { |
| | | return new s((function (t, a) { |
| | | a(e) |
| | | })) |
| | | }, s.race = function (e) { |
| | | return new s((function (t, a) { |
| | | if (!i(e)) return a(new TypeError("Promise.race accepts an array")); |
| | | for (var n = 0, o = e.length; n < o; n++) s.resolve(e[n]).then(t, a) |
| | | })) |
| | | }, s._immediateFn = "function" == typeof e && function (t) { |
| | | e(t) |
| | | } || function (e) { |
| | | r(e, 0) |
| | | }, s._unhandledRejectionFn = function (e) { |
| | | "undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e) |
| | | }, t.a = s |
| | | }).call(this, a(38).setImmediate) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | t.a = function (e) { |
| | | var t = this.constructor; |
| | | return this.then((function (a) { |
| | | return t.resolve(e()).then((function () { |
| | | return a |
| | | })) |
| | | }), (function (a) { |
| | | return t.resolve(e()).then((function () { |
| | | return t.reject(a) |
| | | })) |
| | | })) |
| | | } |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 32"><path style="fill:#ccc" d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | // e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32"><path d="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"></path></svg>' |
| | | e.exports = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1582886283652" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1436" width="12" height="12" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M258.875 174.5h506.25c46.58203125 0 84.375 37.79296875 84.375 84.375v506.25c0 46.58203125-37.79296875 84.375-84.375 84.375H258.875c-46.58203125 0-84.375-37.79296875-84.375-84.375V258.875c0-46.58203125 37.79296875-84.375 84.375-84.375z" style="fill:#cccccc";" p-id="1437"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 21 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 21 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 21 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | // e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 33"><path d="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"></path></svg>' |
| | | e.exports = '<svg t="1583130841318" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2689" width="14" height="14" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M162.133333 162.133333v153.6H85.333333V85.333333h234.666667v76.8H162.133333z m699.733334 0h-153.6V85.333333H938.666667v234.666667h-76.8V162.133333z m0 699.733334v-153.6H938.666667V938.666667h-234.666667v-76.8h157.866667z m-699.733334 0h153.6V938.666667H85.333333v-234.666667h76.8v157.866667zM256 256h512v512H256V256z" p-id="2690" fill="#cccccc"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 33"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 28"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z"></path></svg>' |
| | | }, function (e, t) { |
| | | // e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | e.exports = '<svg t="1583131099295" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4245" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M260.608 232.727273l82.711273-124.090182A34.885818 34.885818 0 0 1 372.363636 93.090909h279.272728c11.682909 0 22.574545 5.818182 29.044363 15.546182L763.415273 232.727273h110.056727A104.261818 104.261818 0 0 1 977.454545 336.686545v490.24A104.285091 104.285091 0 0 1 873.472 930.909091H150.528A104.285091 104.285091 0 0 1 46.545455 826.926545V336.686545A104.261818 104.261818 0 0 1 150.528 232.727273h110.056727z m83.898182 0h334.987636l-46.545454-69.818182H391.074909l-46.545454 69.818182zM512 779.636364c109.079273 0 197.818182-88.738909 197.818182-197.818182 0-109.079273-88.738909-197.818182-197.818182-197.818182-109.079273 0-197.818182 88.738909-197.818182 197.818182 0 109.079273 88.738909 197.818182 197.818182 197.818182z m0-325.818182c70.562909 0 128 57.437091 128 128s-57.437091 128-128 128a128.162909 128.162909 0 0 1-128-128c0-70.562909 57.437091-128 128-128z" fill="#cccccc" p-id="4246"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg version="1.1" viewBox="0 0 22 22"><svg x="7" y="1"><circle class="diplayer-loading-dot diplayer-loading-dot-0" cx="4" cy="4" r="2"></circle></svg><svg x="11" y="3"><circle class="diplayer-loading-dot diplayer-loading-dot-1" cx="4" cy="4" r="2"></circle></svg><svg x="13" y="7"><circle class="diplayer-loading-dot diplayer-loading-dot-2" cx="4" cy="4" r="2"></circle></svg><svg x="11" y="11"><circle class="diplayer-loading-dot diplayer-loading-dot-3" cx="4" cy="4" r="2"></circle></svg><svg x="7" y="13"><circle class="diplayer-loading-dot diplayer-loading-dot-4" cx="4" cy="4" r="2"></circle></svg><svg x="3" y="11"><circle class="diplayer-loading-dot diplayer-loading-dot-5" cx="4" cy="4" r="2"></circle></svg><svg x="1" y="7"><circle class="diplayer-loading-dot diplayer-loading-dot-6" cx="4" cy="4" r="2"></circle></svg><svg x="3" y="3"><circle class="diplayer-loading-dot diplayer-loading-dot-7" cx="4" cy="4" r="2"></circle></svg></svg>' |
| | | }, function (e, t, a) { |
| | | var n = a(14); |
| | | e.exports = function (e) { |
| | | "use strict"; |
| | | e = e || {}; |
| | | var t = "", |
| | | o = (arguments[1], function (e) { |
| | | return t += e |
| | | }), |
| | | r = e.video, |
| | | i = e.options, |
| | | l = n.$escape, |
| | | s = e.tran, |
| | | d = e.icons, |
| | | p = e.index, |
| | | c = n.$each; |
| | | e.$value, e.$index; |
| | | return t += '<div class="dplayer-mask"></div>\n<div class="dplayer-video-wrap">\n ', o(a(1)(r)), t += "\n ", i.logo && (t += '\n <div class="dplayer-logo">\n <img src="', t += l(i.logo), t += '">\n </div>\n '), t += '\n <div class="dplayer-danmaku"', i.danmaku && i.danmaku.bottm && (t += ' style="margin-bottom:', t += l(i.danmaku.bottm), t += '"'), t += '>\n <div class="dplayer-danmaku-item dplayer-danmaku-item--demo"></div>\n </div>\n <div class="dplayer-subtitle"></div>\n <div class="dplayer-bezel">\n <span class="dplayer-bezel-icon"></span>\n ', i.danmaku && (t += '\n <span class="dplayer-danloading">', t += l(s("Danmaku is loading")), t += "</span>\n "), t += '\n <span class="diplayer-loading-icon">', t += d.loading, t += '</span>\n </div>\n</div>\n<div class="dplayer-controller-mask"></div>\n<div class="dplayer-controller">\n <div class="dplayer-icons dplayer-comment-box">\n <button class="dplayer-icon dplayer-comment-setting-icon" data-balloon="', t += l(s("Setting")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.pallette, t += '</span>\n </button>\n <div class="dplayer-comment-setting-box">\n <div class="dplayer-comment-setting-color">\n <div class="dplayer-comment-setting-title">', t += l(s("Set danmaku color")), t += '</div>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#fff" checked>\n <span style="background: #fff;"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#e54256">\n <span style="background: #e54256"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#ffe133">\n <span style="background: #ffe133"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#64DD17">\n <span style="background: #64DD17"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#39ccff">\n <span style="background: #39ccff"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#D500F9">\n <span style="background: #D500F9"></span>\n </label>\n </div>\n <div class="dplayer-comment-setting-type">\n <div class="dplayer-comment-setting-title">', t += l(s("Set danmaku type")), t += '</div>\n <label>\n <input type="radio" name="dplayer-danmaku-type-', t += l(p), t += '" value="1">\n <span>', t += l(s("Top")), t += '</span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-type-', t += l(p), t += '" value="0" checked>\n <span>', t += l(s("Rolling")), t += '</span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-type-', t += l(p), t += '" value="2">\n <span>', t += l(s("Bottom")), t += '</span>\n </label>\n </div>\n </div>\n <input class="dplayer-comment-input" type="text" placeholder="', t += l(s("Input danmaku, hit Enter")), t += '" maxlength="30">\n <button class="dplayer-icon dplayer-send-icon" data-balloon="', t += l(s("Send")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.send, t += '</span>\n </button>\n </div>\n <div class="dplayer-icons dplayer-icons-left">\n <button class="dplayer-icon dplayer-play-icon">\n <span class="dplayer-icon-content">', t += d.play, t += '</span>\n </button>\n <div class="dplayer-volume">\n <button class="dplayer-icon dplayer-volume-icon">\n <span class="dplayer-icon-content">', t += d.volumeDown, t += '</span>\n </button>\n <div class="dplayer-volume-bar-wrap" data-balloon-pos="up">\n <div class="dplayer-volume-bar">\n <div class="dplayer-volume-bar-inner" style="background: ', t += l(i.theme), t += ';">\n <span class="dplayer-thumb" style="background: ', t += l(i.theme), t += '"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="dplayer-time">\n <span class="dplayer-ptime">0:00</span> /\n <span class="dplayer-dtime">0:00</span>\n </span>\n ', i.live && (t += '\n <span class="dplayer-live-badge"><span class="dplayer-live-dot" style="background: ', t += l(i.theme), t += ';"></span><span class="dplayer-live-text">', t += (e.options.liveText ? e.options.liveText : ''/*l(s("Live"))*/), t += "</span></span>\n "), t += '\n </div>\n <div class="dplayer-icons dplayer-icons-right">\n ', i.video.quality && (t += '\n <div class="dplayer-quality">\n <button class="dplayer-icon dplayer-quality-icon">', t += l(i.video.quality[i.video.defaultQuality].name), t += '</button>\n <div class="dplayer-quality-mask">\n <div class="dplayer-quality-list">\n ', c(i.video.quality, (function (e, a) { |
| | | t += '\n <div class="dplayer-quality-item" data-index="', t += l(a), t += '">', t += l(e.name), t += "</div>\n " |
| | | // })), t += "\n </div>\n </div>\n </div>\n "), t += "\n ", i.screenshot && (t += '\n <div class="dplayer-icon dplayer-camera-icon" data-balloon="', t += l(s("Screenshot")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.camera, t += "</span>\n </div>\n "), t += '\n <div class="dplayer-comment">\n <button class="dplayer-icon dplayer-comment-icon" data-balloon="', t += l(s("Send danmaku")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.comment, t += "</span>\n </button>\n </div>\n ", i.subtitle && (t += '\n <div class="dplayer-subtitle-btn">\n <button class="dplayer-icon dplayer-subtitle-icon" data-balloon="', t += l(s("Hide subtitle")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.subtitle, t += "</span>\n </button>\n </div>\n "), t += '\n <div class="dplayer-setting">\n <button class="dplayer-icon dplayer-setting-icon" data-balloon="', t += l(s("Setting")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.setting, t += '</span>\n </button>\n <div class="dplayer-setting-box">\n <div class="dplayer-setting-origin-panel">\n <div class="dplayer-setting-item dplayer-setting-speed">\n <span class="dplayer-label">', t += l(s("Speed")), t += '</span>\n <div class="dplayer-toggle">', t += d.right, t += '</div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-loop">\n <span class="dplayer-label">', t += l(s("Loop")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-toggle-setting-input" type="checkbox" name="dplayer-toggle">\n <label for="dplayer-toggle"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-showdan">\n <span class="dplayer-label">', t += l(s("Show danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-showdan-setting-input" type="checkbox" name="dplayer-toggle-dan">\n <label for="dplayer-toggle-dan"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danunlimit">\n <span class="dplayer-label">', t += l(s("Unlimited danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-danunlimit-setting-input" type="checkbox" name="dplayer-toggle-danunlimit">\n <label for="dplayer-toggle-danunlimit"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danmaku">\n <span class="dplayer-label">', t += l(s("Opacity for danmaku")), t += '</span>\n <div class="dplayer-danmaku-bar-wrap">\n <div class="dplayer-danmaku-bar">\n <div class="dplayer-danmaku-bar-inner">\n <span class="dplayer-thumb"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-setting-speed-panel">\n <div class="dplayer-setting-speed-item" data-speed="0.5">\n <span class="dplayer-label">0.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="0.75">\n <span class="dplayer-label">0.75</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1">\n <span class="dplayer-label">', t += l(s("Normal")), t += '</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.25">\n <span class="dplayer-label">1.25</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.5">\n <span class="dplayer-label">1.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="2">\n <span class="dplayer-label">2</span>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-full">\n <button class="dplayer-icon dplayer-full-in-icon" data-balloon="', t += l(s("Web full screen")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.fullWeb, t += '</span>\n </button>\n <button class="dplayer-icon dplayer-full-icon" data-balloon="', t += l(s("Full")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.full, t += '</span>\n </button>\n </div>\n </div>\n <div class="dplayer-bar-wrap">\n <div class="dplayer-bar-time hidden">00:00</div>\n <div class="dplayer-bar-preview"></div>\n <div class="dplayer-bar">\n <div class="dplayer-loaded" style="width: 0;"></div>\n <div class="dplayer-played" style="width: 0; background: ', t += l(i.theme), t += '">\n <span class="dplayer-thumb" style="background: ', t += l(i.theme), t += '"></span>\n </div>\n </div>\n </div>\n</div>\n<div class="dplayer-info-panel dplayer-info-panel-hide">\n <div class="dplayer-info-panel-close">[x]</div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-version">\n <span class="dplayer-info-panel-item-title">Player version</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-fps">\n <span class="dplayer-info-panel-item-title">Player FPS</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-type">\n <span class="dplayer-info-panel-item-title">Video type</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-url">\n <span class="dplayer-info-panel-item-title">Video url</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-resolution">\n <span class="dplayer-info-panel-item-title">Video resolution</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-duration">\n <span class="dplayer-info-panel-item-title">Video duration</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n ', i.danmaku && (t += '\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-id">\n <span class="dplayer-info-panel-item-title">Danamku id</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-api">\n <span class="dplayer-info-panel-item-title">Danamku api</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-amount">\n <span class="dplayer-info-panel-item-title">Danamku amount</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n '), t += '\n</div>\n<div class="dplayer-menu">\n ', c(i.contextmenu, (function (e, a) { |
| | | })), t += "\n </div>\n </div>\n </div>\n "), t += "\n ", i.screenshot && (t += '\n <div class="dplayer-icon dplayer-camera-icon" data-balloon="', t += l(s("Screenshot")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.camera, t += "</span>\n </div>\n "), t += '\n <div class="dplayer-comment">\n <button class="dplayer-icon dplayer-comment-icon" data-balloon="', t += l(s("Send danmaku")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.comment, t += "</span>\n </button>\n </div>\n ", i.subtitle && (t += '\n <div class="dplayer-subtitle-btn">\n <button class="dplayer-icon dplayer-subtitle-icon" data-balloon="', t += l(s("Hide subtitle")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.subtitle, t += "</span>\n </button>\n </div>\n "), t += '\n <div class="dplayer-setting" style="display: none;">\n <button class="dplayer-icon dplayer-setting-icon" data-balloon="', t += l(s("Setting")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.setting, t += '</span>\n </button>\n <div class="dplayer-setting-box">\n <div class="dplayer-setting-origin-panel">\n <div class="dplayer-setting-item dplayer-setting-speed">\n <span class="dplayer-label">', t += l(s("Speed")), t += '</span>\n <div class="dplayer-toggle">', t += d.right, t += '</div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-loop">\n <span class="dplayer-label">', t += l(s("Loop")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-toggle-setting-input" type="checkbox" name="dplayer-toggle">\n <label for="dplayer-toggle"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-showdan">\n <span class="dplayer-label">', t += l(s("Show danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-showdan-setting-input" type="checkbox" name="dplayer-toggle-dan">\n <label for="dplayer-toggle-dan"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danunlimit">\n <span class="dplayer-label">', t += l(s("Unlimited danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-danunlimit-setting-input" type="checkbox" name="dplayer-toggle-danunlimit">\n <label for="dplayer-toggle-danunlimit"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danmaku">\n <span class="dplayer-label">', t += l(s("Opacity for danmaku")), t += '</span>\n <div class="dplayer-danmaku-bar-wrap">\n <div class="dplayer-danmaku-bar">\n <div class="dplayer-danmaku-bar-inner">\n <span class="dplayer-thumb"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-setting-speed-panel">\n <div class="dplayer-setting-speed-item" data-speed="0.5">\n <span class="dplayer-label">0.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="0.75">\n <span class="dplayer-label">0.75</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1">\n <span class="dplayer-label">', t += l(s("Normal")), t += '</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.25">\n <span class="dplayer-label">1.25</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.5">\n <span class="dplayer-label">1.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="2">\n <span class="dplayer-label">2</span>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-full">\n ', t += '<button class="dplayer-icon dplayer-full-icon" data-balloon="', t += l(s("Full")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.full, t += '</span>\n </button>\n </div>\n </div>\n <div class="dplayer-bar-wrap">\n <div class="dplayer-bar-time hidden">00:00</div>\n <div class="dplayer-bar-preview"></div>\n <div class="dplayer-bar">\n <div class="dplayer-loaded" style="width: 0;"></div>\n <div class="dplayer-played" style="width: 0; background: ', t += l(i.theme), t += '">\n <span class="dplayer-thumb" style="background: ', t += l(i.theme), t += '"></span>\n </div>\n </div>\n </div>\n</div>\n<div class="dplayer-info-panel dplayer-info-panel-hide">\n <div class="dplayer-info-panel-close">[x]</div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-version">\n <span class="dplayer-info-panel-item-title">Player version</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-fps">\n <span class="dplayer-info-panel-item-title">Player FPS</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-type">\n <span class="dplayer-info-panel-item-title">Video type</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-url">\n <span class="dplayer-info-panel-item-title">Video url</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-resolution">\n <span class="dplayer-info-panel-item-title">Video resolution</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-duration">\n <span class="dplayer-info-panel-item-title">Video duration</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n ', i.danmaku && (t += '\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-id">\n <span class="dplayer-info-panel-item-title">Danamku id</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-api">\n <span class="dplayer-info-panel-item-title">Danamku api</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-amount">\n <span class="dplayer-info-panel-item-title">Danamku amount</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n '), t += '\n</div>\n<div class="dplayer-menu">\n ', c(i.contextmenu, (function (e, a) { |
| | | t += '\n <div class="dplayer-menu-item">\n <a', e.link && (t += ' target="_blank"'), t += ' href="', t += l(e.link || "javascript:void(0);"), t += '">', t += l(s(e.text)), t += "</a>\n </div>\n " |
| | | })), t += '\n</div>\n<div class="dplayer-notice"></div>' |
| | | } |
| | | }, function (e, t, a) { |
| | | var n = a(35); |
| | | "string" == typeof n && (n = [ |
| | | [e.i, n, ""] |
| | | ]); |
| | | var o = {insert: "head", singleton: !1}; |
| | | a(37)(n, o); |
| | | n.locals && (e.exports = n.locals) |
| | | }, function (e, t, a) { |
| | | // (t = e.exports = a(3)(!1)).i(a(36), ""), t.push([e.i, '@-webkit-keyframes my-face{2%{transform:translateY(1.5px) rotate(1.5deg)}4%{transform:translateY(-1.5px) rotate(-.5deg)}6%{transform:translateY(1.5px) rotate(-1.5deg)}8%{transform:translateY(-1.5px) rotate(-1.5deg)}10%{transform:translateY(2.5px) rotate(1.5deg)}12%{transform:translateY(-.5px) rotate(1.5deg)}14%{transform:translateY(-1.5px) rotate(1.5deg)}16%{transform:translateY(-.5px) rotate(-1.5deg)}18%{transform:translateY(.5px) rotate(-1.5deg)}20%{transform:translateY(-1.5px) rotate(2.5deg)}22%{transform:translateY(.5px) rotate(-1.5deg)}24%{transform:translateY(1.5px) rotate(1.5deg)}26%{transform:translateY(.5px) rotate(.5deg)}28%{transform:translateY(.5px) rotate(1.5deg)}30%{transform:translateY(-.5px) rotate(2.5deg)}32%{transform:translateY(1.5px) rotate(-.5deg)}34%{transform:translateY(1.5px) rotate(-.5deg)}36%{transform:translateY(-1.5px) rotate(2.5deg)}38%{transform:translateY(1.5px) rotate(-1.5deg)}40%{transform:translateY(-.5px) rotate(2.5deg)}42%{transform:translateY(2.5px) rotate(-1.5deg)}44%{transform:translateY(1.5px) rotate(.5deg)}46%{transform:translateY(-1.5px) rotate(2.5deg)}48%{transform:translateY(-.5px) rotate(.5deg)}50%{transform:translateY(.5px) rotate(.5deg)}52%{transform:translateY(2.5px) rotate(2.5deg)}54%{transform:translateY(-1.5px) rotate(1.5deg)}56%{transform:translateY(2.5px) rotate(2.5deg)}58%{transform:translateY(.5px) rotate(2.5deg)}60%{transform:translateY(2.5px) rotate(2.5deg)}62%{transform:translateY(-.5px) rotate(2.5deg)}64%{transform:translateY(-.5px) rotate(1.5deg)}66%{transform:translateY(1.5px) rotate(-.5deg)}68%{transform:translateY(-1.5px) rotate(-.5deg)}70%{transform:translateY(1.5px) rotate(.5deg)}72%{transform:translateY(2.5px) rotate(1.5deg)}74%{transform:translateY(-.5px) rotate(.5deg)}76%{transform:translateY(-.5px) rotate(2.5deg)}78%{transform:translateY(-.5px) rotate(1.5deg)}80%{transform:translateY(1.5px) rotate(1.5deg)}82%{transform:translateY(-.5px) rotate(.5deg)}84%{transform:translateY(1.5px) rotate(2.5deg)}86%{transform:translateY(-1.5px) rotate(-1.5deg)}88%{transform:translateY(-.5px) rotate(2.5deg)}90%{transform:translateY(2.5px) rotate(-.5deg)}92%{transform:translateY(.5px) rotate(-.5deg)}94%{transform:translateY(2.5px) rotate(.5deg)}96%{transform:translateY(-.5px) rotate(1.5deg)}98%{transform:translateY(-1.5px) rotate(-.5deg)}0%,to{transform:translate(0) rotate(0deg)}}@keyframes my-face{2%{transform:translateY(1.5px) rotate(1.5deg)}4%{transform:translateY(-1.5px) rotate(-.5deg)}6%{transform:translateY(1.5px) rotate(-1.5deg)}8%{transform:translateY(-1.5px) rotate(-1.5deg)}10%{transform:translateY(2.5px) rotate(1.5deg)}12%{transform:translateY(-.5px) rotate(1.5deg)}14%{transform:translateY(-1.5px) rotate(1.5deg)}16%{transform:translateY(-.5px) rotate(-1.5deg)}18%{transform:translateY(.5px) rotate(-1.5deg)}20%{transform:translateY(-1.5px) rotate(2.5deg)}22%{transform:translateY(.5px) rotate(-1.5deg)}24%{transform:translateY(1.5px) rotate(1.5deg)}26%{transform:translateY(.5px) rotate(.5deg)}28%{transform:translateY(.5px) rotate(1.5deg)}30%{transform:translateY(-.5px) rotate(2.5deg)}32%{transform:translateY(1.5px) rotate(-.5deg)}34%{transform:translateY(1.5px) rotate(-.5deg)}36%{transform:translateY(-1.5px) rotate(2.5deg)}38%{transform:translateY(1.5px) rotate(-1.5deg)}40%{transform:translateY(-.5px) rotate(2.5deg)}42%{transform:translateY(2.5px) rotate(-1.5deg)}44%{transform:translateY(1.5px) rotate(.5deg)}46%{transform:translateY(-1.5px) rotate(2.5deg)}48%{transform:translateY(-.5px) rotate(.5deg)}50%{transform:translateY(.5px) rotate(.5deg)}52%{transform:translateY(2.5px) rotate(2.5deg)}54%{transform:translateY(-1.5px) rotate(1.5deg)}56%{transform:translateY(2.5px) rotate(2.5deg)}58%{transform:translateY(.5px) rotate(2.5deg)}60%{transform:translateY(2.5px) rotate(2.5deg)}62%{transform:translateY(-.5px) rotate(2.5deg)}64%{transform:translateY(-.5px) rotate(1.5deg)}66%{transform:translateY(1.5px) rotate(-.5deg)}68%{transform:translateY(-1.5px) rotate(-.5deg)}70%{transform:translateY(1.5px) rotate(.5deg)}72%{transform:translateY(2.5px) rotate(1.5deg)}74%{transform:translateY(-.5px) rotate(.5deg)}76%{transform:translateY(-.5px) rotate(2.5deg)}78%{transform:translateY(-.5px) rotate(1.5deg)}80%{transform:translateY(1.5px) rotate(1.5deg)}82%{transform:translateY(-.5px) rotate(.5deg)}84%{transform:translateY(1.5px) rotate(2.5deg)}86%{transform:translateY(-1.5px) rotate(-1.5deg)}88%{transform:translateY(-.5px) rotate(2.5deg)}90%{transform:translateY(2.5px) rotate(-.5deg)}92%{transform:translateY(.5px) rotate(-.5deg)}94%{transform:translateY(2.5px) rotate(.5deg)}96%{transform:translateY(-.5px) rotate(1.5deg)}98%{transform:translateY(-1.5px) rotate(-.5deg)}0%,to{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 *{box-sizing:content-box}.dplayer svg{width:100%;height:100%}.dplayer svg circle,.dplayer svg path{fill:#fff}.dplayer:-webkit-full-screen{width:100%;height:100%;background:#000;position:fixed;z-index:100000;left:0;top:0;margin:0;padding:0;transform:translate(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:inherit;animation-play-state:inherit}.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:inherit;animation-play-state:inherit}.dplayer.dplayer-live .dplayer-bar-wrap,.dplayer.dplayer-live.dplayer-no-danmaku .dplayer-setting,.dplayer.dplayer-live .dplayer-setting-loop,.dplayer.dplayer-live .dplayer-setting-speed,.dplayer.dplayer-live .dplayer-time,.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-danunlimit,.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-arrow .dplayer-danmaku{font-size:18px}.dplayer.dplayer-arrow .dplayer-icon{margin:0 -3px}.dplayer.dplayer-playing .dplayer-danmaku .dplayer-danmaku-move{-webkit-animation-play-state:running;animation-play-state:running}@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.dplayer-loading .dplayer-danmaku-move,.dplayer.dplayer-paused .dplayer-danmaku,.dplayer.dplayer-paused .dplayer-danmaku-move{-webkit-animation-play-state:paused;animation-play-state:paused}.dplayer.dplayer-hide-controller{cursor:none}.dplayer.dplayer-hide-controller .dplayer-controller,.dplayer.dplayer-hide-controller .dplayer-controller-mask{opacity:0;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-controller .dplayer-icons .dplayer-camera-icon,.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-volume{display:none}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:static;display:inline-block}.dplayer.dplayer-mobile .dplayer-bar-time{display:none}.dplayer-web-fullscreen-fix{position:fixed;top:0;left:0;margin:0;padding:0}[data-balloon]:before{display:none}[data-balloon]:after{padding:.3em .7em;background:rgba(17,17,17,.7)}[data-balloon][data-balloon-pos=up]:after{margin-bottom:0}.dplayer-bezel{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.dplayer-bezel .dplayer-bezel-icon{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;box-sizing:border-box;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none}.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;transform:scale(1)}to{opacity:0;transform:scale(2)}}@keyframes bezel-hide{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.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 ease-in-out infinite;animation:my-face 5s ease-in-out infinite}.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-bezel .diplayer-loading-icon .diplayer-loading-hide{display:none}.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;transform-origin:4px 4px}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-7{-webkit-animation-delay:.7s;animation-delay:.7s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-6{-webkit-animation-delay:.6s;animation-delay:.6s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-5{-webkit-animation-delay:.5s;animation-delay:.5s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-4{-webkit-animation-delay:.4s;animation-delay:.4s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-3{-webkit-animation-delay:.3s;animation-delay:.3s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-2{-webkit-animation-delay:.2s;animation-delay:.2s}.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;transform:scale(1.2)}50%{opacity:.25;transform:scale(.9)}to{opacity:.25;transform:scale(.85)}}@keyframes diplayer-loading-dot-fade{0%{opacity:.7;transform:scale(1.2)}50%{opacity:.25;transform:scale(.9)}to{opacity:.25;transform:scale(.85)}}.dplayer-controller-mask{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%}.dplayer-controller,.dplayer-controller-mask{position:absolute;bottom:0;transition:all .3s ease}.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-controller.dplayer-controller-comment .dplayer-icons{display:none}.dplayer-controller.dplayer-controller-comment .dplayer-icons.dplayer-comment-box{display:block}.dplayer-controller .dplayer-bar-wrap{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-bar .dplayer-played .dplayer-thumb{transform:scale(1)}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-highlight{display:block;width:8px;transform:translateX(-4px);top:4px;height:40%}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight{z-index:12;position:absolute;top:5px;width:6px;height:20%;border-radius:6px;background-color:#fff;text-align:center;transform:translateX(-3px);transition:all .2s ease-in-out}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover .dplayer-highlight-text{display:block}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-preview,.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-time{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight .dplayer-highlight-text{display:none;position:absolute;left:50%;top:-24px;padding:5px 8px;background-color:rgba(0,0,0,.62);color:#fff;border-radius:4px;font-size:12px;white-space:nowrap;transform:translateX(-50%)}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview{position:absolute;background:#fff;pointer-events:none;display:none;background-size:16000px 100%}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview-canvas{position:absolute;width:100%;height:100%;z-index:1;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-bar{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded{background:hsla(0,0%,100%,.4);transition:all .5s ease}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded,.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width}.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;transition:all .3s ease-in-out;transform:scale(0)}.dplayer-controller .dplayer-icons{height:38px;position:absolute;bottom:0}.dplayer-controller .dplayer-icons.dplayer-comment-box{display:none;position:absolute;transition:all .3s ease-in-out;z-index:2;height:38px;bottom:0;left:20px;right:20px;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-icon{position:absolute;left:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-send-icon{position:absolute;right:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box{position:absolute;background:rgba(28,28,28,.9);bottom:41px;left:0;box-shadow:0 0 25px rgba(0,0,0,.3);border-radius:4px;padding:10px 10px 16px;font-size:14px;width:204px;transition:all .3s ease-in-out;transform:scale(0)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box.dplayer-comment-setting-open{transform:scale(1)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box input[type=radio]{display:none}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box label{cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-title{font-size:13px;color:#fff;line-height:30px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type .dplayer-comment-setting-title{margin-bottom:6px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(2) span{border-radius:4px 0 0 4px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(4) span{border-radius:0 4px 4px 0}.dplayer-controller .dplayer-icons.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:#fff;border:1px solid #fff;margin-right:-1px;box-sizing:border-box;text-align:center;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type input:checked+span{background:#e4e4e6;color:#1c1c1c}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color label{font-size:0;padding:6px;display:inline-block}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span{width:22px;height:22px;display:inline-block;border-radius:50%;box-sizing:border-box;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span:hover{-webkit-animation:my-face 5s ease-in-out infinite;animation:my-face 5s ease-in-out infinite}.dplayer-controller .dplayer-icons.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;background:none;margin:0;height:100%;box-sizing:border-box;width:100%;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-webkit-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-moz-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input:-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-clear{display:none}.dplayer-controller .dplayer-icons.dplayer-icons-left .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-icons-right{right:20px}.dplayer-controller .dplayer-icons.dplayer-icons-right .dplayer-icon{padding:8px}.dplayer-controller .dplayer-icons .dplayer-live-badge,.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-controller .dplayer-icons .dplayer-live-dot{display:inline-block;width:6px;height:6px;vertical-align:4%;margin-right:5px;content:"";border-radius:6px}.dplayer-controller .dplayer-icons .dplayer-icon{width:40px;height:100%;border:none;background-color:transparent;outline:none;cursor:pointer;vertical-align:middle;box-sizing:border-box;display:inline-block}.dplayer-controller .dplayer-icons .dplayer-icon .dplayer-icon-content{transition:all .2s ease-in-out;opacity:.8}.dplayer-controller .dplayer-icons .dplayer-icon:hover .dplayer-icon-content{opacity:1}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-quality-icon{color:#fff;width:auto;line-height:22px;font-size:14px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-comment-icon{padding:10px 9px 9px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-setting-icon{padding-top:8.5px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-volume-icon{width:43px}.dplayer-controller .dplayer-icons .dplayer-volume{position:relative;display:inline-block;cursor:pointer;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap{display:inline-block;margin:0 10px 0 -5px;vertical-align:middle;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.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%;transition:all .1s ease;will-change:width}.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;transition:all .3s ease-in-out;transform:scale(0)}.dplayer-controller .dplayer-icons .dplayer-setting,.dplayer-controller .dplayer-icons .dplayer-subtitle-btn{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box{position:absolute;right:0;bottom:50px;transform:scale(0);width:150px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 0;transition:all .3s ease-in-out;overflow:hidden;z-index:2}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div.dplayer-setting-origin-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-open{transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-narrow{width:70px;height:180px;text-align:center}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-origin-panel{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-speed-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item{height:30px;padding:5px 10px;box-sizing:border-box;cursor:pointer;position:relative}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item:hover,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku{padding:5px 0}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-label{padding:0 10px;display:inline}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap{padding:0 10px;box-sizing:border-box;display:none;vertical-align:middle;height:100%;width:100%}.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;transition:all .3s ease-in-out}.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%;transition:all .1s ease;background:#aaa;will-change:width}.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;transition:all .3s ease-in-out;background:#aaa}.dplayer-controller .dplayer-icons .dplayer-full{display:inline-block;height:100%;position:relative}.dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon{display:block}.dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:absolute;top:-30px;z-index:1;display:none}.dplayer-controller .dplayer-icons .dplayer-quality{position:relative;display:inline-block;height:100%;z-index:2}.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list,.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask{display:block}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask{display:none;position:absolute;bottom:38px;left:-18px;width:80px;padding-bottom:12px}.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;transition:all .3s ease-in-out;overflow:hidden;color:#fff;text-align:center}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item{height:25px;box-sizing:border-box;cursor:pointer;line-height:25px}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-comment{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-label{color:#eee;font-size:13px;display:inline-block;vertical-align:middle;white-space:nowrap}.dplayer-controller .dplayer-icons .dplayer-toggle{width:32px;height:20px;text-align:center;font-size:0;vertical-align:middle;position:absolute;top:5px;right:10px}.dplayer-controller .dplayer-icons .dplayer-toggle input{max-height:0;max-width:0;display:none}.dplayer-controller .dplayer-icons .dplayer-toggle input+label{display:inline-block;position:relative;box-shadow:inset 0 0 0 0 #dfdfdf;border:1px solid #dfdfdf;height:20px;width:32px;border-radius:10px;box-sizing:border-box;cursor:pointer;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after,.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;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label{border-color:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:before{width:30px;background:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:after{left:12px}.dplayer-danmaku{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff}.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-danmaku .dplayer-danmaku-item--demo{position:absolute;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-right{position:absolute;right:0;transform:translateX(100%)}.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%{transform:translateX(100%)}}@keyframes danmaku{0%{transform:translateX(100%)}}.dplayer-danmaku .dplayer-danmaku-bottom,.dplayer-danmaku .dplayer-danmaku-top{position:absolute;width:100%;text-align:center;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.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-logo{pointer-events:none;position:absolute;left:20px;top:20px;max-width:50px;max-height:50px}.dplayer-logo img{max-width:100%;max-height:100%;background:none}.dplayer-menu{position:fixed;width:170px;border-radius:2px;background:rgba(28,28,28,.85);padding:5px 0;overflow:hidden;z-index:3;display:none}.dplayer-menu.dplayer-menu-show{display:block}.dplayer-menu .dplayer-menu-item{height:30px;box-sizing:border-box;cursor:pointer}.dplayer-menu .dplayer-menu-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-menu .dplayer-menu-item a{padding:0 10px;line-height:30px;color:#eee;font-size:13px;display:inline-block;vertical-align:middle;width:100%;box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-menu .dplayer-menu-item a:hover{text-decoration:none}.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;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none}.dplayer-subtitle{position:absolute;bottom:40px;width:90%;left:5%;text-align:center;color:#fff;text-shadow:.5px .5px .5px rgba(0,0,0,.5);font-size:20px}.dplayer-subtitle.dplayer-subtitle-hide{display:none}.dplayer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.dplayer-mask.dplayer-mask-show{display:block}.dplayer-video-wrap{position:relative;background:#000;font-size:0;width:100%;height:100%}.dplayer-video-wrap .dplayer-video{width:100%;height:100%;display:none}.dplayer-video-wrap .dplayer-video-current{display:block}.dplayer-video-wrap .dplayer-video-prepare{display:none}.dplayer-info-panel{position:absolute;top:10px;left:10px;width:400px;background:rgba(28,28,28,.8);padding:10px;color:#fff;font-size:12px;border-radius:2px}.dplayer-info-panel-hide{display:none}.dplayer-info-panel .dplayer-info-panel-close{cursor:pointer;position:absolute;right:10px;top:10px}.dplayer-info-panel .dplayer-info-panel-item>span{display:inline-block;vertical-align:middle;line-height:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-info-panel .dplayer-info-panel-item-title{width:100px;text-align:right;margin-right:10px}.dplayer-info-panel .dplayer-info-panel-item-data{width:260px}', ""]) |
| | | (t = e.exports = a(3)(!1)).i(a(36), ""), t.push() |
| | | }, function (e, t, a) { |
| | | (e.exports = a(3)(!1)).push([e.i, ':root{--balloon-color:rgba(16,16,16,0.95);--balloon-font-size:12px;--balloon-move:4px}button[aria-label][data-balloon-pos]{overflow:visible}[aria-label][data-balloon-pos]{position:relative;cursor:pointer}[aria-label][data-balloon-pos]:after{text-indent:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-weight:400;font-style:normal;text-shadow:none;font-size:var(--balloon-font-size);background:var(--balloon-color);border-radius:2px;color:#fff;content:attr(aria-label);padding:.5em 1em;white-space:nowrap}[aria-label][data-balloon-pos]:after,[aria-label][data-balloon-pos]:before{opacity:0;pointer-events:none;transition:all .18s ease-out .18s;position:absolute;z-index:10}[aria-label][data-balloon-pos]:before{width:0;height:0;border:5px solid transparent;border-top:5px solid var(--balloon-color);content:""}[aria-label][data-balloon-pos]:hover:after,[aria-label][data-balloon-pos]:hover:before,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,[aria-label][data-balloon-pos][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-visible]:before{opacity:1;pointer-events:none}[aria-label][data-balloon-pos].font-awesome:after{font-family:FontAwesome,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[aria-label][data-balloon-pos][data-balloon-break]:after{white-space:pre}[aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after{white-space:pre-line;word-break:break-word}[aria-label][data-balloon-pos][data-balloon-blunt]:after,[aria-label][data-balloon-pos][data-balloon-blunt]:before{transition:none}[aria-label][data-balloon-pos][data-balloon-pos=up]:after{margin-bottom:10px}[aria-label][data-balloon-pos][data-balloon-pos=up]:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:before{bottom:100%;left:50%;transform:translate(-50%,var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=up][data-balloon-visible]:before{transform:translate(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=up-left]:after{bottom:100%;left:0;margin-bottom:10px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-left]:before{bottom:100%;left:5px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up-left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up-left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=up-left][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=up-right]:after{bottom:100%;right:0;margin-bottom:10px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-right]:before{bottom:100%;right:5px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up-right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up-right][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=up-right][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=down]:after{left:50%;margin-top:10px;top:100%;transform:translate(-50%,calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down]:before{width:0;height:0;border:5px solid transparent;border-bottom:5px solid var(--balloon-color);left:50%;top:100%;transform:translate(-50%,calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down][data-balloon-visible]:before{transform:translate(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=down-left]:after{left:0;margin-top:10px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-left]:before{width:0;height:0;border:5px solid transparent;border-bottom:5px solid var(--balloon-color);left:5px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down-left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down-left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down-left][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=down-right]:after{right:0;margin-top:10px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-right]:before{width:0;height:0;border:5px solid transparent;border-bottom:5px solid var(--balloon-color);right:5px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down-right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down-right][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down-right][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=left]:after{margin-right:10px;right:100%;top:50%;transform:translate(var(--balloon-move),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:before{width:0;height:0;border:5px solid transparent;border-left:5px solid var(--balloon-color);right:100%;top:50%;transform:translate(var(--balloon-move),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=left][data-balloon-visible]:before{transform:translateY(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:after{left:100%;margin-left:10px;top:50%;transform:translate(calc(var(--balloon-move)*-1),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:before{width:0;height:0;border:5px solid transparent;border-right:5px solid var(--balloon-color);left:100%;top:50%;transform:translate(calc(var(--balloon-move)*-1),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=right][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=right][data-balloon-visible]:before{transform:translateY(-50%)}[aria-label][data-balloon-pos][data-balloon-length=small]:after{white-space:normal;width:80px}[aria-label][data-balloon-pos][data-balloon-length=medium]:after{white-space:normal;width:150px}[aria-label][data-balloon-pos][data-balloon-length=large]:after{white-space:normal;width:260px}[aria-label][data-balloon-pos][data-balloon-length=xlarge]:after{white-space:normal;width:380px}@media screen and (max-width:768px){[aria-label][data-balloon-pos][data-balloon-length=xlarge]:after{white-space:normal;width:90vw}}[aria-label][data-balloon-pos][data-balloon-length=fit]:after{white-space:normal;width:100%}', ""]) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n, o = {}, |
| | | r = function () { |
| | | return void 0 === n && (n = Boolean(window && document && document.all && !window.atob)), n |
| | | }, |
| | | i = function () { |
| | | var e = {}; |
| | | return function (t) { |
| | | if (void 0 === e[t]) { |
| | | var a = document.querySelector(t); |
| | | if (window.HTMLIFrameElement && a instanceof window.HTMLIFrameElement) try { |
| | | a = a.contentDocument.head |
| | | } catch (e) { |
| | | a = null |
| | | } |
| | | e[t] = a |
| | | } |
| | | return e[t] |
| | | } |
| | | }(); |
| | | |
| | | function l(e, t) { |
| | | for (var a = [], n = {}, o = 0; o < e.length; o++) { |
| | | var r = e[o], |
| | | i = t.base ? r[0] + t.base : r[0], |
| | | l = {css: r[1], media: r[2], sourceMap: r[3]}; |
| | | n[i] ? n[i].parts.push(l) : a.push(n[i] = {id: i, parts: [l]}) |
| | | } |
| | | return a |
| | | } |
| | | |
| | | function s(e, t) { |
| | | for (var a = 0; a < e.length; a++) { |
| | | var n = e[a], |
| | | r = o[n.id], |
| | | i = 0; |
| | | if (r) { |
| | | for (r.refs++; i < r.parts.length; i++) r.parts[i](n.parts[i]); |
| | | for (; i < n.parts.length; i++) r.parts.push(f(n.parts[i], t)) |
| | | } else { |
| | | for (var l = []; i < n.parts.length; i++) l.push(f(n.parts[i], t)); |
| | | o[n.id] = {id: n.id, refs: 1, parts: l} |
| | | } |
| | | } |
| | | } |
| | | |
| | | function d(e) { |
| | | var t = document.createElement("style"); |
| | | if (void 0 === e.attributes.nonce) { |
| | | var n = a.nc; |
| | | n && (e.attributes.nonce = n) |
| | | } |
| | | if (Object.keys(e.attributes).forEach((function (a) { |
| | | t.setAttribute(a, e.attributes[a]) |
| | | })), "function" == typeof e.insert) e.insert(t); |
| | | else { |
| | | var o = i(e.insert || "head"); |
| | | if (!o) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); |
| | | o.appendChild(t) |
| | | } |
| | | return t |
| | | } |
| | | |
| | | var p, c = (p = [], function (e, t) { |
| | | return p[e] = t, p.filter(Boolean).join("\n") |
| | | }); |
| | | |
| | | function u(e, t, a, n) { |
| | | var o = a ? "" : n.css; |
| | | if (e.styleSheet) e.styleSheet.cssText = c(t, o); |
| | | else { |
| | | var r = document.createTextNode(o), |
| | | i = e.childNodes; |
| | | i[t] && e.removeChild(i[t]), i.length ? e.insertBefore(r, i[t]) : e.appendChild(r) |
| | | } |
| | | } |
| | | |
| | | function y(e, t, a) { |
| | | var n = a.css, |
| | | o = a.media, |
| | | r = a.sourceMap; |
| | | if (o && e.setAttribute("media", o), r && btoa && (n += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r)))), " */")), e.styleSheet) e.styleSheet.cssText = n; |
| | | else { |
| | | for (; e.firstChild;) e.removeChild(e.firstChild); |
| | | e.appendChild(document.createTextNode(n)) |
| | | } |
| | | } |
| | | |
| | | var h = null, |
| | | m = 0; |
| | | |
| | | function f(e, t) { |
| | | var a, n, o; |
| | | if (t.singleton) { |
| | | var r = m++; |
| | | a = h || (h = d(t)), n = u.bind(null, a, r, !1), o = u.bind(null, a, r, !0) |
| | | } else a = d(t), n = y.bind(null, a, t), o = function () { |
| | | !function (e) { |
| | | if (null === e.parentNode) return !1; |
| | | e.parentNode.removeChild(e) |
| | | }(a) |
| | | }; |
| | | return n(e), |
| | | function (t) { |
| | | if (t) { |
| | | if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return; |
| | | n(e = t) |
| | | } else o() |
| | | } |
| | | } |
| | | |
| | | e.exports = function (e, t) { |
| | | (t = t || {}).attributes = "object" == typeof t.attributes ? t.attributes : {}, t.singleton || "boolean" == typeof t.singleton || (t.singleton = r()); |
| | | var a = l(e, t); |
| | | return s(a, t), |
| | | function (e) { |
| | | for (var n = [], r = 0; r < a.length; r++) { |
| | | var i = a[r], |
| | | d = o[i.id]; |
| | | d && (d.refs--, n.push(d)) |
| | | } |
| | | e && s(l(e, t), t); |
| | | for (var p = 0; p < n.length; p++) { |
| | | var c = n[p]; |
| | | if (0 === c.refs) { |
| | | for (var u = 0; u < c.parts.length; u++) c.parts[u](); |
| | | delete o[c.id] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | var n = Function.prototype.apply; |
| | | |
| | | function o(e, t) { |
| | | this._id = e, this._clearFn = t |
| | | } |
| | | |
| | | t.setTimeout = function () { |
| | | return new o(n.call(setTimeout, window, arguments), clearTimeout) |
| | | }, t.setInterval = function () { |
| | | return new o(n.call(setInterval, window, arguments), clearInterval) |
| | | }, t.clearTimeout = t.clearInterval = function (e) { |
| | | e && e.close() |
| | | }, o.prototype.unref = o.prototype.ref = function () { |
| | | }, o.prototype.close = function () { |
| | | this._clearFn.call(window, this._id) |
| | | }, t.enroll = function (e, t) { |
| | | clearTimeout(e._idleTimeoutId), e._idleTimeout = t |
| | | }, t.unenroll = function (e) { |
| | | clearTimeout(e._idleTimeoutId), e._idleTimeout = -1 |
| | | }, t._unrefActive = t.active = function (e) { |
| | | clearTimeout(e._idleTimeoutId); |
| | | var t = e._idleTimeout; |
| | | t >= 0 && (e._idleTimeoutId = setTimeout((function () { |
| | | e._onTimeout && e._onTimeout() |
| | | }), t)) |
| | | }, a(39), t.setImmediate = setImmediate, t.clearImmediate = clearImmediate |
| | | }, function (e, t, a) { |
| | | (function (e, t) { |
| | | !function (e, a) { |
| | | "use strict"; |
| | | if (!e.setImmediate) { |
| | | var n, o, r, i, l, s = 1, |
| | | d = {}, |
| | | p = !1, |
| | | c = e.document, |
| | | u = Object.getPrototypeOf && Object.getPrototypeOf(e); |
| | | u = u && u.setTimeout ? u : e, "[object process]" === {}.toString.call(e.process) ? n = function (e) { |
| | | t.nextTick((function () { |
| | | h(e) |
| | | })) |
| | | } : !function () { |
| | | if (e.postMessage && !e.importScripts) { |
| | | var t = !0, |
| | | a = e.onmessage; |
| | | return e.onmessage = function () { |
| | | t = !1 |
| | | }, e.postMessage("", "*"), e.onmessage = a, t |
| | | } |
| | | }() ? e.MessageChannel ? ((r = new MessageChannel).port1.onmessage = function (e) { |
| | | h(e.data) |
| | | }, n = function (e) { |
| | | r.port2.postMessage(e) |
| | | }) : c && "onreadystatechange" in c.createElement("script") ? (o = c.documentElement, n = function (e) { |
| | | var t = c.createElement("script"); |
| | | t.onreadystatechange = function () { |
| | | h(e), t.onreadystatechange = null, o.removeChild(t), t = null |
| | | }, o.appendChild(t) |
| | | }) : n = function (e) { |
| | | setTimeout(h, 0, e) |
| | | } : (i = "setImmediate$" + Math.random() + "$", l = function (t) { |
| | | t.source === e && "string" == typeof t.data && 0 === t.data.indexOf(i) && h(+t.data.slice(i.length)) |
| | | }, e.addEventListener ? e.addEventListener("message", l, !1) : e.attachEvent("onmessage", l), n = function (t) { |
| | | e.postMessage(i + t, "*") |
| | | }), u.setImmediate = function (e) { |
| | | "function" != typeof e && (e = new Function("" + e)); |
| | | for (var t = new Array(arguments.length - 1), a = 0; a < t.length; a++) t[a] = arguments[a + 1]; |
| | | var o = {callback: e, args: t}; |
| | | return d[s] = o, n(s), s++ |
| | | }, u.clearImmediate = y |
| | | } |
| | | |
| | | function y(e) { |
| | | delete d[e] |
| | | } |
| | | |
| | | function h(e) { |
| | | if (p) setTimeout(h, 0, e); |
| | | else { |
| | | var t = d[e]; |
| | | if (t) { |
| | | p = !0; |
| | | try { |
| | | !function (e) { |
| | | var t = e.callback, |
| | | n = e.args; |
| | | switch (n.length) { |
| | | case 0: |
| | | t(); |
| | | break; |
| | | case 1: |
| | | t(n[0]); |
| | | break; |
| | | case 2: |
| | | t(n[0], n[1]); |
| | | break; |
| | | case 3: |
| | | t(n[0], n[1], n[2]); |
| | | break; |
| | | default: |
| | | t.apply(a, n) |
| | | } |
| | | }(t) |
| | | } finally { |
| | | y(e), p = !1 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }("undefined" == typeof self ? void 0 === e ? this : e : self) |
| | | }).call(this, a(4), a(5)) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(6), |
| | | r = a(42), |
| | | i = a(12); |
| | | |
| | | function l(e) { |
| | | var t = new r(e), |
| | | a = o(r.prototype.request, t); |
| | | return n.extend(a, r.prototype, t), n.extend(a, t), a |
| | | } |
| | | |
| | | var s = l(a(9)); |
| | | s.Axios = r, s.create = function (e) { |
| | | return l(i(s.defaults, e)) |
| | | }, s.Cancel = a(13), s.CancelToken = a(54), s.isCancel = a(8), s.all = function (e) { |
| | | return Promise.all(e) |
| | | }, s.spread = a(55), e.exports = s, e.exports.default = s |
| | | }, function (e, t) { |
| | | e.exports = function (e) { |
| | | return null != e && null != e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(7), |
| | | r = a(43), |
| | | i = a(44), |
| | | l = a(12); |
| | | |
| | | function s(e) { |
| | | this.defaults = e, this.interceptors = {request: new r, response: new r} |
| | | } |
| | | |
| | | s.prototype.request = function (e) { |
| | | "string" == typeof e ? (e = arguments[1] || {}).url = arguments[0] : e = e || {}, (e = l(this.defaults, e)).method = e.method ? e.method.toLowerCase() : "get"; |
| | | var t = [i, void 0], |
| | | a = Promise.resolve(e); |
| | | for (this.interceptors.request.forEach((function (e) { |
| | | t.unshift(e.fulfilled, e.rejected) |
| | | })), this.interceptors.response.forEach((function (e) { |
| | | t.push(e.fulfilled, e.rejected) |
| | | })); t.length;) a = a.then(t.shift(), t.shift()); |
| | | return a |
| | | }, s.prototype.getUri = function (e) { |
| | | return e = l(this.defaults, e), o(e.url, e.params, e.paramsSerializer).replace(/^\?/, "") |
| | | }, n.forEach(["delete", "get", "head", "options"], (function (e) { |
| | | s.prototype[e] = function (t, a) { |
| | | return this.request(n.merge(a || {}, {method: e, url: t})) |
| | | } |
| | | })), n.forEach(["post", "put", "patch"], (function (e) { |
| | | s.prototype[e] = function (t, a, o) { |
| | | return this.request(n.merge(o || {}, {method: e, url: t, data: a})) |
| | | } |
| | | })), e.exports = s |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | |
| | | function o() { |
| | | this.handlers = [] |
| | | } |
| | | |
| | | o.prototype.use = function (e, t) { |
| | | return this.handlers.push({fulfilled: e, rejected: t}), this.handlers.length - 1 |
| | | }, o.prototype.eject = function (e) { |
| | | this.handlers[e] && (this.handlers[e] = null) |
| | | }, o.prototype.forEach = function (e) { |
| | | n.forEach(this.handlers, (function (t) { |
| | | null !== t && e(t) |
| | | })) |
| | | }, e.exports = o |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(45), |
| | | r = a(8), |
| | | i = a(9), |
| | | l = a(52), |
| | | s = a(53); |
| | | |
| | | function d(e) { |
| | | e.cancelToken && e.cancelToken.throwIfRequested() |
| | | } |
| | | |
| | | e.exports = function (e) { |
| | | return d(e), e.baseURL && !l(e.url) && (e.url = s(e.baseURL, e.url)), e.headers = e.headers || {}, e.data = o(e.data, e.headers, e.transformRequest), e.headers = n.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers || {}), n.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (function (t) { |
| | | delete e.headers[t] |
| | | })), (e.adapter || i.adapter)(e).then((function (t) { |
| | | return d(e), t.data = o(t.data, t.headers, e.transformResponse), t |
| | | }), (function (t) { |
| | | return r(t) || (d(e), t && t.response && (t.response.data = o(t.response.data, t.response.headers, e.transformResponse))), Promise.reject(t) |
| | | })) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = function (e, t, a) { |
| | | return n.forEach(a, (function (a) { |
| | | e = a(e, t) |
| | | })), e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = function (e, t) { |
| | | n.forEach(e, (function (a, n) { |
| | | n !== t && n.toUpperCase() === t.toUpperCase() && (e[t] = a, delete e[n]) |
| | | })) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(11); |
| | | e.exports = function (e, t, a) { |
| | | var o = a.config.validateStatus; |
| | | !o || o(a.status) ? e(a) : t(n("Request failed with status code " + a.status, a.config, null, a.request, a)) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e, t, a, n, o) { |
| | | return e.config = t, a && (e.code = a), e.request = n, e.response = o, e.isAxiosError = !0, e.toJSON = function () { |
| | | return { |
| | | message: this.message, |
| | | name: this.name, |
| | | description: this.description, |
| | | number: this.number, |
| | | fileName: this.fileName, |
| | | lineNumber: this.lineNumber, |
| | | columnNumber: this.columnNumber, |
| | | stack: this.stack, |
| | | config: this.config, |
| | | code: this.code |
| | | } |
| | | }, e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = ["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]; |
| | | e.exports = function (e) { |
| | | var t, a, r, i = {}; |
| | | return e ? (n.forEach(e.split("\n"), (function (e) { |
| | | if (r = e.indexOf(":"), t = n.trim(e.substr(0, r)).toLowerCase(), a = n.trim(e.substr(r + 1)), t) { |
| | | if (i[t] && o.indexOf(t) >= 0) return; |
| | | i[t] = "set-cookie" === t ? (i[t] ? i[t] : []).concat([a]) : i[t] ? i[t] + ", " + a : a |
| | | } |
| | | })), i) : i |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = n.isStandardBrowserEnv() ? function () { |
| | | var e, t = /(msie|trident)/i.test(navigator.userAgent), |
| | | a = document.createElement("a"); |
| | | |
| | | function o(e) { |
| | | var n = e; |
| | | return t && (a.setAttribute("href", n), n = a.href), a.setAttribute("href", n), { |
| | | href: a.href, |
| | | protocol: a.protocol ? a.protocol.replace(/:$/, "") : "", |
| | | host: a.host, |
| | | search: a.search ? a.search.replace(/^\?/, "") : "", |
| | | hash: a.hash ? a.hash.replace(/^#/, "") : "", |
| | | hostname: a.hostname, |
| | | port: a.port, |
| | | pathname: "/" === a.pathname.charAt(0) ? a.pathname : "/" + a.pathname |
| | | } |
| | | } |
| | | |
| | | return e = o(window.location.href), |
| | | function (t) { |
| | | var a = n.isString(t) ? o(t) : t; |
| | | return a.protocol === e.protocol && a.host === e.host |
| | | } |
| | | }() : function () { |
| | | return !0 |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = n.isStandardBrowserEnv() ? { |
| | | write: function (e, t, a, o, r, i) { |
| | | var l = []; |
| | | l.push(e + "=" + encodeURIComponent(t)), n.isNumber(a) && l.push("expires=" + new Date(a).toGMTString()), n.isString(o) && l.push("path=" + o), n.isString(r) && l.push("domain=" + r), !0 === i && l.push("secure"), document.cookie = l.join("; ") |
| | | }, read: function (e) { |
| | | var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); |
| | | return t ? decodeURIComponent(t[3]) : null |
| | | }, remove: function (e) { |
| | | this.write(e, "", Date.now() - 864e5) |
| | | } |
| | | } : { |
| | | write: function () { |
| | | }, read: function () { |
| | | return null |
| | | }, remove: function () { |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e, t) { |
| | | return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(13); |
| | | |
| | | function o(e) { |
| | | if ("function" != typeof e) throw new TypeError("executor must be a function."); |
| | | var t; |
| | | this.promise = new Promise((function (e) { |
| | | t = e |
| | | })); |
| | | var a = this; |
| | | e((function (e) { |
| | | a.reason || (a.reason = new n(e), t(a.reason)) |
| | | })) |
| | | } |
| | | |
| | | o.prototype.throwIfRequested = function () { |
| | | if (this.reason) throw this.reason |
| | | }, o.source = function () { |
| | | var e; |
| | | return { |
| | | token: new o((function (t) { |
| | | e = t |
| | | })), cancel: e |
| | | } |
| | | }, e.exports = o |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | return function (t) { |
| | | return e.apply(null, t) |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | (function (t) { |
| | | var a = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== t ? t : {}, |
| | | n = Object.create(a), |
| | | o = /["&'<>]/; |
| | | n.$escape = function (e) { |
| | | return function (e) { |
| | | var t = "" + e, |
| | | a = o.exec(t); |
| | | if (!a) return e; |
| | | var n = "", |
| | | r = void 0, |
| | | i = void 0, |
| | | l = void 0; |
| | | for (r = a.index, i = 0; r < t.length; r++) { |
| | | switch (t.charCodeAt(r)) { |
| | | case 34: |
| | | l = """; |
| | | break; |
| | | case 38: |
| | | l = "&"; |
| | | break; |
| | | case 39: |
| | | l = "'"; |
| | | break; |
| | | case 60: |
| | | l = "<"; |
| | | break; |
| | | case 62: |
| | | l = ">"; |
| | | break; |
| | | default: |
| | | continue |
| | | } |
| | | i !== r && (n += t.substring(i, r)), i = r + 1, n += l |
| | | } |
| | | return i !== r ? n + t.substring(i, r) : n |
| | | }(function e(t) { |
| | | "string" != typeof t && (t = null == t ? "" : "function" == typeof t ? e(t.call(t)) : JSON.stringify(t)); |
| | | return t |
| | | }(e)) |
| | | }, n.$each = function (e, t) { |
| | | if (Array.isArray(e)) |
| | | for (var a = 0, n = e.length; a < n; a++) t(e[a], a); |
| | | else |
| | | for (var o in e) t(e[o], o) |
| | | }, e.exports = n |
| | | }).call(this, a(4)) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | a.r(t); |
| | | a(34); |
| | | var n = a(15), |
| | | o = /mobile/i.test(window.navigator.userAgent), |
| | | r = { |
| | | secondToTime: function (e) { |
| | | if (0 === (e = e || 0) || e == 1 / 0 || "NaN" === e.toString()) return "00:00"; |
| | | var t = Math.floor(e / 3600), |
| | | a = Math.floor((e - 3600 * t) / 60), |
| | | n = Math.floor(e - 3600 * t - 60 * a); |
| | | return (t > 0 ? [t, a, n] : [a, n]).map((function (e) { |
| | | return e < 10 ? "0" + e : "" + e |
| | | })).join(":") |
| | | }, |
| | | getElementViewLeft: function (e) { |
| | | var t = e.offsetLeft, |
| | | a = e.offsetParent, |
| | | n = document.body.scrollLeft + document.documentElement.scrollLeft; |
| | | if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) |
| | | for (; null !== a && a !== e;) t += a.offsetLeft, a = a.offsetParent; |
| | | else |
| | | for (; null !== a;) t += a.offsetLeft, a = a.offsetParent; |
| | | return t - n |
| | | }, |
| | | getBoundingClientRectViewLeft: function (e) { |
| | | var t = window.scrollY || window.pageYOffset || document.body.scrollTop + (document.documentElement && document.documentElement.scrollTop || 0); |
| | | if (e.getBoundingClientRect) { |
| | | if ("number" != typeof this.getBoundingClientRectViewLeft.offset) { |
| | | var a = document.createElement("div"); |
| | | a.style.cssText = "position:absolute;top:0;left:0;", document.body.appendChild(a), this.getBoundingClientRectViewLeft.offset = -a.getBoundingClientRect().top - t, document.body.removeChild(a), a = null |
| | | } |
| | | var n = e.getBoundingClientRect(), |
| | | o = this.getBoundingClientRectViewLeft.offset; |
| | | return n.left + o |
| | | } |
| | | return this.getElementViewLeft(e) |
| | | }, |
| | | getScrollPosition: function () { |
| | | return { |
| | | left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0, |
| | | top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 |
| | | } |
| | | }, |
| | | setScrollPosition: function (e) { |
| | | var t = e.left, |
| | | a = void 0 === t ? 0 : t, |
| | | n = e.top, |
| | | o = void 0 === n ? 0 : n; |
| | | this.isFirefox ? (document.documentElement.scrollLeft = a, document.documentElement.scrollTop = o) : window.scrollTo(a, o) |
| | | }, |
| | | isMobile: o, |
| | | isFirefox: /firefox/i.test(window.navigator.userAgent), |
| | | isChrome: /chrome/i.test(window.navigator.userAgent), |
| | | storage: { |
| | | set: function (e, t) { |
| | | localStorage.setItem(e, t) |
| | | }, get: function (e) { |
| | | return localStorage.getItem(e) |
| | | } |
| | | }, |
| | | cumulativeOffset: function (e) { |
| | | var t = 0, |
| | | a = 0; |
| | | do { |
| | | t += e.offsetTop || 0, a += e.offsetLeft || 0, e = e.offsetParent |
| | | } while (e); |
| | | return {top: t, left: a} |
| | | }, |
| | | nameMap: { |
| | | dragStart: o ? "touchstart" : "mousedown", |
| | | dragMove: o ? "touchmove" : "mousemove", |
| | | dragEnd: o ? "touchend" : "mouseup" |
| | | }, |
| | | color2Number: function (e) { |
| | | return "#" === e[0] && (e = e.substr(1)), 3 === e.length && (e = "".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2])), parseInt(e, 16) + 0 & 16777215 |
| | | }, |
| | | number2Color: function (e) { |
| | | return "#" + ("00000" + e.toString(16)).slice(-6) |
| | | }, |
| | | number2Type: function (e) { |
| | | switch (e) { |
| | | case 0: |
| | | return "right"; |
| | | case 1: |
| | | return "top"; |
| | | case 2: |
| | | return "bottom"; |
| | | default: |
| | | return "right" |
| | | } |
| | | } |
| | | }, |
| | | i = a(2), |
| | | l = a.n(i), |
| | | s = { |
| | | send: function (e) { |
| | | l.a.post(e.url, e.data).then((function (t) { |
| | | var a = t.data; |
| | | a && 0 === a.code ? e.success && e.success(a) : e.error && e.error(a && a.msg) |
| | | })).catch((function (t) { |
| | | console.error(t), e.error && e.error() |
| | | })) |
| | | }, read: function (e) { |
| | | l.a.get(e.url).then((function (t) { |
| | | var a = t.data; |
| | | a && 0 === a.code ? e.success && e.success(a.data.map((function (e) { |
| | | return {time: e[0], type: e[1], color: e[2], author: e[3], text: e[4]} |
| | | }))) : e.error && e.error(a && a.msg) |
| | | })).catch((function (t) { |
| | | console.error(t), e.error && e.error() |
| | | })) |
| | | } |
| | | }; |
| | | |
| | | function d(e) { |
| | | return (d = "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 |
| | | })(e) |
| | | } |
| | | |
| | | var p = function (e) { |
| | | var t = { |
| | | container: e.element || document.getElementsByClassName("dplayer")[0], |
| | | live: !1, |
| | | autoplay: !1, |
| | | theme: "#b7daff", |
| | | loop: !1, |
| | | lang: (navigator.language || navigator.browserLanguage).toLowerCase(), |
| | | screenshot: !1, |
| | | hotkey: !0, |
| | | preload: "metadata", |
| | | volume: .7, |
| | | apiBackend: s, |
| | | video: {}, |
| | | contextmenu: [], |
| | | mutex: !0, |
| | | pluginOptions: {hls: {}, flvjs: {}, dash: {}, webtorrent: {}} |
| | | }; |
| | | for (var a in t) t.hasOwnProperty(a) && !e.hasOwnProperty(a) && (e[a] = t[a]); |
| | | return e.video && !e.video.type && (e.video.type = "auto"), "object" === d(e.danmaku) && e.danmaku && !e.danmaku.user && (e.danmaku.user = "DIYgod"), e.subtitle && (!e.subtitle.type && (e.subtitle.type = "webvtt"), !e.subtitle.fontSize && (e.subtitle.fontSize = "20px"), !e.subtitle.bottom && (e.subtitle.bottom = "40px"), !e.subtitle.color && (e.subtitle.color = "#fff")), e.video.quality && (e.video.url = e.video.quality[e.video.defaultQuality].url), e.lang && (e.lang = e.lang.toLowerCase()) |
| | | // , e.contextmenu = e.contextmenu.concat([{ |
| | | // text: "Video info", |
| | | // click: function (e) { |
| | | // e.infoPanel.triggle() |
| | | // } |
| | | // }, {text: "About author", link: "https://diygod.me"}, { |
| | | // text: "DPlayer v".concat("1.25.0"), |
| | | // link: "https://github.com/MoePlayer/DPlayer" |
| | | // }]) |
| | | ,e |
| | | }; |
| | | var c = { |
| | | "zh-cn": { |
| | | "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": "设置弹幕类型", |
| | | "Show danmaku": "显示弹幕", |
| | | "Video load failed": "视频加载失败", |
| | | "Danmaku load failed": "弹幕加载失败", |
| | | "Danmaku send failed": "弹幕发送失败", |
| | | "Switching to": "正在切换至", |
| | | "Switched to": "已经切换至", |
| | | quality: "画质", |
| | | FF: "快进", |
| | | REW: "快退", |
| | | "Unlimited danmaku": "海量弹幕", |
| | | "Send danmaku": "发送弹幕", |
| | | Setting: "设置", |
| | | "Full": "全屏", |
| | | "Web full screen": "页面全屏", |
| | | Send: "发送", |
| | | Screenshot: "截图", |
| | | s: "秒", |
| | | "Show subtitle": "显示字幕", |
| | | "Hide subtitle": "隐藏字幕", |
| | | Volume: "音量", |
| | | Live: "直播", |
| | | "Video info": "视频统计信息" |
| | | }, |
| | | "zh-tw": { |
| | | "Danmaku is loading": "彈幕載入中", |
| | | Top: "頂部", |
| | | Bottom: "底部", |
| | | Rolling: "滾動", |
| | | "Input danmaku, hit Enter": "輸入彈幕,Enter 發送", |
| | | "About author": "關於作者", |
| | | "DPlayer feedback": "播放器意見回饋", |
| | | "About DPlayer": "關於 DPlayer 播放器", |
| | | Loop: "循環播放", |
| | | Speed: "速度", |
| | | "Opacity for danmaku": "彈幕透明度", |
| | | Normal: "正常", |
| | | "Please input danmaku content!": "請輸入彈幕內容啊!", |
| | | "Set danmaku color": "設定彈幕顏色", |
| | | "Set danmaku type": "設定彈幕類型", |
| | | "Show danmaku": "顯示彈幕", |
| | | "Video load failed": "影片載入失敗", |
| | | "Danmaku load failed": "彈幕載入失敗", |
| | | "Danmaku send failed": "彈幕發送失敗", |
| | | "Switching to": "正在切換至", |
| | | "Switched to": "已經切換至", |
| | | quality: "畫質", |
| | | FF: "快進", |
| | | REW: "快退", |
| | | "Unlimited danmaku": "巨量彈幕", |
| | | "Send danmaku": "發送彈幕", |
| | | Setting: "設定", |
| | | "Full": "全螢幕", |
| | | "Web full screen": "頁面全螢幕", |
| | | Send: "發送", |
| | | Screenshot: "截圖", |
| | | s: "秒", |
| | | "Show subtitle": "顯示字幕", |
| | | "Hide subtitle": "隱藏字幕", |
| | | Volume: "音量", |
| | | Live: "直播", |
| | | "Video info": "影片統計訊息" |
| | | } |
| | | }, |
| | | u = function (e) { |
| | | var t = this; |
| | | this.lang = e, this.tran = function (e) { |
| | | return c[t.lang] && c[t.lang][e] ? c[t.lang][e] : e |
| | | } |
| | | }, |
| | | y = a(17), |
| | | h = a.n(y), |
| | | m = a(18), |
| | | f = a.n(m), |
| | | v = a(19), |
| | | b = a.n(v), |
| | | g = a(20), |
| | | w = a.n(g), |
| | | x = a(21), |
| | | k = a.n(x), |
| | | S = a(22), |
| | | T = a.n(S), |
| | | L = a(23), |
| | | E = a.n(L), |
| | | q = a(24), |
| | | B = a.n(q), |
| | | M = a(25), |
| | | z = a.n(M), |
| | | C = a(26), |
| | | O = a.n(C), |
| | | F = a(27), |
| | | A = a.n(F), |
| | | P = a(28), |
| | | j = a.n(P), |
| | | Y = a(29), |
| | | _ = a.n(Y), |
| | | D = a(30), |
| | | R = a.n(D), |
| | | I = a(31), |
| | | W = a.n(I), |
| | | H = a(32), |
| | | N = a.n(H), |
| | | U = { |
| | | play: h.a, |
| | | pause: f.a, |
| | | volumeUp: b.a, |
| | | volumeDown: w.a, |
| | | volumeOff: k.a, |
| | | full: T.a, |
| | | fullWeb: E.a, |
| | | setting: B.a, |
| | | right: z.a, |
| | | comment: O.a, |
| | | commentOff: A.a, |
| | | send: j.a, |
| | | pallette: _.a, |
| | | camera: R.a, |
| | | subtitle: W.a, |
| | | loading: N.a |
| | | }, |
| | | V = a(33), |
| | | X = a.n(V); |
| | | |
| | | function Q(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var $ = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t.container, this.options = t.options, this.index = t.index, this.tran = t.tran, this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | this.container.innerHTML = X()({ |
| | | options: this.options, |
| | | index: this.index, |
| | | tran: this.tran, |
| | | icons: U, |
| | | video: { |
| | | current: !0, |
| | | pic: this.options.video.pic, |
| | | screenshot: this.options.screenshot, |
| | | preload: this.options.preload, |
| | | url: this.options.video.url, |
| | | subtitle: this.options.subtitle |
| | | } |
| | | }), this.volumeBar = this.container.querySelector(".dplayer-volume-bar-inner"), this.volumeBarWrap = this.container.querySelector(".dplayer-volume-bar"), this.volumeBarWrapWrap = this.container.querySelector(".dplayer-volume-bar-wrap"), this.volumeButton = this.container.querySelector(".dplayer-volume"), this.volumeButtonIcon = this.container.querySelector(".dplayer-volume-icon"), this.volumeIcon = this.container.querySelector(".dplayer-volume-icon .dplayer-icon-content"), this.playedBar = this.container.querySelector(".dplayer-played"), this.loadedBar = this.container.querySelector(".dplayer-loaded"), this.playedBarWrap = this.container.querySelector(".dplayer-bar-wrap"), this.playedBarTime = this.container.querySelector(".dplayer-bar-time"), this.danmaku = this.container.querySelector(".dplayer-danmaku"), this.danmakuLoading = this.container.querySelector(".dplayer-danloading"), this.video = this.container.querySelector(".dplayer-video-current"), this.bezel = this.container.querySelector(".dplayer-bezel-icon"), this.playButton = this.container.querySelector(".dplayer-play-icon"), this.videoWrap = this.container.querySelector(".dplayer-video-wrap"), this.controllerMask = this.container.querySelector(".dplayer-controller-mask"), this.ptime = this.container.querySelector(".dplayer-ptime"), this.settingButton = this.container.querySelector(".dplayer-setting-icon"), this.settingBox = this.container.querySelector(".dplayer-setting-box"), this.mask = this.container.querySelector(".dplayer-mask"), this.loop = this.container.querySelector(".dplayer-setting-loop"), this.loopToggle = this.container.querySelector(".dplayer-setting-loop .dplayer-toggle-setting-input"), this.showDanmaku = this.container.querySelector(".dplayer-setting-showdan"), this.showDanmakuToggle = this.container.querySelector(".dplayer-showdan-setting-input"), this.unlimitDanmaku = this.container.querySelector(".dplayer-setting-danunlimit"), this.unlimitDanmakuToggle = this.container.querySelector(".dplayer-danunlimit-setting-input"), this.speed = this.container.querySelector(".dplayer-setting-speed"), this.speedItem = this.container.querySelectorAll(".dplayer-setting-speed-item"), this.danmakuOpacityBar = this.container.querySelector(".dplayer-danmaku-bar-inner"), this.danmakuOpacityBarWrap = this.container.querySelector(".dplayer-danmaku-bar"), this.danmakuOpacityBarWrapWrap = this.container.querySelector(".dplayer-danmaku-bar-wrap"), this.danmakuOpacityBox = this.container.querySelector(".dplayer-setting-danmaku"), this.dtime = this.container.querySelector(".dplayer-dtime"), this.controller = this.container.querySelector(".dplayer-controller"), this.commentInput = this.container.querySelector(".dplayer-comment-input"), this.commentButton = this.container.querySelector(".dplayer-comment-icon"), this.commentSettingBox = this.container.querySelector(".dplayer-comment-setting-box"), this.commentSettingButton = this.container.querySelector(".dplayer-comment-setting-icon"), this.commentSettingFill = this.container.querySelector(".dplayer-comment-setting-icon path"), this.commentSendButton = this.container.querySelector(".dplayer-send-icon"), this.commentSendFill = this.container.querySelector(".dplayer-send-icon path"), this.commentColorSettingBox = this.container.querySelector(".dplayer-comment-setting-color"), this.browserFullButton = this.container.querySelector(".dplayer-full-icon"), this.webFullButton = this.container.querySelector(".dplayer-full-in-icon"), this.menu = this.container.querySelector(".dplayer-menu"), this.menuItem = this.container.querySelectorAll(".dplayer-menu-item"), this.qualityList = this.container.querySelector(".dplayer-quality-list"), this.camareButton = this.container.querySelector(".dplayer-camera-icon"), this.subtitleButton = this.container.querySelector(".dplayer-subtitle-icon"), this.subtitleButtonInner = this.container.querySelector(".dplayer-subtitle-icon .dplayer-icon-content"), this.subtitle = this.container.querySelector(".dplayer-subtitle"), this.qualityButton = this.container.querySelector(".dplayer-quality-icon"), this.barPreview = this.container.querySelector(".dplayer-bar-preview"), this.barWrap = this.container.querySelector(".dplayer-bar-wrap"), this.notice = this.container.querySelector(".dplayer-notice"), this.infoPanel = this.container.querySelector(".dplayer-info-panel"), this.infoPanelClose = this.container.querySelector(".dplayer-info-panel-close"), this.infoVersion = this.container.querySelector(".dplayer-info-panel-item-version .dplayer-info-panel-item-data"), this.infoFPS = this.container.querySelector(".dplayer-info-panel-item-fps .dplayer-info-panel-item-data"), this.infoType = this.container.querySelector(".dplayer-info-panel-item-type .dplayer-info-panel-item-data"), this.infoUrl = this.container.querySelector(".dplayer-info-panel-item-url .dplayer-info-panel-item-data"), this.infoResolution = this.container.querySelector(".dplayer-info-panel-item-resolution .dplayer-info-panel-item-data"), this.infoDuration = this.container.querySelector(".dplayer-info-panel-item-duration .dplayer-info-panel-item-data"), this.infoDanmakuId = this.container.querySelector(".dplayer-info-panel-item-danmaku-id .dplayer-info-panel-item-data"), this.infoDanmakuApi = this.container.querySelector(".dplayer-info-panel-item-danmaku-api .dplayer-info-panel-item-data"), this.infoDanmakuAmount = this.container.querySelector(".dplayer-info-panel-item-danmaku-amount .dplayer-info-panel-item-data") |
| | | } |
| | | }]) && Q(t.prototype, a), n && Q(t, n), e |
| | | }(); |
| | | |
| | | function J(e) { |
| | | return (J = "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 |
| | | })(e) |
| | | } |
| | | |
| | | function K(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Z = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.options = t, this.container = this.options.container, this.danTunnel = { |
| | | right: {}, |
| | | top: {}, |
| | | bottom: {} |
| | | }, this.danIndex = 0, this.dan = [], this.showing = !0, this._opacity = this.options.opacity, this.events = this.options.events, this.unlimited = this.options.unlimited, this._measure(""), this.load() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "load", value: function () { |
| | | var e, t = this; |
| | | e = this.options.api.maximum ? "".concat(this.options.api.address, "v3/?id=").concat(this.options.api.id, "&max=").concat(this.options.api.maximum) : "".concat(this.options.api.address, "v3/?id=").concat(this.options.api.id); |
| | | var a = (this.options.api.addition || []).slice(0); |
| | | a.push(e), this.events && this.events.trigger("danmaku_load_start", a), this._readAllEndpoints(a, (function (e) { |
| | | t.dan = [].concat.apply([], e).sort((function (e, t) { |
| | | return e.time - t.time |
| | | })), window.requestAnimationFrame((function () { |
| | | t.frame() |
| | | })), t.options.callback(), t.events && t.events.trigger("danmaku_load_end") |
| | | })) |
| | | } |
| | | }, { |
| | | key: "reload", value: function (e) { |
| | | this.options.api = e, this.dan = [], this.clear(), this.load() |
| | | } |
| | | }, { |
| | | key: "_readAllEndpoints", value: function (e, t) { |
| | | for (var a = this, n = [], o = 0, r = function (r) { |
| | | a.options.apiBackend.read({ |
| | | url: e[r], success: function (a) { |
| | | n[r] = a, ++o === e.length && t(n) |
| | | }, error: function (i) { |
| | | a.options.error(i || a.options.tran("Danmaku load failed")), n[r] = [], ++o === e.length && t(n) |
| | | } |
| | | }) |
| | | }, i = 0; i < e.length; ++i) r(i) |
| | | } |
| | | }, { |
| | | key: "send", value: function (e, t) { |
| | | var a = this, |
| | | n = { |
| | | token: this.options.api.token, |
| | | id: this.options.api.id, |
| | | author: this.options.api.user, |
| | | time: this.options.time(), |
| | | text: e.text, |
| | | color: e.color, |
| | | type: e.type |
| | | }; |
| | | this.options.apiBackend.send({ |
| | | url: this.options.api.address + "v3/", |
| | | data: n, |
| | | success: t, |
| | | error: function (e) { |
| | | a.options.error(e || a.options.tran("Danmaku send failed")) |
| | | } |
| | | }), this.dan.splice(this.danIndex, 0, n), this.danIndex++; |
| | | var o = { |
| | | text: this.htmlEncode(n.text), |
| | | color: n.color, |
| | | type: n.type, |
| | | border: "2px solid ".concat(this.options.borderColor) |
| | | }; |
| | | this.draw(o), this.events && this.events.trigger("danmaku_send", n) |
| | | } |
| | | }, { |
| | | key: "frame", value: function () { |
| | | var e = this; |
| | | if (this.dan.length && !this.paused && this.showing) { |
| | | for (var t = this.dan[this.danIndex], a = []; t && this.options.time() > parseFloat(t.time);) a.push(t), t = this.dan[++this.danIndex]; |
| | | this.draw(a) |
| | | } |
| | | window.requestAnimationFrame((function () { |
| | | e.frame() |
| | | })) |
| | | } |
| | | }, { |
| | | key: "opacity", value: function (e) { |
| | | if (void 0 !== e) { |
| | | for (var t = this.container.getElementsByClassName("dplayer-danmaku-item"), a = 0; a < t.length; a++) t[a].style.opacity = e; |
| | | this._opacity = e, this.events && this.events.trigger("danmaku_opacity", this._opacity) |
| | | } |
| | | return this._opacity |
| | | } |
| | | }, { |
| | | key: "draw", value: function (e) { |
| | | var t = this; |
| | | if (this.showing) { |
| | | var a = this.options.height, |
| | | n = this.container.offsetWidth, |
| | | o = this.container.offsetHeight, |
| | | i = parseInt(o / a), |
| | | l = function (e) { |
| | | var a = e.offsetWidth || parseInt(e.style.width), |
| | | n = e.getBoundingClientRect().right || t.container.getBoundingClientRect().right + a; |
| | | return t.container.getBoundingClientRect().right - n |
| | | }, |
| | | s = function (e) { |
| | | return (n + e) / 5 |
| | | }, |
| | | d = function (e, a, o) { |
| | | for (var r = n / s(o), d = function (o) { |
| | | var d = t.danTunnel[a][o + ""]; |
| | | if (!d || !d.length) return t.danTunnel[a][o + ""] = [e], e.addEventListener("animationend", (function () { |
| | | t.danTunnel[a][o + ""].splice(0, 1) |
| | | })), {v: o % i}; |
| | | if ("right" !== a) return "continue"; |
| | | for (var p = 0; p < d.length; p++) { |
| | | var c = l(d[p]) - 10; |
| | | if (c <= n - r * s(parseInt(d[p].style.width)) || c <= 0) break; |
| | | if (p === d.length - 1) return t.danTunnel[a][o + ""].push(e), e.addEventListener("animationend", (function () { |
| | | t.danTunnel[a][o + ""].splice(0, 1) |
| | | })), {v: o % i} |
| | | } |
| | | }, p = 0; t.unlimited || p < i; p++) { |
| | | var c = d(p); |
| | | switch (c) { |
| | | case "continue": |
| | | continue; |
| | | default: |
| | | if ("object" === J(c)) return c.v |
| | | } |
| | | } |
| | | return -1 |
| | | }; |
| | | "[object Array]" !== Object.prototype.toString.call(e) && (e = [e]); |
| | | for (var p = document.createDocumentFragment(), c = function (o) { |
| | | e[o].type = r.number2Type(e[o].type), e[o].color || (e[o].color = 16777215); |
| | | var i = document.createElement("div"); |
| | | i.classList.add("dplayer-danmaku-item"), i.classList.add("dplayer-danmaku-".concat(e[o].type)), e[o].border ? i.innerHTML = '<span style="border:'.concat(e[o].border, '">').concat(e[o].text, "</span>") : i.innerHTML = e[o].text, i.style.opacity = t._opacity, i.style.color = r.number2Color(e[o].color), i.addEventListener("animationend", (function () { |
| | | t.container.removeChild(i) |
| | | })); |
| | | var l = t._measure(e[o].text), |
| | | s = void 0; |
| | | switch (e[o].type) { |
| | | case "right": |
| | | (s = d(i, e[o].type, l)) >= 0 && (i.style.width = l + 1 + "px", i.style.top = a * s + "px", i.style.transform = "translateX(-".concat(n, "px)")); |
| | | break; |
| | | case "top": |
| | | (s = d(i, e[o].type)) >= 0 && (i.style.top = a * s + "px"); |
| | | break; |
| | | case "bottom": |
| | | (s = d(i, e[o].type)) >= 0 && (i.style.bottom = a * s + "px"); |
| | | break; |
| | | default: |
| | | console.error("Can't handled danmaku type: ".concat(e[o].type)) |
| | | } |
| | | s >= 0 && (i.classList.add("dplayer-danmaku-move"), p.appendChild(i)) |
| | | }, u = 0; u < e.length; u++) c(u); |
| | | return this.container.appendChild(p), p |
| | | } |
| | | } |
| | | }, { |
| | | key: "play", value: function () { |
| | | this.paused = !1 |
| | | } |
| | | }, { |
| | | key: "pause", value: function () { |
| | | this.paused = !0 |
| | | } |
| | | }, { |
| | | key: "_measure", value: function (e) { |
| | | if (!this.context) { |
| | | var t = getComputedStyle(this.container.getElementsByClassName("dplayer-danmaku-item")[0], null); |
| | | this.context = document.createElement("canvas").getContext("2d"), this.context.font = t.getPropertyValue("font") |
| | | } |
| | | return this.context.measureText(e).width |
| | | } |
| | | }, { |
| | | key: "seek", value: function () { |
| | | this.clear(); |
| | | for (var e = 0; e < this.dan.length; e++) { |
| | | if (this.dan[e].time >= this.options.time()) { |
| | | this.danIndex = e; |
| | | break |
| | | } |
| | | this.danIndex = this.dan.length |
| | | } |
| | | } |
| | | }, { |
| | | key: "clear", value: function () { |
| | | this.danTunnel = { |
| | | right: {}, |
| | | top: {}, |
| | | bottom: {} |
| | | }, this.danIndex = 0, this.options.container.innerHTML = "", this.events && this.events.trigger("danmaku_clear") |
| | | } |
| | | }, { |
| | | key: "htmlEncode", value: function (e) { |
| | | return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/") |
| | | } |
| | | }, { |
| | | key: "resize", value: function () { |
| | | for (var e = this.container.offsetWidth, t = this.container.getElementsByClassName("dplayer-danmaku-item"), a = 0; a < t.length; a++) t[a].style.transform = "translateX(-".concat(e, "px)") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.showing = !1, this.pause(), this.clear(), this.events && this.events.trigger("danmaku_hide") |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.seek(), this.showing = !0, this.play(), this.events && this.events.trigger("danmaku_show") |
| | | } |
| | | }, { |
| | | key: "unlimit", value: function (e) { |
| | | this.unlimited = e |
| | | } |
| | | }]) && K(t.prototype, a), n && K(t, n), e |
| | | }(); |
| | | |
| | | function G(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ee = function () { |
| | | function e() { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.events = {}, this.videoEvents = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "mozaudioavailable", "pause", "play", "playing", "progress", "ratechange", "seeked", "seeking", "stalled", "suspend", "timeupdate", "volumechange", "waiting"], this.playerEvents = ["screenshot", "thumbnails_show", "thumbnails_hide", "danmaku_show", "danmaku_hide", "danmaku_clear", "danmaku_loaded", "danmaku_send", "danmaku_opacity", "contextmenu_show", "contextmenu_hide", "notice_show", "notice_hide", "quality_start", "quality_end", "destroy", "resize", "fullscreen", "fullscreen_cancel", "webfullscreen", "webfullscreen_cancel", "subtitle_show", "subtitle_hide", "subtitle_change"] |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "on", value: function (e, t) { |
| | | this.type(e) && "function" == typeof t && (this.events[e] || (this.events[e] = []), this.events[e].push(t)) |
| | | } |
| | | }, { |
| | | key: "trigger", value: function (e, t) { |
| | | if (this.events[e] && this.events[e].length) |
| | | for (var a = 0; a < this.events[e].length; a++) this.events[e][a](t) |
| | | } |
| | | }, { |
| | | key: "type", value: function (e) { |
| | | return -1 !== this.playerEvents.indexOf(e) ? "player" : -1 !== this.videoEvents.indexOf(e) ? "video" : (console.error("Unknown event name: ".concat(e)), null) |
| | | } |
| | | }]) && G(t.prototype, a), n && G(t, n), e |
| | | }(); |
| | | |
| | | function te(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ae = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.lastScrollPosition = { |
| | | left: 0, |
| | | top: 0 |
| | | }, this.player.events.on("webfullscreen", (function () { |
| | | a.player.resize() |
| | | })), this.player.events.on("webfullscreen_cancel", (function () { |
| | | a.player.resize(), r.setScrollPosition(a.lastScrollPosition) |
| | | })); |
| | | var n = function () { |
| | | a.player.resize(), a.isFullScreen("browser") ? a.player.events.trigger("fullscreen") : (r.setScrollPosition(a.lastScrollPosition), a.player.events.trigger("fullscreen_cancel")) |
| | | }, |
| | | o = function () { |
| | | var e = document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement; |
| | | e && e !== a.player.container || (a.player.resize(), e ? a.player.events.trigger("fullscreen") : (r.setScrollPosition(a.lastScrollPosition), a.player.events.trigger("fullscreen_cancel"))) |
| | | }; |
| | | /Firefox/.test(navigator.userAgent) ? (document.addEventListener("mozfullscreenchange", o), document.addEventListener("fullscreenchange", o)) : (this.player.container.addEventListener("fullscreenchange", n), this.player.container.addEventListener("webkitfullscreenchange", n), document.addEventListener("msfullscreenchange", o), document.addEventListener("MSFullscreenChange", o)) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "isFullScreen", value: function () { |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser"; |
| | | switch (e) { |
| | | case "browser": |
| | | return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; |
| | | case "web": |
| | | return this.player.container.classList.contains("dplayer-fulled") |
| | | } |
| | | } |
| | | }, { |
| | | key: "request", value: function () { |
| | | // debugger |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser", |
| | | t = "browser" === e ? "web" : "browser", |
| | | a = this.isFullScreen(t); |
| | | // switch (a || (this.lastScrollPosition = r.getScrollPosition()), e) { |
| | | // case "browser": |
| | | // this.player.container.requestFullscreen ? this.player.container.requestFullscreen() : this.player.container.mozRequestFullScreen ? this.player.container.mozRequestFullScreen() : this.player.container.webkitRequestFullscreen ? this.player.container.webkitRequestFullscreen() : this.player.video.webkitEnterFullscreen ? this.player.video.webkitEnterFullscreen() : this.player.video.webkitEnterFullScreen ? this.player.video.webkitEnterFullScreen() : this.player.container.msRequestFullscreen && this.player.container.msRequestFullscreen(); |
| | | // break; |
| | | // case "web": |
| | | // this.player.container.classList.add("dplayer-fulled"), document.body.classList.add("dplayer-web-fullscreen-fix"), this.player.events.trigger("webfullscreen") |
| | | // } |
| | | this.player.events.trigger("fullscreen") |
| | | a && this.cancel(t) |
| | | } |
| | | }, { |
| | | key: "cancel", value: function () { |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser"; |
| | | switch (e) { |
| | | case "browser": |
| | | document.cancelFullScreen ? document.cancelFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.webkitCancelFullscreen ? document.webkitCancelFullscreen() : document.msCancelFullScreen ? document.msCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(); |
| | | break; |
| | | case "web": |
| | | this.player.container.classList.remove("dplayer-fulled"), document.body.classList.remove("dplayer-web-fullscreen-fix"), this.player.events.trigger("webfullscreen_cancel") |
| | | } |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser"; |
| | | this.isFullScreen(e) ? this.cancel(e) : this.request(e) |
| | | } |
| | | }]) && te(t.prototype, a), n && te(t, n), e |
| | | }(); |
| | | |
| | | function ne(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var oe = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.storageName = { |
| | | opacity: "dplayer-danmaku-opacity", |
| | | volume: "dplayer-volume", |
| | | unlimited: "dplayer-danmaku-unlimited", |
| | | danmaku: "dplayer-danmaku-show", |
| | | subtitle: "dplayer-subtitle-show" |
| | | }, this.default = { |
| | | opacity: .7, |
| | | volume: t.options.hasOwnProperty("volume") ? t.options.volume : .7, |
| | | unlimited: (t.options.danmaku && t.options.danmaku.unlimited ? 1 : 0) || 0, |
| | | danmaku: 1, |
| | | subtitle: 1 |
| | | }, this.data = {}, this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | for (var e in this.storageName) { |
| | | var t = this.storageName[e]; |
| | | this.data[e] = parseFloat(r.storage.get(t) || this.default[e]) |
| | | } |
| | | } |
| | | }, { |
| | | key: "get", value: function (e) { |
| | | return this.data[e] |
| | | } |
| | | }, { |
| | | key: "set", value: function (e, t) { |
| | | this.data[e] = t, r.storage.set(this.storageName[e], t) |
| | | } |
| | | }]) && ne(t.prototype, a), n && ne(t, n), e |
| | | }(); |
| | | |
| | | function re(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ie = function () { |
| | | function e(t, a, n, o) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t, this.video = a, this.options = n, this.events = o, this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | var e = this; |
| | | if (this.container.style.fontSize = this.options.fontSize, this.container.style.bottom = this.options.bottom, this.container.style.color = this.options.color, this.video.textTracks && this.video.textTracks[0]) { |
| | | var t = this.video.textTracks[0]; |
| | | t.oncuechange = function () { |
| | | var a = t.activeCues[0]; |
| | | if (e.container.innerHTML = "", a) { |
| | | var n = document.createElement("div"); |
| | | n.appendChild(a.getCueAsHTML()); |
| | | var o = n.innerHTML.split(/\r?\n/).map((function (e) { |
| | | return "<p>".concat(e, "</p>") |
| | | })).join(""); |
| | | e.container.innerHTML = o |
| | | } |
| | | e.events.trigger("subtitle_change") |
| | | } |
| | | } |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.container.classList.remove("dplayer-subtitle-hide"), this.events.trigger("subtitle_show") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.container.classList.add("dplayer-subtitle-hide"), this.events.trigger("subtitle_hide") |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | this.container.classList.contains("dplayer-subtitle-hide") ? this.show() : this.hide() |
| | | } |
| | | }]) && re(t.prototype, a), n && re(t, n), e |
| | | }(); |
| | | |
| | | function le(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var se = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.elements = {}, this.elements.volume = t.volumeBar, this.elements.played = t.playedBar, this.elements.loaded = t.loadedBar, this.elements.danmaku = t.danmakuOpacityBar |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "set", value: function (e, t, a) { |
| | | t = Math.max(t, 0), t = Math.min(t, 1), this.elements[e].style[a] = 100 * t + "%" |
| | | } |
| | | }, { |
| | | key: "get", value: function (e) { |
| | | return parseFloat(this.elements[e].style.width) / 100 |
| | | } |
| | | }]) && le(t.prototype, a), n && le(t, n), e |
| | | }(); |
| | | |
| | | function de(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var pe = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { |
| | | window.setTimeout(e, 1e3 / 60) |
| | | }, this.types = ["loading", "info", "fps"], this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | var e = this; |
| | | this.types.map((function (t) { |
| | | return "fps" !== t && e["init".concat(t, "Checker")](), t |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initloadingChecker", value: function () { |
| | | var e = this, |
| | | t = 0, |
| | | a = 0, |
| | | n = !1; |
| | | this.loadingChecker = setInterval((function () { |
| | | e.enableloadingChecker && (a = e.player.video.currentTime, n || a !== t || e.player.video.paused || (e.player.container.classList.add("dplayer-loading"), n = !0), n && a > t && !e.player.video.paused && (e.player.container.classList.remove("dplayer-loading"), n = !1), t = a) |
| | | }), 100) |
| | | } |
| | | }, { |
| | | key: "initfpsChecker", value: function () { |
| | | var e = this; |
| | | window.requestAnimationFrame((function () { |
| | | if (e.enablefpsChecker) |
| | | if (e.initfpsChecker(), e.fpsStart) { |
| | | e.fpsIndex++; |
| | | var t = new Date; |
| | | t - e.fpsStart > 1e3 && (e.player.infoPanel.fps(e.fpsIndex / (t - e.fpsStart) * 1e3), e.fpsStart = new Date, e.fpsIndex = 0) |
| | | } else e.fpsStart = new Date, e.fpsIndex = 0; |
| | | else e.fpsStart = 0, e.fpsIndex = 0 |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initinfoChecker", value: function () { |
| | | var e = this; |
| | | this.infoChecker = setInterval((function () { |
| | | e.enableinfoChecker && e.player.infoPanel.update() |
| | | }), 1e3) |
| | | } |
| | | }, { |
| | | key: "enable", value: function (e) { |
| | | this["enable".concat(e, "Checker")] = !0, "fps" === e && this.initfpsChecker() |
| | | } |
| | | }, { |
| | | key: "disable", value: function (e) { |
| | | this["enable".concat(e, "Checker")] = !1 |
| | | } |
| | | }, { |
| | | key: "destroy", value: function () { |
| | | var e = this; |
| | | this.types.map((function (t) { |
| | | return e["enable".concat(t, "Checker")] = !1, e["".concat(t, "Checker")] && clearInterval(e["".concat(t, "Checker")]), t |
| | | })) |
| | | } |
| | | }]) && de(t.prototype, a), n && de(t, n), e |
| | | }(); |
| | | |
| | | function ce(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ue = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t, this.container.addEventListener("animationend", (function () { |
| | | a.container.classList.remove("dplayer-bezel-transition") |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "switch", value: function (e) { |
| | | this.container.innerHTML = e, this.container.classList.add("dplayer-bezel-transition") |
| | | } |
| | | }]) && ce(t.prototype, a), n && ce(t, n), e |
| | | }(); |
| | | |
| | | function ye(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var he = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t.container, this.barWidth = t.barWidth, this.container.style.backgroundImage = "url('".concat(t.url, "')"), this.events = t.events |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "resize", value: function (e, t, a) { |
| | | this.container.style.width = "".concat(e, "px"), this.container.style.height = "".concat(t, "px"), this.container.style.top = "".concat(2 - t, "px"), this.barWidth = a |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.container.style.display = "block", this.events && this.events.trigger("thumbnails_show") |
| | | } |
| | | }, { |
| | | key: "move", value: function (e) { |
| | | this.container.style.backgroundPosition = "-".concat(160 * (Math.ceil(e / this.barWidth * 100) - 1), "px 0"), this.container.style.left = "".concat(Math.min(Math.max(e - this.container.offsetWidth / 2, -10), this.barWidth - 150), "px") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.container.style.display = "none", this.events && this.events.trigger("thumbnails_hide") |
| | | } |
| | | }]) && ye(t.prototype, a), n && ye(t, n), e |
| | | }(); |
| | | |
| | | function me(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var fe = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.autoHideTimer = 0, r.isMobile || (this.player.container.addEventListener("mousemove", (function () { |
| | | a.setAutoHide() |
| | | })), this.player.container.addEventListener("click", (function () { |
| | | a.setAutoHide() |
| | | })), this.player.on("play", (function () { |
| | | a.setAutoHide() |
| | | })), this.player.on("pause", (function () { |
| | | a.setAutoHide() |
| | | }))), this.initPlayButton(), this.initThumbnails(), this.initPlayedBar(), this.initFullButton(), this.initQualityButton(), this.initScreenshotButton(), this.initSubtitleButton(), this.initHighlights(), r.isMobile || this.initVolumeButton() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "initPlayButton", value: function () { |
| | | var e = this; |
| | | this.player.template.playButton.addEventListener("click", (function () { |
| | | e.player.toggle() |
| | | })), r.isMobile ? (this.player.template.videoWrap.addEventListener("click", (function () { |
| | | e.toggle() |
| | | })), this.player.template.controllerMask.addEventListener("click", (function () { |
| | | e.toggle() |
| | | }))) : (this.player.template.videoWrap.addEventListener("click", (function () { |
| | | // debugger |
| | | if(e.player.paused){ |
| | | // e.player.toggle() |
| | | } |
| | | })), this.player.template.controllerMask.addEventListener("click", (function () { |
| | | // debugger |
| | | // e.player.toggle() |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "initHighlights", value: function () { |
| | | var e = this; |
| | | this.player.on("durationchange", (function () { |
| | | if (1 !== e.player.video.duration && e.player.video.duration !== 1 / 0 && e.player.options.highlight) { |
| | | var t = document.querySelectorAll(".dplayer-highlight"); |
| | | [].slice.call(t, 0).forEach((function (t) { |
| | | e.player.template.playedBarWrap.removeChild(t) |
| | | })); |
| | | for (var a = 0; a < e.player.options.highlight.length; a++) |
| | | if (e.player.options.highlight[a].text && e.player.options.highlight[a].time) { |
| | | var n = document.createElement("div"); |
| | | n.classList.add("dplayer-highlight"), n.style.left = e.player.options.highlight[a].time / e.player.video.duration * 100 + "%", n.innerHTML = '<span class="dplayer-highlight-text">' + e.player.options.highlight[a].text + "</span>", e.player.template.playedBarWrap.insertBefore(n, e.player.template.playedBarTime) |
| | | } |
| | | } |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initThumbnails", value: function () { |
| | | var e = this; |
| | | this.player.options.video.thumbnails && (this.thumbnails = new he({ |
| | | container: this.player.template.barPreview, |
| | | barWidth: this.player.template.barWrap.offsetWidth, |
| | | url: this.player.options.video.thumbnails, |
| | | events: this.player.events |
| | | }), this.player.on("loadedmetadata", (function () { |
| | | e.thumbnails.resize(160, e.player.video.videoHeight / e.player.video.videoWidth * 160, e.player.template.barWrap.offsetWidth) |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "initPlayedBar", value: function () { |
| | | var e = this, |
| | | t = function (t) { |
| | | var a = ((t.clientX || t.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.playedBarWrap)) / e.player.template.playedBarWrap.clientWidth; |
| | | a = Math.max(a, 0), a = Math.min(a, 1), e.player.bar.set("played", a, "width"), e.player.template.ptime.innerHTML = r.secondToTime(a * e.player.video.duration) |
| | | }, |
| | | a = function a(n) { |
| | | document.removeEventListener(r.nameMap.dragEnd, a), document.removeEventListener(r.nameMap.dragMove, t); |
| | | var o = ((n.clientX || n.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.playedBarWrap)) / e.player.template.playedBarWrap.clientWidth; |
| | | o = Math.max(o, 0), o = Math.min(o, 1), e.player.bar.set("played", o, "width"), e.player.seek(e.player.bar.get("played") * e.player.video.duration), e.player.timer.enable("progress") |
| | | }; |
| | | this.player.template.playedBarWrap.addEventListener(r.nameMap.dragStart, (function () { |
| | | e.player.timer.disable("progress"), document.addEventListener(r.nameMap.dragMove, t), document.addEventListener(r.nameMap.dragEnd, a) |
| | | })), this.player.template.playedBarWrap.addEventListener(r.nameMap.dragMove, (function (t) { |
| | | if (e.player.video.duration) { |
| | | var a = r.cumulativeOffset(e.player.template.playedBarWrap).left, |
| | | n = (t.clientX || t.changedTouches[0].clientX) - a; |
| | | if (n < 0 || n > e.player.template.playedBarWrap.offsetWidth) return; |
| | | var o = e.player.video.duration * (n / e.player.template.playedBarWrap.offsetWidth); |
| | | r.isMobile && e.thumbnails && e.thumbnails.show(), e.thumbnails && e.thumbnails.move(n), e.player.template.playedBarTime.style.left = "".concat(n - (o >= 3600 ? 25 : 20), "px"), e.player.template.playedBarTime.innerText = r.secondToTime(o), e.player.template.playedBarTime.classList.remove("hidden") |
| | | } |
| | | })), this.player.template.playedBarWrap.addEventListener(r.nameMap.dragEnd, (function () { |
| | | r.isMobile && e.thumbnails && e.thumbnails.hide() |
| | | })), r.isMobile || (this.player.template.playedBarWrap.addEventListener("mouseenter", (function () { |
| | | e.player.video.duration && (e.thumbnails && e.thumbnails.show(), e.player.template.playedBarTime.classList.remove("hidden")) |
| | | })), this.player.template.playedBarWrap.addEventListener("mouseleave", (function () { |
| | | e.player.video.duration && (e.thumbnails && e.thumbnails.hide(), e.player.template.playedBarTime.classList.add("hidden")) |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "initFullButton", value: function () { |
| | | var e = this; |
| | | this.player.template.browserFullButton.addEventListener("click", (function () { |
| | | e.player.fullScreen.toggle("browser") |
| | | })) |
| | | // this.player.template.browserFullButton.addEventListener("click", (function () { |
| | | // e.player.fullScreen.toggle("browser") |
| | | // })), this.player.template.webFullButton.addEventListener("click", (function () { |
| | | // e.player.fullScreen.toggle("web") |
| | | // })) |
| | | } |
| | | }, { |
| | | key: "initVolumeButton", value: function () { |
| | | var e = this, |
| | | t = function (t) { |
| | | var a = t || window.event, |
| | | n = ((a.clientX || a.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap) - 5.5) / 35; |
| | | e.player.volume(n) |
| | | }, |
| | | a = function a() { |
| | | document.removeEventListener(r.nameMap.dragEnd, a), document.removeEventListener(r.nameMap.dragMove, t), e.player.template.volumeButton.classList.remove("dplayer-volume-active") |
| | | }; |
| | | this.player.template.volumeBarWrapWrap.addEventListener("click", (function (t) { |
| | | var a = t || window.event, |
| | | n = ((a.clientX || a.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap) - 5.5) / 35; |
| | | e.player.volume(n) |
| | | })), this.player.template.volumeBarWrapWrap.addEventListener(r.nameMap.dragStart, (function () { |
| | | document.addEventListener(r.nameMap.dragMove, t), document.addEventListener(r.nameMap.dragEnd, a), e.player.template.volumeButton.classList.add("dplayer-volume-active") |
| | | })), this.player.template.volumeButtonIcon.addEventListener("click", (function () { |
| | | e.player.video.muted ? (e.player.video.muted = !1, e.player.switchVolumeIcon(), e.player.bar.set("volume", e.player.volume(), "width")) : (e.player.video.muted = !0, e.player.template.volumeIcon.innerHTML = U.volumeOff, e.player.bar.set("volume", 0, "width")) |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initQualityButton", value: function () { |
| | | var e = this; |
| | | this.player.options.video.quality && this.player.template.qualityList.addEventListener("click", (function (t) { |
| | | t.target.classList.contains("dplayer-quality-item") && e.player.switchQuality(t.target.dataset.index) |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initScreenshotButton", value: function () { |
| | | var e = this; |
| | | this.player.options.screenshot && this.player.template.camareButton.addEventListener("click", (function () { |
| | | var t, a = document.createElement("canvas"),f = e; |
| | | a.width = e.player.video.videoWidth, a.height = e.player.video.videoHeight, a.getContext("2d").drawImage(e.player.video, 0, 0, a.width, a.height), a.toBlob((function (e) { |
| | | t = URL.createObjectURL(e); |
| | | var a = document.createElement("a"); |
| | | var time = new Date(); |
| | | var timestr = time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate() + '-' + time.getHours() + '-' + time.getMinutes() + '-' + time.getSeconds(); |
| | | var fileName = ''; |
| | | if(f.player.options.liveText){ |
| | | fileName = f.player.options.liveText + '-'; |
| | | } |
| | | a.href = t, a.download = fileName + timestr + ".png", a.style.display = "none", document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(t) |
| | | })), e.player.events.trigger("screenshot", t) |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initSubtitleButton", value: function () { |
| | | var e = this; |
| | | this.player.options.subtitle && (this.player.events.on("subtitle_show", (function () { |
| | | e.player.template.subtitleButton.dataset.balloon = e.player.tran("Hide subtitle"), e.player.template.subtitleButtonInner.style.opacity = "", e.player.user.set("subtitle", 1) |
| | | })), this.player.events.on("subtitle_hide", (function () { |
| | | e.player.template.subtitleButton.dataset.balloon = e.player.tran("Show subtitle"), e.player.template.subtitleButtonInner.style.opacity = "0.4", e.player.user.set("subtitle", 0) |
| | | })), this.player.template.subtitleButton.addEventListener("click", (function () { |
| | | e.player.subtitle.toggle() |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "setAutoHide", value: function () { |
| | | var e = this; |
| | | this.show(), clearTimeout(this.autoHideTimer), this.autoHideTimer = setTimeout((function () { |
| | | !e.player.video.played.length || e.player.paused || e.disableAutoHide || e.hide() |
| | | }), 3e3) |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.player.container.classList.remove("dplayer-hide-controller") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.container.classList.add("dplayer-hide-controller"), this.player.setting.hide(), this.player.comment && this.player.comment.hide() |
| | | } |
| | | }, { |
| | | key: "isShow", value: function () { |
| | | return !this.player.container.classList.contains("dplayer-hide-controller") |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | this.isShow() ? this.hide() : this.show() |
| | | } |
| | | }, { |
| | | key: "destroy", value: function () { |
| | | clearTimeout(this.autoHideTimer) |
| | | } |
| | | }]) && me(t.prototype, a), n && me(t, n), e |
| | | }(); |
| | | |
| | | function ve(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var be = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.player.template.mask.addEventListener("click", (function () { |
| | | a.hide() |
| | | })), this.player.template.settingButton.addEventListener("click", (function () { |
| | | a.show() |
| | | })), this.loop = this.player.options.loop, this.player.template.loopToggle.checked = this.loop, this.player.template.loop.addEventListener("click", (function () { |
| | | a.player.template.loopToggle.checked = !a.player.template.loopToggle.checked, a.player.template.loopToggle.checked ? a.loop = !0 : a.loop = !1, a.hide() |
| | | })), this.showDanmaku = this.player.user.get("danmaku"), this.showDanmaku || this.player.danmaku && this.player.danmaku.hide(), this.player.template.showDanmakuToggle.checked = this.showDanmaku, this.player.template.showDanmaku.addEventListener("click", (function () { |
| | | a.player.template.showDanmakuToggle.checked = !a.player.template.showDanmakuToggle.checked, a.player.template.showDanmakuToggle.checked ? (a.showDanmaku = !0, a.player.danmaku.show()) : (a.showDanmaku = !1, a.player.danmaku.hide()), a.player.user.set("danmaku", a.showDanmaku ? 1 : 0), a.hide() |
| | | })), this.unlimitDanmaku = this.player.user.get("unlimited"), this.player.template.unlimitDanmakuToggle.checked = this.unlimitDanmaku, this.player.template.unlimitDanmaku.addEventListener("click", (function () { |
| | | a.player.template.unlimitDanmakuToggle.checked = !a.player.template.unlimitDanmakuToggle.checked, a.player.template.unlimitDanmakuToggle.checked ? (a.unlimitDanmaku = !0, a.player.danmaku.unlimit(!0)) : (a.unlimitDanmaku = !1, a.player.danmaku.unlimit(!1)), a.player.user.set("unlimited", a.unlimitDanmaku ? 1 : 0), a.hide() |
| | | })), this.player.template.speed.addEventListener("click", (function () { |
| | | a.player.template.settingBox.classList.add("dplayer-setting-box-narrow"), a.player.template.settingBox.classList.add("dplayer-setting-box-speed") |
| | | })); |
| | | for (var n = function (e) { |
| | | a.player.template.speedItem[e].addEventListener("click", (function () { |
| | | a.player.speed(a.player.template.speedItem[e].dataset.speed), a.hide() |
| | | })) |
| | | }, o = 0; o < this.player.template.speedItem.length; o++) n(o); |
| | | if (this.player.danmaku) { |
| | | this.player.on("danmaku_opacity", (function (e) { |
| | | a.player.bar.set("danmaku", e, "width"), a.player.user.set("opacity", e) |
| | | })), this.player.danmaku.opacity(this.player.user.get("opacity")); |
| | | var i = function (e) { |
| | | var t = e || window.event, |
| | | n = ((t.clientX || t.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(a.player.template.danmakuOpacityBarWrap)) / 130; |
| | | n = Math.max(n, 0), n = Math.min(n, 1), a.player.danmaku.opacity(n) |
| | | }, |
| | | l = function e() { |
| | | document.removeEventListener(r.nameMap.dragEnd, e), document.removeEventListener(r.nameMap.dragMove, i), a.player.template.danmakuOpacityBox.classList.remove("dplayer-setting-danmaku-active") |
| | | }; |
| | | this.player.template.danmakuOpacityBarWrapWrap.addEventListener("click", (function (e) { |
| | | var t = e || window.event, |
| | | n = ((t.clientX || t.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(a.player.template.danmakuOpacityBarWrap)) / 130; |
| | | n = Math.max(n, 0), n = Math.min(n, 1), a.player.danmaku.opacity(n) |
| | | })), this.player.template.danmakuOpacityBarWrapWrap.addEventListener(r.nameMap.dragStart, (function () { |
| | | document.addEventListener(r.nameMap.dragMove, i), document.addEventListener(r.nameMap.dragEnd, l), a.player.template.danmakuOpacityBox.classList.add("dplayer-setting-danmaku-active") |
| | | })) |
| | | } |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "hide", value: function () { |
| | | var e = this; |
| | | this.player.template.settingBox.classList.remove("dplayer-setting-box-open"), this.player.template.mask.classList.remove("dplayer-mask-show"), setTimeout((function () { |
| | | e.player.template.settingBox.classList.remove("dplayer-setting-box-narrow"), e.player.template.settingBox.classList.remove("dplayer-setting-box-speed") |
| | | }), 300), this.player.controller.disableAutoHide = !1 |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.player.template.settingBox.classList.add("dplayer-setting-box-open"), this.player.template.mask.classList.add("dplayer-mask-show"), this.player.controller.disableAutoHide = !0 |
| | | } |
| | | }]) && ve(t.prototype, a), n && ve(t, n), e |
| | | }(); |
| | | |
| | | function ge(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var we = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.player.template.mask.addEventListener("click", (function () { |
| | | a.hide() |
| | | })), this.player.template.commentButton.addEventListener("click", (function () { |
| | | a.show() |
| | | })), this.player.template.commentSettingButton.addEventListener("click", (function () { |
| | | a.toggleSetting() |
| | | })), this.player.template.commentColorSettingBox.addEventListener("click", (function () { |
| | | if (a.player.template.commentColorSettingBox.querySelector("input:checked+span")) { |
| | | var e = a.player.template.commentColorSettingBox.querySelector("input:checked").value; |
| | | a.player.template.commentSettingFill.style.fill = e, a.player.template.commentInput.style.color = e, a.player.template.commentSendFill.style.fill = e |
| | | } |
| | | })), this.player.template.commentInput.addEventListener("click", (function () { |
| | | a.hideSetting() |
| | | })), this.player.template.commentInput.addEventListener("keydown", (function (e) { |
| | | 13 === (e || window.event).keyCode && a.send() |
| | | })), this.player.template.commentSendButton.addEventListener("click", (function () { |
| | | a.send() |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "show", value: function () { |
| | | this.player.controller.disableAutoHide = !0, this.player.template.controller.classList.add("dplayer-controller-comment"), this.player.template.mask.classList.add("dplayer-mask-show"), this.player.container.classList.add("dplayer-show-controller"), this.player.template.commentInput.focus() |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.template.controller.classList.remove("dplayer-controller-comment"), this.player.template.mask.classList.remove("dplayer-mask-show"), this.player.container.classList.remove("dplayer-show-controller"), this.player.controller.disableAutoHide = !1, this.hideSetting() |
| | | } |
| | | }, { |
| | | key: "showSetting", value: function () { |
| | | this.player.template.commentSettingBox.classList.add("dplayer-comment-setting-open") |
| | | } |
| | | }, { |
| | | key: "hideSetting", value: function () { |
| | | this.player.template.commentSettingBox.classList.remove("dplayer-comment-setting-open") |
| | | } |
| | | }, { |
| | | key: "toggleSetting", value: function () { |
| | | this.player.template.commentSettingBox.classList.contains("dplayer-comment-setting-open") ? this.hideSetting() : this.showSetting() |
| | | } |
| | | }, { |
| | | key: "send", value: function () { |
| | | var e = this; |
| | | this.player.template.commentInput.blur(), this.player.template.commentInput.value.replace(/^\s+|\s+$/g, "") ? this.player.danmaku.send({ |
| | | text: this.player.template.commentInput.value, |
| | | color: r.color2Number(this.player.container.querySelector(".dplayer-comment-setting-color input:checked").value), |
| | | type: parseInt(this.player.container.querySelector(".dplayer-comment-setting-type input:checked").value) |
| | | }, (function () { |
| | | e.player.template.commentInput.value = "", e.hide() |
| | | })) : this.player.notice(this.player.tran("Please input danmaku content!")) |
| | | } |
| | | }]) && ge(t.prototype, a), n && ge(t, n), e |
| | | }(); |
| | | var xe = function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), t.options.hotkey && document.addEventListener("keydown", (function (e) { |
| | | if (t.focus) { |
| | | var a = document.activeElement.tagName.toUpperCase(), |
| | | n = document.activeElement.getAttribute("contenteditable"); |
| | | if ("INPUT" !== a && "TEXTAREA" !== a && "" !== n && "true" !== n) { |
| | | var o, r = e || window.event; |
| | | switch (r.keyCode) { |
| | | case 32: |
| | | r.preventDefault(), t.toggle(); |
| | | break; |
| | | case 37: |
| | | r.preventDefault(), t.seek(t.video.currentTime - 5), t.controller.setAutoHide(); |
| | | break; |
| | | case 39: |
| | | r.preventDefault(), t.seek(t.video.currentTime + 5), t.controller.setAutoHide(); |
| | | break; |
| | | case 38: |
| | | r.preventDefault(), o = t.volume() + .1, t.volume(o); |
| | | break; |
| | | case 40: |
| | | r.preventDefault(), o = t.volume() - .1, t.volume(o) |
| | | } |
| | | } |
| | | } |
| | | })), document.addEventListener("keydown", (function (e) { |
| | | switch ((e || window.event).keyCode) { |
| | | case 27: |
| | | t.fullScreen.isFullScreen("web") && t.fullScreen.cancel("web") |
| | | } |
| | | })) |
| | | }; |
| | | |
| | | function ke(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Se = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.shown = !1, Array.prototype.slice.call(this.player.template.menuItem).forEach((function (e, t) { |
| | | a.player.options.contextmenu[t].click && e.addEventListener("click", (function () { |
| | | a.player.options.contextmenu[t].click(a.player), a.hide() |
| | | })) |
| | | })), this.player.container.addEventListener("contextmenu", (function (e) { |
| | | if (a.shown){ |
| | | a.hide() |
| | | var t = window.event; |
| | | t.preventDefault(); |
| | | } else { |
| | | // var t = e || window.event; |
| | | var t = window.event; |
| | | t.preventDefault(); |
| | | // var n = a.player.container.getBoundingClientRect(); |
| | | // a.show(t.clientX - n.left, t.clientY - n.top), a.player.template.mask.addEventListener("click", (function () { |
| | | // a.hide() |
| | | // })) |
| | | a.show(t.clientX, t.clientY), a.player.template.mask.addEventListener("click", (function () { |
| | | a.hide() |
| | | })) |
| | | } |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "show", value: function (e, t) { |
| | | this.player.template.menu.classList.add("dplayer-menu-show"); |
| | | var a = {} |
| | | a.width = document.documentElement.clientWidth |
| | | a.height = document.documentElement.clientHeight |
| | | e + this.player.template.menu.offsetWidth >= a.width ? (this.player.template.menu.style.right = a.width - e + "px", this.player.template.menu.style.left = "initial") : (this.player.template.menu.style.left = e + "px", this.player.template.menu.style.right = "initial"), t + this.player.template.menu.offsetHeight >= a.height ? (this.player.template.menu.style.bottom = a.height - t + "px", this.player.template.menu.style.top = "initial") : (this.player.template.menu.style.top = t + "px", this.player.template.menu.style.bottom = "initial"), this.player.template.mask.classList.add("dplayer-mask-show"), this.shown = !0, this.player.events.trigger("contextmenu_show") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.template.mask.classList.remove("dplayer-mask-show"), this.player.template.menu.classList.remove("dplayer-menu-show"), this.shown = !1, this.player.events.trigger("contextmenu_hide") |
| | | } |
| | | }]) && ke(t.prototype, a), n && ke(t, n), e |
| | | }(); |
| | | |
| | | function Te(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Le = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t.template.infoPanel, this.template = t.template, this.video = t.video, this.player = t, this.template.infoPanelClose.addEventListener("click", (function () { |
| | | a.hide() |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "show", value: function () { |
| | | this.beginTime = Date.now(), this.update(), this.player.timer.enable("info"), this.player.timer.enable("fps"), this.container.classList.remove("dplayer-info-panel-hide") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.timer.disable("info"), this.player.timer.disable("fps"), this.container.classList.add("dplayer-info-panel-hide") |
| | | } |
| | | }, { |
| | | key: "triggle", value: function () { |
| | | this.container.classList.contains("dplayer-info-panel-hide") ? this.show() : this.hide() |
| | | } |
| | | }, { |
| | | key: "update", value: function () { |
| | | this.template.infoVersion.innerHTML = "v".concat("1.25.0", " ").concat("4ddc860"), this.template.infoType.innerHTML = this.player.type, this.template.infoUrl.innerHTML = this.player.options.video.url, this.template.infoResolution.innerHTML = "".concat(this.player.video.videoWidth, " x ").concat(this.player.video.videoHeight), this.template.infoDuration.innerHTML = this.player.video.duration, this.player.options.danmaku && (this.template.infoDanmakuId.innerHTML = this.player.options.danmaku.id, this.template.infoDanmakuApi.innerHTML = this.player.options.danmaku.api, this.template.infoDanmakuAmount.innerHTML = this.player.danmaku.dan.length) |
| | | } |
| | | }, { |
| | | key: "fps", value: function (e) { |
| | | this.template.infoFPS.innerHTML = "".concat(e.toFixed(1)) |
| | | } |
| | | }]) && Te(t.prototype, a), n && Te(t, n), e |
| | | }(), |
| | | Ee = a(1), |
| | | qe = a.n(Ee); |
| | | |
| | | function Be(e, t) { |
| | | var a = Object.keys(e); |
| | | if (Object.getOwnPropertySymbols) { |
| | | var n = Object.getOwnPropertySymbols(e); |
| | | t && (n = n.filter((function (t) { |
| | | return Object.getOwnPropertyDescriptor(e, t).enumerable |
| | | }))), a.push.apply(a, n) |
| | | } |
| | | return a |
| | | } |
| | | |
| | | function Me(e, t, a) { |
| | | return t in e ? Object.defineProperty(e, t, { |
| | | value: a, |
| | | enumerable: !0, |
| | | configurable: !0, |
| | | writable: !0 |
| | | }) : e[t] = a, e |
| | | } |
| | | |
| | | function ze(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Ce = 0, |
| | | Oe = [], |
| | | Fe = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.options = p(function (e) { |
| | | for (var t = 1; t < arguments.length; t++) { |
| | | var a = null != arguments[t] ? arguments[t] : {}; |
| | | t % 2 ? Be(a, !0).forEach((function (t) { |
| | | Me(e, t, a[t]) |
| | | })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : Be(a).forEach((function (t) { |
| | | Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(a, t)) |
| | | })) |
| | | } |
| | | return e |
| | | }({preload: "webtorrent" === t.video.type ? "none" : "metadata"}, t)), this.options.video.quality && (this.qualityIndex = this.options.video.defaultQuality, this.quality = this.options.video.quality[this.options.video.defaultQuality]), this.tran = new u(this.options.lang).tran, this.events = new ee, this.user = new oe(this), this.container = this.options.container, this.container.classList.add("dplayer"), this.options.danmaku || this.container.classList.add("dplayer-no-danmaku"), this.options.live && this.container.classList.add("dplayer-live"), r.isMobile && this.container.classList.add("dplayer-mobile"), this.arrow = this.container.offsetWidth <= 500, this.arrow && this.container.classList.add("dplayer-arrow"), this.template = new $({ |
| | | container: this.container, |
| | | options: this.options, |
| | | index: Ce, |
| | | tran: this.tran |
| | | }), this.video = this.template.video, this.bar = new se(this.template), this.bezel = new ue(this.template.bezel), this.fullScreen = new ae(this), this.controller = new fe(this), this.options.danmaku && (this.danmaku = new Z({ |
| | | container: this.template.danmaku, |
| | | opacity: this.user.get("opacity"), |
| | | callback: function () { |
| | | setTimeout((function () { |
| | | a.template.danmakuLoading.style.display = "none", a.options.autoplay && a.play() |
| | | }), 0) |
| | | }, |
| | | error: function (e) { |
| | | a.notice(e) |
| | | }, |
| | | apiBackend: this.options.apiBackend, |
| | | borderColor: this.options.theme, |
| | | height: this.arrow ? 24 : 30, |
| | | time: function () { |
| | | return a.video.currentTime |
| | | }, |
| | | unlimited: this.user.get("unlimited"), |
| | | api: { |
| | | id: this.options.danmaku.id, |
| | | address: this.options.danmaku.api, |
| | | token: this.options.danmaku.token, |
| | | maximum: this.options.danmaku.maximum, |
| | | addition: this.options.danmaku.addition, |
| | | user: this.options.danmaku.user |
| | | }, |
| | | events: this.events, |
| | | tran: function (e) { |
| | | return a.tran(e) |
| | | } |
| | | }), this.comment = new we(this)), this.setting = new be(this), this.plugins = {}, document.addEventListener("click", (function () { |
| | | a.focus = !1 |
| | | }), !0), this.container.addEventListener("click", (function () { |
| | | a.focus = !0 |
| | | }), !0), this.paused = !0, this.timer = new pe(this), this.hotkey = new xe(this), this.contextmenu = new Se(this), this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type), this.infoPanel = new Le(this), !this.danmaku && this.options.autoplay && this.play(), Ce++, Oe.push(this) |
| | | } |
| | | |
| | | var t, a, o; |
| | | return t = e, o = [{ |
| | | key: "version", get: function () { |
| | | return "1.25.0" |
| | | } |
| | | }], (a = [{ |
| | | key: "seek", value: function (e) { |
| | | e = Math.max(e, 0), this.video.duration && (e = Math.min(e, this.video.duration)), this.video.currentTime < e ? this.notice("".concat(this.tran("FF"), " ").concat((e - this.video.currentTime).toFixed(0), " ").concat(this.tran("s"))) : this.video.currentTime > e && this.notice("".concat(this.tran("REW"), " ").concat((this.video.currentTime - e).toFixed(1), " ").concat(this.tran("s"))), this.video.currentTime = e, this.danmaku && this.danmaku.seek(), this.bar.set("played", e / this.video.duration, "width"), this.template.ptime.innerHTML = r.secondToTime(e) |
| | | } |
| | | }, { |
| | | key: "play", value: function () { |
| | | var e = this; |
| | | if (this.paused = !1, this.video.paused && this.bezel.switch(U.play), this.template.playButton.innerHTML = U.pause, n.a.resolve(this.video.play()).catch((function () { |
| | | e.pause() |
| | | })).then((function () { |
| | | })), this.timer.enable("loading"), this.container.classList.remove("dplayer-paused"), this.container.classList.add("dplayer-playing"), this.danmaku && this.danmaku.play(), this.options.mutex) |
| | | for (var t = 0; t < Oe.length; t++) this !== Oe[t] && Oe[t].pause() |
| | | } |
| | | }, { |
| | | key: "pause", value: function () { |
| | | this.paused = !0, this.container.classList.remove("dplayer-loading"), this.video.paused || this.bezel.switch(U.pause), this.template.playButton.innerHTML = U.play, this.video.pause(), this.timer.disable("loading"), this.container.classList.remove("dplayer-playing"), this.container.classList.add("dplayer-paused"), this.danmaku && this.danmaku.pause() |
| | | } |
| | | }, { |
| | | key: "switchVolumeIcon", value: function () { |
| | | this.volume() >= .95 ? this.template.volumeIcon.innerHTML = U.volumeUp : this.volume() > 0 ? this.template.volumeIcon.innerHTML = U.volumeDown : this.template.volumeIcon.innerHTML = U.volumeOff |
| | | } |
| | | }, { |
| | | key: "volume", value: function (e, t, a) { |
| | | if (e = parseFloat(e), !isNaN(e)) { |
| | | e = Math.max(e, 0), e = Math.min(e, 1), this.bar.set("volume", e, "width"); |
| | | var n = "".concat((100 * e).toFixed(0), "%"); |
| | | this.template.volumeBarWrapWrap.dataset.balloon = n, t || this.user.set("volume", e), a || this.notice("".concat(this.tran("Volume"), " ").concat((100 * e).toFixed(0), "%")), this.video.volume = e, this.video.muted && (this.video.muted = !1), this.switchVolumeIcon() |
| | | } |
| | | return this.video.volume |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | this.video.paused ? this.play() : this.pause() |
| | | } |
| | | }, { |
| | | key: "on", value: function (e, t) { |
| | | this.events.on(e, t) |
| | | } |
| | | }, { |
| | | key: "switchVideo", value: function (e, t) { |
| | | this.pause(), this.video.poster = e.pic ? e.pic : "", this.video.src = e.url, this.initMSE(this.video, e.type || "auto"), t && (this.template.danmakuLoading.style.display = "block", this.bar.set("played", 0, "width"), this.bar.set("loaded", 0, "width"), this.template.ptime.innerHTML = "00:00", this.template.danmaku.innerHTML = "", this.danmaku && this.danmaku.reload({ |
| | | id: t.id, |
| | | address: t.api, |
| | | token: t.token, |
| | | maximum: t.maximum, |
| | | addition: t.addition, |
| | | user: t.user |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initMSE", value: function (e, t) { |
| | | var a = this; |
| | | if (this.type = t, this.options.video.customType && this.options.video.customType[t]) "[object Function]" === Object.prototype.toString.call(this.options.video.customType[t]) ? this.options.video.customType[t](this.video, this) : console.error("Illegal customType: ".concat(t)); |
| | | else switch ("auto" === this.type && (/m3u8(#|\?|$)/i.exec(e.src) ? this.type = "hls" : /.flv(#|\?|$)/i.exec(e.src) ? this.type = "flv" : /.mpd(#|\?|$)/i.exec(e.src) ? this.type = "dash" : this.type = "normal"), "hls" === this.type && (e.canPlayType("application/x-mpegURL") || e.canPlayType("application/vnd.apple.mpegURL")) && (this.type = "normal"), this.type) { |
| | | case "hls": |
| | | if (Hls) |
| | | if (Hls.isSupported()) { |
| | | var n = this.options.pluginOptions.hls, |
| | | o = new Hls(n); |
| | | this.plugins.hls = o, o.loadSource(e.src), o.attachMedia(e), this.events.on("destroy", (function () { |
| | | o.destroy(), delete a.plugins.hls |
| | | })) |
| | | } else this.notice("Error: Hls is not supported."); |
| | | else this.notice("Error: Can't find Hls."); |
| | | break; |
| | | case "flv": |
| | | if (flvjs) |
| | | if (flvjs.isSupported()) { |
| | | var r = Object.assign(this.options.pluginOptions.flvjs, { |
| | | type: "flv", |
| | | url: e.src |
| | | }), |
| | | i = flvjs.createPlayer(r,{enableStashBuffer:false,fixAudioTimestampGap:false}); |
| | | this.plugins.flvjs = i, i.attachMediaElement(e), i.load(), this.events.on("destroy", (function () { |
| | | i.unload(), i.detachMediaElement(), i.destroy(), delete a.plugins.flvjs |
| | | })) |
| | | } else this.notice("Error: flvjs is not supported."); |
| | | else this.notice("Error: Can't find flvjs."); |
| | | break; |
| | | case "dash": |
| | | if (dashjs) { |
| | | var l = dashjs.MediaPlayer().create().initialize(e, e.src, !1), |
| | | s = this.options.pluginOptions.dash; |
| | | l.updateSettings(s), this.plugins.dash = l, this.events.on("destroy", (function () { |
| | | dashjs.MediaPlayer().reset(), delete a.plugins.dash |
| | | })) |
| | | } else this.notice("Error: Can't find dashjs."); |
| | | break; |
| | | case "webtorrent": |
| | | if (WebTorrent) |
| | | if (WebTorrent.WEBRTC_SUPPORT) { |
| | | this.container.classList.add("dplayer-loading"); |
| | | var d = this.options.pluginOptions.webtorrent, |
| | | p = new WebTorrent(d); |
| | | this.plugins.webtorrent = p; |
| | | var c = e.src; |
| | | e.src = "", e.preload = "metadata", e.addEventListener("durationchange", (function () { |
| | | return a.container.classList.remove("dplayer-loading") |
| | | }), {once: !0}), p.add(c, (function (e) { |
| | | e.files.find((function (e) { |
| | | return e.name.endsWith(".mp4") |
| | | })).renderTo(a.video, {autoplay: a.options.autoplay}) |
| | | })), this.events.on("destroy", (function () { |
| | | p.remove(c), p.destroy(), delete a.plugins.webtorrent |
| | | })) |
| | | } else this.notice("Error: Webtorrent is not supported."); |
| | | else this.notice("Error: Can't find Webtorrent.") |
| | | } |
| | | } |
| | | }, { |
| | | key: "initVideo", value: function (e, t) { |
| | | var a = this; |
| | | this.initMSE(e, t), this.on("durationchange", (function () { |
| | | 1 !== e.duration && e.duration !== 1 / 0 && (a.template.dtime.innerHTML = r.secondToTime(e.duration)) |
| | | })), this.on("progress", (function () { |
| | | var t = e.buffered.length ? e.buffered.end(e.buffered.length - 1) / e.duration : 0; |
| | | a.bar.set("loaded", t, "width") |
| | | })), this.on("error", (function () { |
| | | a.video.error && a.tran && a.notice && "webtorrent" !== a.type && a.notice(a.tran("Video load failed"), -1) |
| | | })), this.on("ended", (function () { |
| | | a.bar.set("played", 1, "width"), a.setting.loop ? (a.seek(0), a.play()) : a.pause(), a.danmaku && (a.danmaku.danIndex = 0) |
| | | })), this.on("play", (function () { |
| | | a.paused && a.play() |
| | | })), this.on("pause", (function () { |
| | | a.paused || a.pause() |
| | | })), this.on("timeupdate", (function () { |
| | | a.bar.set("played", a.video.currentTime / a.video.duration, "width"); |
| | | var e = r.secondToTime(a.video.currentTime); |
| | | a.template.ptime.innerHTML !== e && (a.template.ptime.innerHTML = e) |
| | | })); |
| | | for (var n = function (t) { |
| | | e.addEventListener(a.events.videoEvents[t], (function () { |
| | | a.events.trigger(a.events.videoEvents[t]) |
| | | })) |
| | | }, o = 0; o < this.events.videoEvents.length; o++) n(o); |
| | | // this.volume(this.user.get("volume"), !0, !0), this.options.subtitle && (this.subtitle = new ie(this.template.subtitle, this.video, this.options.subtitle, this.events), this.user.get("subtitle") || this.subtitle.hide()) |
| | | this.volume(this.options.volume, !0, !0), this.options.subtitle && (this.subtitle = new ie(this.template.subtitle, this.video, this.options.subtitle, this.events), this.user.get("subtitle") || this.subtitle.hide()) |
| | | } |
| | | }, { |
| | | key: "switchQuality", value: function (e) { |
| | | var t = this; |
| | | if (e = "string" == typeof e ? parseInt(e) : e, this.qualityIndex !== e && !this.switchingQuality) { |
| | | this.qualityIndex = e, this.switchingQuality = !0, this.quality = this.options.video.quality[e], this.template.qualityButton.innerHTML = this.quality.name; |
| | | var a = this.video.paused; |
| | | this.video.pause(); |
| | | var n = qe()({ |
| | | current: !1, |
| | | pic: null, |
| | | screenshot: this.options.screenshot, |
| | | preload: "auto", |
| | | url: this.quality.url, |
| | | subtitle: this.options.subtitle |
| | | }), |
| | | o = (new DOMParser).parseFromString(n, "text/html").body.firstChild; |
| | | this.template.videoWrap.insertBefore(o, this.template.videoWrap.getElementsByTagName("div")[0]), this.prevVideo = this.video, this.video = o, this.initVideo(this.video, this.quality.type || this.options.video.type), this.seek(this.prevVideo.currentTime), this.notice("".concat(this.tran("Switching to"), " ").concat(this.quality.name, " ").concat(this.tran("quality")), -1), this.events.trigger("quality_start", this.quality), this.on("canplay", (function () { |
| | | if (t.prevVideo) { |
| | | if (t.video.currentTime !== t.prevVideo.currentTime) return void t.seek(t.prevVideo.currentTime); |
| | | t.template.videoWrap.removeChild(t.prevVideo), t.video.classList.add("dplayer-video-current"), a || t.video.play(), t.prevVideo = null, t.notice("".concat(t.tran("Switched to"), " ").concat(t.quality.name, " ").concat(t.tran("quality"))), t.switchingQuality = !1, t.events.trigger("quality_end") |
| | | } |
| | | })) |
| | | } |
| | | } |
| | | }, { |
| | | key: "notice", value: function (e) { |
| | | var t = this, |
| | | a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2e3, |
| | | n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .8; |
| | | this.template.notice.innerHTML = e, this.template.notice.style.opacity = n, this.noticeTime && clearTimeout(this.noticeTime), this.events.trigger("notice_show", e), a > 0 && (this.noticeTime = setTimeout((function () { |
| | | t.template.notice.style.opacity = 0, t.events.trigger("notice_hide") |
| | | }), a)) |
| | | } |
| | | }, { |
| | | key: "resize", value: function () { |
| | | this.danmaku && this.danmaku.resize(), this.controller.thumbnails && this.controller.thumbnails.resize(160, this.video.videoHeight / this.video.videoWidth * 160, this.template.barWrap.offsetWidth), this.events.trigger("resize") |
| | | } |
| | | }, { |
| | | key: "speed", value: function (e) { |
| | | this.video.playbackRate = e |
| | | } |
| | | }, { |
| | | key: "destroy", value: function () { |
| | | Oe.splice(Oe.indexOf(this), 1), this.pause(), this.controller.destroy(), this.timer.destroy(), this.video.src = "", this.container.innerHTML = "", this.events.trigger("destroy") |
| | | } |
| | | }]) && ze(t.prototype, a), o && ze(t, o), e |
| | | }(); |
| | | console.log("\n".concat(" %c DPlayer v", "1.25.0", " ").concat("4ddc860", " %c http://dplayer.js.org ", "\n", "\n"), "color: #fadfa3; background: #030307; padding:5px 0;", "background: #fadfa3; padding:5px 0;"); |
| | | t.default = Fe |
| | | }]).default |
| | | })); |
New file |
| | |
| | | (function (window) { |
| | | |
| | | var Player = function () { |
| | | //创建一个音频环境对象 |
| | | audioContext = window.AudioContext || window.webkitAudioContext; |
| | | var context = new audioContext(); |
| | | var isPlaying = false; |
| | | var audioBuffers = [] |
| | | var audioBuffer = context.createBuffer(1, 8000, 8000); |
| | | var playNextBuffer = function() { |
| | | isPlaying = false; |
| | | if (audioBuffers.length) { |
| | | playAudio(audioBuffers.shift()); |
| | | } |
| | | //if (audioBuffers.length > 1) audioBuffers.shift(); |
| | | //console.log(audioBuffers.length) |
| | | }; |
| | | |
| | | var copyToCtxBuffer = function(fromBuffer) { |
| | | var nowBuffering = audioBuffer.getChannelData(0); |
| | | |
| | | var buffer = new Int8Array( fromBuffer); |
| | | for (var i = 0; i < 8000; i++) { |
| | | |
| | | var word = (buffer[i * 2] & 0xff) + ((buffer[i * 2 + 1] & 0xff) << 8); |
| | | nowBuffering[i] = (((word + 32768) % 65536) - 32768) / 32768.0; |
| | | |
| | | } |
| | | }; |
| | | var playAudio = function(fromBuffer) { |
| | | if (isPlaying) { |
| | | //var buffer = new Int8Array( fromBuffer); |
| | | //copyAudioOutputArray(buffer); |
| | | audioBuffers.push(fromBuffer); |
| | | return; |
| | | } |
| | | isPlaying = true; |
| | | copyToCtxBuffer(fromBuffer); |
| | | var source = context.createBufferSource(); |
| | | source.buffer = audioBuffer; |
| | | source.connect(context.destination); |
| | | source.onended = playNextBuffer; |
| | | //setTimeout(playNextBuffer, audioBufferTime-audioBuffers.length*200); |
| | | source.start(); |
| | | }; |
| | | |
| | | |
| | | |
| | | config = {}; |
| | | config.channelCount = 1; |
| | | config.numberOfInputChannels = config.channelCount; |
| | | config.numberOfOutputChannels = config.channelCount; |
| | | config.sampleBits = config.sampleBits || 16; //采样数位 8, 16 |
| | | //config.sampleRate = config.sampleRate || (context.sampleRate / 6); //采样率(1/6 44100) |
| | | config.sampleRate = config.sampleRate || 8000; //采样率16K |
| | | //创建缓存,用来缓存声音 |
| | | config.bufferSize = 8192; |
| | | |
| | | |
| | | //将声音输入这个对像 |
| | | var audioOutput = context.createBufferSource(); |
| | | |
| | | //设置音量节点 |
| | | var volume = context.createGain(); |
| | | audioOutput.connect(volume); |
| | | |
| | | // 创建声音的缓存节点,createScriptProcessor方法的 |
| | | // 第二个和第三个参数指的是输入和输出都是声道数。 |
| | | var player = context.createScriptProcessor(config.bufferSize, 0, config.channelCount); |
| | | |
| | | |
| | | |
| | | //开始播放 |
| | | this.start = function () { |
| | | audioOutput.connect(player); |
| | | player.connect(context.destination); |
| | | }; |
| | | |
| | | //停止 |
| | | this.stop = function () { |
| | | player.disconnect(); |
| | | context.close(); |
| | | |
| | | }; |
| | | this.addPlay = function (blob) |
| | | { |
| | | var reader = new FileReader(); |
| | | // 读取这四个字节 |
| | | reader.readAsArrayBuffer(blob); |
| | | reader.onload = function (e) { |
| | | var buffer = reader.result; |
| | | var view = new DataView(buffer); |
| | | |
| | | playAudio(view.buffer); |
| | | }; |
| | | }; |
| | | |
| | | var $bo=$("#inbo"); |
| | | var $change=$("#change"); |
| | | var width=$bo.width(); |
| | | //音频采集 |
| | | player.onaudioprocess = function (e) { |
| | | |
| | | |
| | | //console.log(e.playbackTime); |
| | | |
| | | }; |
| | | |
| | | }; |
| | | //抛出异常 |
| | | Player.throwError = function (message) { |
| | | throw new function () { this.toString = function () { return message; };}; |
| | | }; |
| | | |
| | | //获取播放机 |
| | | Player.get = function (callback) { |
| | | if (callback) { |
| | | var rec = new Player(); |
| | | callback(rec); |
| | | } |
| | | }; |
| | | window.Player = Player; |
| | | |
| | | })(window); |
New file |
| | |
| | | (function (window) { |
| | | //兼容 |
| | | window.URL = window.URL || window.webkitURL; |
| | | //请求麦克风 |
| | | navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; |
| | | |
| | | var Recorder = function (stream, wsock) { |
| | | //创建一个音频环境对象 |
| | | audioContext = window.AudioContext || window.webkitAudioContext; |
| | | var context = new audioContext(); |
| | | |
| | | config = {}; |
| | | config.channelCount = 1; |
| | | config.numberOfInputChannels = config.channelCount; |
| | | config.numberOfOutputChannels = config.channelCount; |
| | | config.sampleBits = config.sampleBits || 16; //采样数位 8, 16 |
| | | //config.sampleRate = config.sampleRate || (context.sampleRate / 6); //采样率(1/6 44100) |
| | | config.sampleRate = config.sampleRate || 8000; //采样率16K |
| | | //创建缓存,用来缓存声音 |
| | | config.bufferSize = 8192; |
| | | var ws = wsock; |
| | | //将声音输入这个对像 |
| | | var audioInput = context.createMediaStreamSource(stream); |
| | | |
| | | //设置音量节点 |
| | | var volume = context.createGain(); |
| | | audioInput.connect(volume); |
| | | |
| | | // 创建声音的缓存节点,createScriptProcessor方法的 |
| | | // 第二个和第三个参数指的是输入和输出都是声道数。 |
| | | var recorder = context.createScriptProcessor(config.bufferSize, config.channelCount, config.channelCount); |
| | | |
| | | //用来储存读出的麦克风数据,和压缩这些数据,将这些数据转换为WAV文件的格式 |
| | | var audioData = { |
| | | size: 0 //录音文件长度 |
| | | , buffer: [] //录音缓存 |
| | | , inputSampleRate: context.sampleRate //输入采样率 |
| | | , inputSampleBits: 16 //输入采样数位 8, 16 |
| | | , outputSampleRate: config.sampleRate //输出采样率 |
| | | , oututSampleBits: config.sampleBits //输出采样数位 8, 16 |
| | | , input: function (data) { |
| | | this.buffer = []; |
| | | this.size = 0; |
| | | this.buffer.push(new Float32Array(data)); //Float32Array |
| | | this.size += data.length; |
| | | } |
| | | , getRawData: function () { //合并压缩 |
| | | //合并 |
| | | var data = new Float32Array(this.size); |
| | | var offset = 0; |
| | | for (var i = 0; i < this.buffer.length; i++) { |
| | | data.set(this.buffer[i], offset); |
| | | offset += this.buffer[i].length; |
| | | } |
| | | //压缩 |
| | | var getRawDataion = parseInt(this.inputSampleRate / this.outputSampleRate); |
| | | var length = data.length / getRawDataion; |
| | | var result = new Float32Array(length); |
| | | var index = 0, j = 0; |
| | | while (index < length) { |
| | | result[index] = data[j]; |
| | | j += getRawDataion; |
| | | index++; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | ,closeContext:function(){ |
| | | context.close(); //关闭AudioContext否则录音多次会报错。 |
| | | } |
| | | ,getPureWavData: function(offset) { |
| | | var sampleBits = Math.min(this.inputSampleBits, this.oututSampleBits) |
| | | var bytes = this.getRawData(); |
| | | var dataLength = bytes.length * (sampleBits / 8); |
| | | var buffer = new ArrayBuffer(dataLength); |
| | | var data = new DataView(buffer); |
| | | data = this.reshapeWavData(sampleBits, offset, bytes, data); |
| | | // var wavd = new Int8Array(data.buffer.byteLength); |
| | | // var pos = 0; |
| | | // for (var i = 0; i < data.buffer.byteLength; i++, pos++) { |
| | | // wavd[i] = data.getInt8(pos); |
| | | // } // return wavd; |
| | | |
| | | // return new Blob([data], { type: 'audio/wav' }); |
| | | return data; |
| | | |
| | | } |
| | | ,reshapeWavData: function(sampleBits, offset, iBytes, oData) { |
| | | if (sampleBits === 8) { |
| | | for (var i = 0; i < iBytes.length; i++, offset++) { |
| | | var s = Math.max(-1, Math.min(1, iBytes[i])); |
| | | var val = s < 0 ? s * 0x8000 : s * 0x7FFF; |
| | | val = parseInt(255 / (65535 / (val + 32768))); |
| | | oData.setInt8(offset, val, true); |
| | | } |
| | | } else { |
| | | for (var i = 0; i < iBytes.length; i++, offset += 2) { |
| | | var s = Math.max(-1, Math.min(1, iBytes[i])); |
| | | oData.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true); |
| | | } |
| | | } |
| | | return oData; |
| | | } |
| | | |
| | | }; |
| | | |
| | | //开始录音 |
| | | this.start = function () { |
| | | audioInput.connect(recorder); |
| | | recorder.connect(context.destination); |
| | | }; |
| | | |
| | | //停止 |
| | | this.stop = function () { |
| | | recorder.disconnect(); |
| | | |
| | | audioData.closeContext(); |
| | | } |
| | | |
| | | |
| | | var $bo=$("#inbo"); |
| | | var $change=$("#change"); |
| | | var width=$bo.width(); |
| | | //音频采集 |
| | | recorder.onaudioprocess = function (e) { |
| | | audioData.input(e.inputBuffer.getChannelData(0)); |
| | | |
| | | var data = audioData.getPureWavData(0); |
| | | if (ws != null) |
| | | ws.send(data); |
| | | |
| | | |
| | | }; |
| | | |
| | | }; |
| | | //抛出异常 |
| | | Recorder.throwError = function (message) { |
| | | throw new function () { this.toString = function () { return message; };}; |
| | | }; |
| | | //是否支持录音 |
| | | Recorder.canRecording = (navigator.getUserMedia != null); |
| | | //获取录音机 |
| | | Recorder.get = function (callback, wsock) { |
| | | if (callback) { |
| | | if (navigator.getUserMedia) { |
| | | navigator.getUserMedia( |
| | | { audio: true } //只启用音频 A |
| | | , function (stream) { //stream这个参数是麦克风的输入流,将这个流传递给Recorder |
| | | var rec = new Recorder(stream, wsock); |
| | | callback(rec); |
| | | } |
| | | , function (error) { |
| | | switch (error.code || error.name) { |
| | | case 'PERMISSION_DENIED': |
| | | case 'PermissionDeniedError': |
| | | Recorder.throwError('用户拒绝提供信息。'); |
| | | break; |
| | | case 'NOT_SUPPORTED_ERROR': |
| | | case 'NotSupportedError': |
| | | Recorder.throwError('浏览器不支持硬件设备。'); |
| | | break; |
| | | case 'MANDATORY_UNSATISFIED_ERROR': |
| | | case 'MandatoryUnsatisfiedError': |
| | | Recorder.throwError('无法发现指定的硬件设备。'); |
| | | break; |
| | | default: |
| | | Recorder.throwError('无法打开麦克风。异常信息:' + (error.code || error.name)); |
| | | break; |
| | | } |
| | | }); |
| | | } else { |
| | | Recorder.throwErr('当前浏览器不支持录音功能。'); return; |
| | | } |
| | | } |
| | | }; |
| | | window.Recorder = Recorder; |
| | | |
| | | })(window); |
New file |
| | |
| | | "use strict";var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof2(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.flvjs=e()}}(function(){var e;return function e(t,n,i){function r(a,o){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[a]={exports:{}};t[a][0].call(d.exports,function(e){var n=t[a][1][e];return r(n||e)},d,d.exports,e,t,n,i)}return n[a].exports}for(var s="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,n,i){(function(r,s){!function(t,r){"object"===(void 0===i?"undefined":_typeof2(i))&&void 0!==n?n.exports=r():"function"==typeof e&&e.amd?e(r):t.ES6Promise=r()}(this,function(){function e(e){return"function"==typeof e||"object"===(void 0===e?"undefined":_typeof2(e))&&null!==e}function n(e){return"function"==typeof e}function i(e){K=e}function a(e){q=e}function o(){return void 0!==H?function(){H(l)}:u()}function u(){var e=setTimeout;return function(){return e(l,1)}}function l(){for(var e=0;e<z;e+=2){(0,J[e])(J[e+1]),J[e]=void 0,J[e+1]=void 0}z=0}function d(e,t){var n=arguments,i=this,r=new this.constructor(f);void 0===r[ee]&&I(r);var s=i._state;return s?function(){var e=n[s-1];q(function(){return O(s,r,e,i._result)})}():L(i,r,e,t),r}function h(e){var t=this;if(e&&"object"===(void 0===e?"undefined":_typeof2(e))&&e.constructor===t)return e;var n=new t(f);return b(n,e),n}function f(){}function c(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function m(e){try{return e.then}catch(e){return re.error=e,re}}function p(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}function v(e,t,n){q(function(e){var i=!1,r=p(n,t,function(n){i||(i=!0,t!==n?b(e,n):S(e,n))},function(t){i||(i=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&r&&(i=!0,k(e,r))},e)}function g(e,t){t._state===ne?S(e,t._result):t._state===ie?k(e,t._result):L(t,void 0,function(t){return b(e,t)},function(t){return k(e,t)})}function y(e,t,i){t.constructor===e.constructor&&i===d&&t.constructor.resolve===h?g(e,t):i===re?(k(e,re.error),re.error=null):void 0===i?S(e,t):n(i)?v(e,t,i):S(e,t)}function b(t,n){t===n?k(t,c()):e(n)?y(t,n,m(n)):S(t,n)}function E(e){e._onerror&&e._onerror(e._result),w(e)}function S(e,t){e._state===te&&(e._result=t,e._state=ne,0!==e._subscribers.length&&q(w,e))}function k(e,t){e._state===te&&(e._state=ie,e._result=t,q(E,e))}function L(e,t,n,i){var r=e._subscribers,s=r.length;e._onerror=null,r[s]=t,r[s+ne]=n,r[s+ie]=i,0===s&&e._state&&q(w,e)}function w(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,r=void 0,s=e._result,a=0;a<t.length;a+=3)i=t[a],r=t[a+n],i?O(n,i,r,s):r(s);e._subscribers.length=0}}function R(){this.error=null}function A(e,t){try{return e(t)}catch(e){return se.error=e,se}}function O(e,t,i,r){var s=n(i),a=void 0,o=void 0,u=void 0,l=void 0;if(s){if(a=A(i,r),a===se?(l=!0,o=a.error,a.error=null):u=!0,t===a)return void k(t,_())}else a=r,u=!0;t._state!==te||(s&&u?b(t,a):l?k(t,o):e===ne?S(t,a):e===ie&&k(t,a))}function T(e,t){try{t(function(t){b(e,t)},function(t){k(e,t)})}catch(t){k(e,t)}}function C(){return ae++}function I(e){e[ee]=ae++,e._state=void 0,e._result=void 0,e._subscribers=[]}function x(e,t){this._instanceConstructor=e,this.promise=new e(f),this.promise[ee]||I(this.promise),V(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):k(this.promise,M())}function M(){return new Error("Array Methods must be provided an Array")}function D(e){return new x(this,e).promise}function B(e){var t=this;return new t(V(e)?function(n,i){for(var r=e.length,s=0;s<r;s++)t.resolve(e[s]).then(n,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function j(e){var t=this,n=new t(f);return k(n,e),n}function P(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function U(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function N(e){this[ee]=C(),this._result=this._state=void 0,this._subscribers=[],f!==e&&("function"!=typeof e&&P(),this instanceof N?T(this,e):U())}function F(){var e=void 0;if(void 0!==s)e=s;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=N}var G=void 0;G=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var V=G,z=0,H=void 0,K=void 0,q=function(e,t){J[z]=e,J[z+1]=t,2===(z+=2)&&(K?K(l):$())},W="undefined"!=typeof window?window:void 0,X=W||{},Y=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),Q="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,J=new Array(1e3),$=void 0;$=Z?function(){return function(){return r.nextTick(l)}}():Y?function(){var e=0,t=new Y(l),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():Q?function(){var e=new MessageChannel;return e.port1.onmessage=l,function(){return e.port2.postMessage(0)}}():void 0===W&&"function"==typeof t?function(){try{var e=t,n=e("vertx");return H=n.runOnLoop||n.runOnContext,o()}catch(e){return u()}}():u();var ee=Math.random().toString(36).substring(16),te=void 0,ne=1,ie=2,re=new R,se=new R,ae=0;return x.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===te&&n<e;n++)this._eachEntry(t[n],n)},x.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===h){var r=m(e);if(r===d&&e._state!==te)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===N){var s=new n(f);y(s,e,r),this._willSettleAt(s,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},x.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===te&&(this._remaining--,e===ie?k(i,n):this._result[t]=n),0===this._remaining&&S(i,this._result)},x.prototype._willSettleAt=function(e,t){var n=this;L(e,void 0,function(e){return n._settledAt(ne,t,e)},function(e){return n._settledAt(ie,t,e)})},N.all=D,N.race=B,N.resolve=h,N.reject=j,N._setScheduler=i,N._setAsap=a,N._asap=q,N.prototype={constructor:N,then:d,catch:function(e){return this.then(null,e)}},N.polyfill=F,N.Promise=N,N})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function s(e){return"number"==typeof e}function a(e){return"object"===(void 0===e?"undefined":_typeof2(e))&&null!==e}function o(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,u=0;u<i;u++)l[u].apply(this,s);return!0},i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,s,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],s=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(o=s;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,n){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(h===setTimeout)return setTimeout(e,0);if((h===i||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){p&&_&&(p=!1,_.length?m=_.concat(m):v=-1,m.length&&u())}function u(){if(!p){var e=s(o);p=!0;for(var t=m.length;t;){for(_=m,m=[];++v<t;)_&&_[v].run();v=-1,t=m.length}_=null,p=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function d(){}var h,f,c=t.exports={};!function(){try{h="function"==typeof setTimeout?setTimeout:i}catch(e){h=i}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var _,m=[],p=!1,v=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new l(e,t)),1!==m.length||p||s(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=d,c.addListener=d,c.once=d,c.off=d,c.removeListener=d,c.removeAllListeners=d,c.emit=d,c.prependListener=d,c.prependOnceListener=d,c.listeners=function(e){return[]},c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],4:[function(e,t,n){var i=arguments[3],r=arguments[4],s=arguments[5],a=JSON.stringify;t.exports=function(e,t){function n(e){p[e]=!0;for(var t in r[e][1]){var i=r[e][1][t];p[i]||n(i)}}for(var o,u=Object.keys(s),l=0,d=u.length;l<d;l++){var h=u[l],f=s[h].exports;if(f===e||f&&f.default===e){o=h;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var c={},l=0,d=u.length;l<d;l++){var h=u[l];c[h]=h}r[o]=[Function(["require","module","exports"],"("+e+")(self)"),c]}var _=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[o]=o,r[_]=[Function(["require"],"var f = require("+a(o)+");(f.default ? f.default : f)(self);"),m];var p={};n(_);var v="("+i+")({"+Object.keys(p).map(function(e){return a(e)+":["+r[e][0]+","+a(r[e][1])+"]"}).join(",")+"},{},["+a(_)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return y;var b=g.createObjectURL(y),E=new Worker(b);return E.objectURL=b,E}},{}],5:[function(e,t,n){function i(){return Object.assign({},r)}Object.defineProperty(n,"__esModule",{value:!0}),n.createDefaultConfig=i;var r=n.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1}},{}],6:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("../io/io-controller.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=e("../config.js"),u=function(){function e(){i(this,e)}return r(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new a.default({},(0,o.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new a.default({},(0,o.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){void 0==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}();n.default=u},{"../config.js":5,"../io/io-controller.js":23}],7:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return r(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,i=e.length-1,r=0,s=0,a=i;for(t<e[0]&&(n=0,s=a+1);s<=a;){if((r=s+Math.floor((a-s)/2))===i||t>=e[r]&&t<e[r+1]){n=r;break}e[r]<t?s=r+1:a=r-1}return n}}]),e}();n.default=s},{}],8:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();n.SampleInfo=function e(t,n,r,s,a){i(this,e),this.dts=t,this.pts=n,this.duration=r,this.originalDts=s,this.isSyncPoint=a,this.fileposition=null},n.MediaSegmentInfo=function(){function e(){i(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return r(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),n.IDRSampleList=function(){function e(){i(this,e),this._list=[]}return r(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,i=t.length-1,r=0,s=0,a=i;for(e<t[0].dts&&(n=0,s=a+1);s<=a;){if((r=s+Math.floor((a-s)/2))===i||e>=t[r].dts&&e<t[r+1].dts){n=r;break}t[r].dts<e?s=r+1:a=r-1}return this._list[n]}}]),e}(),n.MediaSegmentInfoList=function(){function e(t){i(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return r(e,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,i=0,r=0,s=n,a=0;if(e<t[0].originalBeginDts)return a=-1;for(;r<=s;){if((i=r+Math.floor((s-r)/2))===n||e>t[i].lastSample.originalDts&&e<t[i+1].originalBeginDts){a=i;break}t[i].originalBeginDts<e?r=i+1:s=i-1}return a}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,i=this._lastAppendLocation,r=0;-1!==i&&i<t.length&&n.originalBeginDts>=t[i].lastSample.originalDts&&(i===t.length-1||i<t.length-1&&n.originalBeginDts<t[i+1].originalBeginDts)?r=i+1:t.length>0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},{}],9:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("../utils/logger.js"),l=i(u),d=e("../utils/browser.js"),h=i(d),f=e("./mse-events.js"),c=i(f),_=e("./media-segment-info.js"),m=e("../utils/exception.js"),p=function(){function e(t){r(this,e),this.TAG="MSEController",this._config=t,this._emitter=new o.default,this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new _.IDRSampleList}return s(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var i=this._sourceBuffers[t];i&&("closed"!==e.readyState&&(e.removeSourceBuffer(i),i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)),this._mimeTypes[t]=null,this._sourceBuffers[t]=null)}if("open"===e.readyState)try{e.endOfStream()}catch(e){l.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,i=""+n.container;n.codec&&n.codec.length>0&&(i+=";codecs="+n.codec);var r=!1;if(l.default.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])l.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+i);else if(r=!0,null==this._sourceBuffers[n.type])try{l.default.v(this.TAG,"mediaSource.addSourceBuffer: "+i);var s=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);s.addEventListener("error",this.e.onSourceBufferError),s.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return l.default.e(this.TAG,e.message),void this._emitter.emit(c.default.ERROR,{code:e.code,msg:e.message})}this._mimeTypes[n.type]=i}t||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),h.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){l.default.e(this.TAG,e.message)}this._idrList.clear();var i=this._pendingSegments[t];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r<n.buffered.length;r++){var s=n.buffered.start(r),a=n.buffered.end(r);this._pendingRemoveRanges[t].push({start:s,end:a})}if(n.updating||this._doRemoveRanges(),h.default.safari){var o=this._lastInitSegments[t];o&&(this._pendingSegments[t].push(o),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;if(!e||"open"!==e.readyState)return void(e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0));t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream())}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var i=n.buffered;if(i.length>=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var i=n.buffered,r=!1,s=0;s<i.length;s++){var a=i.start(s),o=i.end(s);if(a<=e&&e<o+3){if(e-a>=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:a,end:u})}}else o<e&&(r=!0,this._pendingRemoveRanges[t].push({start:a,end:o}))}r&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(l.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var i=n.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,r=n.timestampOffset/1e3,s=Math.abs(i-r);s>.1&&(l.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(c.default.BUFFER_FULL),this._isBufferFull=!0):(l.default.e(this.TAG,e.message),this._emitter.emit(c.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(l.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(c.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){l.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){l.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(c.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){l.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();n.default=p},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./media-segment-info.js":8,"./mse-events.js":10,events:2}],10:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};n.default=i},{}],11:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")} |
| | | Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("../utils/logger.js"),l=i(u),d=e("../utils/logging-control.js"),h=i(d),f=e("./transmuxing-controller.js"),c=i(f),_=e("./transmuxing-events.js"),m=i(_),p=e("./transmuxing-worker.js"),v=i(p),g=e("./media-info.js"),y=i(g),b=function(){function t(n,i){if(r(this,t),this.TAG="Transmuxer",this._emitter=new o.default,i.enableWorker&&"undefined"!=typeof Worker)try{var s=e("webworkify");this._worker=s(v.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[n,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},h.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:h.default.getConfig()})}catch(e){l.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new c.default(n,i)}else this._controller=new c.default(n,i);if(this._controller){var a=this._controller;a.on(m.default.IO_ERROR,this._onIOError.bind(this)),a.on(m.default.DEMUX_ERROR,this._onDemuxError.bind(this)),a.on(m.default.INIT_SEGMENT,this._onInitSegment.bind(this)),a.on(m.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),a.on(m.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),a.on(m.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),a.on(m.default.MEDIA_INFO,this._onMediaInfo.bind(this)),a.on(m.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),a.on(m.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return s(t,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),h.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.INIT_SEGMENT,e,t)})}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.MEDIA_SEGMENT,e,t)})}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.MEDIA_INFO,e)})}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.STATISTICS_INFO,e)})}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.IO_ERROR,e,t)})}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.DEMUX_ERROR,e,t)})}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.RECOMMEND_SEEKPOINT,e)})}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case m.default.INIT_SEGMENT:case m.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case m.default.LOADING_COMPLETE:case m.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case m.default.MEDIA_INFO:Object.setPrototypeOf(n,y.default.prototype),this._emitter.emit(t.msg,n);break;case m.default.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case m.default.IO_ERROR:case m.default.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case m.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":l.default.emitter.emit("log",n.type,n.logcat)}}}]),t}();n.default=b},{"../utils/logger.js":41,"../utils/logging-control.js":42,"./media-info.js":7,"./transmuxing-controller.js":12,"./transmuxing-events.js":13,"./transmuxing-worker.js":14,events:2,webworkify:4}],12:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("../utils/logger.js"),l=i(u),d=e("../utils/browser.js"),h=i(d),f=e("./media-info.js"),c=i(f),_=e("../demux/flv-demuxer.js"),m=i(_),p=e("../remux/mp4-remuxer.js"),v=i(p),g=e("../demux/demux-errors.js"),y=i(g),b=e("../io/io-controller.js"),E=i(b),S=e("./transmuxing-events.js"),k=i(S),L=(e("../io/loader.js"),function(){function e(t,n){r(this,e),this.TAG="TransmuxingController",this._emitter=new o.default,this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach(function(e){e.timestampBase=i,i+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)}),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return s(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],i=this._ioctl=new E.default(n,this._config,e);i.onError=this._onIOException.bind(this),i.onSeeked=this._onIOSeeked.bind(this),i.onComplete=this._onIOComplete.bind(this),i.onRedirect=this._onIORedirect.bind(this),i.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):i.onDataArrival=this._onInitChunkArrival.bind(this),i.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(void 0==n)this._pendingSeekTime=e;else{var i=n.getNearestKeyframe(e);this._remuxer.seek(i.milliseconds),this._ioctl.seek(i.fileposition),this._pendingResolveSeekPoint=i.milliseconds}}else{var r=this._mediaInfo.segments[t];if(void 0==r)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var s=r.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,s.fileposition),this._pendingResolveSeekPoint=s.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,i=0;i<t.length;i++)if(e<t[i].timestampBase){n=i-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,i=null,r=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((i=m.default.probe(e)).match){this._demuxer=new m.default(i,this._config),this._remuxer||(this._remuxer=new v.default(this._config));var s=this._mediaDataSource;void 0==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else i=null,l.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(k.default.DEMUX_ERROR,y.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,c.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,c.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e,n=t+1;n<this._mediaDataSource.segments.length?(this._internalAbort(),this._loadSegment(n)):(this._remuxer.flushStashedSamples(),this._emitter.emit(k.default.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(k.default.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){l.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(k.default.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){l.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(k.default.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(k.default.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(k.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,h.default.safari&&n.length>0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(k.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(k.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(k.default.STATISTICS_INFO,e)}}]),e}());n.default=L},{"../demux/demux-errors.js":16,"../demux/flv-demuxer.js":18,"../io/io-controller.js":23,"../io/loader.js":24,"../remux/mp4-remuxer.js":38,"../utils/browser.js":39,"../utils/logger.js":41,"./media-info.js":7,"./transmuxing-events.js":13,events:2}],13:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};n.default=i},{}],14:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=e("../utils/logger.js"),s=(i(r),e("../utils/logging-control.js")),a=i(s),o=e("../utils/polyfill.js"),u=i(o),l=e("./transmuxing-controller.js"),d=i(l),h=e("./transmuxing-events.js"),f=i(h),c=function(e){function t(t,n){var i={msg:f.default.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function n(t,n){var i={msg:f.default.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function i(){var t={msg:f.default.LOADING_COMPLETE};e.postMessage(t)}function r(){var t={msg:f.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function s(t){var n={msg:f.default.MEDIA_INFO,data:t};e.postMessage(n)}function o(t){var n={msg:f.default.STATISTICS_INFO,data:t};e.postMessage(n)}function l(t,n){e.postMessage({msg:f.default.IO_ERROR,data:{type:t,info:n}})}function h(t,n){e.postMessage({msg:f.default.DEMUX_ERROR,data:{type:t,info:n}})}function c(t){e.postMessage({msg:f.default.RECOMMEND_SEEKPOINT,data:t})}function _(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}var m=null,p=_.bind(this);u.default.install(),e.addEventListener("message",function(u){switch(u.data.cmd){case"init":m=new d.default(u.data.param[0],u.data.param[1]),m.on(f.default.IO_ERROR,l.bind(this)),m.on(f.default.DEMUX_ERROR,h.bind(this)),m.on(f.default.INIT_SEGMENT,t.bind(this)),m.on(f.default.MEDIA_SEGMENT,n.bind(this)),m.on(f.default.LOADING_COMPLETE,i.bind(this)),m.on(f.default.RECOVERED_EARLY_EOF,r.bind(this)),m.on(f.default.MEDIA_INFO,s.bind(this)),m.on(f.default.STATISTICS_INFO,o.bind(this)),m.on(f.default.RECOMMEND_SEEKPOINT,c.bind(this));break;case"destroy":m&&(m.destroy(),m=null),e.postMessage({msg:"destroyed"});break;case"start":m.start();break;case"stop":m.stop();break;case"seek":m.seek(u.data.param);break;case"pause":m.pause();break;case"resume":m.resume();break;case"logging_config":var _=u.data.param;a.default.applyConfig(_),!0===_.enableCallback?a.default.addLogListener(p):a.default.removeLogListener(p)}})};n.default=c},{"../utils/logger.js":41,"../utils/logging-control.js":42,"../utils/polyfill.js":43,"./transmuxing-controller.js":12,"./transmuxing-events.js":13}],15:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=i(a),u=e("../utils/utf8-conv.js"),l=i(u),d=e("../utils/exception.js"),h=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),f=function(){function e(){r(this,e)}return s(e,null,[{key:"parseScriptData",value:function(t,n,i){var r={};try{var s=e.parseValue(t,n,i),a=e.parseValue(t,n+s.size,i-s.size);r[s.data]=a.data}catch(e){o.default.e("AMF",e.toString())}return r}},{key:"parseObject",value:function(t,n,i){if(i<3)throw new d.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,n,i),s=e.parseValue(t,n+r.size,i-r.size),a=s.objectEnd;return{data:{name:r.data,value:s.data},size:r.size+s.size,objectEnd:a}}},{key:"parseVariable",value:function(t,n,i){return e.parseObject(t,n,i)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new d.IllegalStateException("Data not enough when parse String");var i=new DataView(e,t,n),r=i.getUint16(0,!h),s=void 0;return s=r>0?(0,l.default)(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new d.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,n),r=i.getUint32(0,!h),s=void 0;return s=r>0?(0,l.default)(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new d.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,n),r=i.getFloat64(0,!h);return r+=60*i.getInt16(8,!h)*1e3,{data:new Date(r),size:10}}},{key:"parseValue",value:function(t,n,i){if(i<1)throw new d.IllegalStateException("Data not enough when parse Value");var r=new DataView(t,n,i),s=1,a=r.getUint8(0),u=void 0,l=!1;try{switch(a){case 0:u=r.getFloat64(1,!h),s+=8;break;case 1:u=!!r.getUint8(1),s+=1;break;case 2:var f=e.parseString(t,n+1,i-1);u=f.data,s+=f.size;break;case 3:u={};var c=0;for(9==(16777215&r.getUint32(i-4,!h))&&(c=3);s<i-4;){var _=e.parseObject(t,n+s,i-s-c);if(_.objectEnd)break;u[_.data.name]=_.data.value,s+=_.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!h))&&(s+=3)}break;case 8:u={},s+=4;var m=0;for(9==(16777215&r.getUint32(i-4,!h))&&(m=3);s<i-8;){var p=e.parseVariable(t,n+s,i-s-m);if(p.objectEnd)break;u[p.data.name]=p.data.value,s+=p.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!h))&&(s+=3)}break;case 9:u=void 0,s=1,l=!0;break;case 10:u=[];var v=r.getUint32(1,!h);s+=4;for(var g=0;g<v;g++){var y=e.parseValue(t,n+s,i-s);u.push(y.data),s+=y.size}break;case 11:var b=e.parseDate(t,n+1,i-1);u=b.data,s+=b.size;break;case 12:var E=e.parseString(t,n+1,i-1);u=E.data,s+=E.size;break;default:s=i,o.default.w("AMF","Unsupported AMF value type "+a)}}catch(e){o.default.e("AMF",e.toString())}return{data:u,size:s,objectEnd:l}}}]),e}();n.default=f},{"../utils/exception.js":40,"../utils/logger.js":41,"../utils/utf8-conv.js":44}],16:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};n.default=i},{}],17:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("../utils/exception.js"),a=function(){function e(t){i(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return r(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new s.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new s.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var r=Math.min(i,this._current_word_bits_left),a=this._current_word>>>32-r;return this._current_word<<=r,this._current_word_bits_left-=r,n=n<<r|a}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e=void 0;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();n.default=a},{"../utils/exception.js":40}],18:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=e("../utils/logger.js"),l=i(u),d=e("./amf-parser.js"),h=i(d),f=e("./sps-parser.js"),c=i(f),_=e("./demux-errors.js"),m=i(_),p=e("../core/media-info.js"),v=i(p),g=e("../utils/exception.js"),y=function(){function e(t,n){r(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasRecvAudio=!1,this._lastAudioPts=0,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new v.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return o(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new v.default}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new g.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0,r=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;i=e.probe(t).dataOffset}if(this._firstParse){this._firstParse=!1,n+i!==this._dataOffset&&l.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");0!==new DataView(t,i).getUint32(0,!r)&&l.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}for(;i<t.byteLength;){this._dispatch=!0;var s=new DataView(t,i);if(i+11+4>t.byteLength)break;var a=s.getUint8(0),o=16777215&s.getUint32(0,!r);if(i+11+o+4>t.byteLength)break;if(8===a||9===a||18===a){var u=s.getUint8(4),d=s.getUint8(5),h=s.getUint8(6),f=s.getUint8(7),c=h|d<<8|u<<16|f<<24;0!==(16777215&s.getUint32(7,!r))&&l.default.w(this.TAG,"Meet tag which has StreamID != 0!");var _=i+11;switch(a){case 8:this._parseAudioData(t,_,o,c);break;case 9:if(this._parseVideoData(t,_,o,c,n+i),this._videoTrack.length>0&&this._videoTrack.samples.length>0&&this._hasVideo&&!this._hasRecvAudio&&this._audioMetadata){var m=this._videoTrack.samples[this._videoTrack.samples.length-1].pts;if(0==this._lastAudioPts&&(this._lastAudioPts=m),this._lastAudioPts<m&&m-this._lastAudioPts>=this._audioMetadata.refSampleDuration){this._lastAudioPts+=this._audioMetadata.refSampleDuration;var p=new Uint8Array([0,200,0,128,35,128]);p&&(this._audioTrack.samples.push({unit:p,length:p.byteLength,dts:this._lastAudioPts,pts:this._lastAudioPts}),this._audioTrack.length+=p.byteLength)}}break;case 18:this._parseScriptData(t,_,o)}var v=s.getUint32(11+o,!r);v!==11+o&&l.default.w(this.TAG,"Invalid PrevTagSize "+v),i+=11+o+4}else l.default.w(this.TAG,"Unsupported tag type "+a+", skipped"),i+=11+o+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(e,t,n){var i=h.default.parseScriptData(e,t,n);if(i.hasOwnProperty("onMetaData")){if(null==i.onMetaData||"object"!==a(i.onMetaData))return void l.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&l.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=i;var r=this._metadata.onMetaData;if("boolean"==typeof r.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=r.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof r.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=r.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof r.audiodatarate&&(this._mediaInfo.audioDataRate=r.audiodatarate),"number"==typeof r.videodatarate&&(this._mediaInfo.videoDataRate=r.videodatarate),"number"==typeof r.width&&(this._mediaInfo.width=r.width),"number"==typeof r.height&&(this._mediaInfo.height=r.height),"number"==typeof r.duration){if(!this._durationOverrided){var s=Math.floor(r.duration*this._timescale);this._duration=s,this._mediaInfo.duration=s}}else this._mediaInfo.duration=0;if("number"==typeof r.framerate){var o=Math.floor(1e3*r.framerate);if(o>0){var u=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if("object"===a(r.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var d=r.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(d),r.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=r,l.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],i=1;i<e.times.length;i++){var r=this._timestampBase+Math.floor(1e3*e.times[i]);t.push(r),n.push(e.filepositions[i])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,i){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){var r=(this._littleEndian,new DataView(e,t,n)),s=r.getUint8(0),a=s>>>4;if(2!==a&&10!==a)return void this._onError(m.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a);var o=0,u=(12&s)>>>2;if(!(u>=0&&u<=4))return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u);o=this._flvSoundRateTable[u];var d=1&s,h=this._audioMetadata,f=this._audioTrack;if(h||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),h=this._audioMetadata={},h.type="audio",h.id=f.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=o,h.channelCount=0===d?1:2),10===a){var c=this._parseAACAudioData(e,t+1,n-1);if(void 0==c)return;if(0===c.packetType){h.config&&l.default.w(this.TAG,"Found another AudioSpecificConfig!");var _=c.data;h.audioSampleRate=_.samplingRate,h.channelCount=_.channelCount,h.codec=_.codec,h.originalCodec=_.originalCodec,h.config=_.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,l.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",h);var p=this._mediaInfo;p.audioCodec=h.originalCodec,p.audioSampleRate=h.audioSampleRate,p.audioChannelCount=h.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===c.packetType){var v=this._timestampBase+i,g={unit:c.data,length:c.data.byteLength,dts:v,pts:v};f.samples.push(g),f.length+=c.data.length,this._hasRecvAudio=!0 |
| | | }else l.default.e(this.TAG,"Flv: Unsupported AAC data type "+c.packetType)}else if(2===a){if(!h.codec){var y=this._parseMP3AudioData(e,t+1,n-1,!0);if(void 0==y)return;h.audioSampleRate=y.samplingRate,h.channelCount=y.channelCount,h.codec=y.codec,h.originalCodec=y.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,l.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);var b=this._mediaInfo;b.audioCodec=h.codec,b.audioSampleRate=h.audioSampleRate,b.audioChannelCount=h.channelCount,b.audioDataRate=y.bitRate,b.hasVideo?null!=b.videoCodec&&(b.mimeType='video/x-flv; codecs="'+b.videoCodec+","+b.audioCodec+'"'):b.mimeType='video/x-flv; codecs="'+b.audioCodec+'"',b.isComplete()&&this._onMediaInfo(b)}var E=this._parseMP3AudioData(e,t+1,n-1,!1);if(void 0==E)return;var S=this._timestampBase+i,k={unit:E,length:E.byteLength,dts:S,pts:S};f.samples.push(k),f.length+=E.length}}}},{key:"_parseAACAudioData",value:function(e,t,n){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");var i={},r=new Uint8Array(e,t,n);return i.packetType=r[0],0===r[0]?i.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):i.data=r.subarray(1),i}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var i=new Uint8Array(e,t,n),r=null,s=0,a=0,o=0,u=null;if(s=a=i[0]>>>3,(o=(7&i[0])<<1|i[1]>>>7)<0||o>=this._mpegSamplingRates.length)return void this._onError(m.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");var l=this._mpegSamplingRates[o],d=(120&i[1])>>>3;if(d<0||d>=8)return void this._onError(m.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===s&&(u=(7&i[1])<<1|i[2]>>>7,i[2]);var h=self.navigator.userAgent.toLowerCase();return-1!==h.indexOf("firefox")?o>=6?(s=5,r=new Array(4),u=o-3):(s=2,r=new Array(2),u=o):-1!==h.indexOf("android")?(s=2,r=new Array(2),u=o):(s=5,u=o,r=new Array(4),o>=6?u=o-3:1===d&&(s=2,r=new Array(2),u=o)),r[0]=s<<3,r[0]|=(15&o)>>>1,r[1]=(15&o)<<7,r[1]|=(15&d)<<3,5===s&&(r[1]|=(15&u)>>>1,r[2]=(1&u)<<7,r[2]|=8,r[3]=0),{config:r,samplingRate:l,channelCount:d,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+a}}},{key:"_parseMP3AudioData",value:function(e,t,n,i){if(n<4)return void l.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");var r=(this._littleEndian,new Uint8Array(e,t,n)),s=null;if(i){if(255!==r[0])return;var a=r[1]>>>3&3,o=(6&r[1])>>1,u=(240&r[2])>>>4,d=(12&r[2])>>>2,h=r[3]>>>6&3,f=3!==h?2:1,c=0,_=0;switch(a){case 0:c=this._mpegAudioV25SampleRateTable[d];break;case 2:c=this._mpegAudioV20SampleRateTable[d];break;case 3:c=this._mpegAudioV10SampleRateTable[d]}switch(o){case 1:34,u<this._mpegAudioL3BitRateTable.length&&(_=this._mpegAudioL3BitRateTable[u]);break;case 2:33,u<this._mpegAudioL2BitRateTable.length&&(_=this._mpegAudioL2BitRateTable[u]);break;case 3:32,u<this._mpegAudioL1BitRateTable.length&&(_=this._mpegAudioL1BitRateTable[u])}s={bitRate:_,samplingRate:c,channelCount:f,codec:"mp3",originalCodec:"mp3"}}else s=r;return s}},{key:"_parseVideoData",value:function(e,t,n,i,r){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var s=new Uint8Array(e,t,n)[0],a=(240&s)>>>4,o=15&s;if(7!==o)return void this._onError(m.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+o);this._parseAVCVideoPacket(e,t+1,n-1,i,r,a)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,i,r,s){if(n<4)return void l.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");var a=this._littleEndian,o=new DataView(e,t,n),u=o.getUint8(0),d=16777215&o.getUint32(0,!a),h=d<<8>>8;if(0===u)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===u)this._parseAVCVideoData(e,t+4,n-4,i,r,s,h);else if(2!==u)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)return void l.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");var i=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,a=new DataView(e,t,n);i?void 0!==i.avcc&&l.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),i=this._videoMetadata={},i.type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);var o=a.getUint8(0),u=a.getUint8(1);a.getUint8(2),a.getUint8(3);if(1!==o||0===u)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&a.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(m.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));var d=31&a.getUint8(5);if(0===d)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");d>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+d);for(var h=6,f=0;f<d;f++){var _=a.getUint16(h,!s);if(h+=2,0!==_){var p=new Uint8Array(e,t+h,_);h+=_;var v=c.default.parseSPS(p);if(0===f){i.codecWidth=v.codec_size.width,i.codecHeight=v.codec_size.height,i.presentWidth=v.present_size.width,i.presentHeight=v.present_size.height,i.profile=v.profile_string,i.level=v.level_string,i.bitDepth=v.bit_depth,i.chromaFormat=v.chroma_format,i.sarRatio=v.sar_ratio,i.frameRate=v.frame_rate,!1!==v.frame_rate.fixed&&0!==v.frame_rate.fps_num&&0!==v.frame_rate.fps_den||(i.frameRate=this._referenceFrameRate);var g=i.frameRate.fps_den,y=i.frameRate.fps_num;i.refSampleDuration=i.timescale*(g/y);for(var b=p.subarray(1,4),E="avc1.",S=0;S<3;S++){var k=b[S].toString(16);k.length<2&&(k="0"+k),E+=k}i.codec=E;var L=this._mediaInfo;L.width=i.codecWidth,L.height=i.codecHeight,L.fps=i.frameRate.fps,L.profile=i.profile,L.level=i.level,L.refFrames=v.ref_frames,L.chromaFormat=v.chroma_format_string,L.sarNum=i.sarRatio.width,L.sarDen=i.sarRatio.height,L.videoCodec=E,L.hasAudio?null!=L.audioCodec&&(L.mimeType='video/x-flv; codecs="'+L.videoCodec+","+L.audioCodec+'"'):L.mimeType='video/x-flv; codecs="'+L.videoCodec+'"',L.isComplete()&&this._onMediaInfo(L)}}}var w=a.getUint8(h);if(0===w)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");w>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+w),h++;for(var R=0;R<w;R++){var A=a.getUint16(h,!s);h+=2,0!==A&&(h+=A)}i.avcc=new Uint8Array(n),i.avcc.set(new Uint8Array(e,t,n),0),l.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",i)}},{key:"_parseAVCVideoData",value:function(e,t,n,i,r,s,a){for(var o=this._littleEndian,u=new DataView(e,t,n),d=[],h=0,f=0,c=this._naluLengthSize,_=this._timestampBase+i,m=1===s;f<n;){if(f+4>=n){l.default.w(this.TAG,"Malformed Nalu near timestamp "+_+", offset = "+f+", dataSize = "+n);break}var p=u.getUint32(f,!o);if(3===c&&(p>>>=8),p>n-c)return void l.default.w(this.TAG,"Malformed Nalus near timestamp "+_+", NaluSize > DataSize!");var v=31&u.getUint8(f+c);5===v&&(m=!0);var g=new Uint8Array(e,t+f,c+p),y={type:v,data:g};d.push(y),h+=g.byteLength,f+=c+p}if(d.length){var b=this._videoTrack,E={units:d,length:h,isKeyframe:m,dts:_,cts:a,pts:_+a};m&&(E.fileposition=r),b.samples.push(E),b.length+=h}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var i=(4&t[4])>>>2!=0,r=0!=(1&t[4]),a=s(t,5);return a<9?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:i,hasVideoTrack:r}}}]),e}();n.default=y},{"../core/media-info.js":7,"../utils/exception.js":40,"../utils/logger.js":41,"./amf-parser.js":15,"./demux-errors.js":16,"./sps-parser.js":19}],19:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("./exp-golomb.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=function(){function e(){i(this,e)}return r(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,i=new Uint8Array(n),r=0,s=0;s<n;s++)s>=2&&3===t[s]&&0===t[s-1]&&0===t[s-2]||(i[r]=t[s],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),i=new a.default(n);i.readByte();var r=i.readByte();i.readByte();var s=i.readByte();i.readUEG();var o=e.getProfileString(r),u=e.getLevelString(s),l=1,d=420,h=[0,420,422,444],f=8;if((100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r)&&(l=i.readUEG(),3===l&&i.readBits(1),l<=3&&(d=h[l]),f=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var c=3!==l?8:12,_=0;_<c;_++)i.readBool()&&(_<6?e._skipScalingList(i,16):e._skipScalingList(i,64));i.readUEG();var m=i.readUEG();if(0===m)i.readUEG();else if(1===m){i.readBits(1),i.readSEG(),i.readSEG();for(var p=i.readUEG(),v=0;v<p;v++)i.readSEG()}var g=i.readUEG();i.readBits(1);var y=i.readUEG(),b=i.readUEG(),E=i.readBits(1);0===E&&i.readBits(1),i.readBits(1);var S=0,k=0,L=0,w=0;i.readBool()&&(S=i.readUEG(),k=i.readUEG(),L=i.readUEG(),w=i.readUEG());var R=1,A=1,O=0,T=!0,C=0,I=0;if(i.readBool()){if(i.readBool()){var x=i.readByte(),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],D=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];x>0&&x<16?(R=M[x-1],A=D[x-1]):255===x&&(R=i.readByte()<<8|i.readByte(),A=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var B=i.readBits(32),j=i.readBits(32);T=i.readBool(),C=j,I=2*B,O=C/I}}var P=1;1===R&&1===A||(P=R/A);var U=0,N=0;if(0===l)U=1,N=2-E;else{var F=3===l?1:2,G=1===l?2:1;U=F,N=G*(2-E)}var V=16*(y+1),z=16*(b+1)*(2-E);V-=(S+k)*U,z-=(L+w)*N;var H=Math.ceil(V*P);return i.destroy(),i=null,{profile_string:o,level_string:u,bit_depth:f,ref_frames:g,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:T,fps:O,fps_den:I,fps_num:C},sar_ratio:{width:R,height:A},codec_size:{width:V,height:z},present_size:{width:H,height:z}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,i=8,r=0,s=0;s<t;s++)0!==i&&(r=e.readSEG(),i=(n+r+256)%256),n=0===i?n:i}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();n.default=o},{"./exp-golomb.js":17}],20:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=e;if(null==n||"object"!==(void 0===n?"undefined":o(n)))throw new E.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new E.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new c.default(n,t);default:return new m.default(n,t)}}function s(){return h.default.supportMSEH264Playback()}function a(){return h.default.getFeatureList()}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},u=e("./utils/polyfill.js"),l=i(u),d=e("./core/features.js"),h=i(d),f=e("./player/flv-player.js"),c=i(f),_=e("./player/native-player.js"),m=i(_),p=e("./player/player-events.js"),v=i(p),g=e("./player/player-errors.js"),y=e("./utils/logging-control.js"),b=i(y),E=e("./utils/exception.js");l.default.install();var S={};S.createPlayer=r,S.isSupported=s,S.getFeatureList=a,S.Events=v.default,S.ErrorTypes=g.ErrorTypes,S.ErrorDetails=g.ErrorDetails,S.FlvPlayer=c.default,S.NativePlayer=m.default,S.LoggingControl=b.default,Object.defineProperty(S,"version",{enumerable:!0,get:function(){return"1.4.0"}}),n.default=S},{"./core/features.js":6,"./player/flv-player.js":32,"./player/native-player.js":33,"./player/player-errors.js":34,"./player/player-events.js":35,"./utils/exception.js":40,"./utils/logging-control.js":42,"./utils/polyfill.js":43}],21:[function(e,t,n){t.exports=e("./flv.js").default},{"./flv.js":20}],22:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},u=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=e("../utils/logger.js"),h=(i(d),e("../utils/browser.js")),f=i(h),c=e("./loader.js"),_=e("../utils/exception.js"),m=function(e){function t(e,n){r(this,t);var i=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"fetch-stream-loader"));return i.TAG="FetchStreamLoader",i._seekHandler=e,i._config=n,i._needStash=!0,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}return a(t,e),l(t,null,[{key:"isSupported",value:function(){try{var e=f.default.msedge&&f.default.version.minor>=15048,t=!f.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),l(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);var r=this._seekHandler.getConfig(i,t),s=new self.Headers;if("object"===o(r.headers)){var a=r.headers;for(var u in a)a.hasOwnProperty(u)&&s.append(u,a[u])}var l={method:"GET",headers:s,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};!1===e.cors&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=c.LoaderStatus.kConnecting,self.fetch(r.url,l).then(function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=c.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==r.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=c.LoaderStatus.kError,!n._onError)throw new _.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(c.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(function(e){if(n._status=c.LoaderStatus.kError,!n._onError)throw e;n._onError(c.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then(function(n){if(n.done)t._status=c.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=c.LoaderStatus.kComplete,e.cancel();t._status=c.LoaderStatus.kBuffering;var i=n.value.buffer,r=t._range.from+t._receivedLength;t._receivedLength+=i.byteLength,t._onDataArrival&&t._onDataArrival(i,r,t._receivedLength),t._pump(e)}}).catch(function(e){if(11!==e.code||!f.default.msedge){t._status=c.LoaderStatus.kError;var n=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=c.LoaderErrors.EXCEPTION,i={code:e.code,msg:e.message}):(n=c.LoaderErrors.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new _.RuntimeException(i.msg);t._onError(n,i)}})}}]),t}(c.BaseLoader);n.default=m},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],23:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=i(a),u=e("./speed-sampler.js"),l=i(u),d=e("./loader.js"),h=e("./fetch-stream-loader.js"),f=i(h),c=e("./xhr-moz-chunked-loader.js"),_=i(c),m=e("./xhr-msstream-loader.js"),p=(i(m),e("./xhr-range-loader.js")),v=i(p),g=e("./websocket-loader.js"),y=i(g),b=e("./range-seek-handler.js"),E=i(b),S=e("./param-seek-handler.js"),k=i(S),L=e("../utils/exception.js"),w=function(){function e(t,n,i){r(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,void 0!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new l.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return s(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new E.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new k.default(t,n)}else{if("custom"!==e.seekType)throw new L.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new L.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(this._isWebSocketURL)this._loaderClass=y.default;else if(f.default.isSupported())this._loaderClass=f.default;else if(_.default.isSupported())this._loaderClass=_.default;else{if(!v.default.isSupported())throw new L.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=v.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new L.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(i,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,i=0,r=0,s=n;if(e<t[0])return t[0];for(;r<=s;){if((i=r+Math.floor((s-r)/2))===n||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?r=i+1:s=i-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive?e:e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new L.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var i=this._speedSampler.lastSecondKBps;if(0!==i){var r=this._normalizeSpeed(i);this._speedNormalized!==r&&(this._speedNormalized=r,this._adjustStashSize(r))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){var s=new Uint8Array(this._stashBuffer,0,this._stashSize);s.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var a=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var o=this._stashBuffer.slice(0,this._stashUsed),u=this._dispatchChunks(o,this._stashByteStart);if(u<o.byteLength){if(u>0){var l=new Uint8Array(o,u);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=u}}else this._stashUsed=0,this._stashByteStart+=u;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var d=this._dispatchChunks(e,t);if(d<e.byteLength){var h=e.byteLength-d;h>this._bufferSize&&(this._expandBuffer(h),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,d),0),this._stashUsed+=h,this._stashByteStart=t+d}}}else if(0===this._stashUsed){var f=this._dispatchChunks(e,t);if(f<e.byteLength){var c=e.byteLength-f;c>this._bufferSize&&this._expandBuffer(c);var _=new Uint8Array(this._stashBuffer,0,this._bufferSize);_.set(new Uint8Array(e,f),0),this._stashUsed+=c,this._stashByteStart=t+f}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var m=new Uint8Array(this._stashBuffer,0,this._bufferSize);m.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p<this._stashUsed&&p>0){var v=new Uint8Array(this._stashBuffer,p);m.set(v,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var r=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,n);r.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=n}return 0}o.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(o.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case d.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(o.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case d.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case d.LoaderErrors.CONNECTING_TIMEOUT:case d.LoaderErrors.HTTP_STATUS_CODE_INVALID:case d.LoaderErrors.EXCEPTION:}if(!this._onError)throw new L.RuntimeException("IOException: "+t.msg);this._onError(e,t)}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===v.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}]),e}();n.default=w},{"../utils/exception.js":40,"../utils/logger.js":41,"./fetch-stream-loader.js":22,"./loader.js":24,"./param-seek-handler.js":25,"./range-seek-handler.js":26,"./speed-sampler.js":27,"./websocket-loader.js":28,"./xhr-moz-chunked-loader.js":29,"./xhr-msstream-loader.js":30,"./xhr-range-loader.js":31}],24:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.BaseLoader=n.LoaderErrors=n.LoaderStatus=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("../utils/exception.js"),a=n.LoaderStatus={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4};n.LoaderErrors={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},n.BaseLoader=function(){function e(t){i(this,e),this._type=t||"undefined",this._status=a.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return r(e,[{key:"destroy",value:function(){this._status=a.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===a.kConnecting||this._status===a.kBuffering}},{key:"open",value:function(e,t){ |
| | | throw new s.NotImplementedException("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new s.NotImplementedException("Unimplemented abstract function!")}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}}]),e}()},{"../utils/exception.js":40}],25:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(t,n){i(this,e),this._startName=t,this._endName=n}return r(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var i=!0;-1===n.indexOf("?")&&(n+="?",i=!1),i&&(n+="&"),n+=this._startName+"="+t.from.toString(),-1!==t.to&&(n+="&"+this._endName+"="+t.to.toString())}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,i=e.indexOf("?");-1!==i&&(n=e.substring(i+1));var r="";if(void 0!=n&&n.length>0)for(var s=n.split("&"),a=0;a<s.length;a++){var o=s[a].split("="),u=a>0;o[0]!==this._startName&&o[0]!==this._endName&&(u&&(r+="&"),r+=s[a])}return 0===r.length?t:t+"?"+r}}]),e}();n.default=s},{}],26:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(t){i(this,e),this._zeroStart=t||!1}return r(e,[{key:"getConfig",value:function(e,t){var n={};if(0!==t.from||-1!==t.to){var i=void 0;i=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",n.Range=i}else this._zeroStart&&(n.Range="bytes=0-");return{url:e,headers:n}}},{key:"removeURLParameters",value:function(e){return e}}]),e}();n.default=s},{}],27:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return r(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();n.default=s},{}],28:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=e("../utils/logger.js"),l=(function(e){e&&e.__esModule}(u),e("./loader.js")),d=e("../utils/exception.js"),h=function(e){function t(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"websocket-loader"));return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return s(t,e),o(t,null,[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),o(t,[{key:"destroy",value:function(){this._ws&&this.abort(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=l.LoaderStatus.kConnecting}catch(e){this._status=l.LoaderStatus.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new d.RuntimeException(n.msg);this._onError(l.LoaderErrors.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=l.LoaderStatus.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=l.LoaderStatus.kBuffering}},{key:"_onWebSocketClose",value:function(e){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=l.LoaderStatus.kError;var i={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new d.RuntimeException(i.msg);this._onError(l.LoaderErrors.EXCEPTION,i)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=l.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new d.RuntimeException(t.msg);this._onError(l.LoaderErrors.EXCEPTION,t)}}]),t}(l.BaseLoader);n.default=h},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],29:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},o=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e("../utils/logger.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(l),h=e("./loader.js"),f=e("../utils/exception.js"),c=function(e){function t(e,n){i(this,t);var s=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-moz-chunked-loader"));return s.TAG="MozChunkedLoader",s._seekHandler=e,s._config=n,s._needStash=!0,s._xhr=null,s._requestAbort=!1,s._contentLength=null,s._receivedLength=0,s}return s(t,e),u(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return d.default.w("MozChunkedLoader",e.message),!1}}}]),u(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(n=e.redirectedURL);var i=this._seekHandler.getConfig(n,t);this._requestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"===a(i.headers)){var s=i.headers;for(var o in s)s.hasOwnProperty(o)&&r.setRequestHeader(o,s[o])}this._status=h.LoaderStatus.kConnecting,r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=h.LoaderStatus.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=h.LoaderStatus.kError,!this._onError)throw new f.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=h.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==h.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status!==h.LoaderStatus.kError&&(this._status=h.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(e){this._status=h.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=h.LoaderErrors.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=h.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new f.RuntimeException(n.msg);this._onError(t,n)}}]),t}(h.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],30:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},o=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e("../utils/logger.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(l),h=e("./loader.js"),f=e("../utils/exception.js"),c=function(e){function t(e,n){i(this,t);var s=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-msstream-loader"));return s.TAG="MSStreamLoader",s._seekHandler=e,s._config=n,s._needStash=!0,s._xhr=null,s._reader=null,s._totalRange=null,s._currentRange=null,s._currentRequestURL=null,s._currentRedirectedURL=null,s._contentLength=null,s._receivedLength=0,s._bufferLimit=16777216,s._lastTimeBufferSize=0,s._isReconnecting=!1,s}return s(t,e),u(t,null,[{key:"isSupported",value:function(){try{if(void 0===self.MSStream||void 0===self.MSStreamReader)return!1;var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="ms-stream","ms-stream"===e.responseType}catch(e){return d.default.w("MSStreamLoader",e.message),!1}}}]),u(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._internalOpen(e,t,!1)}},{key:"_internalOpen",value:function(e,t,n){this._dataSource=e,n?this._currentRange=t:this._totalRange=t;var i=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?i=this._currentRedirectedURL:void 0!=e.redirectedURL&&(i=e.redirectedURL));var r=this._seekHandler.getConfig(i,t);this._currentRequestURL=r.url;var s=this._reader=new self.MSStreamReader;s.onprogress=this._msrOnProgress.bind(this),s.onload=this._msrOnLoad.bind(this),s.onerror=this._msrOnError.bind(this);var o=this._xhr=new XMLHttpRequest;if(o.open("GET",r.url,!0),o.responseType="ms-stream",o.onreadystatechange=this._xhrOnReadyStateChange.bind(this),o.onerror=this._xhrOnError.bind(this),e.withCredentials&&(o.withCredentials=!0),"object"===a(r.headers)){var u=r.headers;for(var l in u)u.hasOwnProperty(l)&&o.setRequestHeader(l,u[l])}this._isReconnecting?this._isReconnecting=!1:this._status=h.LoaderStatus.kConnecting,o.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=h.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(1===this._reader.readyState&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState)if(t.status>=200&&t.status<=299){if(this._status=h.LoaderStatus.kBuffering,void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var i=t.getResponseHeader("Content-Length");if(null!=i&&null==this._contentLength){var r=parseInt(i);r>0&&(this._contentLength=r,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=h.LoaderStatus.kError,!this._onError)throw new f.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=h.LoaderStatus.kBuffering;var s=t.response;this._reader.readAsArrayBuffer(s)}}},{key:"_xhrOnError",value:function(e){this._status=h.LoaderStatus.kError;var t=h.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new f.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target,n=t.result;if(null==n)return void this._doReconnectIfNeeded();var i=n.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=n.byteLength;var r=this._totalRange.from+this._receivedLength;this._receivedLength+=i.byteLength,this._onDataArrival&&this._onDataArrival(i,r,this._receivedLength),n.byteLength>=this._bufferLimit&&(d.default.v(this.TAG,"MSStream buffer exceeded max size near "+(r+i.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var e={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,e,!0)}}},{key:"_msrOnLoad",value:function(e){this._status=h.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(e){this._status=h.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength<this._contentLength?(t=h.LoaderErrors.EARLY_EOF,n={code:-1,msg:"MSStream meet Early-Eof"}):(t=h.LoaderErrors.EARLY_EOF,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new f.RuntimeException(n.msg);this._onError(t,n)}}]),t}(h.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],31:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},u=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=e("../utils/logger.js"),h=i(d),f=e("./speed-sampler.js"),c=i(f),_=e("./loader.js"),m=e("../utils/exception.js"),p=function(e){function t(e,n){r(this,t);var i=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-range-loader"));return i.TAG="RangeLoader",i._seekHandler=e,i._config=n,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new c.default,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}return a(t,e),l(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return h.default.w("RangeLoader",e.message),!1}}}]),l(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=_.LoaderStatus.kConnecting;var n=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?n=this._currentRedirectedURL:void 0!=e.redirectedURL&&(n=e.redirectedURL));var i=this._seekHandler.getConfig(n,t);this._currentRequestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"===o(i.headers)){var s=i.headers;for(var a in s)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a])}r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=_.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=_.LoaderStatus.kBuffering}else{if(this._status=_.LoaderStatus.kError,!this._onError)throw new m.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(_.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==_.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,i=0,r=0,s=n;if(e<t[0])return t[0];for(;r<=s;){if((i=r+Math.floor((s-r)/2))===n||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?r=i+1:s=i-1}}},{key:"_onLoad",value:function(e){if(this._status!==_.LoaderStatus.kError){if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&++this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var s=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():s=!0,this._onDataArrival&&this._onDataArrival(i,r,this._receivedLength),s&&(this._status=_.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=_.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=_.LoaderErrors.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=_.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new m.RuntimeException(n.msg);this._onError(t,n)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}]),t}(_.BaseLoader);n.default=p},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24,"./speed-sampler.js":27}],32:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e("events"),u=i(o),l=e("../utils/logger.js"),d=i(l),h=e("../utils/browser.js"),f=i(h),c=e("./player-events.js"),_=i(c),m=e("../core/transmuxer.js"),p=i(m),v=e("../core/transmuxing-events.js"),g=i(v),y=e("../core/mse-controller.js"),b=i(y),E=e("../core/mse-events.js"),S=i(E),k=e("./player-errors.js"),L=e("../config.js"),w=e("../utils/exception.js"),R=function(){function e(t,n){if(r(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new u.default,this._config=(0,L.createDefaultConfig)(),"object"===(void 0===n?"undefined":s(n))&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new w.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=f.default.chrome&&(f.default.version.major<50||50===f.default.version.major&&f.default.version.build<2661);this._alwaysSeekKeyframe=!!(i||f.default.msedge||f.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return a(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===_.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(function(){n._emitter.emit(_.default.MEDIA_INFO,n.mediaInfo)}):e===_.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(function(){n._emitter.emit(_.default.STATISTICS_INFO,n.statisticsInfo)}),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new b.default(this._config),this._msectl.on(S.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(S.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(S.default.SOURCE_OPEN,function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())}),this._msectl.on(S.default.ERROR,function(e){t._emitter.emit(_.default.ERROR,k.ErrorTypes.MEDIA_ERROR,k.ErrorDetails.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this |
| | | ;if(!this._mediaElement)throw new w.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new w.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened)return void(this._hasPendingLoad=!0);this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new p.default(this._mediaDataSource,this._config),this._transmuxer.on(g.default.INIT_SEGMENT,function(t,n){e._msectl.appendInitSegment(n)}),this._transmuxer.on(g.default.MEDIA_SEGMENT,function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;n.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(d.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}}),this._transmuxer.on(g.default.LOADING_COMPLETE,function(){e._msectl.endOfStream(),e._emitter.emit(_.default.LOADING_COMPLETE)}),this._transmuxer.on(g.default.RECOVERED_EARLY_EOF,function(){e._emitter.emit(_.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(g.default.IO_ERROR,function(t,n){e._emitter.emit(_.default.ERROR,k.ErrorTypes.NETWORK_ERROR,t,n)}),this._transmuxer.on(g.default.DEMUX_ERROR,function(t,n){e._emitter.emit(_.default.ERROR,k.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})}),this._transmuxer.on(g.default.MEDIA_INFO,function(t){e._mediaInfo=t,e._emitter.emit(_.default.MEDIA_INFO,Object.assign({},t))}),this._transmuxer.on(g.default.STATISTICS_INFO,function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(_.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))}),this._transmuxer.on(g.default.RECOMMEND_SEEKPOINT,function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)}),this._transmuxer.open()}}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,i=0;i<e.length;i++){var r=e.start(i),s=e.end(i);if(r<=t&&t<s){r,n=s;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(d.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){d.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,i=0;i<t.length;i++){var r=t.start(i),s=t.end(i);if(e>=r&&e<s){e>=s-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(d.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var i=t.start(n),r=t.end(n);if(e>=i&&e<r)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,i=0;if(e<1&&this._mediaElement.buffered.length>0){var r=this._mediaElement.buffered.start(0);(r<1&&e<r||f.default.safari)&&(n=!0,i=f.default.safari?.1:r)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=i;else if(t){if(this._alwaysSeekKeyframe){var s=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=s?s.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTime<n.start(0)&&(d.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+n.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)return void(this._requestSetTime=!1);if(t<1&&n.length>0){var i=n.start(0);if(i<1&&t<i||f.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=f.default.safari?.1:i)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var r=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=r&&(this._requestSetTime=!0,this._mediaElement.currentTime=r.dts/1e3)}return void(null!=this._progressChecker&&this._checkProgressAndResume())}this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}]),e}();n.default=R},{"../config.js":5,"../core/mse-controller.js":9,"../core/mse-events.js":10,"../core/transmuxer.js":11,"../core/transmuxing-events.js":13,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./player-errors.js":34,"./player-events.js":35,events:2}],33:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e("events"),u=i(o),l=e("./player-events.js"),d=i(l),h=e("../config.js"),f=e("../utils/exception.js"),c=function(){function e(t,n){if(r(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new u.default,this._config=(0,h.createDefaultConfig)(),"object"===(void 0===n?"undefined":s(n))&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new f.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new f.InvalidArgumentException("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return a(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===d.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){n._emitter.emit(d.default.MEDIA_INFO,n.mediaInfo)}):e===d.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){n._emitter.emit(d.default.STATISTICS_INFO,n.statisticsInfo)}),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new f.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(d.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(d.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}}]),e}();n.default=c},{"../config.js":5,"../utils/exception.js":40,"./player-events.js":35,events:2}],34:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorDetails=n.ErrorTypes=void 0;var i=e("../io/loader.js"),r=e("../demux/demux-errors.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r);n.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},n.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:s.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:s.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:s.default.CODEC_UNSUPPORTED}},{"../demux/demux-errors.js":16,"../io/loader.js":24}],35:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info"};n.default=i},{}],36:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e)}return r(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}();n.default=s},{}],37:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e)}return r(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,i=Array.prototype.slice.call(arguments,1),r=i.length,s=0;s<r;s++)t+=i[s].byteLength;n=new Uint8Array(t),n[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var a=8,o=0;o<r;o++)n.set(i[o],a),a+=i[o].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),i=e.moov(t),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(n,0),r.set(i,n.byteLength),r}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),i=e.trak(t),r=e.mvex(t);return e.box(e.types.moov,n,i,r)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.presentWidth,s=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,s>>>8&255,255&s,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],r)}},{key:"mp4a",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,r,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return e.box(e.types.esds,r)}},{key:"avc1",value:function(t){var n=t.avcc,i=t.codecWidth,r=t.codecHeight,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,s,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var i=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=e.sdtp(t),o=e.trun(t,a.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,s,o,a)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],i=n.length,r=new Uint8Array(4+i),s=0;s<i;s++){var a=n[s].flags;r[s+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return e.box(e.types.sdtp,r)}},{key:"trun",value:function(t,n){var i=t.samples||[],r=i.length,s=12+16*r,a=new Uint8Array(s);n+=8+s,a.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var o=0;o<r;o++){var u=i[o].duration,l=i[o].size,d=i[o].flags,h=i[o].cts;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o)}return e.box(e.types.trun,a)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();s.init(),n.default=s},{}],38:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=i(a),u=e("./mp4-generator.js"),l=i(u),d=e("./aac-silent.js"),h=i(d),f=e("../utils/browser.js"),c=i(f),_=e("../core/media-segment-info.js"),m=e("../utils/exception.js"),p=function(){function e(t){r(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new _.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new _.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!c.default.chrome||!(c.default.version.major<50||50===c.default.version.major&&c.default.version.build<2661)),this._fillSilentAfterSeek=c.default.msedge||c.default.msie,this._mp3UseMpegAudio=!c.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return s(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,i="mp4",r=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(i="mpeg",r="",n=new Uint8Array):n=l.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=l.default.generateInitSegment(t)}if(!this._onInitSegment)throw new m.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:r,container:e+"/"+i,mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var i={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(i.samples.push(t),i.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(i,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n=e,i=n.samples,r=void 0,s=-1,a=-1,u=this._audioMeta.refSampleDuration,d="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,f=this._dtsBaseInited&&void 0===this._audioNextDts,m=!1;if(i&&0!==i.length&&(1!==i.length||t)){var p=0,v=null,g=0;d?(p=0,g=n.length):(p=8,g=8+n.length);var y=null;if(i.length>1&&(y=i.pop(),g-=y.length),null!=this._audioStashedLastSample){var b=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(b),g+=b.length}null!=y&&(this._audioStashedLastSample=y);var E=i[0].dts-this._dtsBase;if(this._audioNextDts)r=E-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(E);if(null!=S){var k=E-(S.originalDts+S.duration);k<=3&&(k=0);var L=S.dts+S.duration+k;r=E-L}else r=0}if(m){var w=E-r,R=this._videoSegmentInfoList.getLastSegmentBefore(E);if(null!=R&&R.beginDts<w){var A=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(A){var O=R.beginDts,T=w-R.beginDts;o.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+O+", duration: "+T),i.unshift({unit:A,dts:O,pts:O}),g+=A.byteLength}}else m=!1}for(var C=[],I=0;I<i.length;I++){var x=i[I],M=x.unit,D=x.dts-this._dtsBase,B=D-r;-1===s&&(s=B);var j=0;if(I!==i.length-1){j=i[I+1].dts-this._dtsBase-r-B}else if(null!=y){var P=y.dts-this._dtsBase-r;j=P-B}else j=C.length>=1?C[C.length-1].duration:Math.floor(u);var U=!1,N=null;if(j>1.5*u&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!c.default.safari){U=!0;var F=Math.abs(j-u),G=Math.ceil(F/u),V=B+u;o.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(B+j)+" ms, expected: "+(B+Math.round(u))+" ms, delta: "+Math.round(F)+" ms, generate: "+G+" frames");var z=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==z&&(o.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),z=M),N=[];for(var H=0;H<G;H++){var K=Math.round(V);if(N.length>0){var q=N[N.length-1];q.duration=K-q.dts}var W={dts:K,pts:K,cts:0,unit:z,size:z.byteLength,duration:0,originalDts:D,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};N.push(W),g+=M.byteLength,V+=u}var X=N[N.length-1];X.duration=B+j-X.dts,j=Math.round(u)}C.push({dts:B,pts:B,cts:0,unit:x.unit,size:x.unit.byteLength,duration:j,originalDts:D,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),U&&C.push.apply(C,N)}d?v=new Uint8Array(g):(v=new Uint8Array(g),v[0]=g>>>24&255,v[1]=g>>>16&255,v[2]=g>>>8&255,v[3]=255&g,v.set(l.default.types.mdat,4));for(var Y=0;Y<C.length;Y++){var Z=C[Y].unit;v.set(Z,p),p+=Z.byteLength}var Q=C[C.length-1];a=Q.dts+Q.duration,this._audioNextDts=a;var J=new _.MediaSegmentInfo;J.beginDts=s,J.endDts=a,J.beginPts=s,J.endPts=a,J.originalBeginDts=C[0].originalDts,J.originalEndDts=Q.originalDts+Q.duration,J.firstSample=new _.SampleInfo(C[0].dts,C[0].pts,C[0].duration,C[0].originalDts,!1),J.lastSample=new _.SampleInfo(Q.dts,Q.pts,Q.duration,Q.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(J),n.samples=C,n.sequenceNumber++;var $=null;$=d?new Uint8Array:l.default.moof(n,s),n.samples=[],n.length=0;var ee={type:"audio",data:this._mergeBoxes($,v).buffer,sampleCount:C.length,info:J};d&&f&&(ee.timestampOffset=s),this._onMediaSegment("audio",ee)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n=e,i=n.samples,r=void 0,s=-1,a=-1,o=-1,u=-1;if(i&&0!==i.length&&(1!==i.length||t)){var d=8,h=null,f=8+e.length,c=null;if(i.length>1&&(c=i.pop(),f-=c.length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,i.unshift(m),f+=m.length}null!=c&&(this._videoStashedLastSample=c);var p=i[0].dts-this._dtsBase;if(this._videoNextDts)r=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())r=0;else{var v=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=v){var g=p-(v.originalDts+v.duration);g<=3&&(g=0);var y=v.dts+v.duration+g;r=p-y}else r=0}for(var b=new _.MediaSegmentInfo,E=[],S=0;S<i.length;S++){var k=i[S],L=k.dts-this._dtsBase,w=k.isKeyframe,R=L-r,A=k.cts,O=R+A;-1===s&&(s=R,o=O);var T=0;if(S!==i.length-1){T=i[S+1].dts-this._dtsBase-r-R}else if(null!=c){var C=c.dts-this._dtsBase-r;T=C-R}else T=E.length>=1?E[E.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(w){var I=new _.SampleInfo(R,O,T,k.dts,!0);I.fileposition=k.fileposition,b.appendSyncPoint(I)}E.push({dts:R,pts:O,cts:A,units:k.units,size:k.length,isKeyframe:w,duration:T,originalDts:L,flags:{isLeading:0,dependsOn:w?2:1,isDependedOn:w?1:0,hasRedundancy:0,isNonSync:w?0:1}})}h=new Uint8Array(f),h[0]=f>>>24&255,h[1]=f>>>16&255,h[2]=f>>>8&255, |
| | | h[3]=255&f,h.set(l.default.types.mdat,4);for(var x=0;x<E.length;x++)for(var M=E[x].units;M.length;){var D=M.shift(),B=D.data;h.set(B,d),d+=B.byteLength}var j=E[E.length-1];if(a=j.dts+j.duration,u=j.pts+j.duration,this._videoNextDts=a,b.beginDts=s,b.endDts=a,b.beginPts=o,b.endPts=u,b.originalBeginDts=E[0].originalDts,b.originalEndDts=j.originalDts+j.duration,b.firstSample=new _.SampleInfo(E[0].dts,E[0].pts,E[0].duration,E[0].originalDts,E[0].isKeyframe),b.lastSample=new _.SampleInfo(j.dts,j.pts,j.duration,j.originalDts,j.isKeyframe),this._isLive||this._videoSegmentInfoList.append(b),n.samples=E,n.sequenceNumber++,this._forceFirstIDR){var P=E[0].flags;P.dependsOn=2,P.isNonSync=0}var U=l.default.moof(n,s);n.samples=[],n.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(U,h).buffer,sampleCount:E.length,info:b})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}}]),e}();n.default=p},{"../core/media-segment-info.js":8,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./aac-silent.js":36,"./mp4-generator.js":37}],39:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},s={};if(r.browser){s[r.browser]=!0;var a=r.majorVersion.split(".");s.version={major:parseInt(r.majorVersion,10),string:r.version},a.length>1&&(s.version.minor=parseInt(a[1],10)),a.length>2&&(s.version.build=parseInt(a[2],10))}r.platform&&(s[r.platform]=!0),(s.chrome||s.opr||s.safari)&&(s.webkit=!0),(s.rv||s.iemobile)&&(s.rv&&delete s.rv,r.browser="msie",s.msie=!0),s.edge&&(delete s.edge,r.browser="msedge",s.msedge=!0),s.opr&&(r.browser="opera",s.opera=!0),s.safari&&s.android&&(r.browser="android",s.android=!0),s.name=r.browser,s.platform=r.platform;for(var o in i)i.hasOwnProperty(o)&&delete i[o];Object.assign(i,s)}(),n.default=i},{}],40:[function(e,t,n){function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n.RuntimeException=function(){function e(t){s(this,e),this._message=t}return a(e,[{key:"toString",value:function(){return this.name+": "+this.message}},{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),e}();n.IllegalStateException=function(e){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return r(t,e),a(t,[{key:"name",get:function(){return"IllegalStateException"}}]),t}(o),n.InvalidArgumentException=function(e){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return r(t,e),a(t,[{key:"name",get:function(){return"InvalidArgumentException"}}]),t}(o),n.NotImplementedException=function(e){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return r(t,e),a(t,[{key:"name",get:function(){return"NotImplementedException"}}]),t}(o)},{}],41:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("events"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=function(){function e(){i(this,e)}return r(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();o.GLOBAL_TAG="flv.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new a.default,n.default=o},{events:2}],42:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("./logger.js"),l=i(u),d=function(){function e(){r(this,e)}return s(e,null,[{key:"getConfig",value:function(){return{globalTag:l.default.GLOBAL_TAG,forceGlobalTag:l.default.FORCE_GLOBAL_TAG,enableVerbose:l.default.ENABLE_VERBOSE,enableDebug:l.default.ENABLE_DEBUG,enableInfo:l.default.ENABLE_INFO,enableWarn:l.default.ENABLE_WARN,enableError:l.default.ENABLE_ERROR,enableCallback:l.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){l.default.GLOBAL_TAG=e.globalTag,l.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,l.default.ENABLE_VERBOSE=e.enableVerbose,l.default.ENABLE_DEBUG=e.enableDebug,l.default.ENABLE_INFO=e.enableInfo,l.default.ENABLE_WARN=e.enableWarn,l.default.ENABLE_ERROR=e.enableError,l.default.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){l.default.emitter.addListener("log",t),l.default.emitter.listenerCount("log")>0&&(l.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){l.default.emitter.removeListener("log",t),0===l.default.emitter.listenerCount("log")&&(l.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return l.default.FORCE_GLOBAL_TAG},set:function(t){l.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return l.default.GLOBAL_TAG},set:function(t){l.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return l.default.ENABLE_VERBOSE&&l.default.ENABLE_DEBUG&&l.default.ENABLE_INFO&&l.default.ENABLE_WARN&&l.default.ENABLE_ERROR},set:function(t){l.default.ENABLE_VERBOSE=t,l.default.ENABLE_DEBUG=t,l.default.ENABLE_INFO=t,l.default.ENABLE_WARN=t,l.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return l.default.ENABLE_DEBUG},set:function(t){l.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return l.default.ENABLE_VERBOSE},set:function(t){l.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return l.default.ENABLE_INFO},set:function(t){l.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return l.default.ENABLE_WARN},set:function(t){l.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return l.default.ENABLE_ERROR},set:function(t){l.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();d.emitter=new o.default,n.default=d},{"./logger.js":41,events:2}],43:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function t(){i(this,t)}return r(t,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(void 0!==i&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t},"function"!=typeof self.Promise&&e("es6-promise").polyfill()}}]),t}();s.install(),n.default=s},{"es6-promise":1}],44:[function(e,t,n){function i(e,t,n){var i=e;if(t+n<i.length){for(;n--;)if(128!=(192&i[++t]))return!1;return!0}return!1}function r(e){for(var t=[],n=e,r=0,s=e.length;r<s;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(i(n,r,1)){var a=(31&n[r])<<6|63&n[r+1];if(a>=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(i(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&i(n,r,3)){var u=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},{}]},{},[21])(21)}); |
New file |
| | |
| | | /*! jQuery v1.7.1 jquery.com | jquery.org/license */ |
| | | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; |
| | | f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() |
| | | {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); |
New file |
| | |
| | | /* |
| | | * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message |
| | | * Digest Algorithm, as defined in RFC 1321. |
| | | * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. |
| | | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet |
| | | * Distributed under the BSD License |
| | | * See http://pajhome.org.uk/crypt/md5 for more info. |
| | | */ |
| | | |
| | | /* |
| | | * Configurable variables. You may need to tweak these to be compatible with |
| | | * the server-side, but the defaults work in most cases. |
| | | */ |
| | | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ |
| | | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ |
| | | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ |
| | | |
| | | /* |
| | | * These are the functions you'll usually want to call |
| | | * They take string arguments and return either hex or base-64 encoded strings |
| | | */ |
| | | function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} |
| | | function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} |
| | | function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} |
| | | function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } |
| | | function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } |
| | | function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } |
| | | |
| | | /* |
| | | * Perform a simple self-test to see if the VM is working |
| | | */ |
| | | function md5_vm_test() |
| | | { |
| | | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; |
| | | } |
| | | |
| | | /* |
| | | * Calculate the MD5 of an array of little-endian words, and a bit length |
| | | */ |
| | | function core_md5(x, len) |
| | | { |
| | | /* append padding */ |
| | | x[len >> 5] |= 0x80 << ((len) % 32); |
| | | x[(((len + 64) >>> 9) << 4) + 14] = len; |
| | | |
| | | var a = 1732584193; |
| | | var b = -271733879; |
| | | var c = -1732584194; |
| | | var d = 271733878; |
| | | |
| | | for(var i = 0; i < x.length; i += 16) |
| | | { |
| | | var olda = a; |
| | | var oldb = b; |
| | | var oldc = c; |
| | | var oldd = d; |
| | | |
| | | a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); |
| | | d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); |
| | | c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); |
| | | b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); |
| | | a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); |
| | | d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); |
| | | c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); |
| | | b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); |
| | | a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); |
| | | d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); |
| | | c = md5_ff(c, d, a, b, x[i+10], 17, -42063); |
| | | b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); |
| | | a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); |
| | | d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); |
| | | c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); |
| | | b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); |
| | | |
| | | a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); |
| | | d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); |
| | | c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); |
| | | b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); |
| | | a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); |
| | | d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); |
| | | c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); |
| | | b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); |
| | | a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); |
| | | d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); |
| | | c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); |
| | | b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); |
| | | a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); |
| | | d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); |
| | | c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); |
| | | b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); |
| | | |
| | | a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); |
| | | d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); |
| | | c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); |
| | | b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); |
| | | a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); |
| | | d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); |
| | | c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); |
| | | b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); |
| | | a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); |
| | | d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); |
| | | c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); |
| | | b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); |
| | | a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); |
| | | d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); |
| | | c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); |
| | | b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); |
| | | |
| | | a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); |
| | | d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); |
| | | c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); |
| | | b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); |
| | | a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); |
| | | d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); |
| | | c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); |
| | | b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); |
| | | a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); |
| | | d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); |
| | | c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); |
| | | b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); |
| | | a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); |
| | | d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); |
| | | c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); |
| | | b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); |
| | | |
| | | a = safe_add(a, olda); |
| | | b = safe_add(b, oldb); |
| | | c = safe_add(c, oldc); |
| | | d = safe_add(d, oldd); |
| | | } |
| | | return Array(a, b, c, d); |
| | | |
| | | } |
| | | |
| | | /* |
| | | * These functions implement the four basic operations the algorithm uses. |
| | | */ |
| | | function md5_cmn(q, a, b, x, s, t) |
| | | { |
| | | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); |
| | | } |
| | | function md5_ff(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); |
| | | } |
| | | function md5_gg(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); |
| | | } |
| | | function md5_hh(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn(b ^ c ^ d, a, b, x, s, t); |
| | | } |
| | | function md5_ii(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); |
| | | } |
| | | |
| | | /* |
| | | * Calculate the HMAC-MD5, of a key and some data |
| | | */ |
| | | function core_hmac_md5(key, data) |
| | | { |
| | | var bkey = str2binl(key); |
| | | if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); |
| | | |
| | | var ipad = Array(16), opad = Array(16); |
| | | for(var i = 0; i < 16; i++) |
| | | { |
| | | ipad[i] = bkey[i] ^ 0x36363636; |
| | | opad[i] = bkey[i] ^ 0x5C5C5C5C; |
| | | } |
| | | |
| | | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); |
| | | return core_md5(opad.concat(hash), 512 + 128); |
| | | } |
| | | |
| | | /* |
| | | * Add integers, wrapping at 2^32. This uses 16-bit operations internally |
| | | * to work around bugs in some JS interpreters. |
| | | */ |
| | | function safe_add(x, y) |
| | | { |
| | | var lsw = (x & 0xFFFF) + (y & 0xFFFF); |
| | | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); |
| | | return (msw << 16) | (lsw & 0xFFFF); |
| | | } |
| | | |
| | | /* |
| | | * Bitwise rotate a 32-bit number to the left. |
| | | */ |
| | | function bit_rol(num, cnt) |
| | | { |
| | | return (num << cnt) | (num >>> (32 - cnt)); |
| | | } |
| | | |
| | | /* |
| | | * Convert a string to an array of little-endian words |
| | | * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. |
| | | */ |
| | | function str2binl(str) |
| | | { |
| | | var bin = Array(); |
| | | var mask = (1 << chrsz) - 1; |
| | | for(var i = 0; i < str.length * chrsz; i += chrsz) |
| | | bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); |
| | | return bin; |
| | | } |
| | | |
| | | /* |
| | | * Convert an array of little-endian words to a string |
| | | */ |
| | | function binl2str(bin) |
| | | { |
| | | var str = ""; |
| | | var mask = (1 << chrsz) - 1; |
| | | for(var i = 0; i < bin.length * 32; i += chrsz) |
| | | str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); |
| | | return str; |
| | | } |
| | | |
| | | /* |
| | | * Convert an array of little-endian words to a hex string. |
| | | */ |
| | | function binl2hex(binarray) |
| | | { |
| | | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; |
| | | var str = ""; |
| | | for(var i = 0; i < binarray.length * 4; i++) |
| | | { |
| | | str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + |
| | | hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | /* |
| | | * Convert an array of little-endian words to a base-64 string |
| | | */ |
| | | function binl2b64(binarray) |
| | | { |
| | | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| | | var str = ""; |
| | | for(var i = 0; i < binarray.length * 4; i += 3) |
| | | { |
| | | var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) |
| | | | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) |
| | | | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); |
| | | for(var j = 0; j < 4; j++) |
| | | { |
| | | if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; |
| | | else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); |
| | | } |
| | | } |
| | | return str; |
| | | } |
New file |
| | |
| | | var BaseURL = "http://116.169.59.170:9986/"; |
| | | //�첽 |
| | | function httpGet(url, parms, callback) { |
| | | httpGetFun(url, parms, callback, true); |
| | | } |
| | | //ͬ�� |
| | | function httpGetAsync(url, parms, callback) { |
| | | httpGetFun(url, parms, callback, false); |
| | | } |
| | | function httpGetFun(url, parms, callback,isAsync) { |
| | | url = BaseURL + url; |
| | | var queryString = ""; |
| | | if (parms) { |
| | | for (var name in parms) { |
| | | queryString += name + "=" + parms[name] + "&"; |
| | | } |
| | | if (url.indexOf("?") == -1) |
| | | url += "?" + queryString; |
| | | else |
| | | url += "&" + queryString; |
| | | } |
| | | url = (url.substring(url.length - 1) == '&') ? url.substring(0, url.length - 1) : url; |
| | | $.ajax({ |
| | | type: 'get', cache: false, dataType: 'json', async: isAsync, |
| | | url: url,//"RequertUrl", |
| | | //data: { url: url }, |
| | | success: function (result) { |
| | | //alert(JSON.stringify(result)); |
| | | if (callback) |
| | | callback(result); |
| | | }, |
| | | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| | | alert('error'); |
| | | } |
| | | }); |
| | | } |
New file |
| | |
| | | var hstVideoAll = { |
| | | init: function (domId, width, height, params, playerType) { |
| | | var path = this.getPath(); |
| | | this.playerPath = path + '../Content/play_media_stream.swf'; |
| | | this.domId = domId; |
| | | this.width = width; |
| | | this.height = height; |
| | | this.version = '11.0.0'; |
| | | this.params = params; |
| | | this.windownum = 4; |
| | | if (playerType === 'flash' || playerType === 'h5') { |
| | | this.playerType = playerType; |
| | | } |
| | | //if (this.isBrowseIE()) { |
| | | // this.playerType = 'flash'; |
| | | //} |
| | | if (!this.playerType && localStorage.playerType && localStorage.playerType === 'flash') { |
| | | this.playerType = 'flash'; |
| | | } |
| | | if (this.playerType === 'flash') { |
| | | this.loadJs(path + "swfobject.js"); |
| | | } else { |
| | | this.loadCss(path + "../css/DPlayer.min.css"); |
| | | this.loadCss(path + "../css/swfobject-h5.css"); |
| | | this.loadJs(path + "flv.min.js"); |
| | | this.loadJs(path + "DPlayer.min.js"); |
| | | this.loadJs(path + "swfobject-h5.js"); |
| | | this.loadJs(path + "md5.js"); |
| | | this.loadJs(path + "HZRecorder.js"); |
| | | this.loadJs(path + "HZPlayer.js"); |
| | | } |
| | | this.initTimer(); |
| | | }, |
| | | initTimer: function () { |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | if (typeof swfobject == "undefined") { |
| | | setTimeout(this.initTimer, 300) |
| | | } else { |
| | | swfobject.embedSWF(hstVideoAll.playerPath, hstVideoAll.domId, hstVideoAll.width, hstVideoAll.height, "11.0.0", null, null, hstVideoAll.params, null); |
| | | playerobject = swfobject.getObjectById(hstVideoAll.domId); |
| | | } |
| | | |
| | | } else { |
| | | if (typeof HstH5Video == "undefined") { |
| | | setTimeout(this.initTimer, 300) |
| | | } else { |
| | | var options = { |
| | | domId: hstVideoAll.domId, |
| | | width: hstVideoAll.width, |
| | | height: hstVideoAll.height |
| | | }; |
| | | if (hstVideoAll.params.lang) { |
| | | options.lang = hstVideoAll.params.lang |
| | | } |
| | | playerobject = new HstH5Video(options); |
| | | } |
| | | } |
| | | }, |
| | | setWindowCount: function (num) { |
| | | |
| | | if (!num) { |
| | | return; |
| | | } |
| | | num = parseInt(num); |
| | | hstVideoAll.windownum = num; |
| | | this.setWindowNum(); |
| | | }, |
| | | setWindowNum: function(){ |
| | | |
| | | if (typeof playerobject == "undefined") { |
| | | setTimeout(this.setWindowNum, 300) |
| | | } |
| | | else{ |
| | | |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.ActionScriptSetWindowsCount(hstVideoAll.windownum); |
| | | } |
| | | else{ |
| | | playerobject.setWindowNum(hstVideoAll.windownum); |
| | | } |
| | | } |
| | | }, |
| | | openVideo: function(server,port,devicechannel){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.ActionScriptPlayStream(server,port,devicechannel); |
| | | } |
| | | else{ |
| | | playerobject.openVideo(server,port,devicechannel); |
| | | } |
| | | }, |
| | | closeVideo: function(devicechannel){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.ActionScriptClosePlayStream(devicechannel); |
| | | } |
| | | else{ |
| | | playerobject.closeVideo(devicechannel); |
| | | } |
| | | }, |
| | | JsStartTalk: function(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsStartTalk(MediaServerName,MediaTCPPort, deviceId, channelId, MediaType); |
| | | } |
| | | else{ |
| | | //playerobject.closeVideo(devicechannel); |
| | | |
| | | playerobject.StartTalk(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password); |
| | | } |
| | | }, |
| | | JsStartMonitor: function(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsStartMonitor(MediaServerName,MediaTCPPort, deviceId, channelId, MediaType); |
| | | } |
| | | else{ |
| | | //playerobject.closeVideo(devicechannel); |
| | | playerobject.StartMonitor(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password); |
| | | } |
| | | }, |
| | | JsStartBroadcast: function(MediaServerName,MediaTCPPort,VoiceTCPPort,type,username,password){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsStartBroadcast(MediaServerName,MediaTCPPort, type); |
| | | } |
| | | else{ |
| | | //playerobject.closeVideo(devicechannel); |
| | | playerobject.StartBroadcast(MediaServerName, VoiceTCPPort, type, username, password); |
| | | } |
| | | }, |
| | | JsCloseTalk: function(deviceId, channelId){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsCloseTalk(deviceId, channelId); |
| | | } |
| | | else{ |
| | | playerobject.CloseTalk(deviceId, channelId); |
| | | } |
| | | }, |
| | | JsCloseMonitor: function(deviceId, channelId){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsCloseMonitor(deviceId, channelId); |
| | | } |
| | | else{ |
| | | playerobject.CloseMonitor(deviceId, channelId); |
| | | } |
| | | }, |
| | | JsCloseBroadcast: function(){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsCloseBroadcast(); |
| | | } |
| | | else{ |
| | | playerobject.CloseBroadcast(); |
| | | } |
| | | }, |
| | | StartRemotePlayback: function(server,port,devicechannel,starttime,endtime,callback){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JavaScriptStartRemotePlayback(server,port,devicechannel,starttime,endtime,2); |
| | | } |
| | | else{ |
| | | playerobject.StartRemotePlayback(server,port,devicechannel,starttime,endtime,callback); |
| | | } |
| | | }, |
| | | CloseRemotePlayback: function(devicechannel){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JavaScriptCloseRemotePlayback(devicechannel); |
| | | } |
| | | else{ |
| | | playerobject.CloseRemotePlayback(devicechannel); |
| | | } |
| | | }, |
| | | getPath: function () { |
| | | var scripts = document.getElementsByTagName('script') |
| | | for (let i = 0; i < scripts.length; i++) { |
| | | var src = scripts[i].src; |
| | | if (src.indexOf('swfobject-all.js') > -1) { |
| | | return src.replace(/[^\/]+$/, ""); |
| | | } |
| | | } |
| | | return ''; |
| | | }, |
| | | switchType: function (playerType) { |
| | | if (this.isBrowseIE() && playerType != 'flash') { |
| | | alert('ie浏览器只支持flash播放') |
| | | return; |
| | | } |
| | | if (playerType !== 'flash' && playerType !== 'h5' && playerType !== 'auto') { |
| | | return; |
| | | } |
| | | localStorage.playerType = playerType |
| | | location.reload() |
| | | }, |
| | | isBrowseIE: function () { |
| | | return (this.getBrowseVersion().indexOf("msie") != -1) ? true : false; |
| | | }, |
| | | getBrowseVersion: function () { |
| | | var userAgent = navigator.userAgent.toLowerCase(); |
| | | var browser = userAgent.match(/(firefox|chrome|safari|opera|msie)/); |
| | | var browserId = "msie"; |
| | | var browserVersion = ""; |
| | | var isIE11 = (userAgent.toLowerCase().indexOf("trident") > -1 && userAgent.indexOf("rv") > -1); |
| | | if (isIE11) { |
| | | browserId = "msie"; |
| | | browserVersion = "11.0"; |
| | | } else { |
| | | if (browser.length >= 2) { |
| | | browserId = browser[1]; |
| | | } else { |
| | | browserId = "msie"; |
| | | } |
| | | browserVersion = (userAgent.match(new RegExp('.+(?:version)[\/: ]([\\d.]+)')) || userAgent.match(new RegExp('(?:' + browserId + ')[\/: ]([\\d.]+)')) || [0, '0'])[1]; |
| | | } |
| | | return browserId + browserVersion; |
| | | }, |
| | | loadCss: function (path) { |
| | | if (!path || path.length === 0) { |
| | | throw new Error('argument "path" is required !'); |
| | | } |
| | | var head = document.getElementsByTagName('head')[0]; |
| | | var link = document.createElement('link'); |
| | | link.href = path; |
| | | link.rel = 'stylesheet'; |
| | | link.type = 'text/css'; |
| | | head.appendChild(link); |
| | | }, |
| | | loadJs: function (path) { |
| | | if (!path || path.length === 0) { |
| | | throw new Error('argument "path" is required !'); |
| | | } |
| | | var head = document.getElementsByTagName('head')[0]; |
| | | var script = document.createElement('script'); |
| | | script.src = path; |
| | | script.type = 'text/javascript'; |
| | | head.appendChild(script); |
| | | } |
| | | } |
New file |
| | |
| | | ; (function (undefined) { |
| | | "use strict" |
| | | var _global; |
| | | |
| | | var scaleProcess = function (hst_his, starttime, endtime, callbacknewpos) { |
| | | var hisDom = $('#' + hst_his); |
| | | var item1 = $("<div id=\"" + hst_his + "_bar\" style=\"background-repeat: repeat-x; background-position: 0 100%; background-color: #E4E4E4; border-left: 1px #83BBD9 solid; height: 10px; position: relative; font-size: 0px; border-radius: 3px;\" ></div>"); |
| | | var item12 = $("<div id=\"" + hst_his + "_step\" style=\"background-repeat: repeat-x; background-color: #8080FF; width: 0px; position: absolute; height: 10px; width: 0; left: 0; bottom: 0; \"></div>"); |
| | | var item13 = $("<span id=\"" + hst_his + "_btn\" style=\"background-repeat: repeat-x; background-color: #804080;width:8px;height:12px;position:absolute;left:-2px;top:-1px;cursor:pointer;\"></span>"); |
| | | item1.append(item12); |
| | | item1.append(item13); |
| | | //var item4 = $("<span id=\""+hst_his+"_start_time\" style=\"left: -25px;position: relative;\">00:00:00</span>"); |
| | | var item5 = $("<span id=\"" + hst_his + "_cur_time\" style=\"left:50%;position: relative;margin-left: -72px;color: #F080F0;font-size:12px;\">00:00:00</span>"); |
| | | //var item6 = $("<span id=\""+hst_his+"_end_time\" style=\"right: -25px;position: relative;float: right;\">00:00:00</span>"); |
| | | //item0.append(item4); |
| | | |
| | | //item0.append(item6); |
| | | hisDom.append(item1); |
| | | hisDom.append(item5); |
| | | |
| | | this.btn = document.getElementById(hst_his + "_btn"); |
| | | this.bar = document.getElementById(hst_his + "_bar"); |
| | | this.title = document.getElementById(hst_his + "_cur_time"); |
| | | this.step = this.bar.getElementsByTagName("div")[0]; |
| | | this.init(callbacknewpos); |
| | | this.startT0 = new Date(starttime.replace(/-/g, "/")); |
| | | this.startT = new Date(starttime.replace(/-/g, "/")); |
| | | this.endT = new Date(endtime.replace(/-/g, "/")); |
| | | this.curT = this.startT; |
| | | var formattedDateString = dateDigitToString(this.startT.getHours()) + ':' + dateDigitToString(this.startT.getMinutes()) + ':' + dateDigitToString(this.startT.getSeconds()); |
| | | //document.getElementById(hst_his+"_start_time").innerHTML=formattedDateString; |
| | | this.title.innerHTML = formattedDateString; |
| | | //formattedDateString = dateDigitToString(this.endT.getHours()) + ':' + dateDigitToString(this.endT.getMinutes()) + ':' + dateDigitToString(this.endT.getSeconds()); |
| | | //document.getElementById(hst_his+"_end_time").innerHTML=formattedDateString; |
| | | }; |
| | | var dateDigitToString = function (num) { |
| | | return num < 10 ? '0' + num : num; |
| | | }; //这个函数的作用是把个位数的十位置0,凑成两位数,如:08 04 |
| | | scaleProcess.prototype = { |
| | | init: function (callbacknewpos) { |
| | | var f = this, g = document, b = window, m = Math; |
| | | f.btn.onmousedown = function (e) { |
| | | var x = (e || b.event).clientX; |
| | | var l = this.offsetLeft; |
| | | var max = f.bar.offsetWidth - this.offsetWidth; |
| | | f.dropStartT = f.curT; |
| | | g.onmousemove = function (e) { |
| | | var thisX = (e || b.event).clientX; |
| | | var to = m.min(max, m.max(-2, l + (thisX - x))); |
| | | f.btn.style.left = to + 'px'; |
| | | f.ondrag(m.round(m.max(0, to / max) * 100), to); |
| | | b.getSelection ? b.getSelection().removeAllRanges() : g.selection.empty(); |
| | | }; |
| | | g.onmouseup = function (e) { |
| | | var thisX = (e || b.event).clientX; |
| | | var to = m.min(max, m.max(-2, l + (thisX - x))); |
| | | f.btn.style.left = to + 'px'; |
| | | var pos = m.round(m.max(0, to / max) * 100); |
| | | |
| | | |
| | | this.onmousemove = null; |
| | | this.onmouseup = null; |
| | | |
| | | if (callbacknewpos != null) { |
| | | var diff = (f.endT.getTime() - f.startT0.getTime()) / 1000;//时间差的毫秒数 |
| | | var passedseconds = diff * pos / 100; |
| | | var curDate = new Date(f.startT0); |
| | | curDate.setSeconds(curDate.getSeconds() + passedseconds); |
| | | callbacknewpos(curDate); |
| | | f.startT.setTime(f.startT.getTime() + (curDate.getTime() - f.dropStartT.getTime()) - 3000); |
| | | } |
| | | f.dropStartT = null; |
| | | }; |
| | | }; |
| | | }, |
| | | ondrag: function (pos, x) { |
| | | this.step.style.width = Math.max(0, x) + 'px'; |
| | | |
| | | var diff = (this.endT.getTime() - this.startT0.getTime()) / 1000;//时间差的毫秒数 |
| | | var passedseconds = diff * pos / 100; |
| | | var curDate = new Date(this.startT0); |
| | | curDate.setSeconds(curDate.getSeconds() + passedseconds); |
| | | this.curT = curDate; |
| | | var formattedDateString = dateDigitToString(curDate.getHours()) + ':' + dateDigitToString(curDate.getMinutes()) + ':' + dateDigitToString(curDate.getSeconds()); |
| | | this.title.innerHTML = formattedDateString; |
| | | }, |
| | | setProcessTime: function (curtime) { |
| | | if (this.dropStartT != null) |
| | | return; |
| | | var max = this.bar.offsetWidth; |
| | | var newdate = new Date(this.startT); |
| | | newdate.setSeconds(this.startT.getSeconds() + curtime); |
| | | if (newdate > this.endT) |
| | | return; |
| | | var percent = (newdate.getTime() - this.startT0.getTime()) / (this.endT.getTime() - this.startT0.getTime()); |
| | | |
| | | |
| | | this.step.style.width = max * percent + 'px'; |
| | | this.btn.style.left = max * percent + 'px'; |
| | | this.curT = newdate; |
| | | |
| | | var formattedDateString = dateDigitToString(newdate.getHours()) + ':' + dateDigitToString(newdate.getMinutes()) + ':' + dateDigitToString(newdate.getSeconds()); |
| | | this.title.innerHTML = formattedDateString; |
| | | } |
| | | } |
| | | |
| | | function extend(o, n, override) { |
| | | for (var key in n) { |
| | | if (n.hasOwnProperty(key) && (!o.hasOwnProperty(key) || override)) { |
| | | o[key] = n[key]; |
| | | } |
| | | } |
| | | return o; |
| | | } |
| | | |
| | | function HstH5Video(opt) { |
| | | this._initial(opt); |
| | | } |
| | | |
| | | HstH5Video.prototype = { |
| | | constructor: this, |
| | | |
| | | _initial: function (opt) { |
| | | // 默认参数 |
| | | var options = { |
| | | domId: '', |
| | | live: true, |
| | | screenshot: true, |
| | | autoplay: true, |
| | | mutex: false, |
| | | width: 400, |
| | | height: 400, |
| | | loop: false, |
| | | volume: 0, |
| | | lang: 'zh-cn', //可选值: 'en', 'zh-cn', 'zh-tw' |
| | | contextmenu: [], |
| | | viewSize: 'full', |
| | | needSeek: false, |
| | | tbarBgColor: {}, |
| | | rightMousedown: function () { |
| | | |
| | | } |
| | | }; |
| | | this.options = extend(options, opt, true); |
| | | this.options.contextmenu = this.options.contextmenu.concat([{ |
| | | text: 'cmsv6 20200103', |
| | | click: function () { |
| | | |
| | | } |
| | | }]); |
| | | if (this.options.lang.indexOf('cn.xml') > -1) { |
| | | this.options.lang = 'zh-cn' |
| | | } |
| | | if (this.options.lang.indexOf('tw.xml') > -1) { |
| | | this.options.lang = 'zh-tw' |
| | | } |
| | | if (this.options.lang.indexOf('en.xml') > -1) { |
| | | this.options.lang = 'en' |
| | | } |
| | | this.itemPre = 'HstH5Video'; |
| | | this.listeners = []; |
| | | this.handlers = {}; |
| | | this.num = 1; |
| | | this.lastIndex = 1; |
| | | this.playVideos = {}; |
| | | this.playVideosTimer = {}; |
| | | this.videoText = {}; |
| | | this.devInfoMap = {}; |
| | | this.progressMap = {}; |
| | | this.reloadMap = {}; |
| | | this.reloadMapTime = {}; |
| | | this.initEventType(); |
| | | this.mediaPortMap = {}; |
| | | this.timeMap808 = {}; |
| | | this.speedZeroNum = {}; |
| | | this.beforeReconnectionVolume = {}; |
| | | this.playWating = false; |
| | | this.playWatingTimer = null; |
| | | this.playWatingNum = 0; |
| | | this.soundDomId = 'HstH5VideoSound'; |
| | | this.winDom = $('#' + this.options.domId); |
| | | this.winDom.empty(); |
| | | this.winDom.css('width', this.options.width).css('height', this.options.height).addClass('ttx-video-h5'); |
| | | this.bindEvent() |
| | | }, |
| | | initEventType: function () { |
| | | this.eventType = { |
| | | select: 'select',//窗口事件 |
| | | full: 'full',//全屏 |
| | | norm: 'norm',//退出全屏 |
| | | stop: 'stop',//停止播放 |
| | | start: 'start',//开始播放 |
| | | sound: 'sound',//开启声音 |
| | | silent: 'silent',//静音 |
| | | play: 'play',//暂停或停止后重新播放 |
| | | PicSave: 'PicSave',//截图 |
| | | startRecive: 'startRecive',//开启对讲 |
| | | uploadRecive: 'uploadRecive',//开启对讲 |
| | | loadRecive: 'loadRecive',//开启对讲 |
| | | stopTalk: 'stopTalk', //关闭对讲 |
| | | playRecive: 'playRecive',//对讲中 |
| | | reciveStreamStop: 'reciveStreamStop',//对讲异常(网络异常等) |
| | | reciveNetError: 'reciveNetError',//对讲异常(网络异常等) |
| | | reciveStreamNotFound: 'reciveStreamNotFound',//对讲异常(网络异常等) |
| | | uploadNetClosed: 'uploadNetClosed',//连接异常 |
| | | uploadNetError: 'uploadNetError',//连接异常 |
| | | upload: 'upload',//对讲讲话 |
| | | uploadfull: 'uploadfull',//对讲讲话结束 |
| | | listenNetError: 'listenNetError',//网络异常 |
| | | playListen: 'playListen',//监听中 |
| | | loadListen: 'loadListen',//等待请求监听 |
| | | listenStreamNotFound: 'listenStreamNotFound',//等待请求监听 |
| | | listenStreamStop: 'listenStreamStop',//等待请求监听 |
| | | } |
| | | }, |
| | | playAll: function () { |
| | | for (var index in this.playVideos) { |
| | | this.playVideos[index].play() |
| | | } |
| | | }, |
| | | pauseAll: function () { |
| | | for (var index in this.playVideos) { |
| | | this.playVideos[index].pause() |
| | | } |
| | | }, |
| | | setWindowNum: function (num) { |
| | | if (!num) { |
| | | return; |
| | | } |
| | | num = parseInt(num); |
| | | $('.ttx-video-h5-item-full').removeClass('ttx-video-h5-item-full') |
| | | num = num > 36 ? 36 : num; |
| | | this.num = num; |
| | | this.winDom.children().addClass('hide'); |
| | | var itemClass; |
| | | if (num == 8) { |
| | | itemClass = 'video-basis-4' |
| | | } else { |
| | | itemClass = 'video-basis-' + Math.ceil(Math.sqrt(num)) |
| | | } |
| | | |
| | | for (var i = 0; i < num; i++) { |
| | | var itemId = this.itemPre + '-' + i; |
| | | var _item = $('#' + itemId); |
| | | var itemClassTmp = itemClass; |
| | | if ((num == 6 || num == 8) && i === 0) { |
| | | itemClassTmp = 'video-basis-' + num + '-1' |
| | | } |
| | | if (_item.length === 0) { |
| | | var item = $("<div data-index='" + i + "' class='ttx-video-h5-item " + itemClassTmp + "' id='" + itemId + "'></div>"); |
| | | this.winDom.append(item); |
| | | this.bindItemEvent(item) |
| | | } else { |
| | | var classArr = _item.attr('class').split(' '); |
| | | classArr = classArr.filter(function (s) { |
| | | return s.indexOf('video-basis-') === -1; |
| | | }) |
| | | _item.attr('class', classArr.join(' ')); |
| | | _item.addClass('ttx-video-h5-item').addClass(itemClassTmp).removeClass('hide').show(); |
| | | } |
| | | } |
| | | if (!this.selectIndex) { |
| | | $('.ttx-video-h5-item:eq(0)').click(); |
| | | } |
| | | this.setVideoFrame(); |
| | | var item = $("<div data-index=\"9999\" style=\"width:100%;height:20px;display: none;font-size: 8px;\" id=\"HstH5Video-audio\">Mic:on;Play:on</div>"); |
| | | this.winDom.append(item); |
| | | }, |
| | | setSize: function (width, height) { |
| | | this.options.width = width |
| | | this.options.height = height |
| | | this.winDom.css('width', this.options.width).css('height', this.options.height) |
| | | }, |
| | | getObjectById: function () { |
| | | return this; |
| | | }, |
| | | |
| | | stopVideo: function (index) { |
| | | var that = this |
| | | if (index >= this.num) { |
| | | return |
| | | } |
| | | this.reSetVideo(index) |
| | | /*var video = this.playVideos[index]; |
| | | if (video) { |
| | | video.pause(); |
| | | video.video.currentTime = 0; |
| | | try { |
| | | var url = video.options.video.url; |
| | | var devidno = url.split('DevIDNO=')[1].split('&')[0]; |
| | | that.timeMap808[devidno] = new Date().getTime() |
| | | } catch (e) { |
| | | |
| | | } |
| | | }*/ |
| | | this.devInfoMap[index.toString()] = null; |
| | | delete this.reloadMapTime[index]; |
| | | delete this.speedZeroNum[index]; |
| | | delete this.progressMap[index]; |
| | | this.progressMap[index] = null; |
| | | this.emit(index, this.eventType.stop) |
| | | }, |
| | | toggleVideo: function (index) { |
| | | if (index >= this.num) { |
| | | return |
| | | } |
| | | var video = this.playVideos[index]; |
| | | if (video) { |
| | | video.toggle(); |
| | | if (video.video.paused) { |
| | | this.emit(index, this.eventType.stop) |
| | | } else { |
| | | this.emit(index, this.eventType.start) |
| | | } |
| | | } |
| | | }, |
| | | reSetVideo: function (index) { |
| | | var video = this.playVideos[index]; |
| | | if (video) { |
| | | video.destroy(); |
| | | delete this.playVideos[index] |
| | | delete this.mediaPortMap[index] |
| | | } |
| | | }, |
| | | hideAllMenu: function () { |
| | | for (var index in this.playVideos) { |
| | | this.playVideos[index].contextmenu.hide() |
| | | } |
| | | }, |
| | | openVideo: function (server, port, devicechannel) { |
| | | var that = this; |
| | | var index = -1; |
| | | //找到重复的 |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | that.startVideo(index, server, port, devicechannel); |
| | | } |
| | | else { |
| | | //找到空闲的窗口 |
| | | index = -1; |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == null) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index == -1) { |
| | | if (Object.keys(that.devInfoMap).length < that.num) |
| | | index = Object.keys(that.devInfoMap).length; |
| | | else { |
| | | return;//满了 |
| | | } |
| | | } |
| | | |
| | | that.startVideo(index, server, port, devicechannel); |
| | | } |
| | | }, |
| | | closeVideo: function (devicechannel) { |
| | | var that = this; |
| | | //找到播放的窗口 |
| | | var index = -1; |
| | | |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | StartTalk: function (MediaServerName, MediaTCPPort, VoiceTCPPort, deviceId, channelId, MediaType, username, password) { |
| | | if ("WebSocket" in window) { |
| | | //alert("您的浏览器支持 WebSocket!"); |
| | | //创建socket,登录,设置定时心跳和关闭事件 |
| | | this.voiceUser = username; |
| | | this.voicePass = password; |
| | | this.voiceDeviceid = deviceId; |
| | | this.voiceChannelID = channelId; |
| | | this.voiceMediaType = MediaType; |
| | | this.voiceServerName = MediaServerName; |
| | | this.voiceMediaTcpPort = MediaTCPPort; |
| | | |
| | | var that = this; |
| | | if (this.ws != null) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | } |
| | | this.ws = new WebSocket("wss://" + MediaServerName + ":" + VoiceTCPPort); |
| | | this.ws.onopen = function () { |
| | | // Web Socket 已连接上,使用 send() 方法发送数据 |
| | | console.log("Connected"); |
| | | //var curtimestamp = Date.now(); |
| | | //var md5string = b64_md5(that.voicePass+curtimestamp.toString()); |
| | | //var messageObj = {cmd:"login",user:that.voiceUser,timestamp:curtimestamp,digest:md5string}; |
| | | // var messageJson = JSON.stringify(messageObj); |
| | | //that.ws.send(messageJson); |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var digest = b64_md5(that.voicePass + timestamp); |
| | | var data = { |
| | | "cmd": "login", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "digest": digest, // |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | // alert("登录已经发送..."); |
| | | console.log(messageJson); |
| | | }; |
| | | this.ws.onmessage = function (evt) { |
| | | var received_msg = evt.data; |
| | | console.log("recv:" + received_msg); |
| | | if (evt.data instanceof Blob) {//收到数据 |
| | | that.player.addPlay(received_msg); |
| | | } |
| | | else { |
| | | var msg = JSON.parse(received_msg); |
| | | //alert("数据已接收..."+received_msg); |
| | | if (msg.response == "login") { |
| | | if (msg.result == 0) { |
| | | //alert("登录成功"); |
| | | console.log("登录成功"); |
| | | that.voiceinterval = self.setInterval(function () { |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "heartbeat", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | //setInterval(this.wsheart(),10000); |
| | | }, 10000); |
| | | //发起对讲请求 |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "open_talk", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "DeviceType": that.voiceMediaType.toString(), // |
| | | "DeviceId": that.voiceDeviceid, // |
| | | "channel": that.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | that.ws.send(messageJson1); |
| | | console.log("发起对讲请求"); |
| | | console.log(messageJson1); |
| | | } |
| | | else { |
| | | console.log("登录失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "open_talk") { |
| | | if (msg.result == 0) { |
| | | console.log("开启对讲成功"); |
| | | //打开播放流 |
| | | Player.get(function (play) { |
| | | that.player = play; |
| | | that.player.start(); |
| | | }); |
| | | //that.openVideo(that.voiceServerName,that.voiceMediaTcpPort,that.voiceDeviceid+"_"+that.voiceChannelID); |
| | | //打开录音机 |
| | | Recorder.get(function (rec) { |
| | | that.recorder = rec; |
| | | that.recorder.start(); |
| | | }, that.ws); |
| | | |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.innerHTML = "正在对讲:" + that.voiceDeviceid; |
| | | item.style["display"] = "flex"; |
| | | } |
| | | else { |
| | | console.log("开启对讲失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "close_talk") { |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | }; |
| | | this.ws.onerror = function (e) { |
| | | //alert("错误"); |
| | | console.log("websocket error!" + e); |
| | | }; |
| | | this.ws.onclose = function (e) { |
| | | // 关闭 websocket |
| | | //alert("连接已关闭..."); |
| | | console.log("websocket closed! " + e.code + ", " + e.reason); |
| | | that.ws = null; |
| | | clearInterval(that.voiceinterval); |
| | | }; |
| | | |
| | | //打开语音通道接收流 |
| | | //打开录音,设置定时发送 |
| | | } |
| | | else { |
| | | alert("您的浏览器不支持 WebSocket!"); |
| | | return; |
| | | } |
| | | }, |
| | | CloseTalk: function (deviceId, channelId) { |
| | | //关闭播放流 |
| | | this.player.stop(); |
| | | //关闭录音 |
| | | this.recorder.stop(); |
| | | |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.style["display"] = "none"; |
| | | //关闭websocket |
| | | //this.ws.close(); |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "close_talk", //发送命令 |
| | | "user": this.voiceUser, //用户名 |
| | | "DeviceType": this.voiceMediaType.toString(), // |
| | | "DeviceId": this.voiceDeviceid, // |
| | | "channel": this.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | this.ws.send(messageJson1); |
| | | console.log("关闭对讲请求"); |
| | | console.log(messageJson1); |
| | | }, |
| | | StartBroadcast: function (MediaServerName, VoiceTCPPort, MediaType, username, password) { |
| | | if ("WebSocket" in window) { |
| | | //alert("您的浏览器支持 WebSocket!"); |
| | | //创建socket,登录,设置定时心跳和关闭事件 |
| | | this.voiceUser = username; |
| | | this.voicePass = password; |
| | | this.voiceMediaType = MediaType; |
| | | this.voiceServerName = MediaServerName; |
| | | this.voiceTcpPort = VoiceTCPPort; |
| | | |
| | | var that = this; |
| | | if (this.ws != null) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | } |
| | | this.ws = new WebSocket("wss://" + MediaServerName + ":" + VoiceTCPPort); |
| | | this.ws.onopen = function () { |
| | | // Web Socket 已连接上,使用 send() 方法发送数据 |
| | | console.log("Connected"); |
| | | //var curtimestamp = Date.now(); |
| | | //var md5string = b64_md5(that.voicePass+curtimestamp.toString()); |
| | | //var messageObj = {cmd:"login",user:that.voiceUser,timestamp:curtimestamp,digest:md5string}; |
| | | // var messageJson = JSON.stringify(messageObj); |
| | | //that.ws.send(messageJson); |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var digest = b64_md5(that.voicePass + timestamp); |
| | | var data = { |
| | | "cmd": "login", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "digest": digest, // |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | // alert("登录已经发送..."); |
| | | console.log(messageJson); |
| | | }; |
| | | this.ws.onmessage = function (evt) { |
| | | var received_msg = evt.data; |
| | | console.log("recv:" + received_msg); |
| | | |
| | | var msg = JSON.parse(received_msg); |
| | | //alert("数据已接收..."+received_msg); |
| | | if (msg.response == "login") { |
| | | if (msg.result == 0) { |
| | | //alert("登录成功"); |
| | | console.log("登录成功"); |
| | | that.voiceinterval = self.setInterval(function () { |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "heartbeat", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | //setInterval(this.wsheart(),10000); |
| | | }, 10000); |
| | | //发起广播请求 |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "open_broadcast", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "DeviceType": that.voiceMediaType.toString(), // |
| | | "DeviceId": that.voiceDeviceid, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | that.ws.send(messageJson1); |
| | | console.log("发起广播请求"); |
| | | console.log(messageJson1); |
| | | } |
| | | else { |
| | | console.log("登录失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "open_broadcast") { |
| | | if (msg.result == 0) { |
| | | console.log("开启广播成功"); |
| | | |
| | | //that.openVideo(that.voiceServerName,that.voiceTcpPort,that.voiceDeviceid+"_"+that.voiceChannelID); |
| | | //打开录音机 |
| | | Recorder.get(function (rec) { |
| | | that.recorder = rec; |
| | | that.recorder.start(); |
| | | }, that.ws); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.innerHTML = "正在广播."; |
| | | item.style["display"] = "flex"; |
| | | } |
| | | else { |
| | | console.log("开启广播失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "close_broadcast") { |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | |
| | | }; |
| | | this.ws.onerror = function (e) { |
| | | //alert("错误"); |
| | | console.log("websocket error!" + e); |
| | | }; |
| | | this.ws.onclose = function (e) { |
| | | // 关闭 websocket |
| | | //alert("连接已关闭..."); |
| | | console.log("websocket closed! " + e.code + ", " + e.reason); |
| | | that.ws = null; |
| | | clearInterval(that.voiceinterval); |
| | | }; |
| | | |
| | | //打开语音通道接收流 |
| | | //打开录音,设置定时发送 |
| | | } |
| | | else { |
| | | alert("您的浏览器不支持 WebSocket!"); |
| | | return; |
| | | } |
| | | }, |
| | | CloseBroadcast: function () { |
| | | |
| | | //关闭录音 |
| | | this.recorder.stop(); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.style["display"] = "none"; |
| | | //关闭websocket |
| | | //this.ws.close(); |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "close_broadcast", //发送命令 |
| | | "user": this.voiceUser, //用户名 |
| | | "DeviceType": this.voiceMediaType.toString(), // |
| | | "DeviceId": this.voiceDeviceid, // |
| | | "channel": this.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | this.ws.send(messageJson1); |
| | | console.log("关闭广播请求"); |
| | | console.log(messageJson1); |
| | | }, |
| | | StartMonitor: function (MediaServerName, MediaTCPPort, VoiceTCPPort, deviceId, channelId, MediaType, username, password) { |
| | | if ("WebSocket" in window) { |
| | | //alert("您的浏览器支持 WebSocket!"); |
| | | //创建socket,登录,设置定时心跳和关闭事件 |
| | | this.voiceUser = username; |
| | | this.voicePass = password; |
| | | this.voiceDeviceid = deviceId; |
| | | this.voiceChannelID = channelId; |
| | | this.voiceMediaType = MediaType; |
| | | this.voiceServerName = MediaServerName; |
| | | this.voiceMediaTcpPort = MediaTCPPort; |
| | | |
| | | var that = this; |
| | | if (this.ws != null) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | } |
| | | this.ws = new WebSocket("wss://" + MediaServerName + ":" + VoiceTCPPort); |
| | | this.ws.onopen = function () { |
| | | // Web Socket 已连接上,使用 send() 方法发送数据 |
| | | console.log("Connected"); |
| | | //var curtimestamp = Date.now(); |
| | | //var md5string = b64_md5(that.voicePass+curtimestamp.toString()); |
| | | //var messageObj = {cmd:"login",user:that.voiceUser,timestamp:curtimestamp,digest:md5string}; |
| | | // var messageJson = JSON.stringify(messageObj); |
| | | //that.ws.send(messageJson); |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var digest = b64_md5(that.voicePass + timestamp); |
| | | var data = { |
| | | "cmd": "login", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "digest": digest, // |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | // alert("登录已经发送..."); |
| | | console.log(messageJson); |
| | | }; |
| | | this.ws.onmessage = function (evt) { |
| | | var received_msg = evt.data; |
| | | console.log("recv:" + received_msg); |
| | | if (evt.data instanceof Blob) {//收到数据 |
| | | that.player.addPlay(received_msg); |
| | | |
| | | |
| | | } |
| | | else { |
| | | var msg = JSON.parse(received_msg); |
| | | //alert("数据已接收..."+received_msg); |
| | | if (msg.response == "login") { |
| | | if (msg.result == 0) { |
| | | //alert("登录成功"); |
| | | console.log("登录成功"); |
| | | /*that.voiceinterval =self.setInterval(function() |
| | | { |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "heartbeat", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | //setInterval(this.wsheart(),10000); |
| | | },10000);*/ |
| | | //发起监听请求 |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "open_monitor", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "DeviceType": that.voiceMediaType.toString(), // |
| | | "DeviceId": that.voiceDeviceid, // |
| | | "channel": that.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | that.ws.send(messageJson1); |
| | | console.log("发起监听请求"); |
| | | console.log(messageJson1); |
| | | } |
| | | else { |
| | | console.log("登录失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "open_monitor") { |
| | | if (msg.result == 0) { |
| | | console.log("开启监听成功"); |
| | | //打开播放流 |
| | | Player.get(function (play) { |
| | | that.player = play; |
| | | that.player.start(); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.innerHTML = "正在监听:" + that.voiceDeviceid; |
| | | item.style["display"] = "flex"; |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | console.log("开启监听失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "close_monitor") { |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | |
| | | }; |
| | | this.ws.onerror = function (e) { |
| | | //alert("错误"); |
| | | console.log("websocket error!" + e); |
| | | }; |
| | | this.ws.onclose = function (e) { |
| | | // 关闭 websocket |
| | | //alert("连接已关闭..."); |
| | | console.log("websocket closed! " + e.code + ", " + e.reason); |
| | | that.ws = null; |
| | | clearInterval(that.voiceinterval); |
| | | }; |
| | | |
| | | //打开语音通道接收流 |
| | | //打开录音,设置定时发送 |
| | | } |
| | | else { |
| | | alert("您的浏览器不支持 WebSocket!"); |
| | | return; |
| | | } |
| | | }, |
| | | CloseMonitor: function (deviceId, channelId) { |
| | | //关闭播放 |
| | | this.player.stop(); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.style["display"] = "none"; |
| | | //关闭websocket |
| | | //this.ws.close(); |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "close_monitor", //发送命令 |
| | | "user": this.voiceUser, //用户名 |
| | | "DeviceType": this.voiceMediaType.toString(), // |
| | | "DeviceId": this.voiceDeviceid, // |
| | | "channel": this.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | this.ws.send(messageJson1); |
| | | console.log("关闭监听请求"); |
| | | console.log(messageJson1); |
| | | }, |
| | | StartRemotePlayback: function (server, port, devicechannel, starttime, endtime, callback) { |
| | | var that = this; |
| | | var index = -1; |
| | | //找到重复的 |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel + "_H") { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | that.startVideo(index, server, port, devicechannel); |
| | | } |
| | | else { |
| | | //找到空闲的窗口 |
| | | index = -1; |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == null) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index == -1) { |
| | | if (Object.keys(that.devInfoMap).length < that.num) |
| | | index = Object.keys(that.devInfoMap).length; |
| | | else { |
| | | return;//满了 |
| | | } |
| | | } |
| | | |
| | | that.startVideo(index, server, port, devicechannel); |
| | | that.devInfoMap[index.toString()] = devicechannel + "_H"; |
| | | //增加进度条显示 |
| | | this.progressMap[index] = new scaleProcess(that.playVideos[index].container.id, starttime, endtime, callback); |
| | | |
| | | } |
| | | }, |
| | | CloseRemotePlayback: function (devicechannel) { |
| | | var that = this; |
| | | //找到播放的窗口 |
| | | var index = -1; |
| | | |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel + "_H") { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | } |
| | | }, |
| | | startVideo: function (index, server, port, channel) { |
| | | var that = this; |
| | | if (!index && index !== 0) { |
| | | return |
| | | } |
| | | if (parseInt(index) >= that.num) { |
| | | return |
| | | } |
| | | |
| | | that.devInfoMap[index.toString()] = channel; |
| | | that.createUrlAndplay(index, server, port, channel, 1); |
| | | }, |
| | | /** |
| | | * |
| | | * @param index |
| | | * @param url |
| | | * @param type 当实时视频时,传1,监听时,传2,双向对讲时传3 广播功能 4 |
| | | */ |
| | | startVod: function (index, url, type, notDeleteTime) { |
| | | // url = 'http://cyberplayerplay.kaywang.cn/cyberplayer/demo201711-L1.flv' |
| | | var that = this; |
| | | //url = that.handleUrl(url); |
| | | //防止多次点击 |
| | | if (that.playWating) { |
| | | return; |
| | | } |
| | | if (!notDeleteTime) { |
| | | delete that.reloadMapTime[index] |
| | | } |
| | | |
| | | var itemId = this.itemPre + '-' + index; |
| | | var dp = that.playVideos[index]; |
| | | if (dp) { |
| | | dp.destroy(); |
| | | } |
| | | var videoType = 'flv' |
| | | if (url.indexOf('PLAYBEG=') == -1 && (url.indexOf('.mp4') > -1 || url.indexOf('.MP4') > -1)) { |
| | | videoType = 'normal' |
| | | } |
| | | if (url.indexOf('.m3u8') > -1 || url.indexOf('.m3u8') > -1) { |
| | | videoType = 'hls' |
| | | } |
| | | |
| | | var volume = that.options.volume; |
| | | if (this.beforeReconnectionVolume[index]) { |
| | | volume = this.beforeReconnectionVolume[index]; |
| | | } |
| | | dp = new DPlayer({ |
| | | container: document.getElementById(itemId), |
| | | live: true,//that.options.live, |
| | | liveText: that.videoText[index], |
| | | screenshot: that.options.screenshot, |
| | | autoplay: that.options.autoplay, |
| | | mutex: that.options.mutex, |
| | | loop: that.options.loop, |
| | | volume: volume, |
| | | lang: that.options.lang, |
| | | video: { |
| | | url: url, |
| | | type: videoType |
| | | }, |
| | | contextmenu: that.options.contextmenu |
| | | }); |
| | | delete this.beforeReconnectionVolume[index] |
| | | this.playVideos[index] = dp; |
| | | this.speedZeroNum[index] = 0; |
| | | this.bindDpEvent(dp, type); |
| | | this.emit(index, this.eventType.start) |
| | | this.setVideoFrame(); |
| | | var bcolor = that.options.tbarBgColor[index]; |
| | | bcolor = bcolor ? bcolor : '000'; |
| | | $('#' + dp.container.id).find('.dplayer-controller').css('background', '#' + bcolor); |
| | | }, |
| | | |
| | | /** |
| | | * @param index |
| | | * @param jsession |
| | | * @param devIdno |
| | | * @param channel |
| | | * @param stream |
| | | * @param type 当实时视频时,传1,监听时,传2,双向对讲时传3 广播功能 4 |
| | | * @returns {string} |
| | | */ |
| | | createUrlAndplay: function (index, server, port, channel, type) { |
| | | var that = this |
| | | index = index.toString(); |
| | | //var url = 'http://' + server + ':' + port + '/live/' + channel; |
| | | //根据当前网站用http还是https. |
| | | var url = window.location.protocol + '//' + server + ':' + port + '/live/' + channel; |
| | | //alert(url); |
| | | |
| | | |
| | | if (type === 1) { |
| | | that.setVideoInfo(index, channel); |
| | | that.startVod(index, url, type) |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | setVideoInfo: function (index, title) { |
| | | // dplayer-live-text |
| | | this.videoText[index] = title; |
| | | var video = this.playVideos[index]; |
| | | if (video) { |
| | | $(video.container).find('.dplayer-live-text').html(title); |
| | | video.options.liveText = title; |
| | | } |
| | | }, |
| | | getDataset: function (ele) { |
| | | if (ele.dataset) { |
| | | return ele.dataset; |
| | | } else { |
| | | var attrs = ele.attributes,//元素的属性集合 |
| | | dataset = {}, name, matchStr; |
| | | for (var i = 0; i < attrs.length; i++) { //是否是data- 开头 |
| | | matchStr = attrs[i].name.match(/^data-(.+)/); |
| | | if (matchStr) { //data-auto-play 转成驼峰写法 autoPlay |
| | | name = matchStr[1].replace(/-([\da-z])/gi, function (all, letter) { |
| | | return letter.toUpperCase(); |
| | | }); |
| | | dataset[name] = attrs[i].value; |
| | | } |
| | | } |
| | | return dataset; |
| | | } |
| | | }, |
| | | bindItemEvent: function (obj) { |
| | | var that = this; |
| | | obj.click(function () { |
| | | $('.ttx-video-h5-item').removeClass('ttx-video-h5-item-check'); |
| | | $(this).addClass('ttx-video-h5-item-check'); |
| | | that.hideAllMenu() |
| | | var dataset = that.getDataset(this) |
| | | that.selectIndex = dataset.index; |
| | | that.emit(that.selectIndex, that.eventType.select) |
| | | }) |
| | | obj.mousedown(function (e) { |
| | | if (3 == e.which) { |
| | | var dataset = that.getDataset(this) |
| | | that.selectMenuIndex = dataset.index.toString(); |
| | | that.options.rightMousedown(); |
| | | } |
| | | }) |
| | | obj.dblclick(function () { |
| | | if ($(this).hasClass('ttx-video-h5-item-full')) { |
| | | $(this).removeClass('ttx-video-h5-item-full') |
| | | $('.ttx-video-h5-item').show() |
| | | } else { |
| | | $('.ttx-video-h5-item').hide() |
| | | $(this).addClass('ttx-video-h5-item-full').show() |
| | | } |
| | | that.setVideoFrame(); |
| | | }) |
| | | }, |
| | | /** |
| | | * |
| | | * @param dp |
| | | * @param type 当实时视频时,传1,监听时,传2,双向对讲时传3 广播功能 4 |
| | | */ |
| | | bindDpEvent: function (dp, type) { |
| | | var that = this; |
| | | var index = dp.container.id.replace(that.itemPre + '-', ''); |
| | | if (type === 1) { |
| | | |
| | | dp.on('fullscreen', function () { |
| | | that.fullScreen() |
| | | $('.map_btn').css('z-index', 0) |
| | | }); |
| | | dp.on('volumechange', function () { |
| | | if (dp.volume() > 0) { |
| | | for (var index in that.playVideos) { |
| | | if (index != that.selectIndex && that.playVideos[index].volume() > 0) { |
| | | that.playVideos[index].volume(0, true, false) |
| | | } |
| | | } |
| | | if (that.soundDp && ttxPlayer && typeof ttxPlayer.doRightMenuMsg == "function") { |
| | | ttxPlayer.doRightMenuMsg(that.selectIndex, 'stopListen'); |
| | | } |
| | | } |
| | | }); |
| | | dp.on('progress', function () { |
| | | //console.log(dp.video.currentTime); |
| | | if (that.progressMap[index] != null) |
| | | that.progressMap[index].setProcessTime(dp.video.currentTime); |
| | | }); |
| | | if (!that.playVideosTimer[index]) { |
| | | that.playVideosTimer[index] = setInterval(function () { |
| | | if (!that.playVideos[index]) { |
| | | return; |
| | | } |
| | | var speed = 0 |
| | | if (that.playVideos[index].plugins.flvjs) { |
| | | speed = parseInt(that.playVideos[index].plugins.flvjs.statisticsInfo.speed) |
| | | } |
| | | if (isNaN(speed)) { |
| | | speed = 0 |
| | | } |
| | | var speedStr = speed + 'KB/S'; |
| | | if (that.playVideos[index].paused || !that.playVideos[index].plugins.flvjs) { |
| | | speedStr = ''; |
| | | } |
| | | var liveText; |
| | | if (that.videoText[index]) { |
| | | liveText = that.videoText[index] + ' ' + speedStr; |
| | | } else { |
| | | liveText = ' ' + speedStr; |
| | | } |
| | | if ($(that.playVideos[index].container).find('.dplayer-live-text').length > 0) { |
| | | $(that.playVideos[index].container).find('.dplayer-live-text').html(liveText).attr('title', liveText); |
| | | } else { |
| | | var liveTextHtml = |
| | | '<span class="dplayer-live-badge" title="' + liveText + '">' + |
| | | ' <span class="dplayer-live-text">' + liveText + '</span>' + |
| | | '</span>'; |
| | | $(that.playVideos[index].container).find('.dplayer-time').after(liveTextHtml); |
| | | } |
| | | }, 1000) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | bindEvent: function () { |
| | | var that = this; |
| | | $(document).mousedown(function (e) { |
| | | if (3 == e.which) { |
| | | that.hideAllMenu() |
| | | } |
| | | }) |
| | | try { |
| | | $(parent.document).mousedown(function (e) { |
| | | that.hideAllMenu() |
| | | }) |
| | | } catch (e) { |
| | | // TODO: handle exception |
| | | } |
| | | that.winDom.bind('contextmenu', function () { |
| | | return false; |
| | | }); |
| | | |
| | | $(document).keyup(function (e) { |
| | | var key = e.which || e.keyCode; |
| | | if (key == 27) { |
| | | that.exitFullScreen() |
| | | } |
| | | }); |
| | | window.onresize = function () { |
| | | if (!that.checkFull()) { |
| | | that.exitFullScreen() |
| | | } |
| | | } |
| | | if (that.options.reconnect) { |
| | | setInterval(function () { |
| | | for (var index in that.playVideos) { |
| | | var dpVideo = that.playVideos[index]; |
| | | that.reconnectionCheck(index, dpVideo) |
| | | if (that.soundDp) { |
| | | that.reconnectionCheck(-1, that.soundDp); |
| | | } |
| | | } |
| | | }, 500) |
| | | } |
| | | }, |
| | | /** |
| | | * 断线重连 |
| | | * @param index |
| | | * @param dpVideo |
| | | */ |
| | | reconnectionCheck: function (index, dpVideo) { |
| | | var that = this; |
| | | if (!that.speedZeroNum[index]) { |
| | | that.speedZeroNum[index] = 0 |
| | | } |
| | | if (dpVideo.plugins.flvjs) { |
| | | var speed = parseInt(dpVideo.plugins.flvjs.statisticsInfo.speed) |
| | | if (!speed && !dpVideo.paused) { |
| | | that.speedZeroNum[index]++; |
| | | } else { |
| | | that.speedZeroNum[index] = 0; |
| | | } |
| | | } |
| | | if (that.speedZeroNum[index] >= 60) { |
| | | var url = dpVideo.options.video.url; |
| | | { |
| | | that.beforeReconnectionVolume[index] = dpVideo.volume() |
| | | that.startVod(index, url, 1); |
| | | } |
| | | console.log('断线重连:' + index) |
| | | } |
| | | }, |
| | | getVideoPlayTime: function (index) { |
| | | var that = this; |
| | | index = index ? index : '0'; |
| | | var video = that.playVideos[index]; |
| | | if (video) { |
| | | var time = parseInt(video.video.currentTime); |
| | | if (this.reloadMapTime[index]) { |
| | | time = time + this.reloadMapTime[index]; |
| | | } |
| | | return time; |
| | | } |
| | | return 0; |
| | | }, |
| | | setVideoFocus: function (index) { |
| | | $('.ttx-video-h5-item:eq(' + index + ')').click(); |
| | | }, |
| | | fullScreen: function () { |
| | | this.winDom.addClass('ttx-video-h5-full') |
| | | $('body').addClass('ttx-video-body-full') |
| | | var el = document.documentElement; |
| | | if (el.requestFullscreen) { |
| | | el.requestFullscreen(); |
| | | } else if (el.mozRequestFullScreen) { |
| | | el.mozRequestFullScreen(); |
| | | } else if (el.webkitRequestFullscreen) { |
| | | el.webkitRequestFullscreen(); |
| | | } else if (el.msRequestFullscreen) { |
| | | el.msRequestFullscreen(); |
| | | } |
| | | }, |
| | | exitFullScreen: function () { |
| | | this.winDom.removeClass('ttx-video-h5-full') |
| | | $('body').removeClass('ttx-video-body-full') |
| | | }, |
| | | checkFull: function () { |
| | | return document.fullscreenElement || |
| | | document.msFullscreenElement || |
| | | document.mozFullScreenElement || |
| | | document.webkitFullscreenElement || false; |
| | | }, |
| | | emit: function (index, type) { |
| | | if (typeof onTtxVideoMsg == 'function') { |
| | | onTtxVideoMsg(index, type) |
| | | } |
| | | }, |
| | | setVideoFrame: function (viewSize) { |
| | | viewSize = viewSize ? viewSize : this.options.viewSize; |
| | | this.options.viewSize = viewSize |
| | | this.winDom.find('video').each(function (i, obj) { |
| | | var _obj = $(obj) |
| | | _obj.css('width', '100%').css('height', '100%') |
| | | var width = _obj.width(); |
| | | var height = _obj.height(); |
| | | if (viewSize === '4:3') { |
| | | if ((width / height) > (4 / 3)) { |
| | | _obj.css('width', (height * 4 / 3)) |
| | | } else { |
| | | _obj.css('height', (width * 3 / 4)) |
| | | } |
| | | } |
| | | if (viewSize === '16:9') { |
| | | if ((width / height) > (16 / 9)) { |
| | | _obj.css('width', (height * 16 / 9)) |
| | | } else { |
| | | _obj.css('height', (width * 9 / 16)) |
| | | } |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | /** |
| | | * 处理URL |
| | | * 如果是http直接访问c++ 端口,否则需要nginx转发 |
| | | */ |
| | | handleUrl: function (url) { |
| | | if (location.protocol == 'http:') { |
| | | return url; |
| | | } |
| | | /*if (url && url.startWith('https:')){ |
| | | return url; |
| | | }*/ |
| | | var portReg = /.+:(\d{1,5})/; |
| | | var urlPortArr = url.match(portReg); |
| | | if (!urlPortArr || urlPortArr.length < 2) { |
| | | return url; |
| | | } |
| | | var videoPort = urlPortArr[1]; |
| | | //用端口分开链接 |
| | | var urlArr = url.split(videoPort); |
| | | try { |
| | | if (rootParent && rootParent.httpsMapHttpPortParams) { |
| | | var httpsPort = rootParent.httpsMapHttpPortParams[videoPort]; |
| | | httpsPort = httpsPort ? httpsPort : ('1' + videoPort); |
| | | return 'https://' + location.hostname + ":" + httpsPort + urlArr[1]; |
| | | } |
| | | } catch (e) { |
| | | console.log(e) |
| | | } |
| | | return 'https://' + location.host + "/" + videoPort + urlArr[1]; |
| | | }, |
| | | /************************下面的方法无实际意义**********************************/ |
| | | embedSWF: function () { |
| | | |
| | | }, |
| | | setLanguage: function () { |
| | | |
| | | }, |
| | | setBufferTime: function () { |
| | | |
| | | }, |
| | | setBufferTimeMax: function () { |
| | | |
| | | }, |
| | | setListenParam: function () { |
| | | |
| | | }, |
| | | setVideoTbarBgColor: function (index, color) { |
| | | this.options.tbarBgColor[index] = color; |
| | | var dp = this.playVideos[index]; |
| | | if (dp && dp.container && dp.container.id) { |
| | | $('#' + dp.container.id).find('.dplayer-controller').css('background', '#' + color); |
| | | } |
| | | }, |
| | | clearVideoMenu: function () { |
| | | |
| | | } |
| | | } |
| | | |
| | | _global = (function () { |
| | | return this || (0, eval)('this'); |
| | | }()); |
| | | if (typeof module !== "undefined" && module.exports) { |
| | | module.exports = HstH5Video; |
| | | } else if (typeof define === "function" && define.amd) { |
| | | define(function () { |
| | | return HstH5Video; |
| | | }); |
| | | } else { |
| | | !('HstH5Video' in _global) && (_global.HstH5Video = HstH5Video); |
| | | } |
| | | |
| | | }()); |
New file |
| | |
| | | var _tokenID; |
| | | var _accessToken; |
| | | //var _mediaServerName; |
| | | //var _mediaTCPPort; |
| | | //var _mediaUserName; |
| | | //var _mediaPassword; |
| | | //var _voiceDomainName; |
| | | //var _voiceTCPPort; |
| | | var _mediaServerName;//请求广播时返回的服务器名,用于打于广播时 |
| | | var _mediaTCPPort;//请求广播时返回的服务器名,用于打于广播时 |
| | | var _deviceId; |
| | | var _channelId; |
| | | var _isHttps = 0; |
| | | |
| | | //获取流媒体配置信息 |
| | | //function getMeidaServerInfo() { |
| | | // httpGet("MediaAPI/BaseInfo/GetMeidaServerInfo", |
| | | // { accessToken: _accessToken }, function (result) { |
| | | // if (result.ResultState == 1) { |
| | | // _mediaServerName = result.ResultData.MediaServerName; |
| | | // _mediaTCPPort = result.ResultData.MediaTCPPort; |
| | | // _mediaUserName = result.ResultData.MediaUserName; |
| | | // _mediaPassword = result.ResultData.MediaPassword; |
| | | // _voiceDomainName = result.ResultData.VoiceDomainName; |
| | | // _voiceTCPPort = result.ResultData.VoiceTCPPort; |
| | | // if (window.location.protocol == "https:") { _isHttps = 1; } |
| | | // } |
| | | // else { |
| | | // alert(result.ResultMessage); |
| | | // } |
| | | // }); |
| | | //}; |
| | | function dateDigitToString (num) { |
| | | return num < 10 ? '0' + num : num; |
| | | }; |
| | | //前面补0 |
| | | function PrefixInteger(num, n) { |
| | | return (Array(n).join(0) + num).slice(-n); |
| | | } |
| | | //拖动 |
| | | function historyDragVideo(newtime) { |
| | | var year = dateDigitToString(newtime.getFullYear()), |
| | | month = dateDigitToString(newtime.getMonth() + 1), |
| | | date = dateDigitToString(newtime.getDate()), |
| | | hour = dateDigitToString(newtime.getHours()), |
| | | minute = dateDigitToString(newtime.getMinutes()), |
| | | second = dateDigitToString(newtime.getSeconds()), |
| | | formattedDateString = year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second; |
| | | httpGetAsync("MediaAPI/ReplayStream/ReplayControl", |
| | | { |
| | | accessToken: _accessToken, |
| | | deviceId: _deviceId, |
| | | channelId: _channelId, |
| | | playType: 5, |
| | | multiple: 0, |
| | | dragDropPosition: formattedDateString |
| | | }, function (data) { |
| | | if (data.ResultState == 1) { |
| | | alert("拖动成功"); |
| | | } |
| | | else { |
| | | alert("拖动失败"); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | var hstVideoPlay = { |
| | | /*------------公共功能开始--------------------------------*/ |
| | | //初始化 |
| | | init: function (tokenID, domId, params, wisdowCount) { |
| | | _tokenID = tokenID; |
| | | //视频插件宽度 |
| | | var width = document.getElementById(domId).style.width; |
| | | //视频插件高度 |
| | | var height = document.getElementById(domId).style.height; |
| | | hstVideoAll.init(domId, width, height, params); |
| | | hstVideoAll.setWindowCount(wisdowCount); |
| | | this.getToken(); |
| | | |
| | | }, |
| | | //只初始化语音,不包括视频。 |
| | | initVoice: function (tokenID) { |
| | | _tokenID = tokenID; |
| | | this.getToken(); |
| | | }, |
| | | getToken: function () { |
| | | var url = "MediaAPI/Token"; |
| | | httpGet(url, { token: _tokenID }, function (result) { |
| | | _accessToken = result.Access_Token; |
| | | if (window.location.protocol == "https:") { _isHttps = 1; } |
| | | //getMeidaServerInfo(); |
| | | }); |
| | | }, |
| | | setWindowCount: function (wisdowCount) { |
| | | hstVideoAll.setWindowCount(wisdowCount); |
| | | }, |
| | | |
| | | /*------------公共功能结束--------------------------------*/ |
| | | |
| | | /*------------历史播放开始--------------------------------*/ |
| | | //历史音视频资源检索 |
| | | historySeach: function (deviceId, channelId, startTime, endTime, alarmType, dataType, streamType, storageType) { |
| | | var resultOK; |
| | | if (_accessToken == "") { |
| | | getToken(); |
| | | } |
| | | _deviceId = deviceId; |
| | | _channelId = channelId; |
| | | var url = "MediaAPI/MediaSearch/SearchResourceList"; |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.startTime = startTime; |
| | | parms.endTime = endTime; |
| | | parms.alarmType = alarmType; |
| | | parms.dataType = dataType; |
| | | parms.streamType = streamType; |
| | | parms.storageType = storageType; |
| | | httpGetAsync(url, parms, function (result) { |
| | | resultOK = result; |
| | | }); |
| | | return resultOK; |
| | | }, |
| | | //打开历史播放 |
| | | historyOpenVideo:function (deviceId, channelId, dataType, streamType, storageType, startTime, endTime) { |
| | | httpGetAsync("MediaAPI/ReplayStream/ReplayVideo", |
| | | { |
| | | accessToken: _accessToken, |
| | | deviceId: deviceId, |
| | | channelId: channelId, |
| | | dataType: dataType, |
| | | streamType: streamType, |
| | | storageType: storageType, |
| | | playType: 0, |
| | | multiple: 0, |
| | | startTime: startTime, |
| | | endTime: endTime |
| | | }, function (result) { |
| | | if (result.ResultState == 1) { |
| | | _channelId = channelId; |
| | | var r = ""; |
| | | //设备类型为深圳标是加"-r"; |
| | | if (result.ResultData.MediaType == 1) { r = "-r" } |
| | | //设备类型为粤标通讯id补足20位; |
| | | //if (result.ResultData.MediaType == 4) { deviceId = PrefixInteger(deviceId, 20); } |
| | | _deviceId = deviceId; |
| | | if (_isHttps == 1) { |
| | | hstVideoAll.StartRemotePlayback( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_voiceTCPPort, |
| | | deviceId + "_" + channelId + r, |
| | | startTime, |
| | | endTime, |
| | | historyDragVideo); |
| | | } |
| | | else { |
| | | hstVideoAll.StartRemotePlayback( |
| | | result.ResultData.MediaServerName, |
| | | result.ResultData.MediaTCPPort, |
| | | //_mediaServerName, |
| | | //_mediaTCPPort, |
| | | deviceId + "_" + channelId + r, |
| | | startTime, |
| | | endTime, |
| | | historyDragVideo); |
| | | } |
| | | } |
| | | else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | }, |
| | | //关闭播放历史 |
| | | historyCloseVideo: function (deviceId, channelId) { |
| | | hstVideoAll.CloseRemotePlayback(deviceId + "_" + channelId); |
| | | httpGet("MediaAPI/ReplayStream/ReplayControl", { |
| | | accessToken: _accessToken, |
| | | deviceId: deviceId, |
| | | channelId: channelId, |
| | | playType: 2, |
| | | multiple: 0, |
| | | dragDropPosition: "2019/01/11" |
| | | }, function (data) { }); |
| | | }, |
| | | /*------------历史播放结束--------------------------------*/ |
| | | |
| | | /*------------实时播放开始--------------------------------*/ |
| | | //打开实时视频 |
| | | realTimeOpenVideo: function (deviceId, channelId) { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken, |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.dataType = 0; |
| | | parms.streamType = 1; |
| | | var url = "MediaAPI/RealTimeStream/OpenVideo"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState == 1) { |
| | | //设备类型为粤标通讯id补足20位; |
| | | //if (result.ResultData.MediaType == 4) { deviceId = PrefixInteger(deviceId, 20); } |
| | | if (_isHttps == 1) { |
| | | hstVideoAll.openVideo( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_voiceTCPPort, |
| | | deviceId + "_" + channelId); |
| | | } |
| | | else { |
| | | hstVideoAll.openVideo( |
| | | result.ResultData.MediaServerName, |
| | | result.ResultData.MediaTCPPort, |
| | | // _mediaServerName, |
| | | //_mediaTCPPort, |
| | | deviceId + "_" + channelId); |
| | | } |
| | | } else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | }, |
| | | //关闭实时视频 |
| | | realTimeCloseVideo: function (deviceId, channelId) { |
| | | hstVideoAll.closeVideo(deviceId + "_" + channelId); |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | var url = "MediaAPI/RealTimeStream/CloseVideo"; |
| | | httpGet(url, parms, function (result) {}); |
| | | }, |
| | | /*------------实时播放结束--------------------------------*/ |
| | | |
| | | /*------------实时语音开始--------------------------------*/ |
| | | //打开语音(广播分二步走,走完本方法后取的通道号,再调用realTimeOpenBroadcast) |
| | | realTimeOpenVoice: function (deviceId, channelId, dataType) { |
| | | |
| | | if (dataType == 3) { |
| | | //广播 |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | var url = "MediaAPI/RealTimeStream/BroadcastRequest"; |
| | | httpGet(url, parms, function (result) { |
| | | var guangboType = 1; |
| | | if (result.ResultData.MediaType != 1) { |
| | | guangboType = 2; |
| | | } |
| | | if (result.ResultState == 1) { |
| | | _mediaServerName = result.ResultData.MediaServerName; |
| | | _mediaTCPPort=result.ResultData.MediaTCPPort; |
| | | hstVideoAll.JsStartBroadcast( |
| | | result.ResultData.MediaServerName, |
| | | result.ResultData.MediaTCPPort, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_mediaTCPPort, |
| | | //_voiceTCPPort, |
| | | parseInt(guangboType), |
| | | result.ResultData.MediaUserName, |
| | | result.ResultData.MediaPassword); |
| | | //_mediaUserName, |
| | | //_mediaPassword); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.dataType = dataType; |
| | | parms.streamType = 1; |
| | | var url = "MediaAPI/RealTimeStream/OpenVoice"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState == 1) { |
| | | //对讲接口的结果 result.ResultData.MediaType协议类型 详细可参考接口文档 水务固定填1即可 |
| | | if (dataType == 1) {//对讲 |
| | | hstVideoAll.JsStartTalk( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaTCPPort, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_mediaTCPPort, |
| | | //_voiceTCPPort, |
| | | parms.deviceId, |
| | | parms.channelId, |
| | | result.ResultData.MediaType, |
| | | result.ResultData.MediaUserName, |
| | | result.ResultData.MediaPassword); |
| | | //_mediaUserName, |
| | | //_mediaPassword); |
| | | } |
| | | else if (dataType == 2) { |
| | | //监听 |
| | | hstVideoAll.JsStartMonitor( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaTCPPort, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_mediaTCPPort, |
| | | //_voiceTCPPort, |
| | | parms.deviceId, |
| | | parms.channelId, |
| | | result.ResultData.MediaType, |
| | | result.ResultData.MediaUserName, |
| | | result.ResultData.MediaPassword); |
| | | //_mediaUserName, |
| | | //_mediaPassword); |
| | | } |
| | | } |
| | | else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //广播时,得到通道号再下发命令。 |
| | | realTimeOpenBroadcast: function (deviceId, backChannelId) { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = backChannelId; |
| | | parms.streamType = 1; |
| | | parms.mediaServerName = _mediaServerName; |
| | | parms.mediaTCPPort = _mediaTCPPort; |
| | | var url = "MediaAPI/RealTimeStream/OpenBroadcast"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState != 1) { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | }, |
| | | //关闭语音 |
| | | realTimeCloseVoice: function (deviceId, channelId, dataType) { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.dataType = dataType; |
| | | var url = "MediaAPI/RealTimeStream/CloseVoice"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState == 1) { |
| | | if (dataType == 1) {//对讲 |
| | | hstVideoAll.JsCloseTalk(parms.deviceId, parms.channelId); |
| | | } else if (dataType == 2) {//监听 |
| | | hstVideoAll.JsCloseMonitor(parms.deviceId, parms.channelId); |
| | | } else if (dataType == 3) {//广播 |
| | | hstVideoAll.JsCloseBroadcast(); |
| | | } |
| | | } else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /*------------实时语音结束--------------------------------*/ |
| | | } |
New file |
| | |
| | | !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() |
| | | }(window, (function () { |
| | | return function (e) { |
| | | var t = {}; |
| | | |
| | | function a(n) { |
| | | if (t[n]) return t[n].exports; |
| | | var o = t[n] = {i: n, l: !1, exports: {}}; |
| | | return e[n].call(o.exports, o, o.exports, a), o.l = !0, o.exports |
| | | } |
| | | |
| | | return a.m = e, a.c = t, a.d = function (e, t, n) { |
| | | a.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: n}) |
| | | }, a.r = function (e) { |
| | | "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0}) |
| | | }, a.t = function (e, t) { |
| | | if (1 & t && (e = a(e)), 8 & t) return e; |
| | | if (4 & t && "object" == typeof e && e && e.__esModule) return e; |
| | | var n = Object.create(null); |
| | | if (a.r(n), Object.defineProperty(n, "default", {enumerable: !0, value: e}), 2 & t && "string" != typeof e) |
| | | for (var o in e) a.d(n, o, function (t) { |
| | | return e[t] |
| | | }.bind(null, o)); |
| | | return n |
| | | }, a.n = function (e) { |
| | | var t = e && e.__esModule ? function () { |
| | | return e.default |
| | | } : function () { |
| | | return e |
| | | }; |
| | | return a.d(t, "a", t), t |
| | | }, a.o = function (e, t) { |
| | | return Object.prototype.hasOwnProperty.call(e, t) |
| | | }, a.p = "/", a(a.s = 57) |
| | | }([function (e, t, a) { |
| | | "use strict"; |
| | | |
| | | function n(e) { |
| | | return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { |
| | | return typeof e |
| | | } : function (e) { |
| | | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e |
| | | })(e) |
| | | } |
| | | |
| | | var o = a(6), |
| | | r = a(41), |
| | | i = Object.prototype.toString; |
| | | |
| | | function l(e) { |
| | | return "[object Array]" === i.call(e) |
| | | } |
| | | |
| | | function s(e) { |
| | | return null !== e && "object" === n(e) |
| | | } |
| | | |
| | | function d(e) { |
| | | return "[object Function]" === i.call(e) |
| | | } |
| | | |
| | | function p(e, t) { |
| | | if (null != e) |
| | | if ("object" !== n(e) && (e = [e]), l(e)) |
| | | for (var a = 0, o = e.length; a < o; a++) t.call(null, e[a], a, e); |
| | | else |
| | | for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.call(null, e[r], r, e) |
| | | } |
| | | |
| | | e.exports = { |
| | | isArray: l, isArrayBuffer: function (e) { |
| | | return "[object ArrayBuffer]" === i.call(e) |
| | | }, isBuffer: r, isFormData: function (e) { |
| | | return "undefined" != typeof FormData && e instanceof FormData |
| | | }, isArrayBufferView: function (e) { |
| | | return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && e.buffer instanceof ArrayBuffer |
| | | }, isString: function (e) { |
| | | return "string" == typeof e |
| | | }, isNumber: function (e) { |
| | | return "number" == typeof e |
| | | }, isObject: s, isUndefined: function (e) { |
| | | return void 0 === e |
| | | }, isDate: function (e) { |
| | | return "[object Date]" === i.call(e) |
| | | }, isFile: function (e) { |
| | | return "[object File]" === i.call(e) |
| | | }, isBlob: function (e) { |
| | | return "[object Blob]" === i.call(e) |
| | | }, isFunction: d, isStream: function (e) { |
| | | return s(e) && d(e.pipe) |
| | | }, isURLSearchParams: function (e) { |
| | | return "undefined" != typeof URLSearchParams && e instanceof URLSearchParams |
| | | }, isStandardBrowserEnv: function () { |
| | | return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && ("undefined" != typeof window && "undefined" != typeof document) |
| | | }, forEach: p, merge: function e() { |
| | | var t = {}; |
| | | |
| | | function a(a, o) { |
| | | "object" === n(t[o]) && "object" === n(a) ? t[o] = e(t[o], a) : t[o] = a |
| | | } |
| | | |
| | | for (var o = 0, r = arguments.length; o < r; o++) p(arguments[o], a); |
| | | return t |
| | | }, deepMerge: function e() { |
| | | var t = {}; |
| | | |
| | | function a(a, o) { |
| | | "object" === n(t[o]) && "object" === n(a) ? t[o] = e(t[o], a) : "object" === n(a) ? t[o] = e({}, a) : t[o] = a |
| | | } |
| | | |
| | | for (var o = 0, r = arguments.length; o < r; o++) p(arguments[o], a); |
| | | return t |
| | | }, extend: function (e, t, a) { |
| | | return p(t, (function (t, n) { |
| | | e[n] = a && "function" == typeof t ? o(t, a) : t |
| | | })), e |
| | | }, trim: function (e) { |
| | | return e.replace(/^\s*/, "").replace(/\s*$/, "") |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | var n = a(14); |
| | | e.exports = function (e) { |
| | | "use strict"; |
| | | var t = "", |
| | | a = (e = e || {}).enableSubtitle, |
| | | o = e.subtitle, |
| | | r = e.current, |
| | | i = e.pic, |
| | | l = n.$escape, |
| | | s = e.screenshot, |
| | | d = e.preload, |
| | | p = e.url; |
| | | a = o && "webvtt" === o.type; |
| | | return t += '\n<video\n class="dplayer-video ', r && (t += "dplayer-video-current"), t += '"\n webkit-playsinline\n playsinline\n ', i && (t += 'poster="', t += l(i), t += '"'), t += "\n ", (s || a) && (t += 'crossorigin="anonymous"'), t += "\n ", d && (t += 'preload="', t += l(d), t += '"'), t += "\n ", p && (t += 'src="', t += l(p), t += '"'), t += "\n >\n ", a && (t += '\n <track kind="metadata" default src="', t += l(o.url), t += '"></track>\n '), t += "\n</video>" |
| | | } |
| | | }, function (e, t, a) { |
| | | e.exports = a(40) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | var t = []; |
| | | return t.toString = function () { |
| | | return this.map((function (t) { |
| | | var a = function (e, t) { |
| | | var a = e[1] || "", |
| | | n = e[3]; |
| | | if (!n) return a; |
| | | if (t && "function" == typeof btoa) { |
| | | var o = (i = n, l = btoa(unescape(encodeURIComponent(JSON.stringify(i)))), s = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l), "/*# ".concat(s, " */")), |
| | | r = n.sources.map((function (e) { |
| | | return "/*# sourceURL=".concat(n.sourceRoot).concat(e, " */") |
| | | })); |
| | | return [a].concat(r).concat([o]).join("\n") |
| | | } |
| | | var i, l, s; |
| | | return [a].join("\n") |
| | | }(t, e); |
| | | return t[2] ? "@media ".concat(t[2], "{").concat(a, "}") : a |
| | | })).join("") |
| | | }, t.i = function (e, a) { |
| | | "string" == typeof e && (e = [ |
| | | [null, e, ""] |
| | | ]); |
| | | for (var n = {}, o = 0; o < this.length; o++) { |
| | | var r = this[o][0]; |
| | | null != r && (n[r] = !0) |
| | | } |
| | | for (var i = 0; i < e.length; i++) { |
| | | var l = e[i]; |
| | | null != l[0] && n[l[0]] || (a && !l[2] ? l[2] = a : a && (l[2] = "(".concat(l[2], ") and (").concat(a, ")")), t.push(l)) |
| | | } |
| | | }, t |
| | | } |
| | | }, function (e, t) { |
| | | function a(e) { |
| | | return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { |
| | | return typeof e |
| | | } : function (e) { |
| | | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e |
| | | })(e) |
| | | } |
| | | |
| | | var n; |
| | | n = function () { |
| | | return this |
| | | }(); |
| | | try { |
| | | n = n || new Function("return this")() |
| | | } catch (e) { |
| | | "object" === ("undefined" == typeof window ? "undefined" : a(window)) && (n = window) |
| | | } |
| | | e.exports = n |
| | | }, function (e, t) { |
| | | var a, n, o = e.exports = {}; |
| | | |
| | | function r() { |
| | | throw new Error("setTimeout has not been defined") |
| | | } |
| | | |
| | | function i() { |
| | | throw new Error("clearTimeout has not been defined") |
| | | } |
| | | |
| | | function l(e) { |
| | | if (a === setTimeout) return setTimeout(e, 0); |
| | | if ((a === r || !a) && setTimeout) return a = setTimeout, setTimeout(e, 0); |
| | | try { |
| | | return a(e, 0) |
| | | } catch (t) { |
| | | try { |
| | | return a.call(null, e, 0) |
| | | } catch (t) { |
| | | return a.call(this, e, 0) |
| | | } |
| | | } |
| | | } |
| | | |
| | | !function () { |
| | | try { |
| | | a = "function" == typeof setTimeout ? setTimeout : r |
| | | } catch (e) { |
| | | a = r |
| | | } |
| | | try { |
| | | n = "function" == typeof clearTimeout ? clearTimeout : i |
| | | } catch (e) { |
| | | n = i |
| | | } |
| | | }(); |
| | | var s, d = [], |
| | | p = !1, |
| | | c = -1; |
| | | |
| | | function u() { |
| | | p && s && (p = !1, s.length ? d = s.concat(d) : c = -1, d.length && y()) |
| | | } |
| | | |
| | | function y() { |
| | | if (!p) { |
| | | var e = l(u); |
| | | p = !0; |
| | | for (var t = d.length; t;) { |
| | | for (s = d, d = []; ++c < t;) s && s[c].run(); |
| | | c = -1, t = d.length |
| | | } |
| | | s = null, p = !1, |
| | | function (e) { |
| | | if (n === clearTimeout) return clearTimeout(e); |
| | | if ((n === i || !n) && clearTimeout) return n = clearTimeout, clearTimeout(e); |
| | | try { |
| | | n(e) |
| | | } catch (t) { |
| | | try { |
| | | return n.call(null, e) |
| | | } catch (t) { |
| | | return n.call(this, e) |
| | | } |
| | | } |
| | | }(e) |
| | | } |
| | | } |
| | | |
| | | function h(e, t) { |
| | | this.fun = e, this.array = t |
| | | } |
| | | |
| | | function m() { |
| | | } |
| | | |
| | | o.nextTick = function (e) { |
| | | var t = new Array(arguments.length - 1); |
| | | if (arguments.length > 1) |
| | | for (var a = 1; a < arguments.length; a++) t[a - 1] = arguments[a]; |
| | | d.push(new h(e, t)), 1 !== d.length || p || l(y) |
| | | }, h.prototype.run = function () { |
| | | this.fun.apply(null, this.array) |
| | | }, o.title = "browser", o.browser = !0, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = m, o.addListener = m, o.once = m, o.off = m, o.removeListener = m, o.removeAllListeners = m, o.emit = m, o.prependListener = m, o.prependOnceListener = m, o.listeners = function (e) { |
| | | return [] |
| | | }, o.binding = function (e) { |
| | | throw new Error("process.binding is not supported") |
| | | }, o.cwd = function () { |
| | | return "/" |
| | | }, o.chdir = function (e) { |
| | | throw new Error("process.chdir is not supported") |
| | | }, o.umask = function () { |
| | | return 0 |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e, t) { |
| | | return function () { |
| | | for (var a = new Array(arguments.length), n = 0; n < a.length; n++) a[n] = arguments[n]; |
| | | return e.apply(t, a) |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | |
| | | function o(e) { |
| | | return encodeURIComponent(e).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]") |
| | | } |
| | | |
| | | e.exports = function (e, t, a) { |
| | | if (!t) return e; |
| | | var r; |
| | | if (a) r = a(t); |
| | | else if (n.isURLSearchParams(t)) r = t.toString(); |
| | | else { |
| | | var i = []; |
| | | n.forEach(t, (function (e, t) { |
| | | null != e && (n.isArray(e) ? t += "[]" : e = [e], n.forEach(e, (function (e) { |
| | | n.isDate(e) ? e = e.toISOString() : n.isObject(e) && (e = JSON.stringify(e)), i.push(o(t) + "=" + o(e)) |
| | | }))) |
| | | })), r = i.join("&") |
| | | } |
| | | if (r) { |
| | | var l = e.indexOf("#"); |
| | | -1 !== l && (e = e.slice(0, l)), e += (-1 === e.indexOf("?") ? "?" : "&") + r |
| | | } |
| | | return e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | return !(!e || !e.__CANCEL__) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | (function (t) { |
| | | var n = a(0), |
| | | o = a(46), |
| | | r = {"Content-Type": "application/x-www-form-urlencoded"}; |
| | | |
| | | function i(e, t) { |
| | | !n.isUndefined(e) && n.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t) |
| | | } |
| | | |
| | | var l, s = { |
| | | adapter: (void 0 !== t && "[object process]" === Object.prototype.toString.call(t) ? l = a(10) : "undefined" != typeof XMLHttpRequest && (l = a(10)), l), |
| | | transformRequest: [function (e, t) { |
| | | return o(t, "Accept"), o(t, "Content-Type"), n.isFormData(e) || n.isArrayBuffer(e) || n.isBuffer(e) || n.isStream(e) || n.isFile(e) || n.isBlob(e) ? e : n.isArrayBufferView(e) ? e.buffer : n.isURLSearchParams(e) ? (i(t, "application/x-www-form-urlencoded;charset=utf-8"), e.toString()) : n.isObject(e) ? (i(t, "application/json;charset=utf-8"), JSON.stringify(e)) : e |
| | | }], |
| | | transformResponse: [function (e) { |
| | | if ("string" == typeof e) try { |
| | | e = JSON.parse(e) |
| | | } catch (e) { |
| | | } |
| | | return e |
| | | }], |
| | | timeout: 0, |
| | | xsrfCookieName: "XSRF-TOKEN", |
| | | xsrfHeaderName: "X-XSRF-TOKEN", |
| | | maxContentLength: -1, |
| | | validateStatus: function (e) { |
| | | return e >= 200 && e < 300 |
| | | } |
| | | }; |
| | | s.headers = {common: {Accept: "application/json, text/plain, */*"}}, n.forEach(["delete", "get", "head"], (function (e) { |
| | | s.headers[e] = {} |
| | | })), n.forEach(["post", "put", "patch"], (function (e) { |
| | | s.headers[e] = n.merge(r) |
| | | })), e.exports = s |
| | | }).call(this, a(5)) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(47), |
| | | r = a(7), |
| | | i = a(49), |
| | | l = a(50), |
| | | s = a(11); |
| | | e.exports = function (e) { |
| | | return new Promise((function (t, d) { |
| | | var p = e.data, |
| | | c = e.headers; |
| | | n.isFormData(p) && delete c["Content-Type"]; |
| | | var u = new XMLHttpRequest; |
| | | if (e.auth) { |
| | | var y = e.auth.username || "", |
| | | h = e.auth.password || ""; |
| | | c.Authorization = "Basic " + btoa(y + ":" + h) |
| | | } |
| | | if (u.open(e.method.toUpperCase(), r(e.url, e.params, e.paramsSerializer), !0), u.timeout = e.timeout, u.onreadystatechange = function () { |
| | | if (u && 4 === u.readyState && (0 !== u.status || u.responseURL && 0 === u.responseURL.indexOf("file:"))) { |
| | | var a = "getAllResponseHeaders" in u ? i(u.getAllResponseHeaders()) : null, |
| | | n = { |
| | | data: e.responseType && "text" !== e.responseType ? u.response : u.responseText, |
| | | status: u.status, |
| | | statusText: u.statusText, |
| | | headers: a, |
| | | config: e, |
| | | request: u |
| | | }; |
| | | o(t, d, n), u = null |
| | | } |
| | | }, u.onabort = function () { |
| | | u && (d(s("Request aborted", e, "ECONNABORTED", u)), u = null) |
| | | }, u.onerror = function () { |
| | | d(s("Network Error", e, null, u)), u = null |
| | | }, u.ontimeout = function () { |
| | | d(s("timeout of " + e.timeout + "ms exceeded", e, "ECONNABORTED", u)), u = null |
| | | }, n.isStandardBrowserEnv()) { |
| | | var m = a(51), |
| | | f = (e.withCredentials || l(e.url)) && e.xsrfCookieName ? m.read(e.xsrfCookieName) : void 0; |
| | | f && (c[e.xsrfHeaderName] = f) |
| | | } |
| | | if ("setRequestHeader" in u && n.forEach(c, (function (e, t) { |
| | | void 0 === p && "content-type" === t.toLowerCase() ? delete c[t] : u.setRequestHeader(t, e) |
| | | })), e.withCredentials && (u.withCredentials = !0), e.responseType) try { |
| | | u.responseType = e.responseType |
| | | } catch (t) { |
| | | if ("json" !== e.responseType) throw t |
| | | } |
| | | "function" == typeof e.onDownloadProgress && u.addEventListener("progress", e.onDownloadProgress), "function" == typeof e.onUploadProgress && u.upload && u.upload.addEventListener("progress", e.onUploadProgress), e.cancelToken && e.cancelToken.promise.then((function (e) { |
| | | u && (u.abort(), d(e), u = null) |
| | | })), void 0 === p && (p = null), u.send(p) |
| | | })) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(48); |
| | | e.exports = function (e, t, a, o, r) { |
| | | var i = new Error(e); |
| | | return n(i, t, a, o, r) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = function (e, t) { |
| | | t = t || {}; |
| | | var a = {}; |
| | | return n.forEach(["url", "method", "params", "data"], (function (e) { |
| | | void 0 !== t[e] && (a[e] = t[e]) |
| | | })), n.forEach(["headers", "auth", "proxy"], (function (o) { |
| | | n.isObject(t[o]) ? a[o] = n.deepMerge(e[o], t[o]) : void 0 !== t[o] ? a[o] = t[o] : n.isObject(e[o]) ? a[o] = n.deepMerge(e[o]) : void 0 !== e[o] && (a[o] = e[o]) |
| | | })), n.forEach(["baseURL", "transformRequest", "transformResponse", "paramsSerializer", "timeout", "withCredentials", "adapter", "responseType", "xsrfCookieName", "xsrfHeaderName", "onUploadProgress", "onDownloadProgress", "maxContentLength", "validateStatus", "maxRedirects", "httpAgent", "httpsAgent", "cancelToken", "socketPath"], (function (n) { |
| | | void 0 !== t[n] ? a[n] = t[n] : void 0 !== e[n] && (a[n] = e[n]) |
| | | })), a |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | |
| | | function n(e) { |
| | | this.message = e |
| | | } |
| | | |
| | | n.prototype.toString = function () { |
| | | return "Cancel" + (this.message ? ": " + this.message : "") |
| | | }, n.prototype.__CANCEL__ = !0, e.exports = n |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = a(56) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | (function (e) { |
| | | var n = a(16); |
| | | |
| | | function o(e) { |
| | | return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { |
| | | return typeof e |
| | | } : function (e) { |
| | | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e |
| | | })(e) |
| | | } |
| | | |
| | | var r = setTimeout; |
| | | |
| | | function i(e) { |
| | | return Boolean(e && void 0 !== e.length) |
| | | } |
| | | |
| | | function l() { |
| | | } |
| | | |
| | | function s(e) { |
| | | if (!(this instanceof s)) throw new TypeError("Promises must be constructed via new"); |
| | | if ("function" != typeof e) throw new TypeError("not a function"); |
| | | this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], h(e, this) |
| | | } |
| | | |
| | | function d(e, t) { |
| | | for (; 3 === e._state;) e = e._value; |
| | | 0 !== e._state ? (e._handled = !0, s._immediateFn((function () { |
| | | var a = 1 === e._state ? t.onFulfilled : t.onRejected; |
| | | if (null !== a) { |
| | | var n; |
| | | try { |
| | | n = a(e._value) |
| | | } catch (e) { |
| | | return void c(t.promise, e) |
| | | } |
| | | p(t.promise, n) |
| | | } else (1 === e._state ? p : c)(t.promise, e._value) |
| | | }))) : e._deferreds.push(t) |
| | | } |
| | | |
| | | function p(e, t) { |
| | | try { |
| | | if (t === e) throw new TypeError("A promise cannot be resolved with itself."); |
| | | if (t && ("object" === o(t) || "function" == typeof t)) { |
| | | var a = t.then; |
| | | if (t instanceof s) return e._state = 3, e._value = t, void u(e); |
| | | if ("function" == typeof a) return void h((n = a, r = t, function () { |
| | | n.apply(r, arguments) |
| | | }), e) |
| | | } |
| | | e._state = 1, e._value = t, u(e) |
| | | } catch (t) { |
| | | c(e, t) |
| | | } |
| | | var n, r |
| | | } |
| | | |
| | | function c(e, t) { |
| | | e._state = 2, e._value = t, u(e) |
| | | } |
| | | |
| | | function u(e) { |
| | | 2 === e._state && 0 === e._deferreds.length && s._immediateFn((function () { |
| | | e._handled || s._unhandledRejectionFn(e._value) |
| | | })); |
| | | for (var t = 0, a = e._deferreds.length; t < a; t++) d(e, e._deferreds[t]); |
| | | e._deferreds = null |
| | | } |
| | | |
| | | function y(e, t, a) { |
| | | this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.promise = a |
| | | } |
| | | |
| | | function h(e, t) { |
| | | var a = !1; |
| | | try { |
| | | e((function (e) { |
| | | a || (a = !0, p(t, e)) |
| | | }), (function (e) { |
| | | a || (a = !0, c(t, e)) |
| | | })) |
| | | } catch (e) { |
| | | if (a) return; |
| | | a = !0, c(t, e) |
| | | } |
| | | } |
| | | |
| | | s.prototype.catch = function (e) { |
| | | return this.then(null, e) |
| | | }, s.prototype.then = function (e, t) { |
| | | var a = new this.constructor(l); |
| | | return d(this, new y(e, t, a)), a |
| | | }, s.prototype.finally = n.a, s.all = function (e) { |
| | | return new s((function (t, a) { |
| | | if (!i(e)) return a(new TypeError("Promise.all accepts an array")); |
| | | var n = Array.prototype.slice.call(e); |
| | | if (0 === n.length) return t([]); |
| | | var r = n.length; |
| | | |
| | | function l(e, i) { |
| | | try { |
| | | if (i && ("object" === o(i) || "function" == typeof i)) { |
| | | var s = i.then; |
| | | if ("function" == typeof s) return void s.call(i, (function (t) { |
| | | l(e, t) |
| | | }), a) |
| | | } |
| | | n[e] = i, 0 == --r && t(n) |
| | | } catch (e) { |
| | | a(e) |
| | | } |
| | | } |
| | | |
| | | for (var s = 0; s < n.length; s++) l(s, n[s]) |
| | | })) |
| | | }, s.resolve = function (e) { |
| | | return e && "object" === o(e) && e.constructor === s ? e : new s((function (t) { |
| | | t(e) |
| | | })) |
| | | }, s.reject = function (e) { |
| | | return new s((function (t, a) { |
| | | a(e) |
| | | })) |
| | | }, s.race = function (e) { |
| | | return new s((function (t, a) { |
| | | if (!i(e)) return a(new TypeError("Promise.race accepts an array")); |
| | | for (var n = 0, o = e.length; n < o; n++) s.resolve(e[n]).then(t, a) |
| | | })) |
| | | }, s._immediateFn = "function" == typeof e && function (t) { |
| | | e(t) |
| | | } || function (e) { |
| | | r(e, 0) |
| | | }, s._unhandledRejectionFn = function (e) { |
| | | "undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e) |
| | | }, t.a = s |
| | | }).call(this, a(38).setImmediate) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | t.a = function (e) { |
| | | var t = this.constructor; |
| | | return this.then((function (a) { |
| | | return t.resolve(e()).then((function () { |
| | | return a |
| | | })) |
| | | }), (function (a) { |
| | | return t.resolve(e()).then((function () { |
| | | return t.reject(a) |
| | | })) |
| | | })) |
| | | } |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 32"><path style="fill:#ccc" d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | // e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32"><path d="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"></path></svg>' |
| | | e.exports = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1582886283652" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1436" width="12" height="12" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M258.875 174.5h506.25c46.58203125 0 84.375 37.79296875 84.375 84.375v506.25c0 46.58203125-37.79296875 84.375-84.375 84.375H258.875c-46.58203125 0-84.375-37.79296875-84.375-84.375V258.875c0-46.58203125 37.79296875-84.375 84.375-84.375z" style="fill:#cccccc";" p-id="1437"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 21 32"><path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056z"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 21 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 21 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | // e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 33"><path d="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"></path></svg>' |
| | | e.exports = '<svg t="1583130841318" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2689" width="14" height="14" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M162.133333 162.133333v153.6H85.333333V85.333333h234.666667v76.8H162.133333z m699.733334 0h-153.6V85.333333H938.666667v234.666667h-76.8V162.133333z m0 699.733334v-153.6H938.666667V938.666667h-234.666667v-76.8h157.866667z m-699.733334 0h153.6V938.666667H85.333333v-234.666667h76.8v157.866667zM256 256h512v512H256V256z" p-id="2690" fill="#cccccc"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 33"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 28"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M19.357 2.88c1.749 0 3.366 0.316 4.851 0.946 1.485 0.632 2.768 1.474 3.845 2.533s1.922 2.279 2.532 3.661c0.611 1.383 0.915 2.829 0.915 4.334 0 1.425-0.304 2.847-0.915 4.271-0.611 1.425-1.587 2.767-2.928 4.028-0.855 0.813-1.811 1.607-2.869 2.38s-2.136 1.465-3.233 2.075c-1.099 0.61-2.198 1.098-3.296 1.465-1.098 0.366-2.115 0.549-3.051 0.549-1.343 0-2.441-0.438-3.296-1.311-0.854-0.876-1.281-2.41-1.281-4.608 0-0.366 0.020-0.773 0.060-1.221s0.062-0.895 0.062-1.343c0-0.773-0.183-1.353-0.55-1.738-0.366-0.387-0.793-0.58-1.281-0.58-0.652 0-1.21 0.295-1.678 0.886s-0.926 1.23-1.373 1.921c-0.447 0.693-0.905 1.334-1.372 1.923s-1.028 0.886-1.679 0.886c-0.529 0-1.048-0.427-1.556-1.282s-0.763-2.259-0.763-4.212c0-2.197 0.529-4.241 1.587-6.133s2.462-3.529 4.21-4.912c1.75-1.383 3.762-2.471 6.041-3.264 2.277-0.796 4.617-1.212 7.018-1.253zM7.334 15.817c0.569 0 1.047-0.204 1.434-0.611s0.579-0.875 0.579-1.404c0-0.569-0.193-1.047-0.579-1.434s-0.864-0.579-1.434-0.579c-0.529 0-0.987 0.193-1.373 0.579s-0.58 0.864-0.58 1.434c0 0.53 0.194 0.998 0.58 1.404 0.388 0.407 0.845 0.611 1.373 0.611zM12.216 11.79c0.691 0 1.292-0.254 1.8-0.763s0.762-1.107 0.762-1.8c0-0.732-0.255-1.343-0.762-1.831-0.509-0.489-1.109-0.732-1.8-0.732-0.732 0-1.342 0.244-1.831 0.732-0.488 0.488-0.732 1.098-0.732 1.831 0 0.693 0.244 1.292 0.732 1.8s1.099 0.763 1.831 0.763zM16.366 25.947c0.692 0 1.282-0.214 1.77-0.64s0.732-0.987 0.732-1.678-0.244-1.261-0.732-1.709c-0.489-0.448-1.078-0.671-1.77-0.671-0.65 0-1.21 0.223-1.678 0.671s-0.702 1.018-0.702 1.709c0 0.692 0.234 1.25 0.702 1.678s1.027 0.64 1.678 0.64zM19.113 9.592c0.651 0 1.129-0.203 1.433-0.611 0.305-0.406 0.459-0.874 0.459-1.404 0-0.488-0.154-0.947-0.459-1.373-0.304-0.427-0.782-0.641-1.433-0.641-0.529 0-1.008 0.193-1.434 0.58s-0.64 0.865-0.64 1.434c0 0.571 0.213 1.049 0.64 1.434 0.427 0.389 0.905 0.581 1.434 0.581zM24.848 12.826c0.57 0 1.067-0.213 1.495-0.64 0.427-0.427 0.64-0.947 0.64-1.556 0-0.57-0.214-1.068-0.64-1.495-0.428-0.427-0.927-0.64-1.495-0.64-0.611 0-1.129 0.213-1.555 0.64-0.428 0.427-0.642 0.926-0.642 1.495 0 0.611 0.213 1.129 0.642 1.556s0.947 0.64 1.555 0.64z"></path></svg>' |
| | | }, function (e, t) { |
| | | // e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="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"></path></svg>' |
| | | e.exports = '<svg t="1583131099295" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4245" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M260.608 232.727273l82.711273-124.090182A34.885818 34.885818 0 0 1 372.363636 93.090909h279.272728c11.682909 0 22.574545 5.818182 29.044363 15.546182L763.415273 232.727273h110.056727A104.261818 104.261818 0 0 1 977.454545 336.686545v490.24A104.285091 104.285091 0 0 1 873.472 930.909091H150.528A104.285091 104.285091 0 0 1 46.545455 826.926545V336.686545A104.261818 104.261818 0 0 1 150.528 232.727273h110.056727z m83.898182 0h334.987636l-46.545454-69.818182H391.074909l-46.545454 69.818182zM512 779.636364c109.079273 0 197.818182-88.738909 197.818182-197.818182 0-109.079273-88.738909-197.818182-197.818182-197.818182-109.079273 0-197.818182 88.738909-197.818182 197.818182 0 109.079273 88.738909 197.818182 197.818182 197.818182z m0-325.818182c70.562909 0 128 57.437091 128 128s-57.437091 128-128 128a128.162909 128.162909 0 0 1-128-128c0-70.562909 57.437091-128 128-128z" fill="#cccccc" p-id="4246"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"></path></svg>' |
| | | }, function (e, t) { |
| | | e.exports = '<svg version="1.1" viewBox="0 0 22 22"><svg x="7" y="1"><circle class="diplayer-loading-dot diplayer-loading-dot-0" cx="4" cy="4" r="2"></circle></svg><svg x="11" y="3"><circle class="diplayer-loading-dot diplayer-loading-dot-1" cx="4" cy="4" r="2"></circle></svg><svg x="13" y="7"><circle class="diplayer-loading-dot diplayer-loading-dot-2" cx="4" cy="4" r="2"></circle></svg><svg x="11" y="11"><circle class="diplayer-loading-dot diplayer-loading-dot-3" cx="4" cy="4" r="2"></circle></svg><svg x="7" y="13"><circle class="diplayer-loading-dot diplayer-loading-dot-4" cx="4" cy="4" r="2"></circle></svg><svg x="3" y="11"><circle class="diplayer-loading-dot diplayer-loading-dot-5" cx="4" cy="4" r="2"></circle></svg><svg x="1" y="7"><circle class="diplayer-loading-dot diplayer-loading-dot-6" cx="4" cy="4" r="2"></circle></svg><svg x="3" y="3"><circle class="diplayer-loading-dot diplayer-loading-dot-7" cx="4" cy="4" r="2"></circle></svg></svg>' |
| | | }, function (e, t, a) { |
| | | var n = a(14); |
| | | e.exports = function (e) { |
| | | "use strict"; |
| | | e = e || {}; |
| | | var t = "", |
| | | o = (arguments[1], function (e) { |
| | | return t += e |
| | | }), |
| | | r = e.video, |
| | | i = e.options, |
| | | l = n.$escape, |
| | | s = e.tran, |
| | | d = e.icons, |
| | | p = e.index, |
| | | c = n.$each; |
| | | e.$value, e.$index; |
| | | return t += '<div class="dplayer-mask"></div>\n<div class="dplayer-video-wrap">\n ', o(a(1)(r)), t += "\n ", i.logo && (t += '\n <div class="dplayer-logo">\n <img src="', t += l(i.logo), t += '">\n </div>\n '), t += '\n <div class="dplayer-danmaku"', i.danmaku && i.danmaku.bottm && (t += ' style="margin-bottom:', t += l(i.danmaku.bottm), t += '"'), t += '>\n <div class="dplayer-danmaku-item dplayer-danmaku-item--demo"></div>\n </div>\n <div class="dplayer-subtitle"></div>\n <div class="dplayer-bezel">\n <span class="dplayer-bezel-icon"></span>\n ', i.danmaku && (t += '\n <span class="dplayer-danloading">', t += l(s("Danmaku is loading")), t += "</span>\n "), t += '\n <span class="diplayer-loading-icon">', t += d.loading, t += '</span>\n </div>\n</div>\n<div class="dplayer-controller-mask"></div>\n<div class="dplayer-controller">\n <div class="dplayer-icons dplayer-comment-box">\n <button class="dplayer-icon dplayer-comment-setting-icon" data-balloon="', t += l(s("Setting")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.pallette, t += '</span>\n </button>\n <div class="dplayer-comment-setting-box">\n <div class="dplayer-comment-setting-color">\n <div class="dplayer-comment-setting-title">', t += l(s("Set danmaku color")), t += '</div>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#fff" checked>\n <span style="background: #fff;"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#e54256">\n <span style="background: #e54256"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#ffe133">\n <span style="background: #ffe133"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#64DD17">\n <span style="background: #64DD17"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#39ccff">\n <span style="background: #39ccff"></span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-color-', t += l(p), t += '" value="#D500F9">\n <span style="background: #D500F9"></span>\n </label>\n </div>\n <div class="dplayer-comment-setting-type">\n <div class="dplayer-comment-setting-title">', t += l(s("Set danmaku type")), t += '</div>\n <label>\n <input type="radio" name="dplayer-danmaku-type-', t += l(p), t += '" value="1">\n <span>', t += l(s("Top")), t += '</span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-type-', t += l(p), t += '" value="0" checked>\n <span>', t += l(s("Rolling")), t += '</span>\n </label>\n <label>\n <input type="radio" name="dplayer-danmaku-type-', t += l(p), t += '" value="2">\n <span>', t += l(s("Bottom")), t += '</span>\n </label>\n </div>\n </div>\n <input class="dplayer-comment-input" type="text" placeholder="', t += l(s("Input danmaku, hit Enter")), t += '" maxlength="30">\n <button class="dplayer-icon dplayer-send-icon" data-balloon="', t += l(s("Send")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.send, t += '</span>\n </button>\n </div>\n <div class="dplayer-icons dplayer-icons-left">\n <button class="dplayer-icon dplayer-play-icon">\n <span class="dplayer-icon-content">', t += d.play, t += '</span>\n </button>\n <div class="dplayer-volume">\n <button class="dplayer-icon dplayer-volume-icon">\n <span class="dplayer-icon-content">', t += d.volumeDown, t += '</span>\n </button>\n <div class="dplayer-volume-bar-wrap" data-balloon-pos="up">\n <div class="dplayer-volume-bar">\n <div class="dplayer-volume-bar-inner" style="background: ', t += l(i.theme), t += ';">\n <span class="dplayer-thumb" style="background: ', t += l(i.theme), t += '"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="dplayer-time">\n <span class="dplayer-ptime">0:00</span> /\n <span class="dplayer-dtime">0:00</span>\n </span>\n ', i.live && (t += '\n <span class="dplayer-live-badge"><span class="dplayer-live-dot" style="background: ', t += l(i.theme), t += ';"></span><span class="dplayer-live-text">', t += (e.options.liveText ? e.options.liveText : ''/*l(s("Live"))*/), t += "</span></span>\n "), t += '\n </div>\n <div class="dplayer-icons dplayer-icons-right">\n ', i.video.quality && (t += '\n <div class="dplayer-quality">\n <button class="dplayer-icon dplayer-quality-icon">', t += l(i.video.quality[i.video.defaultQuality].name), t += '</button>\n <div class="dplayer-quality-mask">\n <div class="dplayer-quality-list">\n ', c(i.video.quality, (function (e, a) { |
| | | t += '\n <div class="dplayer-quality-item" data-index="', t += l(a), t += '">', t += l(e.name), t += "</div>\n " |
| | | // })), t += "\n </div>\n </div>\n </div>\n "), t += "\n ", i.screenshot && (t += '\n <div class="dplayer-icon dplayer-camera-icon" data-balloon="', t += l(s("Screenshot")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.camera, t += "</span>\n </div>\n "), t += '\n <div class="dplayer-comment">\n <button class="dplayer-icon dplayer-comment-icon" data-balloon="', t += l(s("Send danmaku")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.comment, t += "</span>\n </button>\n </div>\n ", i.subtitle && (t += '\n <div class="dplayer-subtitle-btn">\n <button class="dplayer-icon dplayer-subtitle-icon" data-balloon="', t += l(s("Hide subtitle")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.subtitle, t += "</span>\n </button>\n </div>\n "), t += '\n <div class="dplayer-setting">\n <button class="dplayer-icon dplayer-setting-icon" data-balloon="', t += l(s("Setting")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.setting, t += '</span>\n </button>\n <div class="dplayer-setting-box">\n <div class="dplayer-setting-origin-panel">\n <div class="dplayer-setting-item dplayer-setting-speed">\n <span class="dplayer-label">', t += l(s("Speed")), t += '</span>\n <div class="dplayer-toggle">', t += d.right, t += '</div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-loop">\n <span class="dplayer-label">', t += l(s("Loop")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-toggle-setting-input" type="checkbox" name="dplayer-toggle">\n <label for="dplayer-toggle"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-showdan">\n <span class="dplayer-label">', t += l(s("Show danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-showdan-setting-input" type="checkbox" name="dplayer-toggle-dan">\n <label for="dplayer-toggle-dan"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danunlimit">\n <span class="dplayer-label">', t += l(s("Unlimited danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-danunlimit-setting-input" type="checkbox" name="dplayer-toggle-danunlimit">\n <label for="dplayer-toggle-danunlimit"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danmaku">\n <span class="dplayer-label">', t += l(s("Opacity for danmaku")), t += '</span>\n <div class="dplayer-danmaku-bar-wrap">\n <div class="dplayer-danmaku-bar">\n <div class="dplayer-danmaku-bar-inner">\n <span class="dplayer-thumb"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-setting-speed-panel">\n <div class="dplayer-setting-speed-item" data-speed="0.5">\n <span class="dplayer-label">0.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="0.75">\n <span class="dplayer-label">0.75</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1">\n <span class="dplayer-label">', t += l(s("Normal")), t += '</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.25">\n <span class="dplayer-label">1.25</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.5">\n <span class="dplayer-label">1.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="2">\n <span class="dplayer-label">2</span>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-full">\n <button class="dplayer-icon dplayer-full-in-icon" data-balloon="', t += l(s("Web full screen")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.fullWeb, t += '</span>\n </button>\n <button class="dplayer-icon dplayer-full-icon" data-balloon="', t += l(s("Full")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.full, t += '</span>\n </button>\n </div>\n </div>\n <div class="dplayer-bar-wrap">\n <div class="dplayer-bar-time hidden">00:00</div>\n <div class="dplayer-bar-preview"></div>\n <div class="dplayer-bar">\n <div class="dplayer-loaded" style="width: 0;"></div>\n <div class="dplayer-played" style="width: 0; background: ', t += l(i.theme), t += '">\n <span class="dplayer-thumb" style="background: ', t += l(i.theme), t += '"></span>\n </div>\n </div>\n </div>\n</div>\n<div class="dplayer-info-panel dplayer-info-panel-hide">\n <div class="dplayer-info-panel-close">[x]</div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-version">\n <span class="dplayer-info-panel-item-title">Player version</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-fps">\n <span class="dplayer-info-panel-item-title">Player FPS</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-type">\n <span class="dplayer-info-panel-item-title">Video type</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-url">\n <span class="dplayer-info-panel-item-title">Video url</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-resolution">\n <span class="dplayer-info-panel-item-title">Video resolution</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-duration">\n <span class="dplayer-info-panel-item-title">Video duration</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n ', i.danmaku && (t += '\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-id">\n <span class="dplayer-info-panel-item-title">Danamku id</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-api">\n <span class="dplayer-info-panel-item-title">Danamku api</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-amount">\n <span class="dplayer-info-panel-item-title">Danamku amount</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n '), t += '\n</div>\n<div class="dplayer-menu">\n ', c(i.contextmenu, (function (e, a) { |
| | | })), t += "\n </div>\n </div>\n </div>\n "), t += "\n ", i.screenshot && (t += '\n <div class="dplayer-icon dplayer-camera-icon" data-balloon="', t += l(s("Screenshot")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.camera, t += "</span>\n </div>\n "), t += '\n <div class="dplayer-comment">\n <button class="dplayer-icon dplayer-comment-icon" data-balloon="', t += l(s("Send danmaku")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.comment, t += "</span>\n </button>\n </div>\n ", i.subtitle && (t += '\n <div class="dplayer-subtitle-btn">\n <button class="dplayer-icon dplayer-subtitle-icon" data-balloon="', t += l(s("Hide subtitle")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.subtitle, t += "</span>\n </button>\n </div>\n "), t += '\n <div class="dplayer-setting" style="display: none;">\n <button class="dplayer-icon dplayer-setting-icon" data-balloon="', t += l(s("Setting")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.setting, t += '</span>\n </button>\n <div class="dplayer-setting-box">\n <div class="dplayer-setting-origin-panel">\n <div class="dplayer-setting-item dplayer-setting-speed">\n <span class="dplayer-label">', t += l(s("Speed")), t += '</span>\n <div class="dplayer-toggle">', t += d.right, t += '</div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-loop">\n <span class="dplayer-label">', t += l(s("Loop")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-toggle-setting-input" type="checkbox" name="dplayer-toggle">\n <label for="dplayer-toggle"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-showdan">\n <span class="dplayer-label">', t += l(s("Show danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-showdan-setting-input" type="checkbox" name="dplayer-toggle-dan">\n <label for="dplayer-toggle-dan"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danunlimit">\n <span class="dplayer-label">', t += l(s("Unlimited danmaku")), t += '</span>\n <div class="dplayer-toggle">\n <input class="dplayer-danunlimit-setting-input" type="checkbox" name="dplayer-toggle-danunlimit">\n <label for="dplayer-toggle-danunlimit"></label>\n </div>\n </div>\n <div class="dplayer-setting-item dplayer-setting-danmaku">\n <span class="dplayer-label">', t += l(s("Opacity for danmaku")), t += '</span>\n <div class="dplayer-danmaku-bar-wrap">\n <div class="dplayer-danmaku-bar">\n <div class="dplayer-danmaku-bar-inner">\n <span class="dplayer-thumb"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-setting-speed-panel">\n <div class="dplayer-setting-speed-item" data-speed="0.5">\n <span class="dplayer-label">0.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="0.75">\n <span class="dplayer-label">0.75</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1">\n <span class="dplayer-label">', t += l(s("Normal")), t += '</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.25">\n <span class="dplayer-label">1.25</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="1.5">\n <span class="dplayer-label">1.5</span>\n </div>\n <div class="dplayer-setting-speed-item" data-speed="2">\n <span class="dplayer-label">2</span>\n </div>\n </div>\n </div>\n </div>\n <div class="dplayer-full">\n ', t += '<button class="dplayer-icon dplayer-full-icon" data-balloon="', t += l(s("Full")), t += '" data-balloon-pos="up">\n <span class="dplayer-icon-content">', t += d.full, t += '</span>\n </button>\n </div>\n </div>\n <div class="dplayer-bar-wrap">\n <div class="dplayer-bar-time hidden">00:00</div>\n <div class="dplayer-bar-preview"></div>\n <div class="dplayer-bar">\n <div class="dplayer-loaded" style="width: 0;"></div>\n <div class="dplayer-played" style="width: 0; background: ', t += l(i.theme), t += '">\n <span class="dplayer-thumb" style="background: ', t += l(i.theme), t += '"></span>\n </div>\n </div>\n </div>\n</div>\n<div class="dplayer-info-panel dplayer-info-panel-hide">\n <div class="dplayer-info-panel-close">[x]</div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-version">\n <span class="dplayer-info-panel-item-title">Player version</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-fps">\n <span class="dplayer-info-panel-item-title">Player FPS</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-type">\n <span class="dplayer-info-panel-item-title">Video type</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-url">\n <span class="dplayer-info-panel-item-title">Video url</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-resolution">\n <span class="dplayer-info-panel-item-title">Video resolution</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-duration">\n <span class="dplayer-info-panel-item-title">Video duration</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n ', i.danmaku && (t += '\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-id">\n <span class="dplayer-info-panel-item-title">Danamku id</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-api">\n <span class="dplayer-info-panel-item-title">Danamku api</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n <div class="dplayer-info-panel-item dplayer-info-panel-item-danmaku-amount">\n <span class="dplayer-info-panel-item-title">Danamku amount</span>\n <span class="dplayer-info-panel-item-data"></span>\n </div>\n '), t += '\n</div>\n<div class="dplayer-menu">\n ', c(i.contextmenu, (function (e, a) { |
| | | t += '\n <div class="dplayer-menu-item">\n <a', e.link && (t += ' target="_blank"'), t += ' href="', t += l(e.link || "javascript:void(0);"), t += '">', t += l(s(e.text)), t += "</a>\n </div>\n " |
| | | })), t += '\n</div>\n<div class="dplayer-notice"></div>' |
| | | } |
| | | }, function (e, t, a) { |
| | | var n = a(35); |
| | | "string" == typeof n && (n = [ |
| | | [e.i, n, ""] |
| | | ]); |
| | | var o = {insert: "head", singleton: !1}; |
| | | a(37)(n, o); |
| | | n.locals && (e.exports = n.locals) |
| | | }, function (e, t, a) { |
| | | // (t = e.exports = a(3)(!1)).i(a(36), ""), t.push([e.i, '@-webkit-keyframes my-face{2%{transform:translateY(1.5px) rotate(1.5deg)}4%{transform:translateY(-1.5px) rotate(-.5deg)}6%{transform:translateY(1.5px) rotate(-1.5deg)}8%{transform:translateY(-1.5px) rotate(-1.5deg)}10%{transform:translateY(2.5px) rotate(1.5deg)}12%{transform:translateY(-.5px) rotate(1.5deg)}14%{transform:translateY(-1.5px) rotate(1.5deg)}16%{transform:translateY(-.5px) rotate(-1.5deg)}18%{transform:translateY(.5px) rotate(-1.5deg)}20%{transform:translateY(-1.5px) rotate(2.5deg)}22%{transform:translateY(.5px) rotate(-1.5deg)}24%{transform:translateY(1.5px) rotate(1.5deg)}26%{transform:translateY(.5px) rotate(.5deg)}28%{transform:translateY(.5px) rotate(1.5deg)}30%{transform:translateY(-.5px) rotate(2.5deg)}32%{transform:translateY(1.5px) rotate(-.5deg)}34%{transform:translateY(1.5px) rotate(-.5deg)}36%{transform:translateY(-1.5px) rotate(2.5deg)}38%{transform:translateY(1.5px) rotate(-1.5deg)}40%{transform:translateY(-.5px) rotate(2.5deg)}42%{transform:translateY(2.5px) rotate(-1.5deg)}44%{transform:translateY(1.5px) rotate(.5deg)}46%{transform:translateY(-1.5px) rotate(2.5deg)}48%{transform:translateY(-.5px) rotate(.5deg)}50%{transform:translateY(.5px) rotate(.5deg)}52%{transform:translateY(2.5px) rotate(2.5deg)}54%{transform:translateY(-1.5px) rotate(1.5deg)}56%{transform:translateY(2.5px) rotate(2.5deg)}58%{transform:translateY(.5px) rotate(2.5deg)}60%{transform:translateY(2.5px) rotate(2.5deg)}62%{transform:translateY(-.5px) rotate(2.5deg)}64%{transform:translateY(-.5px) rotate(1.5deg)}66%{transform:translateY(1.5px) rotate(-.5deg)}68%{transform:translateY(-1.5px) rotate(-.5deg)}70%{transform:translateY(1.5px) rotate(.5deg)}72%{transform:translateY(2.5px) rotate(1.5deg)}74%{transform:translateY(-.5px) rotate(.5deg)}76%{transform:translateY(-.5px) rotate(2.5deg)}78%{transform:translateY(-.5px) rotate(1.5deg)}80%{transform:translateY(1.5px) rotate(1.5deg)}82%{transform:translateY(-.5px) rotate(.5deg)}84%{transform:translateY(1.5px) rotate(2.5deg)}86%{transform:translateY(-1.5px) rotate(-1.5deg)}88%{transform:translateY(-.5px) rotate(2.5deg)}90%{transform:translateY(2.5px) rotate(-.5deg)}92%{transform:translateY(.5px) rotate(-.5deg)}94%{transform:translateY(2.5px) rotate(.5deg)}96%{transform:translateY(-.5px) rotate(1.5deg)}98%{transform:translateY(-1.5px) rotate(-.5deg)}0%,to{transform:translate(0) rotate(0deg)}}@keyframes my-face{2%{transform:translateY(1.5px) rotate(1.5deg)}4%{transform:translateY(-1.5px) rotate(-.5deg)}6%{transform:translateY(1.5px) rotate(-1.5deg)}8%{transform:translateY(-1.5px) rotate(-1.5deg)}10%{transform:translateY(2.5px) rotate(1.5deg)}12%{transform:translateY(-.5px) rotate(1.5deg)}14%{transform:translateY(-1.5px) rotate(1.5deg)}16%{transform:translateY(-.5px) rotate(-1.5deg)}18%{transform:translateY(.5px) rotate(-1.5deg)}20%{transform:translateY(-1.5px) rotate(2.5deg)}22%{transform:translateY(.5px) rotate(-1.5deg)}24%{transform:translateY(1.5px) rotate(1.5deg)}26%{transform:translateY(.5px) rotate(.5deg)}28%{transform:translateY(.5px) rotate(1.5deg)}30%{transform:translateY(-.5px) rotate(2.5deg)}32%{transform:translateY(1.5px) rotate(-.5deg)}34%{transform:translateY(1.5px) rotate(-.5deg)}36%{transform:translateY(-1.5px) rotate(2.5deg)}38%{transform:translateY(1.5px) rotate(-1.5deg)}40%{transform:translateY(-.5px) rotate(2.5deg)}42%{transform:translateY(2.5px) rotate(-1.5deg)}44%{transform:translateY(1.5px) rotate(.5deg)}46%{transform:translateY(-1.5px) rotate(2.5deg)}48%{transform:translateY(-.5px) rotate(.5deg)}50%{transform:translateY(.5px) rotate(.5deg)}52%{transform:translateY(2.5px) rotate(2.5deg)}54%{transform:translateY(-1.5px) rotate(1.5deg)}56%{transform:translateY(2.5px) rotate(2.5deg)}58%{transform:translateY(.5px) rotate(2.5deg)}60%{transform:translateY(2.5px) rotate(2.5deg)}62%{transform:translateY(-.5px) rotate(2.5deg)}64%{transform:translateY(-.5px) rotate(1.5deg)}66%{transform:translateY(1.5px) rotate(-.5deg)}68%{transform:translateY(-1.5px) rotate(-.5deg)}70%{transform:translateY(1.5px) rotate(.5deg)}72%{transform:translateY(2.5px) rotate(1.5deg)}74%{transform:translateY(-.5px) rotate(.5deg)}76%{transform:translateY(-.5px) rotate(2.5deg)}78%{transform:translateY(-.5px) rotate(1.5deg)}80%{transform:translateY(1.5px) rotate(1.5deg)}82%{transform:translateY(-.5px) rotate(.5deg)}84%{transform:translateY(1.5px) rotate(2.5deg)}86%{transform:translateY(-1.5px) rotate(-1.5deg)}88%{transform:translateY(-.5px) rotate(2.5deg)}90%{transform:translateY(2.5px) rotate(-.5deg)}92%{transform:translateY(.5px) rotate(-.5deg)}94%{transform:translateY(2.5px) rotate(.5deg)}96%{transform:translateY(-.5px) rotate(1.5deg)}98%{transform:translateY(-1.5px) rotate(-.5deg)}0%,to{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 *{box-sizing:content-box}.dplayer svg{width:100%;height:100%}.dplayer svg circle,.dplayer svg path{fill:#fff}.dplayer:-webkit-full-screen{width:100%;height:100%;background:#000;position:fixed;z-index:100000;left:0;top:0;margin:0;padding:0;transform:translate(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:inherit;animation-play-state:inherit}.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:inherit;animation-play-state:inherit}.dplayer.dplayer-live .dplayer-bar-wrap,.dplayer.dplayer-live.dplayer-no-danmaku .dplayer-setting,.dplayer.dplayer-live .dplayer-setting-loop,.dplayer.dplayer-live .dplayer-setting-speed,.dplayer.dplayer-live .dplayer-time,.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-danunlimit,.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-arrow .dplayer-danmaku{font-size:18px}.dplayer.dplayer-arrow .dplayer-icon{margin:0 -3px}.dplayer.dplayer-playing .dplayer-danmaku .dplayer-danmaku-move{-webkit-animation-play-state:running;animation-play-state:running}@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.dplayer-loading .dplayer-danmaku-move,.dplayer.dplayer-paused .dplayer-danmaku,.dplayer.dplayer-paused .dplayer-danmaku-move{-webkit-animation-play-state:paused;animation-play-state:paused}.dplayer.dplayer-hide-controller{cursor:none}.dplayer.dplayer-hide-controller .dplayer-controller,.dplayer.dplayer-hide-controller .dplayer-controller-mask{opacity:0;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-controller .dplayer-icons .dplayer-camera-icon,.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-volume{display:none}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:static;display:inline-block}.dplayer.dplayer-mobile .dplayer-bar-time{display:none}.dplayer-web-fullscreen-fix{position:fixed;top:0;left:0;margin:0;padding:0}[data-balloon]:before{display:none}[data-balloon]:after{padding:.3em .7em;background:rgba(17,17,17,.7)}[data-balloon][data-balloon-pos=up]:after{margin-bottom:0}.dplayer-bezel{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.dplayer-bezel .dplayer-bezel-icon{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;box-sizing:border-box;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none}.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;transform:scale(1)}to{opacity:0;transform:scale(2)}}@keyframes bezel-hide{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.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 ease-in-out infinite;animation:my-face 5s ease-in-out infinite}.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-bezel .diplayer-loading-icon .diplayer-loading-hide{display:none}.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;transform-origin:4px 4px}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-7{-webkit-animation-delay:.7s;animation-delay:.7s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-6{-webkit-animation-delay:.6s;animation-delay:.6s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-5{-webkit-animation-delay:.5s;animation-delay:.5s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-4{-webkit-animation-delay:.4s;animation-delay:.4s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-3{-webkit-animation-delay:.3s;animation-delay:.3s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-2{-webkit-animation-delay:.2s;animation-delay:.2s}.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;transform:scale(1.2)}50%{opacity:.25;transform:scale(.9)}to{opacity:.25;transform:scale(.85)}}@keyframes diplayer-loading-dot-fade{0%{opacity:.7;transform:scale(1.2)}50%{opacity:.25;transform:scale(.9)}to{opacity:.25;transform:scale(.85)}}.dplayer-controller-mask{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%}.dplayer-controller,.dplayer-controller-mask{position:absolute;bottom:0;transition:all .3s ease}.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-controller.dplayer-controller-comment .dplayer-icons{display:none}.dplayer-controller.dplayer-controller-comment .dplayer-icons.dplayer-comment-box{display:block}.dplayer-controller .dplayer-bar-wrap{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-bar .dplayer-played .dplayer-thumb{transform:scale(1)}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-highlight{display:block;width:8px;transform:translateX(-4px);top:4px;height:40%}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight{z-index:12;position:absolute;top:5px;width:6px;height:20%;border-radius:6px;background-color:#fff;text-align:center;transform:translateX(-3px);transition:all .2s ease-in-out}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover .dplayer-highlight-text{display:block}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-preview,.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-time{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight .dplayer-highlight-text{display:none;position:absolute;left:50%;top:-24px;padding:5px 8px;background-color:rgba(0,0,0,.62);color:#fff;border-radius:4px;font-size:12px;white-space:nowrap;transform:translateX(-50%)}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview{position:absolute;background:#fff;pointer-events:none;display:none;background-size:16000px 100%}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview-canvas{position:absolute;width:100%;height:100%;z-index:1;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-bar{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded{background:hsla(0,0%,100%,.4);transition:all .5s ease}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded,.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width}.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;transition:all .3s ease-in-out;transform:scale(0)}.dplayer-controller .dplayer-icons{height:38px;position:absolute;bottom:0}.dplayer-controller .dplayer-icons.dplayer-comment-box{display:none;position:absolute;transition:all .3s ease-in-out;z-index:2;height:38px;bottom:0;left:20px;right:20px;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-icon{position:absolute;left:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-send-icon{position:absolute;right:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box{position:absolute;background:rgba(28,28,28,.9);bottom:41px;left:0;box-shadow:0 0 25px rgba(0,0,0,.3);border-radius:4px;padding:10px 10px 16px;font-size:14px;width:204px;transition:all .3s ease-in-out;transform:scale(0)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box.dplayer-comment-setting-open{transform:scale(1)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box input[type=radio]{display:none}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box label{cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-title{font-size:13px;color:#fff;line-height:30px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type .dplayer-comment-setting-title{margin-bottom:6px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(2) span{border-radius:4px 0 0 4px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(4) span{border-radius:0 4px 4px 0}.dplayer-controller .dplayer-icons.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:#fff;border:1px solid #fff;margin-right:-1px;box-sizing:border-box;text-align:center;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type input:checked+span{background:#e4e4e6;color:#1c1c1c}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color label{font-size:0;padding:6px;display:inline-block}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span{width:22px;height:22px;display:inline-block;border-radius:50%;box-sizing:border-box;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span:hover{-webkit-animation:my-face 5s ease-in-out infinite;animation:my-face 5s ease-in-out infinite}.dplayer-controller .dplayer-icons.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;background:none;margin:0;height:100%;box-sizing:border-box;width:100%;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-webkit-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-moz-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input:-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-clear{display:none}.dplayer-controller .dplayer-icons.dplayer-icons-left .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-icons-right{right:20px}.dplayer-controller .dplayer-icons.dplayer-icons-right .dplayer-icon{padding:8px}.dplayer-controller .dplayer-icons .dplayer-live-badge,.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-controller .dplayer-icons .dplayer-live-dot{display:inline-block;width:6px;height:6px;vertical-align:4%;margin-right:5px;content:"";border-radius:6px}.dplayer-controller .dplayer-icons .dplayer-icon{width:40px;height:100%;border:none;background-color:transparent;outline:none;cursor:pointer;vertical-align:middle;box-sizing:border-box;display:inline-block}.dplayer-controller .dplayer-icons .dplayer-icon .dplayer-icon-content{transition:all .2s ease-in-out;opacity:.8}.dplayer-controller .dplayer-icons .dplayer-icon:hover .dplayer-icon-content{opacity:1}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-quality-icon{color:#fff;width:auto;line-height:22px;font-size:14px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-comment-icon{padding:10px 9px 9px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-setting-icon{padding-top:8.5px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-volume-icon{width:43px}.dplayer-controller .dplayer-icons .dplayer-volume{position:relative;display:inline-block;cursor:pointer;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap{display:inline-block;margin:0 10px 0 -5px;vertical-align:middle;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.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%;transition:all .1s ease;will-change:width}.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;transition:all .3s ease-in-out;transform:scale(0)}.dplayer-controller .dplayer-icons .dplayer-setting,.dplayer-controller .dplayer-icons .dplayer-subtitle-btn{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box{position:absolute;right:0;bottom:50px;transform:scale(0);width:150px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 0;transition:all .3s ease-in-out;overflow:hidden;z-index:2}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div.dplayer-setting-origin-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-open{transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-narrow{width:70px;height:180px;text-align:center}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-origin-panel{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-speed-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item{height:30px;padding:5px 10px;box-sizing:border-box;cursor:pointer;position:relative}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item:hover,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku{padding:5px 0}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-label{padding:0 10px;display:inline}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap{padding:0 10px;box-sizing:border-box;display:none;vertical-align:middle;height:100%;width:100%}.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;transition:all .3s ease-in-out}.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%;transition:all .1s ease;background:#aaa;will-change:width}.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;transition:all .3s ease-in-out;background:#aaa}.dplayer-controller .dplayer-icons .dplayer-full{display:inline-block;height:100%;position:relative}.dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon{display:block}.dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:absolute;top:-30px;z-index:1;display:none}.dplayer-controller .dplayer-icons .dplayer-quality{position:relative;display:inline-block;height:100%;z-index:2}.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list,.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask{display:block}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask{display:none;position:absolute;bottom:38px;left:-18px;width:80px;padding-bottom:12px}.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;transition:all .3s ease-in-out;overflow:hidden;color:#fff;text-align:center}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item{height:25px;box-sizing:border-box;cursor:pointer;line-height:25px}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-comment{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-label{color:#eee;font-size:13px;display:inline-block;vertical-align:middle;white-space:nowrap}.dplayer-controller .dplayer-icons .dplayer-toggle{width:32px;height:20px;text-align:center;font-size:0;vertical-align:middle;position:absolute;top:5px;right:10px}.dplayer-controller .dplayer-icons .dplayer-toggle input{max-height:0;max-width:0;display:none}.dplayer-controller .dplayer-icons .dplayer-toggle input+label{display:inline-block;position:relative;box-shadow:inset 0 0 0 0 #dfdfdf;border:1px solid #dfdfdf;height:20px;width:32px;border-radius:10px;box-sizing:border-box;cursor:pointer;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after,.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;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label{border-color:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:before{width:30px;background:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:after{left:12px}.dplayer-danmaku{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff}.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-danmaku .dplayer-danmaku-item--demo{position:absolute;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-right{position:absolute;right:0;transform:translateX(100%)}.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%{transform:translateX(100%)}}@keyframes danmaku{0%{transform:translateX(100%)}}.dplayer-danmaku .dplayer-danmaku-bottom,.dplayer-danmaku .dplayer-danmaku-top{position:absolute;width:100%;text-align:center;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.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-logo{pointer-events:none;position:absolute;left:20px;top:20px;max-width:50px;max-height:50px}.dplayer-logo img{max-width:100%;max-height:100%;background:none}.dplayer-menu{position:fixed;width:170px;border-radius:2px;background:rgba(28,28,28,.85);padding:5px 0;overflow:hidden;z-index:3;display:none}.dplayer-menu.dplayer-menu-show{display:block}.dplayer-menu .dplayer-menu-item{height:30px;box-sizing:border-box;cursor:pointer}.dplayer-menu .dplayer-menu-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-menu .dplayer-menu-item a{padding:0 10px;line-height:30px;color:#eee;font-size:13px;display:inline-block;vertical-align:middle;width:100%;box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-menu .dplayer-menu-item a:hover{text-decoration:none}.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;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none}.dplayer-subtitle{position:absolute;bottom:40px;width:90%;left:5%;text-align:center;color:#fff;text-shadow:.5px .5px .5px rgba(0,0,0,.5);font-size:20px}.dplayer-subtitle.dplayer-subtitle-hide{display:none}.dplayer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.dplayer-mask.dplayer-mask-show{display:block}.dplayer-video-wrap{position:relative;background:#000;font-size:0;width:100%;height:100%}.dplayer-video-wrap .dplayer-video{width:100%;height:100%;display:none}.dplayer-video-wrap .dplayer-video-current{display:block}.dplayer-video-wrap .dplayer-video-prepare{display:none}.dplayer-info-panel{position:absolute;top:10px;left:10px;width:400px;background:rgba(28,28,28,.8);padding:10px;color:#fff;font-size:12px;border-radius:2px}.dplayer-info-panel-hide{display:none}.dplayer-info-panel .dplayer-info-panel-close{cursor:pointer;position:absolute;right:10px;top:10px}.dplayer-info-panel .dplayer-info-panel-item>span{display:inline-block;vertical-align:middle;line-height:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-info-panel .dplayer-info-panel-item-title{width:100px;text-align:right;margin-right:10px}.dplayer-info-panel .dplayer-info-panel-item-data{width:260px}', ""]) |
| | | (t = e.exports = a(3)(!1)).i(a(36), ""), t.push() |
| | | }, function (e, t, a) { |
| | | (e.exports = a(3)(!1)).push([e.i, ':root{--balloon-color:rgba(16,16,16,0.95);--balloon-font-size:12px;--balloon-move:4px}button[aria-label][data-balloon-pos]{overflow:visible}[aria-label][data-balloon-pos]{position:relative;cursor:pointer}[aria-label][data-balloon-pos]:after{text-indent:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-weight:400;font-style:normal;text-shadow:none;font-size:var(--balloon-font-size);background:var(--balloon-color);border-radius:2px;color:#fff;content:attr(aria-label);padding:.5em 1em;white-space:nowrap}[aria-label][data-balloon-pos]:after,[aria-label][data-balloon-pos]:before{opacity:0;pointer-events:none;transition:all .18s ease-out .18s;position:absolute;z-index:10}[aria-label][data-balloon-pos]:before{width:0;height:0;border:5px solid transparent;border-top:5px solid var(--balloon-color);content:""}[aria-label][data-balloon-pos]:hover:after,[aria-label][data-balloon-pos]:hover:before,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,[aria-label][data-balloon-pos][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-visible]:before{opacity:1;pointer-events:none}[aria-label][data-balloon-pos].font-awesome:after{font-family:FontAwesome,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[aria-label][data-balloon-pos][data-balloon-break]:after{white-space:pre}[aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after{white-space:pre-line;word-break:break-word}[aria-label][data-balloon-pos][data-balloon-blunt]:after,[aria-label][data-balloon-pos][data-balloon-blunt]:before{transition:none}[aria-label][data-balloon-pos][data-balloon-pos=up]:after{margin-bottom:10px}[aria-label][data-balloon-pos][data-balloon-pos=up]:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:before{bottom:100%;left:50%;transform:translate(-50%,var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=up][data-balloon-visible]:before{transform:translate(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=up-left]:after{bottom:100%;left:0;margin-bottom:10px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-left]:before{bottom:100%;left:5px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up-left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up-left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=up-left][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=up-right]:after{bottom:100%;right:0;margin-bottom:10px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-right]:before{bottom:100%;right:5px;transform:translateY(var(--balloon-move));transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up-right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up-right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up-right][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=up-right][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=down]:after{left:50%;margin-top:10px;top:100%;transform:translate(-50%,calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down]:before{width:0;height:0;border:5px solid transparent;border-bottom:5px solid var(--balloon-color);left:50%;top:100%;transform:translate(-50%,calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down][data-balloon-visible]:before{transform:translate(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=down-left]:after{left:0;margin-top:10px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-left]:before{width:0;height:0;border:5px solid transparent;border-bottom:5px solid var(--balloon-color);left:5px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down-left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down-left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down-left][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=down-right]:after{right:0;margin-top:10px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-right]:before{width:0;height:0;border:5px solid transparent;border-bottom:5px solid var(--balloon-color);right:5px;top:100%;transform:translateY(calc(var(--balloon-move)*-1))}[aria-label][data-balloon-pos][data-balloon-pos=down-right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down-right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down-right][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down-right][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos=left]:after{margin-right:10px;right:100%;top:50%;transform:translate(var(--balloon-move),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:before{width:0;height:0;border:5px solid transparent;border-left:5px solid var(--balloon-color);right:100%;top:50%;transform:translate(var(--balloon-move),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=left][data-balloon-visible]:before{transform:translateY(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:after{left:100%;margin-left:10px;top:50%;transform:translate(calc(var(--balloon-move)*-1),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:before{width:0;height:0;border:5px solid transparent;border-right:5px solid var(--balloon-color);left:100%;top:50%;transform:translate(calc(var(--balloon-move)*-1),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=right][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=right][data-balloon-visible]:before{transform:translateY(-50%)}[aria-label][data-balloon-pos][data-balloon-length=small]:after{white-space:normal;width:80px}[aria-label][data-balloon-pos][data-balloon-length=medium]:after{white-space:normal;width:150px}[aria-label][data-balloon-pos][data-balloon-length=large]:after{white-space:normal;width:260px}[aria-label][data-balloon-pos][data-balloon-length=xlarge]:after{white-space:normal;width:380px}@media screen and (max-width:768px){[aria-label][data-balloon-pos][data-balloon-length=xlarge]:after{white-space:normal;width:90vw}}[aria-label][data-balloon-pos][data-balloon-length=fit]:after{white-space:normal;width:100%}', ""]) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n, o = {}, |
| | | r = function () { |
| | | return void 0 === n && (n = Boolean(window && document && document.all && !window.atob)), n |
| | | }, |
| | | i = function () { |
| | | var e = {}; |
| | | return function (t) { |
| | | if (void 0 === e[t]) { |
| | | var a = document.querySelector(t); |
| | | if (window.HTMLIFrameElement && a instanceof window.HTMLIFrameElement) try { |
| | | a = a.contentDocument.head |
| | | } catch (e) { |
| | | a = null |
| | | } |
| | | e[t] = a |
| | | } |
| | | return e[t] |
| | | } |
| | | }(); |
| | | |
| | | function l(e, t) { |
| | | for (var a = [], n = {}, o = 0; o < e.length; o++) { |
| | | var r = e[o], |
| | | i = t.base ? r[0] + t.base : r[0], |
| | | l = {css: r[1], media: r[2], sourceMap: r[3]}; |
| | | n[i] ? n[i].parts.push(l) : a.push(n[i] = {id: i, parts: [l]}) |
| | | } |
| | | return a |
| | | } |
| | | |
| | | function s(e, t) { |
| | | for (var a = 0; a < e.length; a++) { |
| | | var n = e[a], |
| | | r = o[n.id], |
| | | i = 0; |
| | | if (r) { |
| | | for (r.refs++; i < r.parts.length; i++) r.parts[i](n.parts[i]); |
| | | for (; i < n.parts.length; i++) r.parts.push(f(n.parts[i], t)) |
| | | } else { |
| | | for (var l = []; i < n.parts.length; i++) l.push(f(n.parts[i], t)); |
| | | o[n.id] = {id: n.id, refs: 1, parts: l} |
| | | } |
| | | } |
| | | } |
| | | |
| | | function d(e) { |
| | | var t = document.createElement("style"); |
| | | if (void 0 === e.attributes.nonce) { |
| | | var n = a.nc; |
| | | n && (e.attributes.nonce = n) |
| | | } |
| | | if (Object.keys(e.attributes).forEach((function (a) { |
| | | t.setAttribute(a, e.attributes[a]) |
| | | })), "function" == typeof e.insert) e.insert(t); |
| | | else { |
| | | var o = i(e.insert || "head"); |
| | | if (!o) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); |
| | | o.appendChild(t) |
| | | } |
| | | return t |
| | | } |
| | | |
| | | var p, c = (p = [], function (e, t) { |
| | | return p[e] = t, p.filter(Boolean).join("\n") |
| | | }); |
| | | |
| | | function u(e, t, a, n) { |
| | | var o = a ? "" : n.css; |
| | | if (e.styleSheet) e.styleSheet.cssText = c(t, o); |
| | | else { |
| | | var r = document.createTextNode(o), |
| | | i = e.childNodes; |
| | | i[t] && e.removeChild(i[t]), i.length ? e.insertBefore(r, i[t]) : e.appendChild(r) |
| | | } |
| | | } |
| | | |
| | | function y(e, t, a) { |
| | | var n = a.css, |
| | | o = a.media, |
| | | r = a.sourceMap; |
| | | if (o && e.setAttribute("media", o), r && btoa && (n += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r)))), " */")), e.styleSheet) e.styleSheet.cssText = n; |
| | | else { |
| | | for (; e.firstChild;) e.removeChild(e.firstChild); |
| | | e.appendChild(document.createTextNode(n)) |
| | | } |
| | | } |
| | | |
| | | var h = null, |
| | | m = 0; |
| | | |
| | | function f(e, t) { |
| | | var a, n, o; |
| | | if (t.singleton) { |
| | | var r = m++; |
| | | a = h || (h = d(t)), n = u.bind(null, a, r, !1), o = u.bind(null, a, r, !0) |
| | | } else a = d(t), n = y.bind(null, a, t), o = function () { |
| | | !function (e) { |
| | | if (null === e.parentNode) return !1; |
| | | e.parentNode.removeChild(e) |
| | | }(a) |
| | | }; |
| | | return n(e), |
| | | function (t) { |
| | | if (t) { |
| | | if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return; |
| | | n(e = t) |
| | | } else o() |
| | | } |
| | | } |
| | | |
| | | e.exports = function (e, t) { |
| | | (t = t || {}).attributes = "object" == typeof t.attributes ? t.attributes : {}, t.singleton || "boolean" == typeof t.singleton || (t.singleton = r()); |
| | | var a = l(e, t); |
| | | return s(a, t), |
| | | function (e) { |
| | | for (var n = [], r = 0; r < a.length; r++) { |
| | | var i = a[r], |
| | | d = o[i.id]; |
| | | d && (d.refs--, n.push(d)) |
| | | } |
| | | e && s(l(e, t), t); |
| | | for (var p = 0; p < n.length; p++) { |
| | | var c = n[p]; |
| | | if (0 === c.refs) { |
| | | for (var u = 0; u < c.parts.length; u++) c.parts[u](); |
| | | delete o[c.id] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | var n = Function.prototype.apply; |
| | | |
| | | function o(e, t) { |
| | | this._id = e, this._clearFn = t |
| | | } |
| | | |
| | | t.setTimeout = function () { |
| | | return new o(n.call(setTimeout, window, arguments), clearTimeout) |
| | | }, t.setInterval = function () { |
| | | return new o(n.call(setInterval, window, arguments), clearInterval) |
| | | }, t.clearTimeout = t.clearInterval = function (e) { |
| | | e && e.close() |
| | | }, o.prototype.unref = o.prototype.ref = function () { |
| | | }, o.prototype.close = function () { |
| | | this._clearFn.call(window, this._id) |
| | | }, t.enroll = function (e, t) { |
| | | clearTimeout(e._idleTimeoutId), e._idleTimeout = t |
| | | }, t.unenroll = function (e) { |
| | | clearTimeout(e._idleTimeoutId), e._idleTimeout = -1 |
| | | }, t._unrefActive = t.active = function (e) { |
| | | clearTimeout(e._idleTimeoutId); |
| | | var t = e._idleTimeout; |
| | | t >= 0 && (e._idleTimeoutId = setTimeout((function () { |
| | | e._onTimeout && e._onTimeout() |
| | | }), t)) |
| | | }, a(39), t.setImmediate = setImmediate, t.clearImmediate = clearImmediate |
| | | }, function (e, t, a) { |
| | | (function (e, t) { |
| | | !function (e, a) { |
| | | "use strict"; |
| | | if (!e.setImmediate) { |
| | | var n, o, r, i, l, s = 1, |
| | | d = {}, |
| | | p = !1, |
| | | c = e.document, |
| | | u = Object.getPrototypeOf && Object.getPrototypeOf(e); |
| | | u = u && u.setTimeout ? u : e, "[object process]" === {}.toString.call(e.process) ? n = function (e) { |
| | | t.nextTick((function () { |
| | | h(e) |
| | | })) |
| | | } : !function () { |
| | | if (e.postMessage && !e.importScripts) { |
| | | var t = !0, |
| | | a = e.onmessage; |
| | | return e.onmessage = function () { |
| | | t = !1 |
| | | }, e.postMessage("", "*"), e.onmessage = a, t |
| | | } |
| | | }() ? e.MessageChannel ? ((r = new MessageChannel).port1.onmessage = function (e) { |
| | | h(e.data) |
| | | }, n = function (e) { |
| | | r.port2.postMessage(e) |
| | | }) : c && "onreadystatechange" in c.createElement("script") ? (o = c.documentElement, n = function (e) { |
| | | var t = c.createElement("script"); |
| | | t.onreadystatechange = function () { |
| | | h(e), t.onreadystatechange = null, o.removeChild(t), t = null |
| | | }, o.appendChild(t) |
| | | }) : n = function (e) { |
| | | setTimeout(h, 0, e) |
| | | } : (i = "setImmediate$" + Math.random() + "$", l = function (t) { |
| | | t.source === e && "string" == typeof t.data && 0 === t.data.indexOf(i) && h(+t.data.slice(i.length)) |
| | | }, e.addEventListener ? e.addEventListener("message", l, !1) : e.attachEvent("onmessage", l), n = function (t) { |
| | | e.postMessage(i + t, "*") |
| | | }), u.setImmediate = function (e) { |
| | | "function" != typeof e && (e = new Function("" + e)); |
| | | for (var t = new Array(arguments.length - 1), a = 0; a < t.length; a++) t[a] = arguments[a + 1]; |
| | | var o = {callback: e, args: t}; |
| | | return d[s] = o, n(s), s++ |
| | | }, u.clearImmediate = y |
| | | } |
| | | |
| | | function y(e) { |
| | | delete d[e] |
| | | } |
| | | |
| | | function h(e) { |
| | | if (p) setTimeout(h, 0, e); |
| | | else { |
| | | var t = d[e]; |
| | | if (t) { |
| | | p = !0; |
| | | try { |
| | | !function (e) { |
| | | var t = e.callback, |
| | | n = e.args; |
| | | switch (n.length) { |
| | | case 0: |
| | | t(); |
| | | break; |
| | | case 1: |
| | | t(n[0]); |
| | | break; |
| | | case 2: |
| | | t(n[0], n[1]); |
| | | break; |
| | | case 3: |
| | | t(n[0], n[1], n[2]); |
| | | break; |
| | | default: |
| | | t.apply(a, n) |
| | | } |
| | | }(t) |
| | | } finally { |
| | | y(e), p = !1 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }("undefined" == typeof self ? void 0 === e ? this : e : self) |
| | | }).call(this, a(4), a(5)) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(6), |
| | | r = a(42), |
| | | i = a(12); |
| | | |
| | | function l(e) { |
| | | var t = new r(e), |
| | | a = o(r.prototype.request, t); |
| | | return n.extend(a, r.prototype, t), n.extend(a, t), a |
| | | } |
| | | |
| | | var s = l(a(9)); |
| | | s.Axios = r, s.create = function (e) { |
| | | return l(i(s.defaults, e)) |
| | | }, s.Cancel = a(13), s.CancelToken = a(54), s.isCancel = a(8), s.all = function (e) { |
| | | return Promise.all(e) |
| | | }, s.spread = a(55), e.exports = s, e.exports.default = s |
| | | }, function (e, t) { |
| | | e.exports = function (e) { |
| | | return null != e && null != e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(7), |
| | | r = a(43), |
| | | i = a(44), |
| | | l = a(12); |
| | | |
| | | function s(e) { |
| | | this.defaults = e, this.interceptors = {request: new r, response: new r} |
| | | } |
| | | |
| | | s.prototype.request = function (e) { |
| | | "string" == typeof e ? (e = arguments[1] || {}).url = arguments[0] : e = e || {}, (e = l(this.defaults, e)).method = e.method ? e.method.toLowerCase() : "get"; |
| | | var t = [i, void 0], |
| | | a = Promise.resolve(e); |
| | | for (this.interceptors.request.forEach((function (e) { |
| | | t.unshift(e.fulfilled, e.rejected) |
| | | })), this.interceptors.response.forEach((function (e) { |
| | | t.push(e.fulfilled, e.rejected) |
| | | })); t.length;) a = a.then(t.shift(), t.shift()); |
| | | return a |
| | | }, s.prototype.getUri = function (e) { |
| | | return e = l(this.defaults, e), o(e.url, e.params, e.paramsSerializer).replace(/^\?/, "") |
| | | }, n.forEach(["delete", "get", "head", "options"], (function (e) { |
| | | s.prototype[e] = function (t, a) { |
| | | return this.request(n.merge(a || {}, {method: e, url: t})) |
| | | } |
| | | })), n.forEach(["post", "put", "patch"], (function (e) { |
| | | s.prototype[e] = function (t, a, o) { |
| | | return this.request(n.merge(o || {}, {method: e, url: t, data: a})) |
| | | } |
| | | })), e.exports = s |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | |
| | | function o() { |
| | | this.handlers = [] |
| | | } |
| | | |
| | | o.prototype.use = function (e, t) { |
| | | return this.handlers.push({fulfilled: e, rejected: t}), this.handlers.length - 1 |
| | | }, o.prototype.eject = function (e) { |
| | | this.handlers[e] && (this.handlers[e] = null) |
| | | }, o.prototype.forEach = function (e) { |
| | | n.forEach(this.handlers, (function (t) { |
| | | null !== t && e(t) |
| | | })) |
| | | }, e.exports = o |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = a(45), |
| | | r = a(8), |
| | | i = a(9), |
| | | l = a(52), |
| | | s = a(53); |
| | | |
| | | function d(e) { |
| | | e.cancelToken && e.cancelToken.throwIfRequested() |
| | | } |
| | | |
| | | e.exports = function (e) { |
| | | return d(e), e.baseURL && !l(e.url) && (e.url = s(e.baseURL, e.url)), e.headers = e.headers || {}, e.data = o(e.data, e.headers, e.transformRequest), e.headers = n.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers || {}), n.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (function (t) { |
| | | delete e.headers[t] |
| | | })), (e.adapter || i.adapter)(e).then((function (t) { |
| | | return d(e), t.data = o(t.data, t.headers, e.transformResponse), t |
| | | }), (function (t) { |
| | | return r(t) || (d(e), t && t.response && (t.response.data = o(t.response.data, t.response.headers, e.transformResponse))), Promise.reject(t) |
| | | })) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = function (e, t, a) { |
| | | return n.forEach(a, (function (a) { |
| | | e = a(e, t) |
| | | })), e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = function (e, t) { |
| | | n.forEach(e, (function (a, n) { |
| | | n !== t && n.toUpperCase() === t.toUpperCase() && (e[t] = a, delete e[n]) |
| | | })) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(11); |
| | | e.exports = function (e, t, a) { |
| | | var o = a.config.validateStatus; |
| | | !o || o(a.status) ? e(a) : t(n("Request failed with status code " + a.status, a.config, null, a.request, a)) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e, t, a, n, o) { |
| | | return e.config = t, a && (e.code = a), e.request = n, e.response = o, e.isAxiosError = !0, e.toJSON = function () { |
| | | return { |
| | | message: this.message, |
| | | name: this.name, |
| | | description: this.description, |
| | | number: this.number, |
| | | fileName: this.fileName, |
| | | lineNumber: this.lineNumber, |
| | | columnNumber: this.columnNumber, |
| | | stack: this.stack, |
| | | config: this.config, |
| | | code: this.code |
| | | } |
| | | }, e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0), |
| | | o = ["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]; |
| | | e.exports = function (e) { |
| | | var t, a, r, i = {}; |
| | | return e ? (n.forEach(e.split("\n"), (function (e) { |
| | | if (r = e.indexOf(":"), t = n.trim(e.substr(0, r)).toLowerCase(), a = n.trim(e.substr(r + 1)), t) { |
| | | if (i[t] && o.indexOf(t) >= 0) return; |
| | | i[t] = "set-cookie" === t ? (i[t] ? i[t] : []).concat([a]) : i[t] ? i[t] + ", " + a : a |
| | | } |
| | | })), i) : i |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = n.isStandardBrowserEnv() ? function () { |
| | | var e, t = /(msie|trident)/i.test(navigator.userAgent), |
| | | a = document.createElement("a"); |
| | | |
| | | function o(e) { |
| | | var n = e; |
| | | return t && (a.setAttribute("href", n), n = a.href), a.setAttribute("href", n), { |
| | | href: a.href, |
| | | protocol: a.protocol ? a.protocol.replace(/:$/, "") : "", |
| | | host: a.host, |
| | | search: a.search ? a.search.replace(/^\?/, "") : "", |
| | | hash: a.hash ? a.hash.replace(/^#/, "") : "", |
| | | hostname: a.hostname, |
| | | port: a.port, |
| | | pathname: "/" === a.pathname.charAt(0) ? a.pathname : "/" + a.pathname |
| | | } |
| | | } |
| | | |
| | | return e = o(window.location.href), |
| | | function (t) { |
| | | var a = n.isString(t) ? o(t) : t; |
| | | return a.protocol === e.protocol && a.host === e.host |
| | | } |
| | | }() : function () { |
| | | return !0 |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(0); |
| | | e.exports = n.isStandardBrowserEnv() ? { |
| | | write: function (e, t, a, o, r, i) { |
| | | var l = []; |
| | | l.push(e + "=" + encodeURIComponent(t)), n.isNumber(a) && l.push("expires=" + new Date(a).toGMTString()), n.isString(o) && l.push("path=" + o), n.isString(r) && l.push("domain=" + r), !0 === i && l.push("secure"), document.cookie = l.join("; ") |
| | | }, read: function (e) { |
| | | var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); |
| | | return t ? decodeURIComponent(t[3]) : null |
| | | }, remove: function (e) { |
| | | this.write(e, "", Date.now() - 864e5) |
| | | } |
| | | } : { |
| | | write: function () { |
| | | }, read: function () { |
| | | return null |
| | | }, remove: function () { |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e) |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e, t) { |
| | | return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | var n = a(13); |
| | | |
| | | function o(e) { |
| | | if ("function" != typeof e) throw new TypeError("executor must be a function."); |
| | | var t; |
| | | this.promise = new Promise((function (e) { |
| | | t = e |
| | | })); |
| | | var a = this; |
| | | e((function (e) { |
| | | a.reason || (a.reason = new n(e), t(a.reason)) |
| | | })) |
| | | } |
| | | |
| | | o.prototype.throwIfRequested = function () { |
| | | if (this.reason) throw this.reason |
| | | }, o.source = function () { |
| | | var e; |
| | | return { |
| | | token: new o((function (t) { |
| | | e = t |
| | | })), cancel: e |
| | | } |
| | | }, e.exports = o |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | e.exports = function (e) { |
| | | return function (t) { |
| | | return e.apply(null, t) |
| | | } |
| | | } |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | (function (t) { |
| | | var a = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== t ? t : {}, |
| | | n = Object.create(a), |
| | | o = /["&'<>]/; |
| | | n.$escape = function (e) { |
| | | return function (e) { |
| | | var t = "" + e, |
| | | a = o.exec(t); |
| | | if (!a) return e; |
| | | var n = "", |
| | | r = void 0, |
| | | i = void 0, |
| | | l = void 0; |
| | | for (r = a.index, i = 0; r < t.length; r++) { |
| | | switch (t.charCodeAt(r)) { |
| | | case 34: |
| | | l = """; |
| | | break; |
| | | case 38: |
| | | l = "&"; |
| | | break; |
| | | case 39: |
| | | l = "'"; |
| | | break; |
| | | case 60: |
| | | l = "<"; |
| | | break; |
| | | case 62: |
| | | l = ">"; |
| | | break; |
| | | default: |
| | | continue |
| | | } |
| | | i !== r && (n += t.substring(i, r)), i = r + 1, n += l |
| | | } |
| | | return i !== r ? n + t.substring(i, r) : n |
| | | }(function e(t) { |
| | | "string" != typeof t && (t = null == t ? "" : "function" == typeof t ? e(t.call(t)) : JSON.stringify(t)); |
| | | return t |
| | | }(e)) |
| | | }, n.$each = function (e, t) { |
| | | if (Array.isArray(e)) |
| | | for (var a = 0, n = e.length; a < n; a++) t(e[a], a); |
| | | else |
| | | for (var o in e) t(e[o], o) |
| | | }, e.exports = n |
| | | }).call(this, a(4)) |
| | | }, function (e, t, a) { |
| | | "use strict"; |
| | | a.r(t); |
| | | a(34); |
| | | var n = a(15), |
| | | o = /mobile/i.test(window.navigator.userAgent), |
| | | r = { |
| | | secondToTime: function (e) { |
| | | if (0 === (e = e || 0) || e == 1 / 0 || "NaN" === e.toString()) return "00:00"; |
| | | var t = Math.floor(e / 3600), |
| | | a = Math.floor((e - 3600 * t) / 60), |
| | | n = Math.floor(e - 3600 * t - 60 * a); |
| | | return (t > 0 ? [t, a, n] : [a, n]).map((function (e) { |
| | | return e < 10 ? "0" + e : "" + e |
| | | })).join(":") |
| | | }, |
| | | getElementViewLeft: function (e) { |
| | | var t = e.offsetLeft, |
| | | a = e.offsetParent, |
| | | n = document.body.scrollLeft + document.documentElement.scrollLeft; |
| | | if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) |
| | | for (; null !== a && a !== e;) t += a.offsetLeft, a = a.offsetParent; |
| | | else |
| | | for (; null !== a;) t += a.offsetLeft, a = a.offsetParent; |
| | | return t - n |
| | | }, |
| | | getBoundingClientRectViewLeft: function (e) { |
| | | var t = window.scrollY || window.pageYOffset || document.body.scrollTop + (document.documentElement && document.documentElement.scrollTop || 0); |
| | | if (e.getBoundingClientRect) { |
| | | if ("number" != typeof this.getBoundingClientRectViewLeft.offset) { |
| | | var a = document.createElement("div"); |
| | | a.style.cssText = "position:absolute;top:0;left:0;", document.body.appendChild(a), this.getBoundingClientRectViewLeft.offset = -a.getBoundingClientRect().top - t, document.body.removeChild(a), a = null |
| | | } |
| | | var n = e.getBoundingClientRect(), |
| | | o = this.getBoundingClientRectViewLeft.offset; |
| | | return n.left + o |
| | | } |
| | | return this.getElementViewLeft(e) |
| | | }, |
| | | getScrollPosition: function () { |
| | | return { |
| | | left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0, |
| | | top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 |
| | | } |
| | | }, |
| | | setScrollPosition: function (e) { |
| | | var t = e.left, |
| | | a = void 0 === t ? 0 : t, |
| | | n = e.top, |
| | | o = void 0 === n ? 0 : n; |
| | | this.isFirefox ? (document.documentElement.scrollLeft = a, document.documentElement.scrollTop = o) : window.scrollTo(a, o) |
| | | }, |
| | | isMobile: o, |
| | | isFirefox: /firefox/i.test(window.navigator.userAgent), |
| | | isChrome: /chrome/i.test(window.navigator.userAgent), |
| | | storage: { |
| | | set: function (e, t) { |
| | | localStorage.setItem(e, t) |
| | | }, get: function (e) { |
| | | return localStorage.getItem(e) |
| | | } |
| | | }, |
| | | cumulativeOffset: function (e) { |
| | | var t = 0, |
| | | a = 0; |
| | | do { |
| | | t += e.offsetTop || 0, a += e.offsetLeft || 0, e = e.offsetParent |
| | | } while (e); |
| | | return {top: t, left: a} |
| | | }, |
| | | nameMap: { |
| | | dragStart: o ? "touchstart" : "mousedown", |
| | | dragMove: o ? "touchmove" : "mousemove", |
| | | dragEnd: o ? "touchend" : "mouseup" |
| | | }, |
| | | color2Number: function (e) { |
| | | return "#" === e[0] && (e = e.substr(1)), 3 === e.length && (e = "".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2])), parseInt(e, 16) + 0 & 16777215 |
| | | }, |
| | | number2Color: function (e) { |
| | | return "#" + ("00000" + e.toString(16)).slice(-6) |
| | | }, |
| | | number2Type: function (e) { |
| | | switch (e) { |
| | | case 0: |
| | | return "right"; |
| | | case 1: |
| | | return "top"; |
| | | case 2: |
| | | return "bottom"; |
| | | default: |
| | | return "right" |
| | | } |
| | | } |
| | | }, |
| | | i = a(2), |
| | | l = a.n(i), |
| | | s = { |
| | | send: function (e) { |
| | | l.a.post(e.url, e.data).then((function (t) { |
| | | var a = t.data; |
| | | a && 0 === a.code ? e.success && e.success(a) : e.error && e.error(a && a.msg) |
| | | })).catch((function (t) { |
| | | console.error(t), e.error && e.error() |
| | | })) |
| | | }, read: function (e) { |
| | | l.a.get(e.url).then((function (t) { |
| | | var a = t.data; |
| | | a && 0 === a.code ? e.success && e.success(a.data.map((function (e) { |
| | | return {time: e[0], type: e[1], color: e[2], author: e[3], text: e[4]} |
| | | }))) : e.error && e.error(a && a.msg) |
| | | })).catch((function (t) { |
| | | console.error(t), e.error && e.error() |
| | | })) |
| | | } |
| | | }; |
| | | |
| | | function d(e) { |
| | | return (d = "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 |
| | | })(e) |
| | | } |
| | | |
| | | var p = function (e) { |
| | | var t = { |
| | | container: e.element || document.getElementsByClassName("dplayer")[0], |
| | | live: !1, |
| | | autoplay: !1, |
| | | theme: "#b7daff", |
| | | loop: !1, |
| | | lang: (navigator.language || navigator.browserLanguage).toLowerCase(), |
| | | screenshot: !1, |
| | | hotkey: !0, |
| | | preload: "metadata", |
| | | volume: .7, |
| | | apiBackend: s, |
| | | video: {}, |
| | | contextmenu: [], |
| | | mutex: !0, |
| | | pluginOptions: {hls: {}, flvjs: {}, dash: {}, webtorrent: {}} |
| | | }; |
| | | for (var a in t) t.hasOwnProperty(a) && !e.hasOwnProperty(a) && (e[a] = t[a]); |
| | | return e.video && !e.video.type && (e.video.type = "auto"), "object" === d(e.danmaku) && e.danmaku && !e.danmaku.user && (e.danmaku.user = "DIYgod"), e.subtitle && (!e.subtitle.type && (e.subtitle.type = "webvtt"), !e.subtitle.fontSize && (e.subtitle.fontSize = "20px"), !e.subtitle.bottom && (e.subtitle.bottom = "40px"), !e.subtitle.color && (e.subtitle.color = "#fff")), e.video.quality && (e.video.url = e.video.quality[e.video.defaultQuality].url), e.lang && (e.lang = e.lang.toLowerCase()) |
| | | // , e.contextmenu = e.contextmenu.concat([{ |
| | | // text: "Video info", |
| | | // click: function (e) { |
| | | // e.infoPanel.triggle() |
| | | // } |
| | | // }, {text: "About author", link: "https://diygod.me"}, { |
| | | // text: "DPlayer v".concat("1.25.0"), |
| | | // link: "https://github.com/MoePlayer/DPlayer" |
| | | // }]) |
| | | ,e |
| | | }; |
| | | var c = { |
| | | "zh-cn": { |
| | | "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": "设置弹幕类型", |
| | | "Show danmaku": "显示弹幕", |
| | | "Video load failed": "视频加载失败", |
| | | "Danmaku load failed": "弹幕加载失败", |
| | | "Danmaku send failed": "弹幕发送失败", |
| | | "Switching to": "正在切换至", |
| | | "Switched to": "已经切换至", |
| | | quality: "画质", |
| | | FF: "快进", |
| | | REW: "快退", |
| | | "Unlimited danmaku": "海量弹幕", |
| | | "Send danmaku": "发送弹幕", |
| | | Setting: "设置", |
| | | "Full": "全屏", |
| | | "Web full screen": "页面全屏", |
| | | Send: "发送", |
| | | Screenshot: "截图", |
| | | s: "秒", |
| | | "Show subtitle": "显示字幕", |
| | | "Hide subtitle": "隐藏字幕", |
| | | Volume: "音量", |
| | | Live: "直播", |
| | | "Video info": "视频统计信息" |
| | | }, |
| | | "zh-tw": { |
| | | "Danmaku is loading": "彈幕載入中", |
| | | Top: "頂部", |
| | | Bottom: "底部", |
| | | Rolling: "滾動", |
| | | "Input danmaku, hit Enter": "輸入彈幕,Enter 發送", |
| | | "About author": "關於作者", |
| | | "DPlayer feedback": "播放器意見回饋", |
| | | "About DPlayer": "關於 DPlayer 播放器", |
| | | Loop: "循環播放", |
| | | Speed: "速度", |
| | | "Opacity for danmaku": "彈幕透明度", |
| | | Normal: "正常", |
| | | "Please input danmaku content!": "請輸入彈幕內容啊!", |
| | | "Set danmaku color": "設定彈幕顏色", |
| | | "Set danmaku type": "設定彈幕類型", |
| | | "Show danmaku": "顯示彈幕", |
| | | "Video load failed": "影片載入失敗", |
| | | "Danmaku load failed": "彈幕載入失敗", |
| | | "Danmaku send failed": "彈幕發送失敗", |
| | | "Switching to": "正在切換至", |
| | | "Switched to": "已經切換至", |
| | | quality: "畫質", |
| | | FF: "快進", |
| | | REW: "快退", |
| | | "Unlimited danmaku": "巨量彈幕", |
| | | "Send danmaku": "發送彈幕", |
| | | Setting: "設定", |
| | | "Full": "全螢幕", |
| | | "Web full screen": "頁面全螢幕", |
| | | Send: "發送", |
| | | Screenshot: "截圖", |
| | | s: "秒", |
| | | "Show subtitle": "顯示字幕", |
| | | "Hide subtitle": "隱藏字幕", |
| | | Volume: "音量", |
| | | Live: "直播", |
| | | "Video info": "影片統計訊息" |
| | | } |
| | | }, |
| | | u = function (e) { |
| | | var t = this; |
| | | this.lang = e, this.tran = function (e) { |
| | | return c[t.lang] && c[t.lang][e] ? c[t.lang][e] : e |
| | | } |
| | | }, |
| | | y = a(17), |
| | | h = a.n(y), |
| | | m = a(18), |
| | | f = a.n(m), |
| | | v = a(19), |
| | | b = a.n(v), |
| | | g = a(20), |
| | | w = a.n(g), |
| | | x = a(21), |
| | | k = a.n(x), |
| | | S = a(22), |
| | | T = a.n(S), |
| | | L = a(23), |
| | | E = a.n(L), |
| | | q = a(24), |
| | | B = a.n(q), |
| | | M = a(25), |
| | | z = a.n(M), |
| | | C = a(26), |
| | | O = a.n(C), |
| | | F = a(27), |
| | | A = a.n(F), |
| | | P = a(28), |
| | | j = a.n(P), |
| | | Y = a(29), |
| | | _ = a.n(Y), |
| | | D = a(30), |
| | | R = a.n(D), |
| | | I = a(31), |
| | | W = a.n(I), |
| | | H = a(32), |
| | | N = a.n(H), |
| | | U = { |
| | | play: h.a, |
| | | pause: f.a, |
| | | volumeUp: b.a, |
| | | volumeDown: w.a, |
| | | volumeOff: k.a, |
| | | full: T.a, |
| | | fullWeb: E.a, |
| | | setting: B.a, |
| | | right: z.a, |
| | | comment: O.a, |
| | | commentOff: A.a, |
| | | send: j.a, |
| | | pallette: _.a, |
| | | camera: R.a, |
| | | subtitle: W.a, |
| | | loading: N.a |
| | | }, |
| | | V = a(33), |
| | | X = a.n(V); |
| | | |
| | | function Q(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var $ = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t.container, this.options = t.options, this.index = t.index, this.tran = t.tran, this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | this.container.innerHTML = X()({ |
| | | options: this.options, |
| | | index: this.index, |
| | | tran: this.tran, |
| | | icons: U, |
| | | video: { |
| | | current: !0, |
| | | pic: this.options.video.pic, |
| | | screenshot: this.options.screenshot, |
| | | preload: this.options.preload, |
| | | url: this.options.video.url, |
| | | subtitle: this.options.subtitle |
| | | } |
| | | }), this.volumeBar = this.container.querySelector(".dplayer-volume-bar-inner"), this.volumeBarWrap = this.container.querySelector(".dplayer-volume-bar"), this.volumeBarWrapWrap = this.container.querySelector(".dplayer-volume-bar-wrap"), this.volumeButton = this.container.querySelector(".dplayer-volume"), this.volumeButtonIcon = this.container.querySelector(".dplayer-volume-icon"), this.volumeIcon = this.container.querySelector(".dplayer-volume-icon .dplayer-icon-content"), this.playedBar = this.container.querySelector(".dplayer-played"), this.loadedBar = this.container.querySelector(".dplayer-loaded"), this.playedBarWrap = this.container.querySelector(".dplayer-bar-wrap"), this.playedBarTime = this.container.querySelector(".dplayer-bar-time"), this.danmaku = this.container.querySelector(".dplayer-danmaku"), this.danmakuLoading = this.container.querySelector(".dplayer-danloading"), this.video = this.container.querySelector(".dplayer-video-current"), this.bezel = this.container.querySelector(".dplayer-bezel-icon"), this.playButton = this.container.querySelector(".dplayer-play-icon"), this.videoWrap = this.container.querySelector(".dplayer-video-wrap"), this.controllerMask = this.container.querySelector(".dplayer-controller-mask"), this.ptime = this.container.querySelector(".dplayer-ptime"), this.settingButton = this.container.querySelector(".dplayer-setting-icon"), this.settingBox = this.container.querySelector(".dplayer-setting-box"), this.mask = this.container.querySelector(".dplayer-mask"), this.loop = this.container.querySelector(".dplayer-setting-loop"), this.loopToggle = this.container.querySelector(".dplayer-setting-loop .dplayer-toggle-setting-input"), this.showDanmaku = this.container.querySelector(".dplayer-setting-showdan"), this.showDanmakuToggle = this.container.querySelector(".dplayer-showdan-setting-input"), this.unlimitDanmaku = this.container.querySelector(".dplayer-setting-danunlimit"), this.unlimitDanmakuToggle = this.container.querySelector(".dplayer-danunlimit-setting-input"), this.speed = this.container.querySelector(".dplayer-setting-speed"), this.speedItem = this.container.querySelectorAll(".dplayer-setting-speed-item"), this.danmakuOpacityBar = this.container.querySelector(".dplayer-danmaku-bar-inner"), this.danmakuOpacityBarWrap = this.container.querySelector(".dplayer-danmaku-bar"), this.danmakuOpacityBarWrapWrap = this.container.querySelector(".dplayer-danmaku-bar-wrap"), this.danmakuOpacityBox = this.container.querySelector(".dplayer-setting-danmaku"), this.dtime = this.container.querySelector(".dplayer-dtime"), this.controller = this.container.querySelector(".dplayer-controller"), this.commentInput = this.container.querySelector(".dplayer-comment-input"), this.commentButton = this.container.querySelector(".dplayer-comment-icon"), this.commentSettingBox = this.container.querySelector(".dplayer-comment-setting-box"), this.commentSettingButton = this.container.querySelector(".dplayer-comment-setting-icon"), this.commentSettingFill = this.container.querySelector(".dplayer-comment-setting-icon path"), this.commentSendButton = this.container.querySelector(".dplayer-send-icon"), this.commentSendFill = this.container.querySelector(".dplayer-send-icon path"), this.commentColorSettingBox = this.container.querySelector(".dplayer-comment-setting-color"), this.browserFullButton = this.container.querySelector(".dplayer-full-icon"), this.webFullButton = this.container.querySelector(".dplayer-full-in-icon"), this.menu = this.container.querySelector(".dplayer-menu"), this.menuItem = this.container.querySelectorAll(".dplayer-menu-item"), this.qualityList = this.container.querySelector(".dplayer-quality-list"), this.camareButton = this.container.querySelector(".dplayer-camera-icon"), this.subtitleButton = this.container.querySelector(".dplayer-subtitle-icon"), this.subtitleButtonInner = this.container.querySelector(".dplayer-subtitle-icon .dplayer-icon-content"), this.subtitle = this.container.querySelector(".dplayer-subtitle"), this.qualityButton = this.container.querySelector(".dplayer-quality-icon"), this.barPreview = this.container.querySelector(".dplayer-bar-preview"), this.barWrap = this.container.querySelector(".dplayer-bar-wrap"), this.notice = this.container.querySelector(".dplayer-notice"), this.infoPanel = this.container.querySelector(".dplayer-info-panel"), this.infoPanelClose = this.container.querySelector(".dplayer-info-panel-close"), this.infoVersion = this.container.querySelector(".dplayer-info-panel-item-version .dplayer-info-panel-item-data"), this.infoFPS = this.container.querySelector(".dplayer-info-panel-item-fps .dplayer-info-panel-item-data"), this.infoType = this.container.querySelector(".dplayer-info-panel-item-type .dplayer-info-panel-item-data"), this.infoUrl = this.container.querySelector(".dplayer-info-panel-item-url .dplayer-info-panel-item-data"), this.infoResolution = this.container.querySelector(".dplayer-info-panel-item-resolution .dplayer-info-panel-item-data"), this.infoDuration = this.container.querySelector(".dplayer-info-panel-item-duration .dplayer-info-panel-item-data"), this.infoDanmakuId = this.container.querySelector(".dplayer-info-panel-item-danmaku-id .dplayer-info-panel-item-data"), this.infoDanmakuApi = this.container.querySelector(".dplayer-info-panel-item-danmaku-api .dplayer-info-panel-item-data"), this.infoDanmakuAmount = this.container.querySelector(".dplayer-info-panel-item-danmaku-amount .dplayer-info-panel-item-data") |
| | | } |
| | | }]) && Q(t.prototype, a), n && Q(t, n), e |
| | | }(); |
| | | |
| | | function J(e) { |
| | | return (J = "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 |
| | | })(e) |
| | | } |
| | | |
| | | function K(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Z = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.options = t, this.container = this.options.container, this.danTunnel = { |
| | | right: {}, |
| | | top: {}, |
| | | bottom: {} |
| | | }, this.danIndex = 0, this.dan = [], this.showing = !0, this._opacity = this.options.opacity, this.events = this.options.events, this.unlimited = this.options.unlimited, this._measure(""), this.load() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "load", value: function () { |
| | | var e, t = this; |
| | | e = this.options.api.maximum ? "".concat(this.options.api.address, "v3/?id=").concat(this.options.api.id, "&max=").concat(this.options.api.maximum) : "".concat(this.options.api.address, "v3/?id=").concat(this.options.api.id); |
| | | var a = (this.options.api.addition || []).slice(0); |
| | | a.push(e), this.events && this.events.trigger("danmaku_load_start", a), this._readAllEndpoints(a, (function (e) { |
| | | t.dan = [].concat.apply([], e).sort((function (e, t) { |
| | | return e.time - t.time |
| | | })), window.requestAnimationFrame((function () { |
| | | t.frame() |
| | | })), t.options.callback(), t.events && t.events.trigger("danmaku_load_end") |
| | | })) |
| | | } |
| | | }, { |
| | | key: "reload", value: function (e) { |
| | | this.options.api = e, this.dan = [], this.clear(), this.load() |
| | | } |
| | | }, { |
| | | key: "_readAllEndpoints", value: function (e, t) { |
| | | for (var a = this, n = [], o = 0, r = function (r) { |
| | | a.options.apiBackend.read({ |
| | | url: e[r], success: function (a) { |
| | | n[r] = a, ++o === e.length && t(n) |
| | | }, error: function (i) { |
| | | a.options.error(i || a.options.tran("Danmaku load failed")), n[r] = [], ++o === e.length && t(n) |
| | | } |
| | | }) |
| | | }, i = 0; i < e.length; ++i) r(i) |
| | | } |
| | | }, { |
| | | key: "send", value: function (e, t) { |
| | | var a = this, |
| | | n = { |
| | | token: this.options.api.token, |
| | | id: this.options.api.id, |
| | | author: this.options.api.user, |
| | | time: this.options.time(), |
| | | text: e.text, |
| | | color: e.color, |
| | | type: e.type |
| | | }; |
| | | this.options.apiBackend.send({ |
| | | url: this.options.api.address + "v3/", |
| | | data: n, |
| | | success: t, |
| | | error: function (e) { |
| | | a.options.error(e || a.options.tran("Danmaku send failed")) |
| | | } |
| | | }), this.dan.splice(this.danIndex, 0, n), this.danIndex++; |
| | | var o = { |
| | | text: this.htmlEncode(n.text), |
| | | color: n.color, |
| | | type: n.type, |
| | | border: "2px solid ".concat(this.options.borderColor) |
| | | }; |
| | | this.draw(o), this.events && this.events.trigger("danmaku_send", n) |
| | | } |
| | | }, { |
| | | key: "frame", value: function () { |
| | | var e = this; |
| | | if (this.dan.length && !this.paused && this.showing) { |
| | | for (var t = this.dan[this.danIndex], a = []; t && this.options.time() > parseFloat(t.time);) a.push(t), t = this.dan[++this.danIndex]; |
| | | this.draw(a) |
| | | } |
| | | window.requestAnimationFrame((function () { |
| | | e.frame() |
| | | })) |
| | | } |
| | | }, { |
| | | key: "opacity", value: function (e) { |
| | | if (void 0 !== e) { |
| | | for (var t = this.container.getElementsByClassName("dplayer-danmaku-item"), a = 0; a < t.length; a++) t[a].style.opacity = e; |
| | | this._opacity = e, this.events && this.events.trigger("danmaku_opacity", this._opacity) |
| | | } |
| | | return this._opacity |
| | | } |
| | | }, { |
| | | key: "draw", value: function (e) { |
| | | var t = this; |
| | | if (this.showing) { |
| | | var a = this.options.height, |
| | | n = this.container.offsetWidth, |
| | | o = this.container.offsetHeight, |
| | | i = parseInt(o / a), |
| | | l = function (e) { |
| | | var a = e.offsetWidth || parseInt(e.style.width), |
| | | n = e.getBoundingClientRect().right || t.container.getBoundingClientRect().right + a; |
| | | return t.container.getBoundingClientRect().right - n |
| | | }, |
| | | s = function (e) { |
| | | return (n + e) / 5 |
| | | }, |
| | | d = function (e, a, o) { |
| | | for (var r = n / s(o), d = function (o) { |
| | | var d = t.danTunnel[a][o + ""]; |
| | | if (!d || !d.length) return t.danTunnel[a][o + ""] = [e], e.addEventListener("animationend", (function () { |
| | | t.danTunnel[a][o + ""].splice(0, 1) |
| | | })), {v: o % i}; |
| | | if ("right" !== a) return "continue"; |
| | | for (var p = 0; p < d.length; p++) { |
| | | var c = l(d[p]) - 10; |
| | | if (c <= n - r * s(parseInt(d[p].style.width)) || c <= 0) break; |
| | | if (p === d.length - 1) return t.danTunnel[a][o + ""].push(e), e.addEventListener("animationend", (function () { |
| | | t.danTunnel[a][o + ""].splice(0, 1) |
| | | })), {v: o % i} |
| | | } |
| | | }, p = 0; t.unlimited || p < i; p++) { |
| | | var c = d(p); |
| | | switch (c) { |
| | | case "continue": |
| | | continue; |
| | | default: |
| | | if ("object" === J(c)) return c.v |
| | | } |
| | | } |
| | | return -1 |
| | | }; |
| | | "[object Array]" !== Object.prototype.toString.call(e) && (e = [e]); |
| | | for (var p = document.createDocumentFragment(), c = function (o) { |
| | | e[o].type = r.number2Type(e[o].type), e[o].color || (e[o].color = 16777215); |
| | | var i = document.createElement("div"); |
| | | i.classList.add("dplayer-danmaku-item"), i.classList.add("dplayer-danmaku-".concat(e[o].type)), e[o].border ? i.innerHTML = '<span style="border:'.concat(e[o].border, '">').concat(e[o].text, "</span>") : i.innerHTML = e[o].text, i.style.opacity = t._opacity, i.style.color = r.number2Color(e[o].color), i.addEventListener("animationend", (function () { |
| | | t.container.removeChild(i) |
| | | })); |
| | | var l = t._measure(e[o].text), |
| | | s = void 0; |
| | | switch (e[o].type) { |
| | | case "right": |
| | | (s = d(i, e[o].type, l)) >= 0 && (i.style.width = l + 1 + "px", i.style.top = a * s + "px", i.style.transform = "translateX(-".concat(n, "px)")); |
| | | break; |
| | | case "top": |
| | | (s = d(i, e[o].type)) >= 0 && (i.style.top = a * s + "px"); |
| | | break; |
| | | case "bottom": |
| | | (s = d(i, e[o].type)) >= 0 && (i.style.bottom = a * s + "px"); |
| | | break; |
| | | default: |
| | | console.error("Can't handled danmaku type: ".concat(e[o].type)) |
| | | } |
| | | s >= 0 && (i.classList.add("dplayer-danmaku-move"), p.appendChild(i)) |
| | | }, u = 0; u < e.length; u++) c(u); |
| | | return this.container.appendChild(p), p |
| | | } |
| | | } |
| | | }, { |
| | | key: "play", value: function () { |
| | | this.paused = !1 |
| | | } |
| | | }, { |
| | | key: "pause", value: function () { |
| | | this.paused = !0 |
| | | } |
| | | }, { |
| | | key: "_measure", value: function (e) { |
| | | if (!this.context) { |
| | | var t = getComputedStyle(this.container.getElementsByClassName("dplayer-danmaku-item")[0], null); |
| | | this.context = document.createElement("canvas").getContext("2d"), this.context.font = t.getPropertyValue("font") |
| | | } |
| | | return this.context.measureText(e).width |
| | | } |
| | | }, { |
| | | key: "seek", value: function () { |
| | | this.clear(); |
| | | for (var e = 0; e < this.dan.length; e++) { |
| | | if (this.dan[e].time >= this.options.time()) { |
| | | this.danIndex = e; |
| | | break |
| | | } |
| | | this.danIndex = this.dan.length |
| | | } |
| | | } |
| | | }, { |
| | | key: "clear", value: function () { |
| | | this.danTunnel = { |
| | | right: {}, |
| | | top: {}, |
| | | bottom: {} |
| | | }, this.danIndex = 0, this.options.container.innerHTML = "", this.events && this.events.trigger("danmaku_clear") |
| | | } |
| | | }, { |
| | | key: "htmlEncode", value: function (e) { |
| | | return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/") |
| | | } |
| | | }, { |
| | | key: "resize", value: function () { |
| | | for (var e = this.container.offsetWidth, t = this.container.getElementsByClassName("dplayer-danmaku-item"), a = 0; a < t.length; a++) t[a].style.transform = "translateX(-".concat(e, "px)") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.showing = !1, this.pause(), this.clear(), this.events && this.events.trigger("danmaku_hide") |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.seek(), this.showing = !0, this.play(), this.events && this.events.trigger("danmaku_show") |
| | | } |
| | | }, { |
| | | key: "unlimit", value: function (e) { |
| | | this.unlimited = e |
| | | } |
| | | }]) && K(t.prototype, a), n && K(t, n), e |
| | | }(); |
| | | |
| | | function G(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ee = function () { |
| | | function e() { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.events = {}, this.videoEvents = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "mozaudioavailable", "pause", "play", "playing", "progress", "ratechange", "seeked", "seeking", "stalled", "suspend", "timeupdate", "volumechange", "waiting"], this.playerEvents = ["screenshot", "thumbnails_show", "thumbnails_hide", "danmaku_show", "danmaku_hide", "danmaku_clear", "danmaku_loaded", "danmaku_send", "danmaku_opacity", "contextmenu_show", "contextmenu_hide", "notice_show", "notice_hide", "quality_start", "quality_end", "destroy", "resize", "fullscreen", "fullscreen_cancel", "webfullscreen", "webfullscreen_cancel", "subtitle_show", "subtitle_hide", "subtitle_change"] |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "on", value: function (e, t) { |
| | | this.type(e) && "function" == typeof t && (this.events[e] || (this.events[e] = []), this.events[e].push(t)) |
| | | } |
| | | }, { |
| | | key: "trigger", value: function (e, t) { |
| | | if (this.events[e] && this.events[e].length) |
| | | for (var a = 0; a < this.events[e].length; a++) this.events[e][a](t) |
| | | } |
| | | }, { |
| | | key: "type", value: function (e) { |
| | | return -1 !== this.playerEvents.indexOf(e) ? "player" : -1 !== this.videoEvents.indexOf(e) ? "video" : (console.error("Unknown event name: ".concat(e)), null) |
| | | } |
| | | }]) && G(t.prototype, a), n && G(t, n), e |
| | | }(); |
| | | |
| | | function te(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ae = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.lastScrollPosition = { |
| | | left: 0, |
| | | top: 0 |
| | | }, this.player.events.on("webfullscreen", (function () { |
| | | a.player.resize() |
| | | })), this.player.events.on("webfullscreen_cancel", (function () { |
| | | a.player.resize(), r.setScrollPosition(a.lastScrollPosition) |
| | | })); |
| | | var n = function () { |
| | | a.player.resize(), a.isFullScreen("browser") ? a.player.events.trigger("fullscreen") : (r.setScrollPosition(a.lastScrollPosition), a.player.events.trigger("fullscreen_cancel")) |
| | | }, |
| | | o = function () { |
| | | var e = document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement; |
| | | e && e !== a.player.container || (a.player.resize(), e ? a.player.events.trigger("fullscreen") : (r.setScrollPosition(a.lastScrollPosition), a.player.events.trigger("fullscreen_cancel"))) |
| | | }; |
| | | /Firefox/.test(navigator.userAgent) ? (document.addEventListener("mozfullscreenchange", o), document.addEventListener("fullscreenchange", o)) : (this.player.container.addEventListener("fullscreenchange", n), this.player.container.addEventListener("webkitfullscreenchange", n), document.addEventListener("msfullscreenchange", o), document.addEventListener("MSFullscreenChange", o)) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "isFullScreen", value: function () { |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser"; |
| | | switch (e) { |
| | | case "browser": |
| | | return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; |
| | | case "web": |
| | | return this.player.container.classList.contains("dplayer-fulled") |
| | | } |
| | | } |
| | | }, { |
| | | key: "request", value: function () { |
| | | // debugger |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser", |
| | | t = "browser" === e ? "web" : "browser", |
| | | a = this.isFullScreen(t); |
| | | // switch (a || (this.lastScrollPosition = r.getScrollPosition()), e) { |
| | | // case "browser": |
| | | // this.player.container.requestFullscreen ? this.player.container.requestFullscreen() : this.player.container.mozRequestFullScreen ? this.player.container.mozRequestFullScreen() : this.player.container.webkitRequestFullscreen ? this.player.container.webkitRequestFullscreen() : this.player.video.webkitEnterFullscreen ? this.player.video.webkitEnterFullscreen() : this.player.video.webkitEnterFullScreen ? this.player.video.webkitEnterFullScreen() : this.player.container.msRequestFullscreen && this.player.container.msRequestFullscreen(); |
| | | // break; |
| | | // case "web": |
| | | // this.player.container.classList.add("dplayer-fulled"), document.body.classList.add("dplayer-web-fullscreen-fix"), this.player.events.trigger("webfullscreen") |
| | | // } |
| | | this.player.events.trigger("fullscreen") |
| | | a && this.cancel(t) |
| | | } |
| | | }, { |
| | | key: "cancel", value: function () { |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser"; |
| | | switch (e) { |
| | | case "browser": |
| | | document.cancelFullScreen ? document.cancelFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.webkitCancelFullscreen ? document.webkitCancelFullscreen() : document.msCancelFullScreen ? document.msCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(); |
| | | break; |
| | | case "web": |
| | | this.player.container.classList.remove("dplayer-fulled"), document.body.classList.remove("dplayer-web-fullscreen-fix"), this.player.events.trigger("webfullscreen_cancel") |
| | | } |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "browser"; |
| | | this.isFullScreen(e) ? this.cancel(e) : this.request(e) |
| | | } |
| | | }]) && te(t.prototype, a), n && te(t, n), e |
| | | }(); |
| | | |
| | | function ne(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var oe = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.storageName = { |
| | | opacity: "dplayer-danmaku-opacity", |
| | | volume: "dplayer-volume", |
| | | unlimited: "dplayer-danmaku-unlimited", |
| | | danmaku: "dplayer-danmaku-show", |
| | | subtitle: "dplayer-subtitle-show" |
| | | }, this.default = { |
| | | opacity: .7, |
| | | volume: t.options.hasOwnProperty("volume") ? t.options.volume : .7, |
| | | unlimited: (t.options.danmaku && t.options.danmaku.unlimited ? 1 : 0) || 0, |
| | | danmaku: 1, |
| | | subtitle: 1 |
| | | }, this.data = {}, this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | for (var e in this.storageName) { |
| | | var t = this.storageName[e]; |
| | | this.data[e] = parseFloat(r.storage.get(t) || this.default[e]) |
| | | } |
| | | } |
| | | }, { |
| | | key: "get", value: function (e) { |
| | | return this.data[e] |
| | | } |
| | | }, { |
| | | key: "set", value: function (e, t) { |
| | | this.data[e] = t, r.storage.set(this.storageName[e], t) |
| | | } |
| | | }]) && ne(t.prototype, a), n && ne(t, n), e |
| | | }(); |
| | | |
| | | function re(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ie = function () { |
| | | function e(t, a, n, o) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t, this.video = a, this.options = n, this.events = o, this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | var e = this; |
| | | if (this.container.style.fontSize = this.options.fontSize, this.container.style.bottom = this.options.bottom, this.container.style.color = this.options.color, this.video.textTracks && this.video.textTracks[0]) { |
| | | var t = this.video.textTracks[0]; |
| | | t.oncuechange = function () { |
| | | var a = t.activeCues[0]; |
| | | if (e.container.innerHTML = "", a) { |
| | | var n = document.createElement("div"); |
| | | n.appendChild(a.getCueAsHTML()); |
| | | var o = n.innerHTML.split(/\r?\n/).map((function (e) { |
| | | return "<p>".concat(e, "</p>") |
| | | })).join(""); |
| | | e.container.innerHTML = o |
| | | } |
| | | e.events.trigger("subtitle_change") |
| | | } |
| | | } |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.container.classList.remove("dplayer-subtitle-hide"), this.events.trigger("subtitle_show") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.container.classList.add("dplayer-subtitle-hide"), this.events.trigger("subtitle_hide") |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | this.container.classList.contains("dplayer-subtitle-hide") ? this.show() : this.hide() |
| | | } |
| | | }]) && re(t.prototype, a), n && re(t, n), e |
| | | }(); |
| | | |
| | | function le(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var se = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.elements = {}, this.elements.volume = t.volumeBar, this.elements.played = t.playedBar, this.elements.loaded = t.loadedBar, this.elements.danmaku = t.danmakuOpacityBar |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "set", value: function (e, t, a) { |
| | | t = Math.max(t, 0), t = Math.min(t, 1), this.elements[e].style[a] = 100 * t + "%" |
| | | } |
| | | }, { |
| | | key: "get", value: function (e) { |
| | | return parseFloat(this.elements[e].style.width) / 100 |
| | | } |
| | | }]) && le(t.prototype, a), n && le(t, n), e |
| | | }(); |
| | | |
| | | function de(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var pe = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { |
| | | window.setTimeout(e, 1e3 / 60) |
| | | }, this.types = ["loading", "info", "fps"], this.init() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "init", value: function () { |
| | | var e = this; |
| | | this.types.map((function (t) { |
| | | return "fps" !== t && e["init".concat(t, "Checker")](), t |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initloadingChecker", value: function () { |
| | | var e = this, |
| | | t = 0, |
| | | a = 0, |
| | | n = !1; |
| | | this.loadingChecker = setInterval((function () { |
| | | e.enableloadingChecker && (a = e.player.video.currentTime, n || a !== t || e.player.video.paused || (e.player.container.classList.add("dplayer-loading"), n = !0), n && a > t && !e.player.video.paused && (e.player.container.classList.remove("dplayer-loading"), n = !1), t = a) |
| | | }), 100) |
| | | } |
| | | }, { |
| | | key: "initfpsChecker", value: function () { |
| | | var e = this; |
| | | window.requestAnimationFrame((function () { |
| | | if (e.enablefpsChecker) |
| | | if (e.initfpsChecker(), e.fpsStart) { |
| | | e.fpsIndex++; |
| | | var t = new Date; |
| | | t - e.fpsStart > 1e3 && (e.player.infoPanel.fps(e.fpsIndex / (t - e.fpsStart) * 1e3), e.fpsStart = new Date, e.fpsIndex = 0) |
| | | } else e.fpsStart = new Date, e.fpsIndex = 0; |
| | | else e.fpsStart = 0, e.fpsIndex = 0 |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initinfoChecker", value: function () { |
| | | var e = this; |
| | | this.infoChecker = setInterval((function () { |
| | | e.enableinfoChecker && e.player.infoPanel.update() |
| | | }), 1e3) |
| | | } |
| | | }, { |
| | | key: "enable", value: function (e) { |
| | | this["enable".concat(e, "Checker")] = !0, "fps" === e && this.initfpsChecker() |
| | | } |
| | | }, { |
| | | key: "disable", value: function (e) { |
| | | this["enable".concat(e, "Checker")] = !1 |
| | | } |
| | | }, { |
| | | key: "destroy", value: function () { |
| | | var e = this; |
| | | this.types.map((function (t) { |
| | | return e["enable".concat(t, "Checker")] = !1, e["".concat(t, "Checker")] && clearInterval(e["".concat(t, "Checker")]), t |
| | | })) |
| | | } |
| | | }]) && de(t.prototype, a), n && de(t, n), e |
| | | }(); |
| | | |
| | | function ce(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var ue = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t, this.container.addEventListener("animationend", (function () { |
| | | a.container.classList.remove("dplayer-bezel-transition") |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "switch", value: function (e) { |
| | | this.container.innerHTML = e, this.container.classList.add("dplayer-bezel-transition") |
| | | } |
| | | }]) && ce(t.prototype, a), n && ce(t, n), e |
| | | }(); |
| | | |
| | | function ye(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var he = function () { |
| | | function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t.container, this.barWidth = t.barWidth, this.container.style.backgroundImage = "url('".concat(t.url, "')"), this.events = t.events |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "resize", value: function (e, t, a) { |
| | | this.container.style.width = "".concat(e, "px"), this.container.style.height = "".concat(t, "px"), this.container.style.top = "".concat(2 - t, "px"), this.barWidth = a |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.container.style.display = "block", this.events && this.events.trigger("thumbnails_show") |
| | | } |
| | | }, { |
| | | key: "move", value: function (e) { |
| | | this.container.style.backgroundPosition = "-".concat(160 * (Math.ceil(e / this.barWidth * 100) - 1), "px 0"), this.container.style.left = "".concat(Math.min(Math.max(e - this.container.offsetWidth / 2, -10), this.barWidth - 150), "px") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.container.style.display = "none", this.events && this.events.trigger("thumbnails_hide") |
| | | } |
| | | }]) && ye(t.prototype, a), n && ye(t, n), e |
| | | }(); |
| | | |
| | | function me(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var fe = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.autoHideTimer = 0, r.isMobile || (this.player.container.addEventListener("mousemove", (function () { |
| | | a.setAutoHide() |
| | | })), this.player.container.addEventListener("click", (function () { |
| | | a.setAutoHide() |
| | | })), this.player.on("play", (function () { |
| | | a.setAutoHide() |
| | | })), this.player.on("pause", (function () { |
| | | a.setAutoHide() |
| | | }))), this.initPlayButton(), this.initThumbnails(), this.initPlayedBar(), this.initFullButton(), this.initQualityButton(), this.initScreenshotButton(), this.initSubtitleButton(), this.initHighlights(), r.isMobile || this.initVolumeButton() |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "initPlayButton", value: function () { |
| | | var e = this; |
| | | this.player.template.playButton.addEventListener("click", (function () { |
| | | e.player.toggle() |
| | | })), r.isMobile ? (this.player.template.videoWrap.addEventListener("click", (function () { |
| | | e.toggle() |
| | | })), this.player.template.controllerMask.addEventListener("click", (function () { |
| | | e.toggle() |
| | | }))) : (this.player.template.videoWrap.addEventListener("click", (function () { |
| | | // debugger |
| | | if(e.player.paused){ |
| | | // e.player.toggle() |
| | | } |
| | | })), this.player.template.controllerMask.addEventListener("click", (function () { |
| | | // debugger |
| | | // e.player.toggle() |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "initHighlights", value: function () { |
| | | var e = this; |
| | | this.player.on("durationchange", (function () { |
| | | if (1 !== e.player.video.duration && e.player.video.duration !== 1 / 0 && e.player.options.highlight) { |
| | | var t = document.querySelectorAll(".dplayer-highlight"); |
| | | [].slice.call(t, 0).forEach((function (t) { |
| | | e.player.template.playedBarWrap.removeChild(t) |
| | | })); |
| | | for (var a = 0; a < e.player.options.highlight.length; a++) |
| | | if (e.player.options.highlight[a].text && e.player.options.highlight[a].time) { |
| | | var n = document.createElement("div"); |
| | | n.classList.add("dplayer-highlight"), n.style.left = e.player.options.highlight[a].time / e.player.video.duration * 100 + "%", n.innerHTML = '<span class="dplayer-highlight-text">' + e.player.options.highlight[a].text + "</span>", e.player.template.playedBarWrap.insertBefore(n, e.player.template.playedBarTime) |
| | | } |
| | | } |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initThumbnails", value: function () { |
| | | var e = this; |
| | | this.player.options.video.thumbnails && (this.thumbnails = new he({ |
| | | container: this.player.template.barPreview, |
| | | barWidth: this.player.template.barWrap.offsetWidth, |
| | | url: this.player.options.video.thumbnails, |
| | | events: this.player.events |
| | | }), this.player.on("loadedmetadata", (function () { |
| | | e.thumbnails.resize(160, e.player.video.videoHeight / e.player.video.videoWidth * 160, e.player.template.barWrap.offsetWidth) |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "initPlayedBar", value: function () { |
| | | var e = this, |
| | | t = function (t) { |
| | | var a = ((t.clientX || t.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.playedBarWrap)) / e.player.template.playedBarWrap.clientWidth; |
| | | a = Math.max(a, 0), a = Math.min(a, 1), e.player.bar.set("played", a, "width"), e.player.template.ptime.innerHTML = r.secondToTime(a * e.player.video.duration) |
| | | }, |
| | | a = function a(n) { |
| | | document.removeEventListener(r.nameMap.dragEnd, a), document.removeEventListener(r.nameMap.dragMove, t); |
| | | var o = ((n.clientX || n.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.playedBarWrap)) / e.player.template.playedBarWrap.clientWidth; |
| | | o = Math.max(o, 0), o = Math.min(o, 1), e.player.bar.set("played", o, "width"), e.player.seek(e.player.bar.get("played") * e.player.video.duration), e.player.timer.enable("progress") |
| | | }; |
| | | this.player.template.playedBarWrap.addEventListener(r.nameMap.dragStart, (function () { |
| | | e.player.timer.disable("progress"), document.addEventListener(r.nameMap.dragMove, t), document.addEventListener(r.nameMap.dragEnd, a) |
| | | })), this.player.template.playedBarWrap.addEventListener(r.nameMap.dragMove, (function (t) { |
| | | if (e.player.video.duration) { |
| | | var a = r.cumulativeOffset(e.player.template.playedBarWrap).left, |
| | | n = (t.clientX || t.changedTouches[0].clientX) - a; |
| | | if (n < 0 || n > e.player.template.playedBarWrap.offsetWidth) return; |
| | | var o = e.player.video.duration * (n / e.player.template.playedBarWrap.offsetWidth); |
| | | r.isMobile && e.thumbnails && e.thumbnails.show(), e.thumbnails && e.thumbnails.move(n), e.player.template.playedBarTime.style.left = "".concat(n - (o >= 3600 ? 25 : 20), "px"), e.player.template.playedBarTime.innerText = r.secondToTime(o), e.player.template.playedBarTime.classList.remove("hidden") |
| | | } |
| | | })), this.player.template.playedBarWrap.addEventListener(r.nameMap.dragEnd, (function () { |
| | | r.isMobile && e.thumbnails && e.thumbnails.hide() |
| | | })), r.isMobile || (this.player.template.playedBarWrap.addEventListener("mouseenter", (function () { |
| | | e.player.video.duration && (e.thumbnails && e.thumbnails.show(), e.player.template.playedBarTime.classList.remove("hidden")) |
| | | })), this.player.template.playedBarWrap.addEventListener("mouseleave", (function () { |
| | | e.player.video.duration && (e.thumbnails && e.thumbnails.hide(), e.player.template.playedBarTime.classList.add("hidden")) |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "initFullButton", value: function () { |
| | | var e = this; |
| | | this.player.template.browserFullButton.addEventListener("click", (function () { |
| | | e.player.fullScreen.toggle("browser") |
| | | })) |
| | | // this.player.template.browserFullButton.addEventListener("click", (function () { |
| | | // e.player.fullScreen.toggle("browser") |
| | | // })), this.player.template.webFullButton.addEventListener("click", (function () { |
| | | // e.player.fullScreen.toggle("web") |
| | | // })) |
| | | } |
| | | }, { |
| | | key: "initVolumeButton", value: function () { |
| | | var e = this, |
| | | t = function (t) { |
| | | var a = t || window.event, |
| | | n = ((a.clientX || a.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap) - 5.5) / 35; |
| | | e.player.volume(n) |
| | | }, |
| | | a = function a() { |
| | | document.removeEventListener(r.nameMap.dragEnd, a), document.removeEventListener(r.nameMap.dragMove, t), e.player.template.volumeButton.classList.remove("dplayer-volume-active") |
| | | }; |
| | | this.player.template.volumeBarWrapWrap.addEventListener("click", (function (t) { |
| | | var a = t || window.event, |
| | | n = ((a.clientX || a.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap) - 5.5) / 35; |
| | | e.player.volume(n) |
| | | })), this.player.template.volumeBarWrapWrap.addEventListener(r.nameMap.dragStart, (function () { |
| | | document.addEventListener(r.nameMap.dragMove, t), document.addEventListener(r.nameMap.dragEnd, a), e.player.template.volumeButton.classList.add("dplayer-volume-active") |
| | | })), this.player.template.volumeButtonIcon.addEventListener("click", (function () { |
| | | e.player.video.muted ? (e.player.video.muted = !1, e.player.switchVolumeIcon(), e.player.bar.set("volume", e.player.volume(), "width")) : (e.player.video.muted = !0, e.player.template.volumeIcon.innerHTML = U.volumeOff, e.player.bar.set("volume", 0, "width")) |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initQualityButton", value: function () { |
| | | var e = this; |
| | | this.player.options.video.quality && this.player.template.qualityList.addEventListener("click", (function (t) { |
| | | t.target.classList.contains("dplayer-quality-item") && e.player.switchQuality(t.target.dataset.index) |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initScreenshotButton", value: function () { |
| | | var e = this; |
| | | this.player.options.screenshot && this.player.template.camareButton.addEventListener("click", (function () { |
| | | var t, a = document.createElement("canvas"),f = e; |
| | | a.width = e.player.video.videoWidth, a.height = e.player.video.videoHeight, a.getContext("2d").drawImage(e.player.video, 0, 0, a.width, a.height), a.toBlob((function (e) { |
| | | t = URL.createObjectURL(e); |
| | | var a = document.createElement("a"); |
| | | var time = new Date(); |
| | | var timestr = time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate() + '-' + time.getHours() + '-' + time.getMinutes() + '-' + time.getSeconds(); |
| | | var fileName = ''; |
| | | if(f.player.options.liveText){ |
| | | fileName = f.player.options.liveText + '-'; |
| | | } |
| | | a.href = t, a.download = fileName + timestr + ".png", a.style.display = "none", document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(t) |
| | | })), e.player.events.trigger("screenshot", t) |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initSubtitleButton", value: function () { |
| | | var e = this; |
| | | this.player.options.subtitle && (this.player.events.on("subtitle_show", (function () { |
| | | e.player.template.subtitleButton.dataset.balloon = e.player.tran("Hide subtitle"), e.player.template.subtitleButtonInner.style.opacity = "", e.player.user.set("subtitle", 1) |
| | | })), this.player.events.on("subtitle_hide", (function () { |
| | | e.player.template.subtitleButton.dataset.balloon = e.player.tran("Show subtitle"), e.player.template.subtitleButtonInner.style.opacity = "0.4", e.player.user.set("subtitle", 0) |
| | | })), this.player.template.subtitleButton.addEventListener("click", (function () { |
| | | e.player.subtitle.toggle() |
| | | }))) |
| | | } |
| | | }, { |
| | | key: "setAutoHide", value: function () { |
| | | var e = this; |
| | | this.show(), clearTimeout(this.autoHideTimer), this.autoHideTimer = setTimeout((function () { |
| | | !e.player.video.played.length || e.player.paused || e.disableAutoHide || e.hide() |
| | | }), 3e3) |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.player.container.classList.remove("dplayer-hide-controller") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.container.classList.add("dplayer-hide-controller"), this.player.setting.hide(), this.player.comment && this.player.comment.hide() |
| | | } |
| | | }, { |
| | | key: "isShow", value: function () { |
| | | return !this.player.container.classList.contains("dplayer-hide-controller") |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | this.isShow() ? this.hide() : this.show() |
| | | } |
| | | }, { |
| | | key: "destroy", value: function () { |
| | | clearTimeout(this.autoHideTimer) |
| | | } |
| | | }]) && me(t.prototype, a), n && me(t, n), e |
| | | }(); |
| | | |
| | | function ve(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var be = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.player.template.mask.addEventListener("click", (function () { |
| | | a.hide() |
| | | })), this.player.template.settingButton.addEventListener("click", (function () { |
| | | a.show() |
| | | })), this.loop = this.player.options.loop, this.player.template.loopToggle.checked = this.loop, this.player.template.loop.addEventListener("click", (function () { |
| | | a.player.template.loopToggle.checked = !a.player.template.loopToggle.checked, a.player.template.loopToggle.checked ? a.loop = !0 : a.loop = !1, a.hide() |
| | | })), this.showDanmaku = this.player.user.get("danmaku"), this.showDanmaku || this.player.danmaku && this.player.danmaku.hide(), this.player.template.showDanmakuToggle.checked = this.showDanmaku, this.player.template.showDanmaku.addEventListener("click", (function () { |
| | | a.player.template.showDanmakuToggle.checked = !a.player.template.showDanmakuToggle.checked, a.player.template.showDanmakuToggle.checked ? (a.showDanmaku = !0, a.player.danmaku.show()) : (a.showDanmaku = !1, a.player.danmaku.hide()), a.player.user.set("danmaku", a.showDanmaku ? 1 : 0), a.hide() |
| | | })), this.unlimitDanmaku = this.player.user.get("unlimited"), this.player.template.unlimitDanmakuToggle.checked = this.unlimitDanmaku, this.player.template.unlimitDanmaku.addEventListener("click", (function () { |
| | | a.player.template.unlimitDanmakuToggle.checked = !a.player.template.unlimitDanmakuToggle.checked, a.player.template.unlimitDanmakuToggle.checked ? (a.unlimitDanmaku = !0, a.player.danmaku.unlimit(!0)) : (a.unlimitDanmaku = !1, a.player.danmaku.unlimit(!1)), a.player.user.set("unlimited", a.unlimitDanmaku ? 1 : 0), a.hide() |
| | | })), this.player.template.speed.addEventListener("click", (function () { |
| | | a.player.template.settingBox.classList.add("dplayer-setting-box-narrow"), a.player.template.settingBox.classList.add("dplayer-setting-box-speed") |
| | | })); |
| | | for (var n = function (e) { |
| | | a.player.template.speedItem[e].addEventListener("click", (function () { |
| | | a.player.speed(a.player.template.speedItem[e].dataset.speed), a.hide() |
| | | })) |
| | | }, o = 0; o < this.player.template.speedItem.length; o++) n(o); |
| | | if (this.player.danmaku) { |
| | | this.player.on("danmaku_opacity", (function (e) { |
| | | a.player.bar.set("danmaku", e, "width"), a.player.user.set("opacity", e) |
| | | })), this.player.danmaku.opacity(this.player.user.get("opacity")); |
| | | var i = function (e) { |
| | | var t = e || window.event, |
| | | n = ((t.clientX || t.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(a.player.template.danmakuOpacityBarWrap)) / 130; |
| | | n = Math.max(n, 0), n = Math.min(n, 1), a.player.danmaku.opacity(n) |
| | | }, |
| | | l = function e() { |
| | | document.removeEventListener(r.nameMap.dragEnd, e), document.removeEventListener(r.nameMap.dragMove, i), a.player.template.danmakuOpacityBox.classList.remove("dplayer-setting-danmaku-active") |
| | | }; |
| | | this.player.template.danmakuOpacityBarWrapWrap.addEventListener("click", (function (e) { |
| | | var t = e || window.event, |
| | | n = ((t.clientX || t.changedTouches[0].clientX) - r.getBoundingClientRectViewLeft(a.player.template.danmakuOpacityBarWrap)) / 130; |
| | | n = Math.max(n, 0), n = Math.min(n, 1), a.player.danmaku.opacity(n) |
| | | })), this.player.template.danmakuOpacityBarWrapWrap.addEventListener(r.nameMap.dragStart, (function () { |
| | | document.addEventListener(r.nameMap.dragMove, i), document.addEventListener(r.nameMap.dragEnd, l), a.player.template.danmakuOpacityBox.classList.add("dplayer-setting-danmaku-active") |
| | | })) |
| | | } |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "hide", value: function () { |
| | | var e = this; |
| | | this.player.template.settingBox.classList.remove("dplayer-setting-box-open"), this.player.template.mask.classList.remove("dplayer-mask-show"), setTimeout((function () { |
| | | e.player.template.settingBox.classList.remove("dplayer-setting-box-narrow"), e.player.template.settingBox.classList.remove("dplayer-setting-box-speed") |
| | | }), 300), this.player.controller.disableAutoHide = !1 |
| | | } |
| | | }, { |
| | | key: "show", value: function () { |
| | | this.player.template.settingBox.classList.add("dplayer-setting-box-open"), this.player.template.mask.classList.add("dplayer-mask-show"), this.player.controller.disableAutoHide = !0 |
| | | } |
| | | }]) && ve(t.prototype, a), n && ve(t, n), e |
| | | }(); |
| | | |
| | | function ge(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var we = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.player.template.mask.addEventListener("click", (function () { |
| | | a.hide() |
| | | })), this.player.template.commentButton.addEventListener("click", (function () { |
| | | a.show() |
| | | })), this.player.template.commentSettingButton.addEventListener("click", (function () { |
| | | a.toggleSetting() |
| | | })), this.player.template.commentColorSettingBox.addEventListener("click", (function () { |
| | | if (a.player.template.commentColorSettingBox.querySelector("input:checked+span")) { |
| | | var e = a.player.template.commentColorSettingBox.querySelector("input:checked").value; |
| | | a.player.template.commentSettingFill.style.fill = e, a.player.template.commentInput.style.color = e, a.player.template.commentSendFill.style.fill = e |
| | | } |
| | | })), this.player.template.commentInput.addEventListener("click", (function () { |
| | | a.hideSetting() |
| | | })), this.player.template.commentInput.addEventListener("keydown", (function (e) { |
| | | 13 === (e || window.event).keyCode && a.send() |
| | | })), this.player.template.commentSendButton.addEventListener("click", (function () { |
| | | a.send() |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "show", value: function () { |
| | | this.player.controller.disableAutoHide = !0, this.player.template.controller.classList.add("dplayer-controller-comment"), this.player.template.mask.classList.add("dplayer-mask-show"), this.player.container.classList.add("dplayer-show-controller"), this.player.template.commentInput.focus() |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.template.controller.classList.remove("dplayer-controller-comment"), this.player.template.mask.classList.remove("dplayer-mask-show"), this.player.container.classList.remove("dplayer-show-controller"), this.player.controller.disableAutoHide = !1, this.hideSetting() |
| | | } |
| | | }, { |
| | | key: "showSetting", value: function () { |
| | | this.player.template.commentSettingBox.classList.add("dplayer-comment-setting-open") |
| | | } |
| | | }, { |
| | | key: "hideSetting", value: function () { |
| | | this.player.template.commentSettingBox.classList.remove("dplayer-comment-setting-open") |
| | | } |
| | | }, { |
| | | key: "toggleSetting", value: function () { |
| | | this.player.template.commentSettingBox.classList.contains("dplayer-comment-setting-open") ? this.hideSetting() : this.showSetting() |
| | | } |
| | | }, { |
| | | key: "send", value: function () { |
| | | var e = this; |
| | | this.player.template.commentInput.blur(), this.player.template.commentInput.value.replace(/^\s+|\s+$/g, "") ? this.player.danmaku.send({ |
| | | text: this.player.template.commentInput.value, |
| | | color: r.color2Number(this.player.container.querySelector(".dplayer-comment-setting-color input:checked").value), |
| | | type: parseInt(this.player.container.querySelector(".dplayer-comment-setting-type input:checked").value) |
| | | }, (function () { |
| | | e.player.template.commentInput.value = "", e.hide() |
| | | })) : this.player.notice(this.player.tran("Please input danmaku content!")) |
| | | } |
| | | }]) && ge(t.prototype, a), n && ge(t, n), e |
| | | }(); |
| | | var xe = function e(t) { |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), t.options.hotkey && document.addEventListener("keydown", (function (e) { |
| | | if (t.focus) { |
| | | var a = document.activeElement.tagName.toUpperCase(), |
| | | n = document.activeElement.getAttribute("contenteditable"); |
| | | if ("INPUT" !== a && "TEXTAREA" !== a && "" !== n && "true" !== n) { |
| | | var o, r = e || window.event; |
| | | switch (r.keyCode) { |
| | | case 32: |
| | | r.preventDefault(), t.toggle(); |
| | | break; |
| | | case 37: |
| | | r.preventDefault(), t.seek(t.video.currentTime - 5), t.controller.setAutoHide(); |
| | | break; |
| | | case 39: |
| | | r.preventDefault(), t.seek(t.video.currentTime + 5), t.controller.setAutoHide(); |
| | | break; |
| | | case 38: |
| | | r.preventDefault(), o = t.volume() + .1, t.volume(o); |
| | | break; |
| | | case 40: |
| | | r.preventDefault(), o = t.volume() - .1, t.volume(o) |
| | | } |
| | | } |
| | | } |
| | | })), document.addEventListener("keydown", (function (e) { |
| | | switch ((e || window.event).keyCode) { |
| | | case 27: |
| | | t.fullScreen.isFullScreen("web") && t.fullScreen.cancel("web") |
| | | } |
| | | })) |
| | | }; |
| | | |
| | | function ke(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Se = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.player = t, this.shown = !1, Array.prototype.slice.call(this.player.template.menuItem).forEach((function (e, t) { |
| | | a.player.options.contextmenu[t].click && e.addEventListener("click", (function () { |
| | | a.player.options.contextmenu[t].click(a.player), a.hide() |
| | | })) |
| | | })), this.player.container.addEventListener("contextmenu", (function (e) { |
| | | if (a.shown){ |
| | | a.hide() |
| | | var t = window.event; |
| | | t.preventDefault(); |
| | | } else { |
| | | // var t = e || window.event; |
| | | var t = window.event; |
| | | t.preventDefault(); |
| | | // var n = a.player.container.getBoundingClientRect(); |
| | | // a.show(t.clientX - n.left, t.clientY - n.top), a.player.template.mask.addEventListener("click", (function () { |
| | | // a.hide() |
| | | // })) |
| | | a.show(t.clientX, t.clientY), a.player.template.mask.addEventListener("click", (function () { |
| | | a.hide() |
| | | })) |
| | | } |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "show", value: function (e, t) { |
| | | this.player.template.menu.classList.add("dplayer-menu-show"); |
| | | var a = {} |
| | | a.width = document.documentElement.clientWidth |
| | | a.height = document.documentElement.clientHeight |
| | | e + this.player.template.menu.offsetWidth >= a.width ? (this.player.template.menu.style.right = a.width - e + "px", this.player.template.menu.style.left = "initial") : (this.player.template.menu.style.left = e + "px", this.player.template.menu.style.right = "initial"), t + this.player.template.menu.offsetHeight >= a.height ? (this.player.template.menu.style.bottom = a.height - t + "px", this.player.template.menu.style.top = "initial") : (this.player.template.menu.style.top = t + "px", this.player.template.menu.style.bottom = "initial"), this.player.template.mask.classList.add("dplayer-mask-show"), this.shown = !0, this.player.events.trigger("contextmenu_show") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.template.mask.classList.remove("dplayer-mask-show"), this.player.template.menu.classList.remove("dplayer-menu-show"), this.shown = !1, this.player.events.trigger("contextmenu_hide") |
| | | } |
| | | }]) && ke(t.prototype, a), n && ke(t, n), e |
| | | }(); |
| | | |
| | | function Te(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Le = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.container = t.template.infoPanel, this.template = t.template, this.video = t.video, this.player = t, this.template.infoPanelClose.addEventListener("click", (function () { |
| | | a.hide() |
| | | })) |
| | | } |
| | | |
| | | var t, a, n; |
| | | return t = e, (a = [{ |
| | | key: "show", value: function () { |
| | | this.beginTime = Date.now(), this.update(), this.player.timer.enable("info"), this.player.timer.enable("fps"), this.container.classList.remove("dplayer-info-panel-hide") |
| | | } |
| | | }, { |
| | | key: "hide", value: function () { |
| | | this.player.timer.disable("info"), this.player.timer.disable("fps"), this.container.classList.add("dplayer-info-panel-hide") |
| | | } |
| | | }, { |
| | | key: "triggle", value: function () { |
| | | this.container.classList.contains("dplayer-info-panel-hide") ? this.show() : this.hide() |
| | | } |
| | | }, { |
| | | key: "update", value: function () { |
| | | this.template.infoVersion.innerHTML = "v".concat("1.25.0", " ").concat("4ddc860"), this.template.infoType.innerHTML = this.player.type, this.template.infoUrl.innerHTML = this.player.options.video.url, this.template.infoResolution.innerHTML = "".concat(this.player.video.videoWidth, " x ").concat(this.player.video.videoHeight), this.template.infoDuration.innerHTML = this.player.video.duration, this.player.options.danmaku && (this.template.infoDanmakuId.innerHTML = this.player.options.danmaku.id, this.template.infoDanmakuApi.innerHTML = this.player.options.danmaku.api, this.template.infoDanmakuAmount.innerHTML = this.player.danmaku.dan.length) |
| | | } |
| | | }, { |
| | | key: "fps", value: function (e) { |
| | | this.template.infoFPS.innerHTML = "".concat(e.toFixed(1)) |
| | | } |
| | | }]) && Te(t.prototype, a), n && Te(t, n), e |
| | | }(), |
| | | Ee = a(1), |
| | | qe = a.n(Ee); |
| | | |
| | | function Be(e, t) { |
| | | var a = Object.keys(e); |
| | | if (Object.getOwnPropertySymbols) { |
| | | var n = Object.getOwnPropertySymbols(e); |
| | | t && (n = n.filter((function (t) { |
| | | return Object.getOwnPropertyDescriptor(e, t).enumerable |
| | | }))), a.push.apply(a, n) |
| | | } |
| | | return a |
| | | } |
| | | |
| | | function Me(e, t, a) { |
| | | return t in e ? Object.defineProperty(e, t, { |
| | | value: a, |
| | | enumerable: !0, |
| | | configurable: !0, |
| | | writable: !0 |
| | | }) : e[t] = a, e |
| | | } |
| | | |
| | | function ze(e, t) { |
| | | for (var a = 0; a < t.length; a++) { |
| | | var n = t[a]; |
| | | n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) |
| | | } |
| | | } |
| | | |
| | | var Ce = 0, |
| | | Oe = [], |
| | | Fe = function () { |
| | | function e(t) { |
| | | var a = this; |
| | | !function (e, t) { |
| | | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") |
| | | }(this, e), this.options = p(function (e) { |
| | | for (var t = 1; t < arguments.length; t++) { |
| | | var a = null != arguments[t] ? arguments[t] : {}; |
| | | t % 2 ? Be(a, !0).forEach((function (t) { |
| | | Me(e, t, a[t]) |
| | | })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : Be(a).forEach((function (t) { |
| | | Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(a, t)) |
| | | })) |
| | | } |
| | | return e |
| | | }({preload: "webtorrent" === t.video.type ? "none" : "metadata"}, t)), this.options.video.quality && (this.qualityIndex = this.options.video.defaultQuality, this.quality = this.options.video.quality[this.options.video.defaultQuality]), this.tran = new u(this.options.lang).tran, this.events = new ee, this.user = new oe(this), this.container = this.options.container, this.container.classList.add("dplayer"), this.options.danmaku || this.container.classList.add("dplayer-no-danmaku"), this.options.live && this.container.classList.add("dplayer-live"), r.isMobile && this.container.classList.add("dplayer-mobile"), this.arrow = this.container.offsetWidth <= 500, this.arrow && this.container.classList.add("dplayer-arrow"), this.template = new $({ |
| | | container: this.container, |
| | | options: this.options, |
| | | index: Ce, |
| | | tran: this.tran |
| | | }), this.video = this.template.video, this.bar = new se(this.template), this.bezel = new ue(this.template.bezel), this.fullScreen = new ae(this), this.controller = new fe(this), this.options.danmaku && (this.danmaku = new Z({ |
| | | container: this.template.danmaku, |
| | | opacity: this.user.get("opacity"), |
| | | callback: function () { |
| | | setTimeout((function () { |
| | | a.template.danmakuLoading.style.display = "none", a.options.autoplay && a.play() |
| | | }), 0) |
| | | }, |
| | | error: function (e) { |
| | | a.notice(e) |
| | | }, |
| | | apiBackend: this.options.apiBackend, |
| | | borderColor: this.options.theme, |
| | | height: this.arrow ? 24 : 30, |
| | | time: function () { |
| | | return a.video.currentTime |
| | | }, |
| | | unlimited: this.user.get("unlimited"), |
| | | api: { |
| | | id: this.options.danmaku.id, |
| | | address: this.options.danmaku.api, |
| | | token: this.options.danmaku.token, |
| | | maximum: this.options.danmaku.maximum, |
| | | addition: this.options.danmaku.addition, |
| | | user: this.options.danmaku.user |
| | | }, |
| | | events: this.events, |
| | | tran: function (e) { |
| | | return a.tran(e) |
| | | } |
| | | }), this.comment = new we(this)), this.setting = new be(this), this.plugins = {}, document.addEventListener("click", (function () { |
| | | a.focus = !1 |
| | | }), !0), this.container.addEventListener("click", (function () { |
| | | a.focus = !0 |
| | | }), !0), this.paused = !0, this.timer = new pe(this), this.hotkey = new xe(this), this.contextmenu = new Se(this), this.initVideo(this.video, this.quality && this.quality.type || this.options.video.type), this.infoPanel = new Le(this), !this.danmaku && this.options.autoplay && this.play(), Ce++, Oe.push(this) |
| | | } |
| | | |
| | | var t, a, o; |
| | | return t = e, o = [{ |
| | | key: "version", get: function () { |
| | | return "1.25.0" |
| | | } |
| | | }], (a = [{ |
| | | key: "seek", value: function (e) { |
| | | e = Math.max(e, 0), this.video.duration && (e = Math.min(e, this.video.duration)), this.video.currentTime < e ? this.notice("".concat(this.tran("FF"), " ").concat((e - this.video.currentTime).toFixed(0), " ").concat(this.tran("s"))) : this.video.currentTime > e && this.notice("".concat(this.tran("REW"), " ").concat((this.video.currentTime - e).toFixed(1), " ").concat(this.tran("s"))), this.video.currentTime = e, this.danmaku && this.danmaku.seek(), this.bar.set("played", e / this.video.duration, "width"), this.template.ptime.innerHTML = r.secondToTime(e) |
| | | } |
| | | }, { |
| | | key: "play", value: function () { |
| | | var e = this; |
| | | if (this.paused = !1, this.video.paused && this.bezel.switch(U.play), this.template.playButton.innerHTML = U.pause, n.a.resolve(this.video.play()).catch((function () { |
| | | e.pause() |
| | | })).then((function () { |
| | | })), this.timer.enable("loading"), this.container.classList.remove("dplayer-paused"), this.container.classList.add("dplayer-playing"), this.danmaku && this.danmaku.play(), this.options.mutex) |
| | | for (var t = 0; t < Oe.length; t++) this !== Oe[t] && Oe[t].pause() |
| | | } |
| | | }, { |
| | | key: "pause", value: function () { |
| | | this.paused = !0, this.container.classList.remove("dplayer-loading"), this.video.paused || this.bezel.switch(U.pause), this.template.playButton.innerHTML = U.play, this.video.pause(), this.timer.disable("loading"), this.container.classList.remove("dplayer-playing"), this.container.classList.add("dplayer-paused"), this.danmaku && this.danmaku.pause() |
| | | } |
| | | }, { |
| | | key: "switchVolumeIcon", value: function () { |
| | | this.volume() >= .95 ? this.template.volumeIcon.innerHTML = U.volumeUp : this.volume() > 0 ? this.template.volumeIcon.innerHTML = U.volumeDown : this.template.volumeIcon.innerHTML = U.volumeOff |
| | | } |
| | | }, { |
| | | key: "volume", value: function (e, t, a) { |
| | | if (e = parseFloat(e), !isNaN(e)) { |
| | | e = Math.max(e, 0), e = Math.min(e, 1), this.bar.set("volume", e, "width"); |
| | | var n = "".concat((100 * e).toFixed(0), "%"); |
| | | this.template.volumeBarWrapWrap.dataset.balloon = n, t || this.user.set("volume", e), a || this.notice("".concat(this.tran("Volume"), " ").concat((100 * e).toFixed(0), "%")), this.video.volume = e, this.video.muted && (this.video.muted = !1), this.switchVolumeIcon() |
| | | } |
| | | return this.video.volume |
| | | } |
| | | }, { |
| | | key: "toggle", value: function () { |
| | | this.video.paused ? this.play() : this.pause() |
| | | } |
| | | }, { |
| | | key: "on", value: function (e, t) { |
| | | this.events.on(e, t) |
| | | } |
| | | }, { |
| | | key: "switchVideo", value: function (e, t) { |
| | | this.pause(), this.video.poster = e.pic ? e.pic : "", this.video.src = e.url, this.initMSE(this.video, e.type || "auto"), t && (this.template.danmakuLoading.style.display = "block", this.bar.set("played", 0, "width"), this.bar.set("loaded", 0, "width"), this.template.ptime.innerHTML = "00:00", this.template.danmaku.innerHTML = "", this.danmaku && this.danmaku.reload({ |
| | | id: t.id, |
| | | address: t.api, |
| | | token: t.token, |
| | | maximum: t.maximum, |
| | | addition: t.addition, |
| | | user: t.user |
| | | })) |
| | | } |
| | | }, { |
| | | key: "initMSE", value: function (e, t) { |
| | | var a = this; |
| | | if (this.type = t, this.options.video.customType && this.options.video.customType[t]) "[object Function]" === Object.prototype.toString.call(this.options.video.customType[t]) ? this.options.video.customType[t](this.video, this) : console.error("Illegal customType: ".concat(t)); |
| | | else switch ("auto" === this.type && (/m3u8(#|\?|$)/i.exec(e.src) ? this.type = "hls" : /.flv(#|\?|$)/i.exec(e.src) ? this.type = "flv" : /.mpd(#|\?|$)/i.exec(e.src) ? this.type = "dash" : this.type = "normal"), "hls" === this.type && (e.canPlayType("application/x-mpegURL") || e.canPlayType("application/vnd.apple.mpegURL")) && (this.type = "normal"), this.type) { |
| | | case "hls": |
| | | if (Hls) |
| | | if (Hls.isSupported()) { |
| | | var n = this.options.pluginOptions.hls, |
| | | o = new Hls(n); |
| | | this.plugins.hls = o, o.loadSource(e.src), o.attachMedia(e), this.events.on("destroy", (function () { |
| | | o.destroy(), delete a.plugins.hls |
| | | })) |
| | | } else this.notice("Error: Hls is not supported."); |
| | | else this.notice("Error: Can't find Hls."); |
| | | break; |
| | | case "flv": |
| | | if (flvjs) |
| | | if (flvjs.isSupported()) { |
| | | var r = Object.assign(this.options.pluginOptions.flvjs, { |
| | | type: "flv", |
| | | url: e.src |
| | | }), |
| | | i = flvjs.createPlayer(r,{enableStashBuffer:false,fixAudioTimestampGap:false}); |
| | | this.plugins.flvjs = i, i.attachMediaElement(e), i.load(), this.events.on("destroy", (function () { |
| | | i.unload(), i.detachMediaElement(), i.destroy(), delete a.plugins.flvjs |
| | | })) |
| | | } else this.notice("Error: flvjs is not supported."); |
| | | else this.notice("Error: Can't find flvjs."); |
| | | break; |
| | | case "dash": |
| | | if (dashjs) { |
| | | var l = dashjs.MediaPlayer().create().initialize(e, e.src, !1), |
| | | s = this.options.pluginOptions.dash; |
| | | l.updateSettings(s), this.plugins.dash = l, this.events.on("destroy", (function () { |
| | | dashjs.MediaPlayer().reset(), delete a.plugins.dash |
| | | })) |
| | | } else this.notice("Error: Can't find dashjs."); |
| | | break; |
| | | case "webtorrent": |
| | | if (WebTorrent) |
| | | if (WebTorrent.WEBRTC_SUPPORT) { |
| | | this.container.classList.add("dplayer-loading"); |
| | | var d = this.options.pluginOptions.webtorrent, |
| | | p = new WebTorrent(d); |
| | | this.plugins.webtorrent = p; |
| | | var c = e.src; |
| | | e.src = "", e.preload = "metadata", e.addEventListener("durationchange", (function () { |
| | | return a.container.classList.remove("dplayer-loading") |
| | | }), {once: !0}), p.add(c, (function (e) { |
| | | e.files.find((function (e) { |
| | | return e.name.endsWith(".mp4") |
| | | })).renderTo(a.video, {autoplay: a.options.autoplay}) |
| | | })), this.events.on("destroy", (function () { |
| | | p.remove(c), p.destroy(), delete a.plugins.webtorrent |
| | | })) |
| | | } else this.notice("Error: Webtorrent is not supported."); |
| | | else this.notice("Error: Can't find Webtorrent.") |
| | | } |
| | | } |
| | | }, { |
| | | key: "initVideo", value: function (e, t) { |
| | | var a = this; |
| | | this.initMSE(e, t), this.on("durationchange", (function () { |
| | | 1 !== e.duration && e.duration !== 1 / 0 && (a.template.dtime.innerHTML = r.secondToTime(e.duration)) |
| | | })), this.on("progress", (function () { |
| | | var t = e.buffered.length ? e.buffered.end(e.buffered.length - 1) / e.duration : 0; |
| | | a.bar.set("loaded", t, "width") |
| | | })), this.on("error", (function () { |
| | | a.video.error && a.tran && a.notice && "webtorrent" !== a.type && a.notice(a.tran("Video load failed"), -1) |
| | | })), this.on("ended", (function () { |
| | | a.bar.set("played", 1, "width"), a.setting.loop ? (a.seek(0), a.play()) : a.pause(), a.danmaku && (a.danmaku.danIndex = 0) |
| | | })), this.on("play", (function () { |
| | | a.paused && a.play() |
| | | })), this.on("pause", (function () { |
| | | a.paused || a.pause() |
| | | })), this.on("timeupdate", (function () { |
| | | a.bar.set("played", a.video.currentTime / a.video.duration, "width"); |
| | | var e = r.secondToTime(a.video.currentTime); |
| | | a.template.ptime.innerHTML !== e && (a.template.ptime.innerHTML = e) |
| | | })); |
| | | for (var n = function (t) { |
| | | e.addEventListener(a.events.videoEvents[t], (function () { |
| | | a.events.trigger(a.events.videoEvents[t]) |
| | | })) |
| | | }, o = 0; o < this.events.videoEvents.length; o++) n(o); |
| | | // this.volume(this.user.get("volume"), !0, !0), this.options.subtitle && (this.subtitle = new ie(this.template.subtitle, this.video, this.options.subtitle, this.events), this.user.get("subtitle") || this.subtitle.hide()) |
| | | this.volume(this.options.volume, !0, !0), this.options.subtitle && (this.subtitle = new ie(this.template.subtitle, this.video, this.options.subtitle, this.events), this.user.get("subtitle") || this.subtitle.hide()) |
| | | } |
| | | }, { |
| | | key: "switchQuality", value: function (e) { |
| | | var t = this; |
| | | if (e = "string" == typeof e ? parseInt(e) : e, this.qualityIndex !== e && !this.switchingQuality) { |
| | | this.qualityIndex = e, this.switchingQuality = !0, this.quality = this.options.video.quality[e], this.template.qualityButton.innerHTML = this.quality.name; |
| | | var a = this.video.paused; |
| | | this.video.pause(); |
| | | var n = qe()({ |
| | | current: !1, |
| | | pic: null, |
| | | screenshot: this.options.screenshot, |
| | | preload: "auto", |
| | | url: this.quality.url, |
| | | subtitle: this.options.subtitle |
| | | }), |
| | | o = (new DOMParser).parseFromString(n, "text/html").body.firstChild; |
| | | this.template.videoWrap.insertBefore(o, this.template.videoWrap.getElementsByTagName("div")[0]), this.prevVideo = this.video, this.video = o, this.initVideo(this.video, this.quality.type || this.options.video.type), this.seek(this.prevVideo.currentTime), this.notice("".concat(this.tran("Switching to"), " ").concat(this.quality.name, " ").concat(this.tran("quality")), -1), this.events.trigger("quality_start", this.quality), this.on("canplay", (function () { |
| | | if (t.prevVideo) { |
| | | if (t.video.currentTime !== t.prevVideo.currentTime) return void t.seek(t.prevVideo.currentTime); |
| | | t.template.videoWrap.removeChild(t.prevVideo), t.video.classList.add("dplayer-video-current"), a || t.video.play(), t.prevVideo = null, t.notice("".concat(t.tran("Switched to"), " ").concat(t.quality.name, " ").concat(t.tran("quality"))), t.switchingQuality = !1, t.events.trigger("quality_end") |
| | | } |
| | | })) |
| | | } |
| | | } |
| | | }, { |
| | | key: "notice", value: function (e) { |
| | | var t = this, |
| | | a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2e3, |
| | | n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : .8; |
| | | this.template.notice.innerHTML = e, this.template.notice.style.opacity = n, this.noticeTime && clearTimeout(this.noticeTime), this.events.trigger("notice_show", e), a > 0 && (this.noticeTime = setTimeout((function () { |
| | | t.template.notice.style.opacity = 0, t.events.trigger("notice_hide") |
| | | }), a)) |
| | | } |
| | | }, { |
| | | key: "resize", value: function () { |
| | | this.danmaku && this.danmaku.resize(), this.controller.thumbnails && this.controller.thumbnails.resize(160, this.video.videoHeight / this.video.videoWidth * 160, this.template.barWrap.offsetWidth), this.events.trigger("resize") |
| | | } |
| | | }, { |
| | | key: "speed", value: function (e) { |
| | | this.video.playbackRate = e |
| | | } |
| | | }, { |
| | | key: "destroy", value: function () { |
| | | Oe.splice(Oe.indexOf(this), 1), this.pause(), this.controller.destroy(), this.timer.destroy(), this.video.src = "", this.container.innerHTML = "", this.events.trigger("destroy") |
| | | } |
| | | }]) && ze(t.prototype, a), o && ze(t, o), e |
| | | }(); |
| | | console.log("\n".concat(" %c DPlayer v", "1.25.0", " ").concat("4ddc860", " %c http://dplayer.js.org ", "\n", "\n"), "color: #fadfa3; background: #030307; padding:5px 0;", "background: #fadfa3; padding:5px 0;"); |
| | | t.default = Fe |
| | | }]).default |
| | | })); |
New file |
| | |
| | | (function (window) { |
| | | |
| | | var Player = function () { |
| | | //创建一个音频环境对象 |
| | | audioContext = window.AudioContext || window.webkitAudioContext; |
| | | var context = new audioContext(); |
| | | var isPlaying = false; |
| | | var audioBuffers = [] |
| | | var audioBuffer = context.createBuffer(1, 8000, 8000); |
| | | var playNextBuffer = function() { |
| | | isPlaying = false; |
| | | if (audioBuffers.length) { |
| | | playAudio(audioBuffers.shift()); |
| | | } |
| | | //if (audioBuffers.length > 1) audioBuffers.shift(); |
| | | //console.log(audioBuffers.length) |
| | | }; |
| | | |
| | | var copyToCtxBuffer = function(fromBuffer) { |
| | | var nowBuffering = audioBuffer.getChannelData(0); |
| | | |
| | | var buffer = new Int8Array( fromBuffer); |
| | | for (var i = 0; i < 8000; i++) { |
| | | |
| | | var word = (buffer[i * 2] & 0xff) + ((buffer[i * 2 + 1] & 0xff) << 8); |
| | | nowBuffering[i] = (((word + 32768) % 65536) - 32768) / 32768.0; |
| | | |
| | | } |
| | | }; |
| | | var playAudio = function(fromBuffer) { |
| | | if (isPlaying) { |
| | | //var buffer = new Int8Array( fromBuffer); |
| | | //copyAudioOutputArray(buffer); |
| | | audioBuffers.push(fromBuffer); |
| | | return; |
| | | } |
| | | isPlaying = true; |
| | | copyToCtxBuffer(fromBuffer); |
| | | var source = context.createBufferSource(); |
| | | source.buffer = audioBuffer; |
| | | source.connect(context.destination); |
| | | source.onended = playNextBuffer; |
| | | //setTimeout(playNextBuffer, audioBufferTime-audioBuffers.length*200); |
| | | source.start(); |
| | | }; |
| | | |
| | | |
| | | |
| | | config = {}; |
| | | config.channelCount = 1; |
| | | config.numberOfInputChannels = config.channelCount; |
| | | config.numberOfOutputChannels = config.channelCount; |
| | | config.sampleBits = config.sampleBits || 16; //采样数位 8, 16 |
| | | //config.sampleRate = config.sampleRate || (context.sampleRate / 6); //采样率(1/6 44100) |
| | | config.sampleRate = config.sampleRate || 8000; //采样率16K |
| | | //创建缓存,用来缓存声音 |
| | | config.bufferSize = 8192; |
| | | |
| | | |
| | | //将声音输入这个对像 |
| | | var audioOutput = context.createBufferSource(); |
| | | |
| | | //设置音量节点 |
| | | var volume = context.createGain(); |
| | | audioOutput.connect(volume); |
| | | |
| | | // 创建声音的缓存节点,createScriptProcessor方法的 |
| | | // 第二个和第三个参数指的是输入和输出都是声道数。 |
| | | var player = context.createScriptProcessor(config.bufferSize, 0, config.channelCount); |
| | | |
| | | |
| | | |
| | | //开始播放 |
| | | this.start = function () { |
| | | audioOutput.connect(player); |
| | | player.connect(context.destination); |
| | | }; |
| | | |
| | | //停止 |
| | | this.stop = function () { |
| | | player.disconnect(); |
| | | context.close(); |
| | | |
| | | }; |
| | | this.addPlay = function (blob) |
| | | { |
| | | var reader = new FileReader(); |
| | | // 读取这四个字节 |
| | | reader.readAsArrayBuffer(blob); |
| | | reader.onload = function (e) { |
| | | var buffer = reader.result; |
| | | var view = new DataView(buffer); |
| | | |
| | | playAudio(view.buffer); |
| | | }; |
| | | }; |
| | | |
| | | var $bo=$("#inbo"); |
| | | var $change=$("#change"); |
| | | var width=$bo.width(); |
| | | //音频采集 |
| | | player.onaudioprocess = function (e) { |
| | | |
| | | |
| | | //console.log(e.playbackTime); |
| | | |
| | | }; |
| | | |
| | | }; |
| | | //抛出异常 |
| | | Player.throwError = function (message) { |
| | | throw new function () { this.toString = function () { return message; };}; |
| | | }; |
| | | |
| | | //获取播放机 |
| | | Player.get = function (callback) { |
| | | if (callback) { |
| | | var rec = new Player(); |
| | | callback(rec); |
| | | } |
| | | }; |
| | | window.Player = Player; |
| | | |
| | | })(window); |
New file |
| | |
| | | (function (window) { |
| | | //兼容 |
| | | window.URL = window.URL || window.webkitURL; |
| | | //请求麦克风 |
| | | navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; |
| | | |
| | | var Recorder = function (stream, wsock) { |
| | | //创建一个音频环境对象 |
| | | audioContext = window.AudioContext || window.webkitAudioContext; |
| | | var context = new audioContext(); |
| | | |
| | | config = {}; |
| | | config.channelCount = 1; |
| | | config.numberOfInputChannels = config.channelCount; |
| | | config.numberOfOutputChannels = config.channelCount; |
| | | config.sampleBits = config.sampleBits || 16; //采样数位 8, 16 |
| | | //config.sampleRate = config.sampleRate || (context.sampleRate / 6); //采样率(1/6 44100) |
| | | config.sampleRate = config.sampleRate || 8000; //采样率16K |
| | | //创建缓存,用来缓存声音 |
| | | config.bufferSize = 8192; |
| | | var ws = wsock; |
| | | //将声音输入这个对像 |
| | | var audioInput = context.createMediaStreamSource(stream); |
| | | |
| | | //设置音量节点 |
| | | var volume = context.createGain(); |
| | | audioInput.connect(volume); |
| | | |
| | | // 创建声音的缓存节点,createScriptProcessor方法的 |
| | | // 第二个和第三个参数指的是输入和输出都是声道数。 |
| | | var recorder = context.createScriptProcessor(config.bufferSize, config.channelCount, config.channelCount); |
| | | |
| | | //用来储存读出的麦克风数据,和压缩这些数据,将这些数据转换为WAV文件的格式 |
| | | var audioData = { |
| | | size: 0 //录音文件长度 |
| | | , buffer: [] //录音缓存 |
| | | , inputSampleRate: context.sampleRate //输入采样率 |
| | | , inputSampleBits: 16 //输入采样数位 8, 16 |
| | | , outputSampleRate: config.sampleRate //输出采样率 |
| | | , oututSampleBits: config.sampleBits //输出采样数位 8, 16 |
| | | , input: function (data) { |
| | | this.buffer = []; |
| | | this.size = 0; |
| | | this.buffer.push(new Float32Array(data)); //Float32Array |
| | | this.size += data.length; |
| | | } |
| | | , getRawData: function () { //合并压缩 |
| | | //合并 |
| | | var data = new Float32Array(this.size); |
| | | var offset = 0; |
| | | for (var i = 0; i < this.buffer.length; i++) { |
| | | data.set(this.buffer[i], offset); |
| | | offset += this.buffer[i].length; |
| | | } |
| | | //压缩 |
| | | var getRawDataion = parseInt(this.inputSampleRate / this.outputSampleRate); |
| | | var length = data.length / getRawDataion; |
| | | var result = new Float32Array(length); |
| | | var index = 0, j = 0; |
| | | while (index < length) { |
| | | result[index] = data[j]; |
| | | j += getRawDataion; |
| | | index++; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | ,closeContext:function(){ |
| | | context.close(); //关闭AudioContext否则录音多次会报错。 |
| | | } |
| | | ,getPureWavData: function(offset) { |
| | | var sampleBits = Math.min(this.inputSampleBits, this.oututSampleBits) |
| | | var bytes = this.getRawData(); |
| | | var dataLength = bytes.length * (sampleBits / 8); |
| | | var buffer = new ArrayBuffer(dataLength); |
| | | var data = new DataView(buffer); |
| | | data = this.reshapeWavData(sampleBits, offset, bytes, data); |
| | | // var wavd = new Int8Array(data.buffer.byteLength); |
| | | // var pos = 0; |
| | | // for (var i = 0; i < data.buffer.byteLength; i++, pos++) { |
| | | // wavd[i] = data.getInt8(pos); |
| | | // } // return wavd; |
| | | |
| | | // return new Blob([data], { type: 'audio/wav' }); |
| | | return data; |
| | | |
| | | } |
| | | ,reshapeWavData: function(sampleBits, offset, iBytes, oData) { |
| | | if (sampleBits === 8) { |
| | | for (var i = 0; i < iBytes.length; i++, offset++) { |
| | | var s = Math.max(-1, Math.min(1, iBytes[i])); |
| | | var val = s < 0 ? s * 0x8000 : s * 0x7FFF; |
| | | val = parseInt(255 / (65535 / (val + 32768))); |
| | | oData.setInt8(offset, val, true); |
| | | } |
| | | } else { |
| | | for (var i = 0; i < iBytes.length; i++, offset += 2) { |
| | | var s = Math.max(-1, Math.min(1, iBytes[i])); |
| | | oData.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true); |
| | | } |
| | | } |
| | | return oData; |
| | | } |
| | | |
| | | }; |
| | | |
| | | //开始录音 |
| | | this.start = function () { |
| | | audioInput.connect(recorder); |
| | | recorder.connect(context.destination); |
| | | }; |
| | | |
| | | //停止 |
| | | this.stop = function () { |
| | | recorder.disconnect(); |
| | | |
| | | audioData.closeContext(); |
| | | } |
| | | |
| | | |
| | | var $bo=$("#inbo"); |
| | | var $change=$("#change"); |
| | | var width=$bo.width(); |
| | | //音频采集 |
| | | recorder.onaudioprocess = function (e) { |
| | | audioData.input(e.inputBuffer.getChannelData(0)); |
| | | |
| | | var data = audioData.getPureWavData(0); |
| | | if (ws != null) |
| | | ws.send(data); |
| | | |
| | | |
| | | }; |
| | | |
| | | }; |
| | | //抛出异常 |
| | | Recorder.throwError = function (message) { |
| | | throw new function () { this.toString = function () { return message; };}; |
| | | }; |
| | | //是否支持录音 |
| | | Recorder.canRecording = (navigator.getUserMedia != null); |
| | | //获取录音机 |
| | | Recorder.get = function (callback, wsock) { |
| | | if (callback) { |
| | | if (navigator.getUserMedia) { |
| | | navigator.getUserMedia( |
| | | { audio: true } //只启用音频 A |
| | | , function (stream) { //stream这个参数是麦克风的输入流,将这个流传递给Recorder |
| | | var rec = new Recorder(stream, wsock); |
| | | callback(rec); |
| | | } |
| | | , function (error) { |
| | | switch (error.code || error.name) { |
| | | case 'PERMISSION_DENIED': |
| | | case 'PermissionDeniedError': |
| | | Recorder.throwError('用户拒绝提供信息。'); |
| | | break; |
| | | case 'NOT_SUPPORTED_ERROR': |
| | | case 'NotSupportedError': |
| | | Recorder.throwError('浏览器不支持硬件设备。'); |
| | | break; |
| | | case 'MANDATORY_UNSATISFIED_ERROR': |
| | | case 'MandatoryUnsatisfiedError': |
| | | Recorder.throwError('无法发现指定的硬件设备。'); |
| | | break; |
| | | default: |
| | | Recorder.throwError('无法打开麦克风。异常信息:' + (error.code || error.name)); |
| | | break; |
| | | } |
| | | }); |
| | | } else { |
| | | Recorder.throwErr('当前浏览器不支持录音功能。'); return; |
| | | } |
| | | } |
| | | }; |
| | | window.Recorder = Recorder; |
| | | |
| | | })(window); |
New file |
| | |
| | | "use strict";var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof2(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.flvjs=e()}}(function(){var e;return function e(t,n,i){function r(a,o){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[a]={exports:{}};t[a][0].call(d.exports,function(e){var n=t[a][1][e];return r(n||e)},d,d.exports,e,t,n,i)}return n[a].exports}for(var s="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,n,i){(function(r,s){!function(t,r){"object"===(void 0===i?"undefined":_typeof2(i))&&void 0!==n?n.exports=r():"function"==typeof e&&e.amd?e(r):t.ES6Promise=r()}(this,function(){function e(e){return"function"==typeof e||"object"===(void 0===e?"undefined":_typeof2(e))&&null!==e}function n(e){return"function"==typeof e}function i(e){K=e}function a(e){q=e}function o(){return void 0!==H?function(){H(l)}:u()}function u(){var e=setTimeout;return function(){return e(l,1)}}function l(){for(var e=0;e<z;e+=2){(0,J[e])(J[e+1]),J[e]=void 0,J[e+1]=void 0}z=0}function d(e,t){var n=arguments,i=this,r=new this.constructor(f);void 0===r[ee]&&I(r);var s=i._state;return s?function(){var e=n[s-1];q(function(){return O(s,r,e,i._result)})}():L(i,r,e,t),r}function h(e){var t=this;if(e&&"object"===(void 0===e?"undefined":_typeof2(e))&&e.constructor===t)return e;var n=new t(f);return b(n,e),n}function f(){}function c(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function m(e){try{return e.then}catch(e){return re.error=e,re}}function p(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}function v(e,t,n){q(function(e){var i=!1,r=p(n,t,function(n){i||(i=!0,t!==n?b(e,n):S(e,n))},function(t){i||(i=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&r&&(i=!0,k(e,r))},e)}function g(e,t){t._state===ne?S(e,t._result):t._state===ie?k(e,t._result):L(t,void 0,function(t){return b(e,t)},function(t){return k(e,t)})}function y(e,t,i){t.constructor===e.constructor&&i===d&&t.constructor.resolve===h?g(e,t):i===re?(k(e,re.error),re.error=null):void 0===i?S(e,t):n(i)?v(e,t,i):S(e,t)}function b(t,n){t===n?k(t,c()):e(n)?y(t,n,m(n)):S(t,n)}function E(e){e._onerror&&e._onerror(e._result),w(e)}function S(e,t){e._state===te&&(e._result=t,e._state=ne,0!==e._subscribers.length&&q(w,e))}function k(e,t){e._state===te&&(e._state=ie,e._result=t,q(E,e))}function L(e,t,n,i){var r=e._subscribers,s=r.length;e._onerror=null,r[s]=t,r[s+ne]=n,r[s+ie]=i,0===s&&e._state&&q(w,e)}function w(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,r=void 0,s=e._result,a=0;a<t.length;a+=3)i=t[a],r=t[a+n],i?O(n,i,r,s):r(s);e._subscribers.length=0}}function R(){this.error=null}function A(e,t){try{return e(t)}catch(e){return se.error=e,se}}function O(e,t,i,r){var s=n(i),a=void 0,o=void 0,u=void 0,l=void 0;if(s){if(a=A(i,r),a===se?(l=!0,o=a.error,a.error=null):u=!0,t===a)return void k(t,_())}else a=r,u=!0;t._state!==te||(s&&u?b(t,a):l?k(t,o):e===ne?S(t,a):e===ie&&k(t,a))}function T(e,t){try{t(function(t){b(e,t)},function(t){k(e,t)})}catch(t){k(e,t)}}function C(){return ae++}function I(e){e[ee]=ae++,e._state=void 0,e._result=void 0,e._subscribers=[]}function x(e,t){this._instanceConstructor=e,this.promise=new e(f),this.promise[ee]||I(this.promise),V(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):k(this.promise,M())}function M(){return new Error("Array Methods must be provided an Array")}function D(e){return new x(this,e).promise}function B(e){var t=this;return new t(V(e)?function(n,i){for(var r=e.length,s=0;s<r;s++)t.resolve(e[s]).then(n,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function j(e){var t=this,n=new t(f);return k(n,e),n}function P(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function U(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function N(e){this[ee]=C(),this._result=this._state=void 0,this._subscribers=[],f!==e&&("function"!=typeof e&&P(),this instanceof N?T(this,e):U())}function F(){var e=void 0;if(void 0!==s)e=s;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=N}var G=void 0;G=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var V=G,z=0,H=void 0,K=void 0,q=function(e,t){J[z]=e,J[z+1]=t,2===(z+=2)&&(K?K(l):$())},W="undefined"!=typeof window?window:void 0,X=W||{},Y=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),Q="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,J=new Array(1e3),$=void 0;$=Z?function(){return function(){return r.nextTick(l)}}():Y?function(){var e=0,t=new Y(l),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():Q?function(){var e=new MessageChannel;return e.port1.onmessage=l,function(){return e.port2.postMessage(0)}}():void 0===W&&"function"==typeof t?function(){try{var e=t,n=e("vertx");return H=n.runOnLoop||n.runOnContext,o()}catch(e){return u()}}():u();var ee=Math.random().toString(36).substring(16),te=void 0,ne=1,ie=2,re=new R,se=new R,ae=0;return x.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===te&&n<e;n++)this._eachEntry(t[n],n)},x.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===h){var r=m(e);if(r===d&&e._state!==te)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===N){var s=new n(f);y(s,e,r),this._willSettleAt(s,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},x.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===te&&(this._remaining--,e===ie?k(i,n):this._result[t]=n),0===this._remaining&&S(i,this._result)},x.prototype._willSettleAt=function(e,t){var n=this;L(e,void 0,function(e){return n._settledAt(ne,t,e)},function(e){return n._settledAt(ie,t,e)})},N.all=D,N.race=B,N.resolve=h,N.reject=j,N._setScheduler=i,N._setAsap=a,N._asap=q,N.prototype={constructor:N,then:d,catch:function(e){return this.then(null,e)}},N.polyfill=F,N.Promise=N,N})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function s(e){return"number"==typeof e}function a(e){return"object"===(void 0===e?"undefined":_typeof2(e))&&null!==e}function o(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,u=0;u<i;u++)l[u].apply(this,s);return!0},i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,s,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],s=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(o=s;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,n){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(h===setTimeout)return setTimeout(e,0);if((h===i||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){p&&_&&(p=!1,_.length?m=_.concat(m):v=-1,m.length&&u())}function u(){if(!p){var e=s(o);p=!0;for(var t=m.length;t;){for(_=m,m=[];++v<t;)_&&_[v].run();v=-1,t=m.length}_=null,p=!1,a(e)}}function l(e,t){this.fun=e,this.array=t}function d(){}var h,f,c=t.exports={};!function(){try{h="function"==typeof setTimeout?setTimeout:i}catch(e){h=i}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var _,m=[],p=!1,v=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new l(e,t)),1!==m.length||p||s(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=d,c.addListener=d,c.once=d,c.off=d,c.removeListener=d,c.removeAllListeners=d,c.emit=d,c.prependListener=d,c.prependOnceListener=d,c.listeners=function(e){return[]},c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],4:[function(e,t,n){var i=arguments[3],r=arguments[4],s=arguments[5],a=JSON.stringify;t.exports=function(e,t){function n(e){p[e]=!0;for(var t in r[e][1]){var i=r[e][1][t];p[i]||n(i)}}for(var o,u=Object.keys(s),l=0,d=u.length;l<d;l++){var h=u[l],f=s[h].exports;if(f===e||f&&f.default===e){o=h;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var c={},l=0,d=u.length;l<d;l++){var h=u[l];c[h]=h}r[o]=[Function(["require","module","exports"],"("+e+")(self)"),c]}var _=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[o]=o,r[_]=[Function(["require"],"var f = require("+a(o)+");(f.default ? f.default : f)(self);"),m];var p={};n(_);var v="("+i+")({"+Object.keys(p).map(function(e){return a(e)+":["+r[e][0]+","+a(r[e][1])+"]"}).join(",")+"},{},["+a(_)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return y;var b=g.createObjectURL(y),E=new Worker(b);return E.objectURL=b,E}},{}],5:[function(e,t,n){function i(){return Object.assign({},r)}Object.defineProperty(n,"__esModule",{value:!0}),n.createDefaultConfig=i;var r=n.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1}},{}],6:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("../io/io-controller.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=e("../config.js"),u=function(){function e(){i(this,e)}return r(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new a.default({},(0,o.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new a.default({},(0,o.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){void 0==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}();n.default=u},{"../config.js":5,"../io/io-controller.js":23}],7:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return r(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,i=e.length-1,r=0,s=0,a=i;for(t<e[0]&&(n=0,s=a+1);s<=a;){if((r=s+Math.floor((a-s)/2))===i||t>=e[r]&&t<e[r+1]){n=r;break}e[r]<t?s=r+1:a=r-1}return n}}]),e}();n.default=s},{}],8:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();n.SampleInfo=function e(t,n,r,s,a){i(this,e),this.dts=t,this.pts=n,this.duration=r,this.originalDts=s,this.isSyncPoint=a,this.fileposition=null},n.MediaSegmentInfo=function(){function e(){i(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return r(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),n.IDRSampleList=function(){function e(){i(this,e),this._list=[]}return r(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,i=t.length-1,r=0,s=0,a=i;for(e<t[0].dts&&(n=0,s=a+1);s<=a;){if((r=s+Math.floor((a-s)/2))===i||e>=t[r].dts&&e<t[r+1].dts){n=r;break}t[r].dts<e?s=r+1:a=r-1}return this._list[n]}}]),e}(),n.MediaSegmentInfoList=function(){function e(t){i(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return r(e,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,i=0,r=0,s=n,a=0;if(e<t[0].originalBeginDts)return a=-1;for(;r<=s;){if((i=r+Math.floor((s-r)/2))===n||e>t[i].lastSample.originalDts&&e<t[i+1].originalBeginDts){a=i;break}t[i].originalBeginDts<e?r=i+1:s=i-1}return a}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,i=this._lastAppendLocation,r=0;-1!==i&&i<t.length&&n.originalBeginDts>=t[i].lastSample.originalDts&&(i===t.length-1||i<t.length-1&&n.originalBeginDts<t[i+1].originalBeginDts)?r=i+1:t.length>0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},{}],9:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("../utils/logger.js"),l=i(u),d=e("../utils/browser.js"),h=i(d),f=e("./mse-events.js"),c=i(f),_=e("./media-segment-info.js"),m=e("../utils/exception.js"),p=function(){function e(t){r(this,e),this.TAG="MSEController",this._config=t,this._emitter=new o.default,this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new _.IDRSampleList}return s(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var i=this._sourceBuffers[t];i&&("closed"!==e.readyState&&(e.removeSourceBuffer(i),i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)),this._mimeTypes[t]=null,this._sourceBuffers[t]=null)}if("open"===e.readyState)try{e.endOfStream()}catch(e){l.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,i=""+n.container;n.codec&&n.codec.length>0&&(i+=";codecs="+n.codec);var r=!1;if(l.default.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])l.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+i);else if(r=!0,null==this._sourceBuffers[n.type])try{l.default.v(this.TAG,"mediaSource.addSourceBuffer: "+i);var s=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);s.addEventListener("error",this.e.onSourceBufferError),s.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return l.default.e(this.TAG,e.message),void this._emitter.emit(c.default.ERROR,{code:e.code,msg:e.message})}this._mimeTypes[n.type]=i}t||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),h.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){l.default.e(this.TAG,e.message)}this._idrList.clear();var i=this._pendingSegments[t];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r<n.buffered.length;r++){var s=n.buffered.start(r),a=n.buffered.end(r);this._pendingRemoveRanges[t].push({start:s,end:a})}if(n.updating||this._doRemoveRanges(),h.default.safari){var o=this._lastInitSegments[t];o&&(this._pendingSegments[t].push(o),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;if(!e||"open"!==e.readyState)return void(e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0));t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream())}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var i=n.buffered;if(i.length>=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var i=n.buffered,r=!1,s=0;s<i.length;s++){var a=i.start(s),o=i.end(s);if(a<=e&&e<o+3){if(e-a>=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:a,end:u})}}else o<e&&(r=!0,this._pendingRemoveRanges[t].push({start:a,end:o}))}r&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(l.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var i=n.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,r=n.timestampOffset/1e3,s=Math.abs(i-r);s>.1&&(l.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(c.default.BUFFER_FULL),this._isBufferFull=!0):(l.default.e(this.TAG,e.message),this._emitter.emit(c.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(l.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(c.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){l.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){l.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(c.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){l.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();n.default=p},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./media-segment-info.js":8,"./mse-events.js":10,events:2}],10:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};n.default=i},{}],11:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")} |
| | | Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("../utils/logger.js"),l=i(u),d=e("../utils/logging-control.js"),h=i(d),f=e("./transmuxing-controller.js"),c=i(f),_=e("./transmuxing-events.js"),m=i(_),p=e("./transmuxing-worker.js"),v=i(p),g=e("./media-info.js"),y=i(g),b=function(){function t(n,i){if(r(this,t),this.TAG="Transmuxer",this._emitter=new o.default,i.enableWorker&&"undefined"!=typeof Worker)try{var s=e("webworkify");this._worker=s(v.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[n,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},h.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:h.default.getConfig()})}catch(e){l.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new c.default(n,i)}else this._controller=new c.default(n,i);if(this._controller){var a=this._controller;a.on(m.default.IO_ERROR,this._onIOError.bind(this)),a.on(m.default.DEMUX_ERROR,this._onDemuxError.bind(this)),a.on(m.default.INIT_SEGMENT,this._onInitSegment.bind(this)),a.on(m.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),a.on(m.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),a.on(m.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),a.on(m.default.MEDIA_INFO,this._onMediaInfo.bind(this)),a.on(m.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),a.on(m.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return s(t,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),h.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.INIT_SEGMENT,e,t)})}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.MEDIA_SEGMENT,e,t)})}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.MEDIA_INFO,e)})}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.STATISTICS_INFO,e)})}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.IO_ERROR,e,t)})}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then(function(){n._emitter.emit(m.default.DEMUX_ERROR,e,t)})}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.RECOMMEND_SEEKPOINT,e)})}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case m.default.INIT_SEGMENT:case m.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case m.default.LOADING_COMPLETE:case m.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case m.default.MEDIA_INFO:Object.setPrototypeOf(n,y.default.prototype),this._emitter.emit(t.msg,n);break;case m.default.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case m.default.IO_ERROR:case m.default.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case m.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":l.default.emitter.emit("log",n.type,n.logcat)}}}]),t}();n.default=b},{"../utils/logger.js":41,"../utils/logging-control.js":42,"./media-info.js":7,"./transmuxing-controller.js":12,"./transmuxing-events.js":13,"./transmuxing-worker.js":14,events:2,webworkify:4}],12:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("../utils/logger.js"),l=i(u),d=e("../utils/browser.js"),h=i(d),f=e("./media-info.js"),c=i(f),_=e("../demux/flv-demuxer.js"),m=i(_),p=e("../remux/mp4-remuxer.js"),v=i(p),g=e("../demux/demux-errors.js"),y=i(g),b=e("../io/io-controller.js"),E=i(b),S=e("./transmuxing-events.js"),k=i(S),L=(e("../io/loader.js"),function(){function e(t,n){r(this,e),this.TAG="TransmuxingController",this._emitter=new o.default,this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach(function(e){e.timestampBase=i,i+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)}),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return s(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],i=this._ioctl=new E.default(n,this._config,e);i.onError=this._onIOException.bind(this),i.onSeeked=this._onIOSeeked.bind(this),i.onComplete=this._onIOComplete.bind(this),i.onRedirect=this._onIORedirect.bind(this),i.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):i.onDataArrival=this._onInitChunkArrival.bind(this),i.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(void 0==n)this._pendingSeekTime=e;else{var i=n.getNearestKeyframe(e);this._remuxer.seek(i.milliseconds),this._ioctl.seek(i.fileposition),this._pendingResolveSeekPoint=i.milliseconds}}else{var r=this._mediaInfo.segments[t];if(void 0==r)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var s=r.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,s.fileposition),this._pendingResolveSeekPoint=s.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,i=0;i<t.length;i++)if(e<t[i].timestampBase){n=i-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,i=null,r=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((i=m.default.probe(e)).match){this._demuxer=new m.default(i,this._config),this._remuxer||(this._remuxer=new v.default(this._config));var s=this._mediaDataSource;void 0==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else i=null,l.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(k.default.DEMUX_ERROR,y.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,c.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,c.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e,n=t+1;n<this._mediaDataSource.segments.length?(this._internalAbort(),this._loadSegment(n)):(this._remuxer.flushStashedSamples(),this._emitter.emit(k.default.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(k.default.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){l.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(k.default.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){l.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(k.default.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(k.default.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(k.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,h.default.safari&&n.length>0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(k.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(k.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(k.default.STATISTICS_INFO,e)}}]),e}());n.default=L},{"../demux/demux-errors.js":16,"../demux/flv-demuxer.js":18,"../io/io-controller.js":23,"../io/loader.js":24,"../remux/mp4-remuxer.js":38,"../utils/browser.js":39,"../utils/logger.js":41,"./media-info.js":7,"./transmuxing-events.js":13,events:2}],13:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};n.default=i},{}],14:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=e("../utils/logger.js"),s=(i(r),e("../utils/logging-control.js")),a=i(s),o=e("../utils/polyfill.js"),u=i(o),l=e("./transmuxing-controller.js"),d=i(l),h=e("./transmuxing-events.js"),f=i(h),c=function(e){function t(t,n){var i={msg:f.default.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function n(t,n){var i={msg:f.default.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function i(){var t={msg:f.default.LOADING_COMPLETE};e.postMessage(t)}function r(){var t={msg:f.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function s(t){var n={msg:f.default.MEDIA_INFO,data:t};e.postMessage(n)}function o(t){var n={msg:f.default.STATISTICS_INFO,data:t};e.postMessage(n)}function l(t,n){e.postMessage({msg:f.default.IO_ERROR,data:{type:t,info:n}})}function h(t,n){e.postMessage({msg:f.default.DEMUX_ERROR,data:{type:t,info:n}})}function c(t){e.postMessage({msg:f.default.RECOMMEND_SEEKPOINT,data:t})}function _(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}var m=null,p=_.bind(this);u.default.install(),e.addEventListener("message",function(u){switch(u.data.cmd){case"init":m=new d.default(u.data.param[0],u.data.param[1]),m.on(f.default.IO_ERROR,l.bind(this)),m.on(f.default.DEMUX_ERROR,h.bind(this)),m.on(f.default.INIT_SEGMENT,t.bind(this)),m.on(f.default.MEDIA_SEGMENT,n.bind(this)),m.on(f.default.LOADING_COMPLETE,i.bind(this)),m.on(f.default.RECOVERED_EARLY_EOF,r.bind(this)),m.on(f.default.MEDIA_INFO,s.bind(this)),m.on(f.default.STATISTICS_INFO,o.bind(this)),m.on(f.default.RECOMMEND_SEEKPOINT,c.bind(this));break;case"destroy":m&&(m.destroy(),m=null),e.postMessage({msg:"destroyed"});break;case"start":m.start();break;case"stop":m.stop();break;case"seek":m.seek(u.data.param);break;case"pause":m.pause();break;case"resume":m.resume();break;case"logging_config":var _=u.data.param;a.default.applyConfig(_),!0===_.enableCallback?a.default.addLogListener(p):a.default.removeLogListener(p)}})};n.default=c},{"../utils/logger.js":41,"../utils/logging-control.js":42,"../utils/polyfill.js":43,"./transmuxing-controller.js":12,"./transmuxing-events.js":13}],15:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=i(a),u=e("../utils/utf8-conv.js"),l=i(u),d=e("../utils/exception.js"),h=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),f=function(){function e(){r(this,e)}return s(e,null,[{key:"parseScriptData",value:function(t,n,i){var r={};try{var s=e.parseValue(t,n,i),a=e.parseValue(t,n+s.size,i-s.size);r[s.data]=a.data}catch(e){o.default.e("AMF",e.toString())}return r}},{key:"parseObject",value:function(t,n,i){if(i<3)throw new d.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,n,i),s=e.parseValue(t,n+r.size,i-r.size),a=s.objectEnd;return{data:{name:r.data,value:s.data},size:r.size+s.size,objectEnd:a}}},{key:"parseVariable",value:function(t,n,i){return e.parseObject(t,n,i)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new d.IllegalStateException("Data not enough when parse String");var i=new DataView(e,t,n),r=i.getUint16(0,!h),s=void 0;return s=r>0?(0,l.default)(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new d.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,n),r=i.getUint32(0,!h),s=void 0;return s=r>0?(0,l.default)(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new d.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,n),r=i.getFloat64(0,!h);return r+=60*i.getInt16(8,!h)*1e3,{data:new Date(r),size:10}}},{key:"parseValue",value:function(t,n,i){if(i<1)throw new d.IllegalStateException("Data not enough when parse Value");var r=new DataView(t,n,i),s=1,a=r.getUint8(0),u=void 0,l=!1;try{switch(a){case 0:u=r.getFloat64(1,!h),s+=8;break;case 1:u=!!r.getUint8(1),s+=1;break;case 2:var f=e.parseString(t,n+1,i-1);u=f.data,s+=f.size;break;case 3:u={};var c=0;for(9==(16777215&r.getUint32(i-4,!h))&&(c=3);s<i-4;){var _=e.parseObject(t,n+s,i-s-c);if(_.objectEnd)break;u[_.data.name]=_.data.value,s+=_.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!h))&&(s+=3)}break;case 8:u={},s+=4;var m=0;for(9==(16777215&r.getUint32(i-4,!h))&&(m=3);s<i-8;){var p=e.parseVariable(t,n+s,i-s-m);if(p.objectEnd)break;u[p.data.name]=p.data.value,s+=p.size}if(s<=i-3){9===(16777215&r.getUint32(s-1,!h))&&(s+=3)}break;case 9:u=void 0,s=1,l=!0;break;case 10:u=[];var v=r.getUint32(1,!h);s+=4;for(var g=0;g<v;g++){var y=e.parseValue(t,n+s,i-s);u.push(y.data),s+=y.size}break;case 11:var b=e.parseDate(t,n+1,i-1);u=b.data,s+=b.size;break;case 12:var E=e.parseString(t,n+1,i-1);u=E.data,s+=E.size;break;default:s=i,o.default.w("AMF","Unsupported AMF value type "+a)}}catch(e){o.default.e("AMF",e.toString())}return{data:u,size:s,objectEnd:l}}}]),e}();n.default=f},{"../utils/exception.js":40,"../utils/logger.js":41,"../utils/utf8-conv.js":44}],16:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};n.default=i},{}],17:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("../utils/exception.js"),a=function(){function e(t){i(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return r(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new s.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new s.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var r=Math.min(i,this._current_word_bits_left),a=this._current_word>>>32-r;return this._current_word<<=r,this._current_word_bits_left-=r,n=n<<r|a}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e=void 0;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();n.default=a},{"../utils/exception.js":40}],18:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=e("../utils/logger.js"),l=i(u),d=e("./amf-parser.js"),h=i(d),f=e("./sps-parser.js"),c=i(f),_=e("./demux-errors.js"),m=i(_),p=e("../core/media-info.js"),v=i(p),g=e("../utils/exception.js"),y=function(){function e(t,n){r(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasRecvAudio=!1,this._lastAudioPts=0,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new v.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return o(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new v.default}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new g.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0,r=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;i=e.probe(t).dataOffset}if(this._firstParse){this._firstParse=!1,n+i!==this._dataOffset&&l.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");0!==new DataView(t,i).getUint32(0,!r)&&l.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}for(;i<t.byteLength;){this._dispatch=!0;var s=new DataView(t,i);if(i+11+4>t.byteLength)break;var a=s.getUint8(0),o=16777215&s.getUint32(0,!r);if(i+11+o+4>t.byteLength)break;if(8===a||9===a||18===a){var u=s.getUint8(4),d=s.getUint8(5),h=s.getUint8(6),f=s.getUint8(7),c=h|d<<8|u<<16|f<<24;0!==(16777215&s.getUint32(7,!r))&&l.default.w(this.TAG,"Meet tag which has StreamID != 0!");var _=i+11;switch(a){case 8:this._parseAudioData(t,_,o,c);break;case 9:if(this._parseVideoData(t,_,o,c,n+i),this._videoTrack.length>0&&this._videoTrack.samples.length>0&&this._hasVideo&&!this._hasRecvAudio&&this._audioMetadata){var m=this._videoTrack.samples[this._videoTrack.samples.length-1].pts;if(0==this._lastAudioPts&&(this._lastAudioPts=m),this._lastAudioPts<m&&m-this._lastAudioPts>=this._audioMetadata.refSampleDuration){this._lastAudioPts+=this._audioMetadata.refSampleDuration;var p=new Uint8Array([0,200,0,128,35,128]);p&&(this._audioTrack.samples.push({unit:p,length:p.byteLength,dts:this._lastAudioPts,pts:this._lastAudioPts}),this._audioTrack.length+=p.byteLength)}}break;case 18:this._parseScriptData(t,_,o)}var v=s.getUint32(11+o,!r);v!==11+o&&l.default.w(this.TAG,"Invalid PrevTagSize "+v),i+=11+o+4}else l.default.w(this.TAG,"Unsupported tag type "+a+", skipped"),i+=11+o+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(e,t,n){var i=h.default.parseScriptData(e,t,n);if(i.hasOwnProperty("onMetaData")){if(null==i.onMetaData||"object"!==a(i.onMetaData))return void l.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&l.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=i;var r=this._metadata.onMetaData;if("boolean"==typeof r.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=r.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof r.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=r.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof r.audiodatarate&&(this._mediaInfo.audioDataRate=r.audiodatarate),"number"==typeof r.videodatarate&&(this._mediaInfo.videoDataRate=r.videodatarate),"number"==typeof r.width&&(this._mediaInfo.width=r.width),"number"==typeof r.height&&(this._mediaInfo.height=r.height),"number"==typeof r.duration){if(!this._durationOverrided){var s=Math.floor(r.duration*this._timescale);this._duration=s,this._mediaInfo.duration=s}}else this._mediaInfo.duration=0;if("number"==typeof r.framerate){var o=Math.floor(1e3*r.framerate);if(o>0){var u=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if("object"===a(r.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var d=r.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(d),r.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=r,l.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],i=1;i<e.times.length;i++){var r=this._timestampBase+Math.floor(1e3*e.times[i]);t.push(r),n.push(e.filepositions[i])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,i){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){var r=(this._littleEndian,new DataView(e,t,n)),s=r.getUint8(0),a=s>>>4;if(2!==a&&10!==a)return void this._onError(m.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a);var o=0,u=(12&s)>>>2;if(!(u>=0&&u<=4))return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u);o=this._flvSoundRateTable[u];var d=1&s,h=this._audioMetadata,f=this._audioTrack;if(h||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),h=this._audioMetadata={},h.type="audio",h.id=f.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=o,h.channelCount=0===d?1:2),10===a){var c=this._parseAACAudioData(e,t+1,n-1);if(void 0==c)return;if(0===c.packetType){h.config&&l.default.w(this.TAG,"Found another AudioSpecificConfig!");var _=c.data;h.audioSampleRate=_.samplingRate,h.channelCount=_.channelCount,h.codec=_.codec,h.originalCodec=_.originalCodec,h.config=_.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,l.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",h);var p=this._mediaInfo;p.audioCodec=h.originalCodec,p.audioSampleRate=h.audioSampleRate,p.audioChannelCount=h.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===c.packetType){var v=this._timestampBase+i,g={unit:c.data,length:c.data.byteLength,dts:v,pts:v};f.samples.push(g),f.length+=c.data.length,this._hasRecvAudio=!0 |
| | | }else l.default.e(this.TAG,"Flv: Unsupported AAC data type "+c.packetType)}else if(2===a){if(!h.codec){var y=this._parseMP3AudioData(e,t+1,n-1,!0);if(void 0==y)return;h.audioSampleRate=y.samplingRate,h.channelCount=y.channelCount,h.codec=y.codec,h.originalCodec=y.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,l.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);var b=this._mediaInfo;b.audioCodec=h.codec,b.audioSampleRate=h.audioSampleRate,b.audioChannelCount=h.channelCount,b.audioDataRate=y.bitRate,b.hasVideo?null!=b.videoCodec&&(b.mimeType='video/x-flv; codecs="'+b.videoCodec+","+b.audioCodec+'"'):b.mimeType='video/x-flv; codecs="'+b.audioCodec+'"',b.isComplete()&&this._onMediaInfo(b)}var E=this._parseMP3AudioData(e,t+1,n-1,!1);if(void 0==E)return;var S=this._timestampBase+i,k={unit:E,length:E.byteLength,dts:S,pts:S};f.samples.push(k),f.length+=E.length}}}},{key:"_parseAACAudioData",value:function(e,t,n){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");var i={},r=new Uint8Array(e,t,n);return i.packetType=r[0],0===r[0]?i.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):i.data=r.subarray(1),i}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var i=new Uint8Array(e,t,n),r=null,s=0,a=0,o=0,u=null;if(s=a=i[0]>>>3,(o=(7&i[0])<<1|i[1]>>>7)<0||o>=this._mpegSamplingRates.length)return void this._onError(m.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");var l=this._mpegSamplingRates[o],d=(120&i[1])>>>3;if(d<0||d>=8)return void this._onError(m.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===s&&(u=(7&i[1])<<1|i[2]>>>7,i[2]);var h=self.navigator.userAgent.toLowerCase();return-1!==h.indexOf("firefox")?o>=6?(s=5,r=new Array(4),u=o-3):(s=2,r=new Array(2),u=o):-1!==h.indexOf("android")?(s=2,r=new Array(2),u=o):(s=5,u=o,r=new Array(4),o>=6?u=o-3:1===d&&(s=2,r=new Array(2),u=o)),r[0]=s<<3,r[0]|=(15&o)>>>1,r[1]=(15&o)<<7,r[1]|=(15&d)<<3,5===s&&(r[1]|=(15&u)>>>1,r[2]=(1&u)<<7,r[2]|=8,r[3]=0),{config:r,samplingRate:l,channelCount:d,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+a}}},{key:"_parseMP3AudioData",value:function(e,t,n,i){if(n<4)return void l.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");var r=(this._littleEndian,new Uint8Array(e,t,n)),s=null;if(i){if(255!==r[0])return;var a=r[1]>>>3&3,o=(6&r[1])>>1,u=(240&r[2])>>>4,d=(12&r[2])>>>2,h=r[3]>>>6&3,f=3!==h?2:1,c=0,_=0;switch(a){case 0:c=this._mpegAudioV25SampleRateTable[d];break;case 2:c=this._mpegAudioV20SampleRateTable[d];break;case 3:c=this._mpegAudioV10SampleRateTable[d]}switch(o){case 1:34,u<this._mpegAudioL3BitRateTable.length&&(_=this._mpegAudioL3BitRateTable[u]);break;case 2:33,u<this._mpegAudioL2BitRateTable.length&&(_=this._mpegAudioL2BitRateTable[u]);break;case 3:32,u<this._mpegAudioL1BitRateTable.length&&(_=this._mpegAudioL1BitRateTable[u])}s={bitRate:_,samplingRate:c,channelCount:f,codec:"mp3",originalCodec:"mp3"}}else s=r;return s}},{key:"_parseVideoData",value:function(e,t,n,i,r){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var s=new Uint8Array(e,t,n)[0],a=(240&s)>>>4,o=15&s;if(7!==o)return void this._onError(m.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+o);this._parseAVCVideoPacket(e,t+1,n-1,i,r,a)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,i,r,s){if(n<4)return void l.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");var a=this._littleEndian,o=new DataView(e,t,n),u=o.getUint8(0),d=16777215&o.getUint32(0,!a),h=d<<8>>8;if(0===u)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===u)this._parseAVCVideoData(e,t+4,n-4,i,r,s,h);else if(2!==u)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)return void l.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");var i=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,a=new DataView(e,t,n);i?void 0!==i.avcc&&l.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),i=this._videoMetadata={},i.type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);var o=a.getUint8(0),u=a.getUint8(1);a.getUint8(2),a.getUint8(3);if(1!==o||0===u)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&a.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(m.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));var d=31&a.getUint8(5);if(0===d)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");d>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+d);for(var h=6,f=0;f<d;f++){var _=a.getUint16(h,!s);if(h+=2,0!==_){var p=new Uint8Array(e,t+h,_);h+=_;var v=c.default.parseSPS(p);if(0===f){i.codecWidth=v.codec_size.width,i.codecHeight=v.codec_size.height,i.presentWidth=v.present_size.width,i.presentHeight=v.present_size.height,i.profile=v.profile_string,i.level=v.level_string,i.bitDepth=v.bit_depth,i.chromaFormat=v.chroma_format,i.sarRatio=v.sar_ratio,i.frameRate=v.frame_rate,!1!==v.frame_rate.fixed&&0!==v.frame_rate.fps_num&&0!==v.frame_rate.fps_den||(i.frameRate=this._referenceFrameRate);var g=i.frameRate.fps_den,y=i.frameRate.fps_num;i.refSampleDuration=i.timescale*(g/y);for(var b=p.subarray(1,4),E="avc1.",S=0;S<3;S++){var k=b[S].toString(16);k.length<2&&(k="0"+k),E+=k}i.codec=E;var L=this._mediaInfo;L.width=i.codecWidth,L.height=i.codecHeight,L.fps=i.frameRate.fps,L.profile=i.profile,L.level=i.level,L.refFrames=v.ref_frames,L.chromaFormat=v.chroma_format_string,L.sarNum=i.sarRatio.width,L.sarDen=i.sarRatio.height,L.videoCodec=E,L.hasAudio?null!=L.audioCodec&&(L.mimeType='video/x-flv; codecs="'+L.videoCodec+","+L.audioCodec+'"'):L.mimeType='video/x-flv; codecs="'+L.videoCodec+'"',L.isComplete()&&this._onMediaInfo(L)}}}var w=a.getUint8(h);if(0===w)return void this._onError(m.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");w>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+w),h++;for(var R=0;R<w;R++){var A=a.getUint16(h,!s);h+=2,0!==A&&(h+=A)}i.avcc=new Uint8Array(n),i.avcc.set(new Uint8Array(e,t,n),0),l.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",i)}},{key:"_parseAVCVideoData",value:function(e,t,n,i,r,s,a){for(var o=this._littleEndian,u=new DataView(e,t,n),d=[],h=0,f=0,c=this._naluLengthSize,_=this._timestampBase+i,m=1===s;f<n;){if(f+4>=n){l.default.w(this.TAG,"Malformed Nalu near timestamp "+_+", offset = "+f+", dataSize = "+n);break}var p=u.getUint32(f,!o);if(3===c&&(p>>>=8),p>n-c)return void l.default.w(this.TAG,"Malformed Nalus near timestamp "+_+", NaluSize > DataSize!");var v=31&u.getUint8(f+c);5===v&&(m=!0);var g=new Uint8Array(e,t+f,c+p),y={type:v,data:g};d.push(y),h+=g.byteLength,f+=c+p}if(d.length){var b=this._videoTrack,E={units:d,length:h,isKeyframe:m,dts:_,cts:a,pts:_+a};m&&(E.fileposition=r),b.samples.push(E),b.length+=h}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var i=(4&t[4])>>>2!=0,r=0!=(1&t[4]),a=s(t,5);return a<9?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:i,hasVideoTrack:r}}}]),e}();n.default=y},{"../core/media-info.js":7,"../utils/exception.js":40,"../utils/logger.js":41,"./amf-parser.js":15,"./demux-errors.js":16,"./sps-parser.js":19}],19:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("./exp-golomb.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=function(){function e(){i(this,e)}return r(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,i=new Uint8Array(n),r=0,s=0;s<n;s++)s>=2&&3===t[s]&&0===t[s-1]&&0===t[s-2]||(i[r]=t[s],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),i=new a.default(n);i.readByte();var r=i.readByte();i.readByte();var s=i.readByte();i.readUEG();var o=e.getProfileString(r),u=e.getLevelString(s),l=1,d=420,h=[0,420,422,444],f=8;if((100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r)&&(l=i.readUEG(),3===l&&i.readBits(1),l<=3&&(d=h[l]),f=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var c=3!==l?8:12,_=0;_<c;_++)i.readBool()&&(_<6?e._skipScalingList(i,16):e._skipScalingList(i,64));i.readUEG();var m=i.readUEG();if(0===m)i.readUEG();else if(1===m){i.readBits(1),i.readSEG(),i.readSEG();for(var p=i.readUEG(),v=0;v<p;v++)i.readSEG()}var g=i.readUEG();i.readBits(1);var y=i.readUEG(),b=i.readUEG(),E=i.readBits(1);0===E&&i.readBits(1),i.readBits(1);var S=0,k=0,L=0,w=0;i.readBool()&&(S=i.readUEG(),k=i.readUEG(),L=i.readUEG(),w=i.readUEG());var R=1,A=1,O=0,T=!0,C=0,I=0;if(i.readBool()){if(i.readBool()){var x=i.readByte(),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],D=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];x>0&&x<16?(R=M[x-1],A=D[x-1]):255===x&&(R=i.readByte()<<8|i.readByte(),A=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var B=i.readBits(32),j=i.readBits(32);T=i.readBool(),C=j,I=2*B,O=C/I}}var P=1;1===R&&1===A||(P=R/A);var U=0,N=0;if(0===l)U=1,N=2-E;else{var F=3===l?1:2,G=1===l?2:1;U=F,N=G*(2-E)}var V=16*(y+1),z=16*(b+1)*(2-E);V-=(S+k)*U,z-=(L+w)*N;var H=Math.ceil(V*P);return i.destroy(),i=null,{profile_string:o,level_string:u,bit_depth:f,ref_frames:g,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:T,fps:O,fps_den:I,fps_num:C},sar_ratio:{width:R,height:A},codec_size:{width:V,height:z},present_size:{width:H,height:z}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,i=8,r=0,s=0;s<t;s++)0!==i&&(r=e.readSEG(),i=(n+r+256)%256),n=0===i?n:i}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();n.default=o},{"./exp-golomb.js":17}],20:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=e;if(null==n||"object"!==(void 0===n?"undefined":o(n)))throw new E.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new E.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new c.default(n,t);default:return new m.default(n,t)}}function s(){return h.default.supportMSEH264Playback()}function a(){return h.default.getFeatureList()}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},u=e("./utils/polyfill.js"),l=i(u),d=e("./core/features.js"),h=i(d),f=e("./player/flv-player.js"),c=i(f),_=e("./player/native-player.js"),m=i(_),p=e("./player/player-events.js"),v=i(p),g=e("./player/player-errors.js"),y=e("./utils/logging-control.js"),b=i(y),E=e("./utils/exception.js");l.default.install();var S={};S.createPlayer=r,S.isSupported=s,S.getFeatureList=a,S.Events=v.default,S.ErrorTypes=g.ErrorTypes,S.ErrorDetails=g.ErrorDetails,S.FlvPlayer=c.default,S.NativePlayer=m.default,S.LoggingControl=b.default,Object.defineProperty(S,"version",{enumerable:!0,get:function(){return"1.4.0"}}),n.default=S},{"./core/features.js":6,"./player/flv-player.js":32,"./player/native-player.js":33,"./player/player-errors.js":34,"./player/player-events.js":35,"./utils/exception.js":40,"./utils/logging-control.js":42,"./utils/polyfill.js":43}],21:[function(e,t,n){t.exports=e("./flv.js").default},{"./flv.js":20}],22:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},u=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=e("../utils/logger.js"),h=(i(d),e("../utils/browser.js")),f=i(h),c=e("./loader.js"),_=e("../utils/exception.js"),m=function(e){function t(e,n){r(this,t);var i=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"fetch-stream-loader"));return i.TAG="FetchStreamLoader",i._seekHandler=e,i._config=n,i._needStash=!0,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}return a(t,e),l(t,null,[{key:"isSupported",value:function(){try{var e=f.default.msedge&&f.default.version.minor>=15048,t=!f.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),l(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);var r=this._seekHandler.getConfig(i,t),s=new self.Headers;if("object"===o(r.headers)){var a=r.headers;for(var u in a)a.hasOwnProperty(u)&&s.append(u,a[u])}var l={method:"GET",headers:s,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};!1===e.cors&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=c.LoaderStatus.kConnecting,self.fetch(r.url,l).then(function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=c.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==r.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=c.LoaderStatus.kError,!n._onError)throw new _.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(c.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(function(e){if(n._status=c.LoaderStatus.kError,!n._onError)throw e;n._onError(c.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then(function(n){if(n.done)t._status=c.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=c.LoaderStatus.kComplete,e.cancel();t._status=c.LoaderStatus.kBuffering;var i=n.value.buffer,r=t._range.from+t._receivedLength;t._receivedLength+=i.byteLength,t._onDataArrival&&t._onDataArrival(i,r,t._receivedLength),t._pump(e)}}).catch(function(e){if(11!==e.code||!f.default.msedge){t._status=c.LoaderStatus.kError;var n=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=c.LoaderErrors.EXCEPTION,i={code:e.code,msg:e.message}):(n=c.LoaderErrors.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new _.RuntimeException(i.msg);t._onError(n,i)}})}}]),t}(c.BaseLoader);n.default=m},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],23:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=i(a),u=e("./speed-sampler.js"),l=i(u),d=e("./loader.js"),h=e("./fetch-stream-loader.js"),f=i(h),c=e("./xhr-moz-chunked-loader.js"),_=i(c),m=e("./xhr-msstream-loader.js"),p=(i(m),e("./xhr-range-loader.js")),v=i(p),g=e("./websocket-loader.js"),y=i(g),b=e("./range-seek-handler.js"),E=i(b),S=e("./param-seek-handler.js"),k=i(S),L=e("../utils/exception.js"),w=function(){function e(t,n,i){r(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,void 0!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new l.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return s(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new E.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new k.default(t,n)}else{if("custom"!==e.seekType)throw new L.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new L.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(this._isWebSocketURL)this._loaderClass=y.default;else if(f.default.isSupported())this._loaderClass=f.default;else if(_.default.isSupported())this._loaderClass=_.default;else{if(!v.default.isSupported())throw new L.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=v.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new L.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(i,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,i=0,r=0,s=n;if(e<t[0])return t[0];for(;r<=s;){if((i=r+Math.floor((s-r)/2))===n||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?r=i+1:s=i-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive?e:e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new L.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var i=this._speedSampler.lastSecondKBps;if(0!==i){var r=this._normalizeSpeed(i);this._speedNormalized!==r&&(this._speedNormalized=r,this._adjustStashSize(r))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){var s=new Uint8Array(this._stashBuffer,0,this._stashSize);s.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var a=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var o=this._stashBuffer.slice(0,this._stashUsed),u=this._dispatchChunks(o,this._stashByteStart);if(u<o.byteLength){if(u>0){var l=new Uint8Array(o,u);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=u}}else this._stashUsed=0,this._stashByteStart+=u;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var d=this._dispatchChunks(e,t);if(d<e.byteLength){var h=e.byteLength-d;h>this._bufferSize&&(this._expandBuffer(h),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,d),0),this._stashUsed+=h,this._stashByteStart=t+d}}}else if(0===this._stashUsed){var f=this._dispatchChunks(e,t);if(f<e.byteLength){var c=e.byteLength-f;c>this._bufferSize&&this._expandBuffer(c);var _=new Uint8Array(this._stashBuffer,0,this._bufferSize);_.set(new Uint8Array(e,f),0),this._stashUsed+=c,this._stashByteStart=t+f}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var m=new Uint8Array(this._stashBuffer,0,this._bufferSize);m.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p<this._stashUsed&&p>0){var v=new Uint8Array(this._stashBuffer,p);m.set(v,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var r=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,n);r.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=n}return 0}o.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(o.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case d.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(o.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case d.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case d.LoaderErrors.CONNECTING_TIMEOUT:case d.LoaderErrors.HTTP_STATUS_CODE_INVALID:case d.LoaderErrors.EXCEPTION:}if(!this._onError)throw new L.RuntimeException("IOException: "+t.msg);this._onError(e,t)}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===v.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}]),e}();n.default=w},{"../utils/exception.js":40,"../utils/logger.js":41,"./fetch-stream-loader.js":22,"./loader.js":24,"./param-seek-handler.js":25,"./range-seek-handler.js":26,"./speed-sampler.js":27,"./websocket-loader.js":28,"./xhr-moz-chunked-loader.js":29,"./xhr-msstream-loader.js":30,"./xhr-range-loader.js":31}],24:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.BaseLoader=n.LoaderErrors=n.LoaderStatus=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("../utils/exception.js"),a=n.LoaderStatus={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4};n.LoaderErrors={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},n.BaseLoader=function(){function e(t){i(this,e),this._type=t||"undefined",this._status=a.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return r(e,[{key:"destroy",value:function(){this._status=a.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===a.kConnecting||this._status===a.kBuffering}},{key:"open",value:function(e,t){ |
| | | throw new s.NotImplementedException("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new s.NotImplementedException("Unimplemented abstract function!")}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}}]),e}()},{"../utils/exception.js":40}],25:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(t,n){i(this,e),this._startName=t,this._endName=n}return r(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var i=!0;-1===n.indexOf("?")&&(n+="?",i=!1),i&&(n+="&"),n+=this._startName+"="+t.from.toString(),-1!==t.to&&(n+="&"+this._endName+"="+t.to.toString())}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,i=e.indexOf("?");-1!==i&&(n=e.substring(i+1));var r="";if(void 0!=n&&n.length>0)for(var s=n.split("&"),a=0;a<s.length;a++){var o=s[a].split("="),u=a>0;o[0]!==this._startName&&o[0]!==this._endName&&(u&&(r+="&"),r+=s[a])}return 0===r.length?t:t+"?"+r}}]),e}();n.default=s},{}],26:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(t){i(this,e),this._zeroStart=t||!1}return r(e,[{key:"getConfig",value:function(e,t){var n={};if(0!==t.from||-1!==t.to){var i=void 0;i=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",n.Range=i}else this._zeroStart&&(n.Range="bytes=0-");return{url:e,headers:n}}},{key:"removeURLParameters",value:function(e){return e}}]),e}();n.default=s},{}],27:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return r(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();n.default=s},{}],28:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=e("../utils/logger.js"),l=(function(e){e&&e.__esModule}(u),e("./loader.js")),d=e("../utils/exception.js"),h=function(e){function t(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"websocket-loader"));return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return s(t,e),o(t,null,[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),o(t,[{key:"destroy",value:function(){this._ws&&this.abort(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=l.LoaderStatus.kConnecting}catch(e){this._status=l.LoaderStatus.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new d.RuntimeException(n.msg);this._onError(l.LoaderErrors.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=l.LoaderStatus.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=l.LoaderStatus.kBuffering}},{key:"_onWebSocketClose",value:function(e){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=l.LoaderStatus.kError;var i={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new d.RuntimeException(i.msg);this._onError(l.LoaderErrors.EXCEPTION,i)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=l.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new d.RuntimeException(t.msg);this._onError(l.LoaderErrors.EXCEPTION,t)}}]),t}(l.BaseLoader);n.default=h},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],29:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},o=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e("../utils/logger.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(l),h=e("./loader.js"),f=e("../utils/exception.js"),c=function(e){function t(e,n){i(this,t);var s=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-moz-chunked-loader"));return s.TAG="MozChunkedLoader",s._seekHandler=e,s._config=n,s._needStash=!0,s._xhr=null,s._requestAbort=!1,s._contentLength=null,s._receivedLength=0,s}return s(t,e),u(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return d.default.w("MozChunkedLoader",e.message),!1}}}]),u(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(n=e.redirectedURL);var i=this._seekHandler.getConfig(n,t);this._requestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"===a(i.headers)){var s=i.headers;for(var o in s)s.hasOwnProperty(o)&&r.setRequestHeader(o,s[o])}this._status=h.LoaderStatus.kConnecting,r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=h.LoaderStatus.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=h.LoaderStatus.kError,!this._onError)throw new f.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=h.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==h.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status!==h.LoaderStatus.kError&&(this._status=h.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(e){this._status=h.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=h.LoaderErrors.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=h.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new f.RuntimeException(n.msg);this._onError(t,n)}}]),t}(h.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],30:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},o=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=e("../utils/logger.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(l),h=e("./loader.js"),f=e("../utils/exception.js"),c=function(e){function t(e,n){i(this,t);var s=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-msstream-loader"));return s.TAG="MSStreamLoader",s._seekHandler=e,s._config=n,s._needStash=!0,s._xhr=null,s._reader=null,s._totalRange=null,s._currentRange=null,s._currentRequestURL=null,s._currentRedirectedURL=null,s._contentLength=null,s._receivedLength=0,s._bufferLimit=16777216,s._lastTimeBufferSize=0,s._isReconnecting=!1,s}return s(t,e),u(t,null,[{key:"isSupported",value:function(){try{if(void 0===self.MSStream||void 0===self.MSStreamReader)return!1;var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="ms-stream","ms-stream"===e.responseType}catch(e){return d.default.w("MSStreamLoader",e.message),!1}}}]),u(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._internalOpen(e,t,!1)}},{key:"_internalOpen",value:function(e,t,n){this._dataSource=e,n?this._currentRange=t:this._totalRange=t;var i=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?i=this._currentRedirectedURL:void 0!=e.redirectedURL&&(i=e.redirectedURL));var r=this._seekHandler.getConfig(i,t);this._currentRequestURL=r.url;var s=this._reader=new self.MSStreamReader;s.onprogress=this._msrOnProgress.bind(this),s.onload=this._msrOnLoad.bind(this),s.onerror=this._msrOnError.bind(this);var o=this._xhr=new XMLHttpRequest;if(o.open("GET",r.url,!0),o.responseType="ms-stream",o.onreadystatechange=this._xhrOnReadyStateChange.bind(this),o.onerror=this._xhrOnError.bind(this),e.withCredentials&&(o.withCredentials=!0),"object"===a(r.headers)){var u=r.headers;for(var l in u)u.hasOwnProperty(l)&&o.setRequestHeader(l,u[l])}this._isReconnecting?this._isReconnecting=!1:this._status=h.LoaderStatus.kConnecting,o.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=h.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(1===this._reader.readyState&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState)if(t.status>=200&&t.status<=299){if(this._status=h.LoaderStatus.kBuffering,void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var i=t.getResponseHeader("Content-Length");if(null!=i&&null==this._contentLength){var r=parseInt(i);r>0&&(this._contentLength=r,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=h.LoaderStatus.kError,!this._onError)throw new f.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(h.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=h.LoaderStatus.kBuffering;var s=t.response;this._reader.readAsArrayBuffer(s)}}},{key:"_xhrOnError",value:function(e){this._status=h.LoaderStatus.kError;var t=h.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new f.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target,n=t.result;if(null==n)return void this._doReconnectIfNeeded();var i=n.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=n.byteLength;var r=this._totalRange.from+this._receivedLength;this._receivedLength+=i.byteLength,this._onDataArrival&&this._onDataArrival(i,r,this._receivedLength),n.byteLength>=this._bufferLimit&&(d.default.v(this.TAG,"MSStream buffer exceeded max size near "+(r+i.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var e={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,e,!0)}}},{key:"_msrOnLoad",value:function(e){this._status=h.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(e){this._status=h.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength<this._contentLength?(t=h.LoaderErrors.EARLY_EOF,n={code:-1,msg:"MSStream meet Early-Eof"}):(t=h.LoaderErrors.EARLY_EOF,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new f.RuntimeException(n.msg);this._onError(t,n)}}]),t}(h.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],31:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},u=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(i)},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=e("../utils/logger.js"),h=i(d),f=e("./speed-sampler.js"),c=i(f),_=e("./loader.js"),m=e("../utils/exception.js"),p=function(e){function t(e,n){r(this,t);var i=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-range-loader"));return i.TAG="RangeLoader",i._seekHandler=e,i._config=n,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new c.default,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}return a(t,e),l(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return h.default.w("RangeLoader",e.message),!1}}}]),l(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=_.LoaderStatus.kConnecting;var n=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?n=this._currentRedirectedURL:void 0!=e.redirectedURL&&(n=e.redirectedURL));var i=this._seekHandler.getConfig(n,t);this._currentRequestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"===o(i.headers)){var s=i.headers;for(var a in s)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a])}r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=_.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=_.LoaderStatus.kBuffering}else{if(this._status=_.LoaderStatus.kError,!this._onError)throw new m.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(_.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==_.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,i=0,r=0,s=n;if(e<t[0])return t[0];for(;r<=s;){if((i=r+Math.floor((s-r)/2))===n||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?r=i+1:s=i-1}}},{key:"_onLoad",value:function(e){if(this._status!==_.LoaderStatus.kError){if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&++this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var s=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():s=!0,this._onDataArrival&&this._onDataArrival(i,r,this._receivedLength),s&&(this._status=_.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=_.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=_.LoaderErrors.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=_.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new m.RuntimeException(n.msg);this._onError(t,n)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}]),t}(_.BaseLoader);n.default=p},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24,"./speed-sampler.js":27}],32:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e("events"),u=i(o),l=e("../utils/logger.js"),d=i(l),h=e("../utils/browser.js"),f=i(h),c=e("./player-events.js"),_=i(c),m=e("../core/transmuxer.js"),p=i(m),v=e("../core/transmuxing-events.js"),g=i(v),y=e("../core/mse-controller.js"),b=i(y),E=e("../core/mse-events.js"),S=i(E),k=e("./player-errors.js"),L=e("../config.js"),w=e("../utils/exception.js"),R=function(){function e(t,n){if(r(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new u.default,this._config=(0,L.createDefaultConfig)(),"object"===(void 0===n?"undefined":s(n))&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new w.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=f.default.chrome&&(f.default.version.major<50||50===f.default.version.major&&f.default.version.build<2661);this._alwaysSeekKeyframe=!!(i||f.default.msedge||f.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return a(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===_.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(function(){n._emitter.emit(_.default.MEDIA_INFO,n.mediaInfo)}):e===_.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(function(){n._emitter.emit(_.default.STATISTICS_INFO,n.statisticsInfo)}),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new b.default(this._config),this._msectl.on(S.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(S.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(S.default.SOURCE_OPEN,function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())}),this._msectl.on(S.default.ERROR,function(e){t._emitter.emit(_.default.ERROR,k.ErrorTypes.MEDIA_ERROR,k.ErrorDetails.MEDIA_MSE_ERROR,e)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this |
| | | ;if(!this._mediaElement)throw new w.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new w.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened)return void(this._hasPendingLoad=!0);this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new p.default(this._mediaDataSource,this._config),this._transmuxer.on(g.default.INIT_SEGMENT,function(t,n){e._msectl.appendInitSegment(n)}),this._transmuxer.on(g.default.MEDIA_SEGMENT,function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;n.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(d.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}}),this._transmuxer.on(g.default.LOADING_COMPLETE,function(){e._msectl.endOfStream(),e._emitter.emit(_.default.LOADING_COMPLETE)}),this._transmuxer.on(g.default.RECOVERED_EARLY_EOF,function(){e._emitter.emit(_.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(g.default.IO_ERROR,function(t,n){e._emitter.emit(_.default.ERROR,k.ErrorTypes.NETWORK_ERROR,t,n)}),this._transmuxer.on(g.default.DEMUX_ERROR,function(t,n){e._emitter.emit(_.default.ERROR,k.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})}),this._transmuxer.on(g.default.MEDIA_INFO,function(t){e._mediaInfo=t,e._emitter.emit(_.default.MEDIA_INFO,Object.assign({},t))}),this._transmuxer.on(g.default.STATISTICS_INFO,function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(_.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))}),this._transmuxer.on(g.default.RECOMMEND_SEEKPOINT,function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)}),this._transmuxer.open()}}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,i=0;i<e.length;i++){var r=e.start(i),s=e.end(i);if(r<=t&&t<s){r,n=s;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(d.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){d.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,i=0;i<t.length;i++){var r=t.start(i),s=t.end(i);if(e>=r&&e<s){e>=s-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(d.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var i=t.start(n),r=t.end(n);if(e>=i&&e<r)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,i=0;if(e<1&&this._mediaElement.buffered.length>0){var r=this._mediaElement.buffered.start(0);(r<1&&e<r||f.default.safari)&&(n=!0,i=f.default.safari?.1:r)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=i;else if(t){if(this._alwaysSeekKeyframe){var s=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=s?s.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTime<n.start(0)&&(d.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+n.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)return void(this._requestSetTime=!1);if(t<1&&n.length>0){var i=n.start(0);if(i<1&&t<i||f.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=f.default.safari?.1:i)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var r=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=r&&(this._requestSetTime=!0,this._mediaElement.currentTime=r.dts/1e3)}return void(null!=this._progressChecker&&this._checkProgressAndResume())}this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}]),e}();n.default=R},{"../config.js":5,"../core/mse-controller.js":9,"../core/mse-events.js":10,"../core/transmuxer.js":11,"../core/transmuxing-events.js":13,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./player-errors.js":34,"./player-events.js":35,events:2}],33:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e("events"),u=i(o),l=e("./player-events.js"),d=i(l),h=e("../config.js"),f=e("../utils/exception.js"),c=function(){function e(t,n){if(r(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new u.default,this._config=(0,h.createDefaultConfig)(),"object"===(void 0===n?"undefined":s(n))&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new f.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new f.InvalidArgumentException("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return a(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===d.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){n._emitter.emit(d.default.MEDIA_INFO,n.mediaInfo)}):e===d.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){n._emitter.emit(d.default.STATISTICS_INFO,n.statisticsInfo)}),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new f.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(d.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(d.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}}]),e}();n.default=c},{"../config.js":5,"../utils/exception.js":40,"./player-events.js":35,events:2}],34:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorDetails=n.ErrorTypes=void 0;var i=e("../io/loader.js"),r=e("../demux/demux-errors.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r);n.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},n.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:s.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:s.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:s.default.CODEC_UNSUPPORTED}},{"../demux/demux-errors.js":16,"../io/loader.js":24}],35:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info"};n.default=i},{}],36:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e)}return r(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}();n.default=s},{}],37:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(){i(this,e)}return r(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,i=Array.prototype.slice.call(arguments,1),r=i.length,s=0;s<r;s++)t+=i[s].byteLength;n=new Uint8Array(t),n[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var a=8,o=0;o<r;o++)n.set(i[o],a),a+=i[o].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),i=e.moov(t),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(n,0),r.set(i,n.byteLength),r}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),i=e.trak(t),r=e.mvex(t);return e.box(e.types.moov,n,i,r)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.presentWidth,s=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,s>>>8&255,255&s,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],r)}},{key:"mp4a",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,r,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return e.box(e.types.esds,r)}},{key:"avc1",value:function(t){var n=t.avcc,i=t.codecWidth,r=t.codecHeight,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,s,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var i=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=e.sdtp(t),o=e.trun(t,a.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,s,o,a)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],i=n.length,r=new Uint8Array(4+i),s=0;s<i;s++){var a=n[s].flags;r[s+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return e.box(e.types.sdtp,r)}},{key:"trun",value:function(t,n){var i=t.samples||[],r=i.length,s=12+16*r,a=new Uint8Array(s);n+=8+s,a.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var o=0;o<r;o++){var u=i[o].duration,l=i[o].size,d=i[o].flags,h=i[o].cts;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o)}return e.box(e.types.trun,a)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();s.init(),n.default=s},{}],38:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=i(a),u=e("./mp4-generator.js"),l=i(u),d=e("./aac-silent.js"),h=i(d),f=e("../utils/browser.js"),c=i(f),_=e("../core/media-segment-info.js"),m=e("../utils/exception.js"),p=function(){function e(t){r(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new _.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new _.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!c.default.chrome||!(c.default.version.major<50||50===c.default.version.major&&c.default.version.build<2661)),this._fillSilentAfterSeek=c.default.msedge||c.default.msie,this._mp3UseMpegAudio=!c.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return s(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,i="mp4",r=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(i="mpeg",r="",n=new Uint8Array):n=l.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=l.default.generateInitSegment(t)}if(!this._onInitSegment)throw new m.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:r,container:e+"/"+i,mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var i={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(i.samples.push(t),i.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(i,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n=e,i=n.samples,r=void 0,s=-1,a=-1,u=this._audioMeta.refSampleDuration,d="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,f=this._dtsBaseInited&&void 0===this._audioNextDts,m=!1;if(i&&0!==i.length&&(1!==i.length||t)){var p=0,v=null,g=0;d?(p=0,g=n.length):(p=8,g=8+n.length);var y=null;if(i.length>1&&(y=i.pop(),g-=y.length),null!=this._audioStashedLastSample){var b=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(b),g+=b.length}null!=y&&(this._audioStashedLastSample=y);var E=i[0].dts-this._dtsBase;if(this._audioNextDts)r=E-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(E);if(null!=S){var k=E-(S.originalDts+S.duration);k<=3&&(k=0);var L=S.dts+S.duration+k;r=E-L}else r=0}if(m){var w=E-r,R=this._videoSegmentInfoList.getLastSegmentBefore(E);if(null!=R&&R.beginDts<w){var A=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(A){var O=R.beginDts,T=w-R.beginDts;o.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+O+", duration: "+T),i.unshift({unit:A,dts:O,pts:O}),g+=A.byteLength}}else m=!1}for(var C=[],I=0;I<i.length;I++){var x=i[I],M=x.unit,D=x.dts-this._dtsBase,B=D-r;-1===s&&(s=B);var j=0;if(I!==i.length-1){j=i[I+1].dts-this._dtsBase-r-B}else if(null!=y){var P=y.dts-this._dtsBase-r;j=P-B}else j=C.length>=1?C[C.length-1].duration:Math.floor(u);var U=!1,N=null;if(j>1.5*u&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!c.default.safari){U=!0;var F=Math.abs(j-u),G=Math.ceil(F/u),V=B+u;o.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(B+j)+" ms, expected: "+(B+Math.round(u))+" ms, delta: "+Math.round(F)+" ms, generate: "+G+" frames");var z=h.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==z&&(o.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),z=M),N=[];for(var H=0;H<G;H++){var K=Math.round(V);if(N.length>0){var q=N[N.length-1];q.duration=K-q.dts}var W={dts:K,pts:K,cts:0,unit:z,size:z.byteLength,duration:0,originalDts:D,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};N.push(W),g+=M.byteLength,V+=u}var X=N[N.length-1];X.duration=B+j-X.dts,j=Math.round(u)}C.push({dts:B,pts:B,cts:0,unit:x.unit,size:x.unit.byteLength,duration:j,originalDts:D,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),U&&C.push.apply(C,N)}d?v=new Uint8Array(g):(v=new Uint8Array(g),v[0]=g>>>24&255,v[1]=g>>>16&255,v[2]=g>>>8&255,v[3]=255&g,v.set(l.default.types.mdat,4));for(var Y=0;Y<C.length;Y++){var Z=C[Y].unit;v.set(Z,p),p+=Z.byteLength}var Q=C[C.length-1];a=Q.dts+Q.duration,this._audioNextDts=a;var J=new _.MediaSegmentInfo;J.beginDts=s,J.endDts=a,J.beginPts=s,J.endPts=a,J.originalBeginDts=C[0].originalDts,J.originalEndDts=Q.originalDts+Q.duration,J.firstSample=new _.SampleInfo(C[0].dts,C[0].pts,C[0].duration,C[0].originalDts,!1),J.lastSample=new _.SampleInfo(Q.dts,Q.pts,Q.duration,Q.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(J),n.samples=C,n.sequenceNumber++;var $=null;$=d?new Uint8Array:l.default.moof(n,s),n.samples=[],n.length=0;var ee={type:"audio",data:this._mergeBoxes($,v).buffer,sampleCount:C.length,info:J};d&&f&&(ee.timestampOffset=s),this._onMediaSegment("audio",ee)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n=e,i=n.samples,r=void 0,s=-1,a=-1,o=-1,u=-1;if(i&&0!==i.length&&(1!==i.length||t)){var d=8,h=null,f=8+e.length,c=null;if(i.length>1&&(c=i.pop(),f-=c.length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,i.unshift(m),f+=m.length}null!=c&&(this._videoStashedLastSample=c);var p=i[0].dts-this._dtsBase;if(this._videoNextDts)r=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())r=0;else{var v=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=v){var g=p-(v.originalDts+v.duration);g<=3&&(g=0);var y=v.dts+v.duration+g;r=p-y}else r=0}for(var b=new _.MediaSegmentInfo,E=[],S=0;S<i.length;S++){var k=i[S],L=k.dts-this._dtsBase,w=k.isKeyframe,R=L-r,A=k.cts,O=R+A;-1===s&&(s=R,o=O);var T=0;if(S!==i.length-1){T=i[S+1].dts-this._dtsBase-r-R}else if(null!=c){var C=c.dts-this._dtsBase-r;T=C-R}else T=E.length>=1?E[E.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(w){var I=new _.SampleInfo(R,O,T,k.dts,!0);I.fileposition=k.fileposition,b.appendSyncPoint(I)}E.push({dts:R,pts:O,cts:A,units:k.units,size:k.length,isKeyframe:w,duration:T,originalDts:L,flags:{isLeading:0,dependsOn:w?2:1,isDependedOn:w?1:0,hasRedundancy:0,isNonSync:w?0:1}})}h=new Uint8Array(f),h[0]=f>>>24&255,h[1]=f>>>16&255,h[2]=f>>>8&255, |
| | | h[3]=255&f,h.set(l.default.types.mdat,4);for(var x=0;x<E.length;x++)for(var M=E[x].units;M.length;){var D=M.shift(),B=D.data;h.set(B,d),d+=B.byteLength}var j=E[E.length-1];if(a=j.dts+j.duration,u=j.pts+j.duration,this._videoNextDts=a,b.beginDts=s,b.endDts=a,b.beginPts=o,b.endPts=u,b.originalBeginDts=E[0].originalDts,b.originalEndDts=j.originalDts+j.duration,b.firstSample=new _.SampleInfo(E[0].dts,E[0].pts,E[0].duration,E[0].originalDts,E[0].isKeyframe),b.lastSample=new _.SampleInfo(j.dts,j.pts,j.duration,j.originalDts,j.isKeyframe),this._isLive||this._videoSegmentInfoList.append(b),n.samples=E,n.sequenceNumber++,this._forceFirstIDR){var P=E[0].flags;P.dependsOn=2,P.isNonSync=0}var U=l.default.moof(n,s);n.samples=[],n.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(U,h).buffer,sampleCount:E.length,info:b})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}}]),e}();n.default=p},{"../core/media-segment-info.js":8,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./aac-silent.js":36,"./mp4-generator.js":37}],39:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var i={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},s={};if(r.browser){s[r.browser]=!0;var a=r.majorVersion.split(".");s.version={major:parseInt(r.majorVersion,10),string:r.version},a.length>1&&(s.version.minor=parseInt(a[1],10)),a.length>2&&(s.version.build=parseInt(a[2],10))}r.platform&&(s[r.platform]=!0),(s.chrome||s.opr||s.safari)&&(s.webkit=!0),(s.rv||s.iemobile)&&(s.rv&&delete s.rv,r.browser="msie",s.msie=!0),s.edge&&(delete s.edge,r.browser="msedge",s.msedge=!0),s.opr&&(r.browser="opera",s.opera=!0),s.safari&&s.android&&(r.browser="android",s.android=!0),s.name=r.browser,s.platform=r.platform;for(var o in i)i.hasOwnProperty(o)&&delete i[o];Object.assign(i,s)}(),n.default=i},{}],40:[function(e,t,n){function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof2(t))&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof2(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n.RuntimeException=function(){function e(t){s(this,e),this._message=t}return a(e,[{key:"toString",value:function(){return this.name+": "+this.message}},{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),e}();n.IllegalStateException=function(e){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return r(t,e),a(t,[{key:"name",get:function(){return"IllegalStateException"}}]),t}(o),n.InvalidArgumentException=function(e){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return r(t,e),a(t,[{key:"name",get:function(){return"InvalidArgumentException"}}]),t}(o),n.NotImplementedException=function(e){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return r(t,e),a(t,[{key:"name",get:function(){return"NotImplementedException"}}]),t}(o)},{}],41:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=e("events"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=function(){function e(){i(this,e)}return r(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();o.GLOBAL_TAG="flv.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new a.default,n.default=o},{events:2}],42:[function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=i(a),u=e("./logger.js"),l=i(u),d=function(){function e(){r(this,e)}return s(e,null,[{key:"getConfig",value:function(){return{globalTag:l.default.GLOBAL_TAG,forceGlobalTag:l.default.FORCE_GLOBAL_TAG,enableVerbose:l.default.ENABLE_VERBOSE,enableDebug:l.default.ENABLE_DEBUG,enableInfo:l.default.ENABLE_INFO,enableWarn:l.default.ENABLE_WARN,enableError:l.default.ENABLE_ERROR,enableCallback:l.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){l.default.GLOBAL_TAG=e.globalTag,l.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,l.default.ENABLE_VERBOSE=e.enableVerbose,l.default.ENABLE_DEBUG=e.enableDebug,l.default.ENABLE_INFO=e.enableInfo,l.default.ENABLE_WARN=e.enableWarn,l.default.ENABLE_ERROR=e.enableError,l.default.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){l.default.emitter.addListener("log",t),l.default.emitter.listenerCount("log")>0&&(l.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){l.default.emitter.removeListener("log",t),0===l.default.emitter.listenerCount("log")&&(l.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return l.default.FORCE_GLOBAL_TAG},set:function(t){l.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return l.default.GLOBAL_TAG},set:function(t){l.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return l.default.ENABLE_VERBOSE&&l.default.ENABLE_DEBUG&&l.default.ENABLE_INFO&&l.default.ENABLE_WARN&&l.default.ENABLE_ERROR},set:function(t){l.default.ENABLE_VERBOSE=t,l.default.ENABLE_DEBUG=t,l.default.ENABLE_INFO=t,l.default.ENABLE_WARN=t,l.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return l.default.ENABLE_DEBUG},set:function(t){l.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return l.default.ENABLE_VERBOSE},set:function(t){l.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return l.default.ENABLE_INFO},set:function(t){l.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return l.default.ENABLE_WARN},set:function(t){l.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return l.default.ENABLE_ERROR},set:function(t){l.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();d.emitter=new o.default,n.default=d},{"./logger.js":41,events:2}],43:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function t(){i(this,t)}return r(t,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(void 0!==i&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t},"function"!=typeof self.Promise&&e("es6-promise").polyfill()}}]),t}();s.install(),n.default=s},{"es6-promise":1}],44:[function(e,t,n){function i(e,t,n){var i=e;if(t+n<i.length){for(;n--;)if(128!=(192&i[++t]))return!1;return!0}return!1}function r(e){for(var t=[],n=e,r=0,s=e.length;r<s;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(i(n,r,1)){var a=(31&n[r])<<6|63&n[r+1];if(a>=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(i(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&i(n,r,3)){var u=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},{}]},{},[21])(21)}); |
New file |
| | |
| | | /*! jQuery v1.7.1 jquery.com | jquery.org/license */ |
| | | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; |
| | | f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() |
| | | {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); |
New file |
| | |
| | | /* |
| | | * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message |
| | | * Digest Algorithm, as defined in RFC 1321. |
| | | * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. |
| | | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet |
| | | * Distributed under the BSD License |
| | | * See http://pajhome.org.uk/crypt/md5 for more info. |
| | | */ |
| | | |
| | | /* |
| | | * Configurable variables. You may need to tweak these to be compatible with |
| | | * the server-side, but the defaults work in most cases. |
| | | */ |
| | | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ |
| | | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ |
| | | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ |
| | | |
| | | /* |
| | | * These are the functions you'll usually want to call |
| | | * They take string arguments and return either hex or base-64 encoded strings |
| | | */ |
| | | function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} |
| | | function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} |
| | | function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} |
| | | function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } |
| | | function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } |
| | | function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } |
| | | |
| | | /* |
| | | * Perform a simple self-test to see if the VM is working |
| | | */ |
| | | function md5_vm_test() |
| | | { |
| | | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; |
| | | } |
| | | |
| | | /* |
| | | * Calculate the MD5 of an array of little-endian words, and a bit length |
| | | */ |
| | | function core_md5(x, len) |
| | | { |
| | | /* append padding */ |
| | | x[len >> 5] |= 0x80 << ((len) % 32); |
| | | x[(((len + 64) >>> 9) << 4) + 14] = len; |
| | | |
| | | var a = 1732584193; |
| | | var b = -271733879; |
| | | var c = -1732584194; |
| | | var d = 271733878; |
| | | |
| | | for(var i = 0; i < x.length; i += 16) |
| | | { |
| | | var olda = a; |
| | | var oldb = b; |
| | | var oldc = c; |
| | | var oldd = d; |
| | | |
| | | a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); |
| | | d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); |
| | | c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); |
| | | b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); |
| | | a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); |
| | | d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); |
| | | c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); |
| | | b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); |
| | | a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); |
| | | d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); |
| | | c = md5_ff(c, d, a, b, x[i+10], 17, -42063); |
| | | b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); |
| | | a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); |
| | | d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); |
| | | c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); |
| | | b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); |
| | | |
| | | a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); |
| | | d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); |
| | | c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); |
| | | b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); |
| | | a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); |
| | | d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); |
| | | c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); |
| | | b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); |
| | | a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); |
| | | d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); |
| | | c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); |
| | | b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); |
| | | a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); |
| | | d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); |
| | | c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); |
| | | b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); |
| | | |
| | | a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); |
| | | d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); |
| | | c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); |
| | | b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); |
| | | a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); |
| | | d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); |
| | | c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); |
| | | b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); |
| | | a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); |
| | | d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); |
| | | c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); |
| | | b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); |
| | | a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); |
| | | d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); |
| | | c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); |
| | | b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); |
| | | |
| | | a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); |
| | | d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); |
| | | c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); |
| | | b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); |
| | | a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); |
| | | d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); |
| | | c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); |
| | | b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); |
| | | a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); |
| | | d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); |
| | | c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); |
| | | b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); |
| | | a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); |
| | | d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); |
| | | c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); |
| | | b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); |
| | | |
| | | a = safe_add(a, olda); |
| | | b = safe_add(b, oldb); |
| | | c = safe_add(c, oldc); |
| | | d = safe_add(d, oldd); |
| | | } |
| | | return Array(a, b, c, d); |
| | | |
| | | } |
| | | |
| | | /* |
| | | * These functions implement the four basic operations the algorithm uses. |
| | | */ |
| | | function md5_cmn(q, a, b, x, s, t) |
| | | { |
| | | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); |
| | | } |
| | | function md5_ff(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); |
| | | } |
| | | function md5_gg(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); |
| | | } |
| | | function md5_hh(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn(b ^ c ^ d, a, b, x, s, t); |
| | | } |
| | | function md5_ii(a, b, c, d, x, s, t) |
| | | { |
| | | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); |
| | | } |
| | | |
| | | /* |
| | | * Calculate the HMAC-MD5, of a key and some data |
| | | */ |
| | | function core_hmac_md5(key, data) |
| | | { |
| | | var bkey = str2binl(key); |
| | | if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); |
| | | |
| | | var ipad = Array(16), opad = Array(16); |
| | | for(var i = 0; i < 16; i++) |
| | | { |
| | | ipad[i] = bkey[i] ^ 0x36363636; |
| | | opad[i] = bkey[i] ^ 0x5C5C5C5C; |
| | | } |
| | | |
| | | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); |
| | | return core_md5(opad.concat(hash), 512 + 128); |
| | | } |
| | | |
| | | /* |
| | | * Add integers, wrapping at 2^32. This uses 16-bit operations internally |
| | | * to work around bugs in some JS interpreters. |
| | | */ |
| | | function safe_add(x, y) |
| | | { |
| | | var lsw = (x & 0xFFFF) + (y & 0xFFFF); |
| | | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); |
| | | return (msw << 16) | (lsw & 0xFFFF); |
| | | } |
| | | |
| | | /* |
| | | * Bitwise rotate a 32-bit number to the left. |
| | | */ |
| | | function bit_rol(num, cnt) |
| | | { |
| | | return (num << cnt) | (num >>> (32 - cnt)); |
| | | } |
| | | |
| | | /* |
| | | * Convert a string to an array of little-endian words |
| | | * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. |
| | | */ |
| | | function str2binl(str) |
| | | { |
| | | var bin = Array(); |
| | | var mask = (1 << chrsz) - 1; |
| | | for(var i = 0; i < str.length * chrsz; i += chrsz) |
| | | bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); |
| | | return bin; |
| | | } |
| | | |
| | | /* |
| | | * Convert an array of little-endian words to a string |
| | | */ |
| | | function binl2str(bin) |
| | | { |
| | | var str = ""; |
| | | var mask = (1 << chrsz) - 1; |
| | | for(var i = 0; i < bin.length * 32; i += chrsz) |
| | | str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); |
| | | return str; |
| | | } |
| | | |
| | | /* |
| | | * Convert an array of little-endian words to a hex string. |
| | | */ |
| | | function binl2hex(binarray) |
| | | { |
| | | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; |
| | | var str = ""; |
| | | for(var i = 0; i < binarray.length * 4; i++) |
| | | { |
| | | str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + |
| | | hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | /* |
| | | * Convert an array of little-endian words to a base-64 string |
| | | */ |
| | | function binl2b64(binarray) |
| | | { |
| | | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| | | var str = ""; |
| | | for(var i = 0; i < binarray.length * 4; i += 3) |
| | | { |
| | | var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) |
| | | | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) |
| | | | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); |
| | | for(var j = 0; j < 4; j++) |
| | | { |
| | | if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; |
| | | else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); |
| | | } |
| | | } |
| | | return str; |
| | | } |
New file |
| | |
| | | var BaseURL = "http://116.169.59.170:9986/"; |
| | | //�첽 |
| | | function httpGet(url, parms, callback) { |
| | | httpGetFun(url, parms, callback, true); |
| | | } |
| | | //ͬ�� |
| | | function httpGetAsync(url, parms, callback) { |
| | | httpGetFun(url, parms, callback, false); |
| | | } |
| | | function httpGetFun(url, parms, callback,isAsync) { |
| | | url = BaseURL + url; |
| | | var queryString = ""; |
| | | if (parms) { |
| | | for (var name in parms) { |
| | | queryString += name + "=" + parms[name] + "&"; |
| | | } |
| | | if (url.indexOf("?") == -1) |
| | | url += "?" + queryString; |
| | | else |
| | | url += "&" + queryString; |
| | | } |
| | | url = (url.substring(url.length - 1) == '&') ? url.substring(0, url.length - 1) : url; |
| | | $.ajax({ |
| | | type: 'get', cache: false, dataType: 'json', async: isAsync, |
| | | url: url,//"RequertUrl", |
| | | //data: { url: url }, |
| | | success: function (result) { |
| | | //alert(JSON.stringify(result)); |
| | | if (callback) |
| | | callback(result); |
| | | }, |
| | | error: function (XMLHttpRequest, textStatus, errorThrown) { |
| | | alert('error'); |
| | | } |
| | | }); |
| | | } |
New file |
| | |
| | | var hstVideoAll = { |
| | | init: function (domId, width, height, params, playerType) { |
| | | var path = this.getPath(); |
| | | this.playerPath = path + '../Content/play_media_stream.swf'; |
| | | this.domId = domId; |
| | | this.width = width; |
| | | this.height = height; |
| | | this.version = '11.0.0'; |
| | | this.params = params; |
| | | this.windownum = 4; |
| | | if (playerType === 'flash' || playerType === 'h5') { |
| | | this.playerType = playerType; |
| | | } |
| | | //if (this.isBrowseIE()) { |
| | | // this.playerType = 'flash'; |
| | | //} |
| | | if (!this.playerType && localStorage.playerType && localStorage.playerType === 'flash') { |
| | | this.playerType = 'flash'; |
| | | } |
| | | if (this.playerType === 'flash') { |
| | | this.loadJs(path + "swfobject.js"); |
| | | } else { |
| | | this.loadCss(path + "../css/DPlayer.min.css"); |
| | | this.loadCss(path + "../css/swfobject-h5.css"); |
| | | this.loadJs(path + "flv.min.js"); |
| | | this.loadJs(path + "DPlayer.min.js"); |
| | | this.loadJs(path + "swfobject-h5.js"); |
| | | this.loadJs(path + "md5.js"); |
| | | this.loadJs(path + "HZRecorder.js"); |
| | | this.loadJs(path + "HZPlayer.js"); |
| | | } |
| | | this.initTimer(); |
| | | }, |
| | | initTimer: function () { |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | if (typeof swfobject == "undefined") { |
| | | setTimeout(this.initTimer, 300) |
| | | } else { |
| | | swfobject.embedSWF(hstVideoAll.playerPath, hstVideoAll.domId, hstVideoAll.width, hstVideoAll.height, "11.0.0", null, null, hstVideoAll.params, null); |
| | | playerobject = swfobject.getObjectById(hstVideoAll.domId); |
| | | } |
| | | |
| | | } else { |
| | | if (typeof HstH5Video == "undefined") { |
| | | setTimeout(this.initTimer, 300) |
| | | } else { |
| | | var options = { |
| | | domId: hstVideoAll.domId, |
| | | width: hstVideoAll.width, |
| | | height: hstVideoAll.height |
| | | }; |
| | | if (hstVideoAll.params.lang) { |
| | | options.lang = hstVideoAll.params.lang |
| | | } |
| | | playerobject = new HstH5Video(options); |
| | | } |
| | | } |
| | | }, |
| | | setWindowCount: function (num) { |
| | | |
| | | if (!num) { |
| | | return; |
| | | } |
| | | num = parseInt(num); |
| | | hstVideoAll.windownum = num; |
| | | this.setWindowNum(); |
| | | }, |
| | | setWindowNum: function(){ |
| | | |
| | | if (typeof playerobject == "undefined") { |
| | | setTimeout(this.setWindowNum, 300) |
| | | } |
| | | else{ |
| | | |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.ActionScriptSetWindowsCount(hstVideoAll.windownum); |
| | | } |
| | | else{ |
| | | playerobject.setWindowNum(hstVideoAll.windownum); |
| | | } |
| | | } |
| | | }, |
| | | openVideo: function(server,port,devicechannel){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.ActionScriptPlayStream(server,port,devicechannel); |
| | | } |
| | | else{ |
| | | playerobject.openVideo(server,port,devicechannel); |
| | | } |
| | | }, |
| | | closeVideo: function(devicechannel){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.ActionScriptClosePlayStream(devicechannel); |
| | | } |
| | | else{ |
| | | playerobject.closeVideo(devicechannel); |
| | | } |
| | | }, |
| | | JsStartTalk: function(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsStartTalk(MediaServerName,MediaTCPPort, deviceId, channelId, MediaType); |
| | | } |
| | | else{ |
| | | //playerobject.closeVideo(devicechannel); |
| | | |
| | | playerobject.StartTalk(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password); |
| | | } |
| | | }, |
| | | JsStartMonitor: function(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsStartMonitor(MediaServerName,MediaTCPPort, deviceId, channelId, MediaType); |
| | | } |
| | | else{ |
| | | //playerobject.closeVideo(devicechannel); |
| | | playerobject.StartMonitor(MediaServerName,MediaTCPPort, VoiceTCPPort,deviceId, channelId, MediaType,username,password); |
| | | } |
| | | }, |
| | | JsStartBroadcast: function(MediaServerName,MediaTCPPort,VoiceTCPPort,type,username,password){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsStartBroadcast(MediaServerName,MediaTCPPort, type); |
| | | } |
| | | else{ |
| | | //playerobject.closeVideo(devicechannel); |
| | | playerobject.StartBroadcast(MediaServerName, VoiceTCPPort, type, username, password); |
| | | } |
| | | }, |
| | | JsCloseTalk: function(deviceId, channelId){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsCloseTalk(deviceId, channelId); |
| | | } |
| | | else{ |
| | | playerobject.CloseTalk(deviceId, channelId); |
| | | } |
| | | }, |
| | | JsCloseMonitor: function(deviceId, channelId){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsCloseMonitor(deviceId, channelId); |
| | | } |
| | | else{ |
| | | playerobject.CloseMonitor(deviceId, channelId); |
| | | } |
| | | }, |
| | | JsCloseBroadcast: function(){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JsCloseBroadcast(); |
| | | } |
| | | else{ |
| | | playerobject.CloseBroadcast(); |
| | | } |
| | | }, |
| | | StartRemotePlayback: function(server,port,devicechannel,starttime,endtime,callback){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JavaScriptStartRemotePlayback(server,port,devicechannel,starttime,endtime,2); |
| | | } |
| | | else{ |
| | | playerobject.StartRemotePlayback(server,port,devicechannel,starttime,endtime,callback); |
| | | } |
| | | }, |
| | | CloseRemotePlayback: function(devicechannel){ |
| | | if (hstVideoAll.playerType == 'flash') { |
| | | playerobject.JavaScriptCloseRemotePlayback(devicechannel); |
| | | } |
| | | else{ |
| | | playerobject.CloseRemotePlayback(devicechannel); |
| | | } |
| | | }, |
| | | getPath: function () { |
| | | var scripts = document.getElementsByTagName('script') |
| | | for (let i = 0; i < scripts.length; i++) { |
| | | var src = scripts[i].src; |
| | | if (src.indexOf('swfobject-all.js') > -1) { |
| | | return src.replace(/[^\/]+$/, ""); |
| | | } |
| | | } |
| | | return ''; |
| | | }, |
| | | switchType: function (playerType) { |
| | | if (this.isBrowseIE() && playerType != 'flash') { |
| | | alert('ie浏览器只支持flash播放') |
| | | return; |
| | | } |
| | | if (playerType !== 'flash' && playerType !== 'h5' && playerType !== 'auto') { |
| | | return; |
| | | } |
| | | localStorage.playerType = playerType |
| | | location.reload() |
| | | }, |
| | | isBrowseIE: function () { |
| | | return (this.getBrowseVersion().indexOf("msie") != -1) ? true : false; |
| | | }, |
| | | getBrowseVersion: function () { |
| | | var userAgent = navigator.userAgent.toLowerCase(); |
| | | var browser = userAgent.match(/(firefox|chrome|safari|opera|msie)/); |
| | | var browserId = "msie"; |
| | | var browserVersion = ""; |
| | | var isIE11 = (userAgent.toLowerCase().indexOf("trident") > -1 && userAgent.indexOf("rv") > -1); |
| | | if (isIE11) { |
| | | browserId = "msie"; |
| | | browserVersion = "11.0"; |
| | | } else { |
| | | if (browser.length >= 2) { |
| | | browserId = browser[1]; |
| | | } else { |
| | | browserId = "msie"; |
| | | } |
| | | browserVersion = (userAgent.match(new RegExp('.+(?:version)[\/: ]([\\d.]+)')) || userAgent.match(new RegExp('(?:' + browserId + ')[\/: ]([\\d.]+)')) || [0, '0'])[1]; |
| | | } |
| | | return browserId + browserVersion; |
| | | }, |
| | | loadCss: function (path) { |
| | | if (!path || path.length === 0) { |
| | | throw new Error('argument "path" is required !'); |
| | | } |
| | | var head = document.getElementsByTagName('head')[0]; |
| | | var link = document.createElement('link'); |
| | | link.href = path; |
| | | link.rel = 'stylesheet'; |
| | | link.type = 'text/css'; |
| | | head.appendChild(link); |
| | | }, |
| | | loadJs: function (path) { |
| | | if (!path || path.length === 0) { |
| | | throw new Error('argument "path" is required !'); |
| | | } |
| | | var head = document.getElementsByTagName('head')[0]; |
| | | var script = document.createElement('script'); |
| | | script.src = path; |
| | | script.type = 'text/javascript'; |
| | | head.appendChild(script); |
| | | } |
| | | } |
New file |
| | |
| | | ; (function (undefined) { |
| | | "use strict" |
| | | var _global; |
| | | |
| | | var scaleProcess = function (hst_his, starttime, endtime, callbacknewpos) { |
| | | var hisDom = $('#' + hst_his); |
| | | var item1 = $("<div id=\"" + hst_his + "_bar\" style=\"background-repeat: repeat-x; background-position: 0 100%; background-color: #E4E4E4; border-left: 1px #83BBD9 solid; height: 10px; position: relative; font-size: 0px; border-radius: 3px;\" ></div>"); |
| | | var item12 = $("<div id=\"" + hst_his + "_step\" style=\"background-repeat: repeat-x; background-color: #8080FF; width: 0px; position: absolute; height: 10px; width: 0; left: 0; bottom: 0; \"></div>"); |
| | | var item13 = $("<span id=\"" + hst_his + "_btn\" style=\"background-repeat: repeat-x; background-color: #804080;width:8px;height:12px;position:absolute;left:-2px;top:-1px;cursor:pointer;\"></span>"); |
| | | item1.append(item12); |
| | | item1.append(item13); |
| | | //var item4 = $("<span id=\""+hst_his+"_start_time\" style=\"left: -25px;position: relative;\">00:00:00</span>"); |
| | | var item5 = $("<span id=\"" + hst_his + "_cur_time\" style=\"left:50%;position: relative;margin-left: -72px;color: #F080F0;font-size:12px;\">00:00:00</span>"); |
| | | //var item6 = $("<span id=\""+hst_his+"_end_time\" style=\"right: -25px;position: relative;float: right;\">00:00:00</span>"); |
| | | //item0.append(item4); |
| | | |
| | | //item0.append(item6); |
| | | hisDom.append(item1); |
| | | hisDom.append(item5); |
| | | |
| | | this.btn = document.getElementById(hst_his + "_btn"); |
| | | this.bar = document.getElementById(hst_his + "_bar"); |
| | | this.title = document.getElementById(hst_his + "_cur_time"); |
| | | this.step = this.bar.getElementsByTagName("div")[0]; |
| | | this.init(callbacknewpos); |
| | | this.startT0 = new Date(starttime.replace(/-/g, "/")); |
| | | this.startT = new Date(starttime.replace(/-/g, "/")); |
| | | this.endT = new Date(endtime.replace(/-/g, "/")); |
| | | this.curT = this.startT; |
| | | var formattedDateString = dateDigitToString(this.startT.getHours()) + ':' + dateDigitToString(this.startT.getMinutes()) + ':' + dateDigitToString(this.startT.getSeconds()); |
| | | //document.getElementById(hst_his+"_start_time").innerHTML=formattedDateString; |
| | | this.title.innerHTML = formattedDateString; |
| | | //formattedDateString = dateDigitToString(this.endT.getHours()) + ':' + dateDigitToString(this.endT.getMinutes()) + ':' + dateDigitToString(this.endT.getSeconds()); |
| | | //document.getElementById(hst_his+"_end_time").innerHTML=formattedDateString; |
| | | }; |
| | | var dateDigitToString = function (num) { |
| | | return num < 10 ? '0' + num : num; |
| | | }; //这个函数的作用是把个位数的十位置0,凑成两位数,如:08 04 |
| | | scaleProcess.prototype = { |
| | | init: function (callbacknewpos) { |
| | | var f = this, g = document, b = window, m = Math; |
| | | f.btn.onmousedown = function (e) { |
| | | var x = (e || b.event).clientX; |
| | | var l = this.offsetLeft; |
| | | var max = f.bar.offsetWidth - this.offsetWidth; |
| | | f.dropStartT = f.curT; |
| | | g.onmousemove = function (e) { |
| | | var thisX = (e || b.event).clientX; |
| | | var to = m.min(max, m.max(-2, l + (thisX - x))); |
| | | f.btn.style.left = to + 'px'; |
| | | f.ondrag(m.round(m.max(0, to / max) * 100), to); |
| | | b.getSelection ? b.getSelection().removeAllRanges() : g.selection.empty(); |
| | | }; |
| | | g.onmouseup = function (e) { |
| | | var thisX = (e || b.event).clientX; |
| | | var to = m.min(max, m.max(-2, l + (thisX - x))); |
| | | f.btn.style.left = to + 'px'; |
| | | var pos = m.round(m.max(0, to / max) * 100); |
| | | |
| | | |
| | | this.onmousemove = null; |
| | | this.onmouseup = null; |
| | | |
| | | if (callbacknewpos != null) { |
| | | var diff = (f.endT.getTime() - f.startT0.getTime()) / 1000;//时间差的毫秒数 |
| | | var passedseconds = diff * pos / 100; |
| | | var curDate = new Date(f.startT0); |
| | | curDate.setSeconds(curDate.getSeconds() + passedseconds); |
| | | callbacknewpos(curDate); |
| | | f.startT.setTime(f.startT.getTime() + (curDate.getTime() - f.dropStartT.getTime()) - 3000); |
| | | } |
| | | f.dropStartT = null; |
| | | }; |
| | | }; |
| | | }, |
| | | ondrag: function (pos, x) { |
| | | this.step.style.width = Math.max(0, x) + 'px'; |
| | | |
| | | var diff = (this.endT.getTime() - this.startT0.getTime()) / 1000;//时间差的毫秒数 |
| | | var passedseconds = diff * pos / 100; |
| | | var curDate = new Date(this.startT0); |
| | | curDate.setSeconds(curDate.getSeconds() + passedseconds); |
| | | this.curT = curDate; |
| | | var formattedDateString = dateDigitToString(curDate.getHours()) + ':' + dateDigitToString(curDate.getMinutes()) + ':' + dateDigitToString(curDate.getSeconds()); |
| | | this.title.innerHTML = formattedDateString; |
| | | }, |
| | | setProcessTime: function (curtime) { |
| | | if (this.dropStartT != null) |
| | | return; |
| | | var max = this.bar.offsetWidth; |
| | | var newdate = new Date(this.startT); |
| | | newdate.setSeconds(this.startT.getSeconds() + curtime); |
| | | if (newdate > this.endT) |
| | | return; |
| | | var percent = (newdate.getTime() - this.startT0.getTime()) / (this.endT.getTime() - this.startT0.getTime()); |
| | | |
| | | |
| | | this.step.style.width = max * percent + 'px'; |
| | | this.btn.style.left = max * percent + 'px'; |
| | | this.curT = newdate; |
| | | |
| | | var formattedDateString = dateDigitToString(newdate.getHours()) + ':' + dateDigitToString(newdate.getMinutes()) + ':' + dateDigitToString(newdate.getSeconds()); |
| | | this.title.innerHTML = formattedDateString; |
| | | } |
| | | } |
| | | |
| | | function extend(o, n, override) { |
| | | for (var key in n) { |
| | | if (n.hasOwnProperty(key) && (!o.hasOwnProperty(key) || override)) { |
| | | o[key] = n[key]; |
| | | } |
| | | } |
| | | return o; |
| | | } |
| | | |
| | | function HstH5Video(opt) { |
| | | this._initial(opt); |
| | | } |
| | | |
| | | HstH5Video.prototype = { |
| | | constructor: this, |
| | | |
| | | _initial: function (opt) { |
| | | // 默认参数 |
| | | var options = { |
| | | domId: '', |
| | | live: true, |
| | | screenshot: true, |
| | | autoplay: true, |
| | | mutex: false, |
| | | width: 400, |
| | | height: 400, |
| | | loop: false, |
| | | volume: 0, |
| | | lang: 'zh-cn', //可选值: 'en', 'zh-cn', 'zh-tw' |
| | | contextmenu: [], |
| | | viewSize: 'full', |
| | | needSeek: false, |
| | | tbarBgColor: {}, |
| | | rightMousedown: function () { |
| | | |
| | | } |
| | | }; |
| | | this.options = extend(options, opt, true); |
| | | this.options.contextmenu = this.options.contextmenu.concat([{ |
| | | text: 'cmsv6 20200103', |
| | | click: function () { |
| | | |
| | | } |
| | | }]); |
| | | if (this.options.lang.indexOf('cn.xml') > -1) { |
| | | this.options.lang = 'zh-cn' |
| | | } |
| | | if (this.options.lang.indexOf('tw.xml') > -1) { |
| | | this.options.lang = 'zh-tw' |
| | | } |
| | | if (this.options.lang.indexOf('en.xml') > -1) { |
| | | this.options.lang = 'en' |
| | | } |
| | | this.itemPre = 'HstH5Video'; |
| | | this.listeners = []; |
| | | this.handlers = {}; |
| | | this.num = 1; |
| | | this.lastIndex = 1; |
| | | this.playVideos = {}; |
| | | this.playVideosTimer = {}; |
| | | this.videoText = {}; |
| | | this.devInfoMap = {}; |
| | | this.progressMap = {}; |
| | | this.reloadMap = {}; |
| | | this.reloadMapTime = {}; |
| | | this.initEventType(); |
| | | this.mediaPortMap = {}; |
| | | this.timeMap808 = {}; |
| | | this.speedZeroNum = {}; |
| | | this.beforeReconnectionVolume = {}; |
| | | this.playWating = false; |
| | | this.playWatingTimer = null; |
| | | this.playWatingNum = 0; |
| | | this.soundDomId = 'HstH5VideoSound'; |
| | | this.winDom = $('#' + this.options.domId); |
| | | this.winDom.empty(); |
| | | this.winDom.css('width', this.options.width).css('height', this.options.height).addClass('ttx-video-h5'); |
| | | this.bindEvent() |
| | | }, |
| | | initEventType: function () { |
| | | this.eventType = { |
| | | select: 'select',//窗口事件 |
| | | full: 'full',//全屏 |
| | | norm: 'norm',//退出全屏 |
| | | stop: 'stop',//停止播放 |
| | | start: 'start',//开始播放 |
| | | sound: 'sound',//开启声音 |
| | | silent: 'silent',//静音 |
| | | play: 'play',//暂停或停止后重新播放 |
| | | PicSave: 'PicSave',//截图 |
| | | startRecive: 'startRecive',//开启对讲 |
| | | uploadRecive: 'uploadRecive',//开启对讲 |
| | | loadRecive: 'loadRecive',//开启对讲 |
| | | stopTalk: 'stopTalk', //关闭对讲 |
| | | playRecive: 'playRecive',//对讲中 |
| | | reciveStreamStop: 'reciveStreamStop',//对讲异常(网络异常等) |
| | | reciveNetError: 'reciveNetError',//对讲异常(网络异常等) |
| | | reciveStreamNotFound: 'reciveStreamNotFound',//对讲异常(网络异常等) |
| | | uploadNetClosed: 'uploadNetClosed',//连接异常 |
| | | uploadNetError: 'uploadNetError',//连接异常 |
| | | upload: 'upload',//对讲讲话 |
| | | uploadfull: 'uploadfull',//对讲讲话结束 |
| | | listenNetError: 'listenNetError',//网络异常 |
| | | playListen: 'playListen',//监听中 |
| | | loadListen: 'loadListen',//等待请求监听 |
| | | listenStreamNotFound: 'listenStreamNotFound',//等待请求监听 |
| | | listenStreamStop: 'listenStreamStop',//等待请求监听 |
| | | } |
| | | }, |
| | | playAll: function () { |
| | | for (var index in this.playVideos) { |
| | | this.playVideos[index].play() |
| | | } |
| | | }, |
| | | pauseAll: function () { |
| | | for (var index in this.playVideos) { |
| | | this.playVideos[index].pause() |
| | | } |
| | | }, |
| | | setWindowNum: function (num) { |
| | | if (!num) { |
| | | return; |
| | | } |
| | | num = parseInt(num); |
| | | $('.ttx-video-h5-item-full').removeClass('ttx-video-h5-item-full') |
| | | num = num > 36 ? 36 : num; |
| | | this.num = num; |
| | | this.winDom.children().addClass('hide'); |
| | | var itemClass; |
| | | if (num == 8) { |
| | | itemClass = 'video-basis-4' |
| | | } else { |
| | | itemClass = 'video-basis-' + Math.ceil(Math.sqrt(num)) |
| | | } |
| | | |
| | | for (var i = 0; i < num; i++) { |
| | | var itemId = this.itemPre + '-' + i; |
| | | var _item = $('#' + itemId); |
| | | var itemClassTmp = itemClass; |
| | | if ((num == 6 || num == 8) && i === 0) { |
| | | itemClassTmp = 'video-basis-' + num + '-1' |
| | | } |
| | | if (_item.length === 0) { |
| | | var item = $("<div data-index='" + i + "' class='ttx-video-h5-item " + itemClassTmp + "' id='" + itemId + "'></div>"); |
| | | this.winDom.append(item); |
| | | this.bindItemEvent(item) |
| | | } else { |
| | | var classArr = _item.attr('class').split(' '); |
| | | classArr = classArr.filter(function (s) { |
| | | return s.indexOf('video-basis-') === -1; |
| | | }) |
| | | _item.attr('class', classArr.join(' ')); |
| | | _item.addClass('ttx-video-h5-item').addClass(itemClassTmp).removeClass('hide').show(); |
| | | } |
| | | } |
| | | if (!this.selectIndex) { |
| | | $('.ttx-video-h5-item:eq(0)').click(); |
| | | } |
| | | this.setVideoFrame(); |
| | | var item = $("<div data-index=\"9999\" style=\"width:100%;height:20px;display: none;font-size: 8px;\" id=\"HstH5Video-audio\">Mic:on;Play:on</div>"); |
| | | this.winDom.append(item); |
| | | }, |
| | | setSize: function (width, height) { |
| | | this.options.width = width |
| | | this.options.height = height |
| | | this.winDom.css('width', this.options.width).css('height', this.options.height) |
| | | }, |
| | | getObjectById: function () { |
| | | return this; |
| | | }, |
| | | |
| | | stopVideo: function (index) { |
| | | var that = this |
| | | if (index >= this.num) { |
| | | return |
| | | } |
| | | this.reSetVideo(index) |
| | | /*var video = this.playVideos[index]; |
| | | if (video) { |
| | | video.pause(); |
| | | video.video.currentTime = 0; |
| | | try { |
| | | var url = video.options.video.url; |
| | | var devidno = url.split('DevIDNO=')[1].split('&')[0]; |
| | | that.timeMap808[devidno] = new Date().getTime() |
| | | } catch (e) { |
| | | |
| | | } |
| | | }*/ |
| | | this.devInfoMap[index.toString()] = null; |
| | | delete this.reloadMapTime[index]; |
| | | delete this.speedZeroNum[index]; |
| | | delete this.progressMap[index]; |
| | | this.progressMap[index] = null; |
| | | this.emit(index, this.eventType.stop) |
| | | }, |
| | | toggleVideo: function (index) { |
| | | if (index >= this.num) { |
| | | return |
| | | } |
| | | var video = this.playVideos[index]; |
| | | if (video) { |
| | | video.toggle(); |
| | | if (video.video.paused) { |
| | | this.emit(index, this.eventType.stop) |
| | | } else { |
| | | this.emit(index, this.eventType.start) |
| | | } |
| | | } |
| | | }, |
| | | reSetVideo: function (index) { |
| | | var video = this.playVideos[index]; |
| | | if (video) { |
| | | video.destroy(); |
| | | delete this.playVideos[index] |
| | | delete this.mediaPortMap[index] |
| | | } |
| | | }, |
| | | hideAllMenu: function () { |
| | | for (var index in this.playVideos) { |
| | | this.playVideos[index].contextmenu.hide() |
| | | } |
| | | }, |
| | | openVideo: function (server, port, devicechannel) { |
| | | var that = this; |
| | | var index = -1; |
| | | //找到重复的 |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | that.startVideo(index, server, port, devicechannel); |
| | | } |
| | | else { |
| | | //找到空闲的窗口 |
| | | index = -1; |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == null) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index == -1) { |
| | | if (Object.keys(that.devInfoMap).length < that.num) |
| | | index = Object.keys(that.devInfoMap).length; |
| | | else { |
| | | return;//满了 |
| | | } |
| | | } |
| | | |
| | | that.startVideo(index, server, port, devicechannel); |
| | | } |
| | | }, |
| | | closeVideo: function (devicechannel) { |
| | | var that = this; |
| | | //找到播放的窗口 |
| | | var index = -1; |
| | | |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | StartTalk: function (MediaServerName, MediaTCPPort, VoiceTCPPort, deviceId, channelId, MediaType, username, password) { |
| | | if ("WebSocket" in window) { |
| | | //alert("您的浏览器支持 WebSocket!"); |
| | | //创建socket,登录,设置定时心跳和关闭事件 |
| | | this.voiceUser = username; |
| | | this.voicePass = password; |
| | | this.voiceDeviceid = deviceId; |
| | | this.voiceChannelID = channelId; |
| | | this.voiceMediaType = MediaType; |
| | | this.voiceServerName = MediaServerName; |
| | | this.voiceMediaTcpPort = MediaTCPPort; |
| | | |
| | | var that = this; |
| | | if (this.ws != null) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | } |
| | | this.ws = new WebSocket("wss://" + MediaServerName + ":" + VoiceTCPPort); |
| | | this.ws.onopen = function () { |
| | | // Web Socket 已连接上,使用 send() 方法发送数据 |
| | | console.log("Connected"); |
| | | //var curtimestamp = Date.now(); |
| | | //var md5string = b64_md5(that.voicePass+curtimestamp.toString()); |
| | | //var messageObj = {cmd:"login",user:that.voiceUser,timestamp:curtimestamp,digest:md5string}; |
| | | // var messageJson = JSON.stringify(messageObj); |
| | | //that.ws.send(messageJson); |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var digest = b64_md5(that.voicePass + timestamp); |
| | | var data = { |
| | | "cmd": "login", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "digest": digest, // |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | // alert("登录已经发送..."); |
| | | console.log(messageJson); |
| | | }; |
| | | this.ws.onmessage = function (evt) { |
| | | var received_msg = evt.data; |
| | | console.log("recv:" + received_msg); |
| | | if (evt.data instanceof Blob) {//收到数据 |
| | | that.player.addPlay(received_msg); |
| | | } |
| | | else { |
| | | var msg = JSON.parse(received_msg); |
| | | //alert("数据已接收..."+received_msg); |
| | | if (msg.response == "login") { |
| | | if (msg.result == 0) { |
| | | //alert("登录成功"); |
| | | console.log("登录成功"); |
| | | that.voiceinterval = self.setInterval(function () { |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "heartbeat", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | //setInterval(this.wsheart(),10000); |
| | | }, 10000); |
| | | //发起对讲请求 |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "open_talk", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "DeviceType": that.voiceMediaType.toString(), // |
| | | "DeviceId": that.voiceDeviceid, // |
| | | "channel": that.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | that.ws.send(messageJson1); |
| | | console.log("发起对讲请求"); |
| | | console.log(messageJson1); |
| | | } |
| | | else { |
| | | console.log("登录失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "open_talk") { |
| | | if (msg.result == 0) { |
| | | console.log("开启对讲成功"); |
| | | //打开播放流 |
| | | Player.get(function (play) { |
| | | that.player = play; |
| | | that.player.start(); |
| | | }); |
| | | //that.openVideo(that.voiceServerName,that.voiceMediaTcpPort,that.voiceDeviceid+"_"+that.voiceChannelID); |
| | | //打开录音机 |
| | | Recorder.get(function (rec) { |
| | | that.recorder = rec; |
| | | that.recorder.start(); |
| | | }, that.ws); |
| | | |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.innerHTML = "正在对讲:" + that.voiceDeviceid; |
| | | item.style["display"] = "flex"; |
| | | } |
| | | else { |
| | | console.log("开启对讲失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "close_talk") { |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | }; |
| | | this.ws.onerror = function (e) { |
| | | //alert("错误"); |
| | | console.log("websocket error!" + e); |
| | | }; |
| | | this.ws.onclose = function (e) { |
| | | // 关闭 websocket |
| | | //alert("连接已关闭..."); |
| | | console.log("websocket closed! " + e.code + ", " + e.reason); |
| | | that.ws = null; |
| | | clearInterval(that.voiceinterval); |
| | | }; |
| | | |
| | | //打开语音通道接收流 |
| | | //打开录音,设置定时发送 |
| | | } |
| | | else { |
| | | alert("您的浏览器不支持 WebSocket!"); |
| | | return; |
| | | } |
| | | }, |
| | | CloseTalk: function (deviceId, channelId) { |
| | | //关闭播放流 |
| | | this.player.stop(); |
| | | //关闭录音 |
| | | this.recorder.stop(); |
| | | |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.style["display"] = "none"; |
| | | //关闭websocket |
| | | //this.ws.close(); |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "close_talk", //发送命令 |
| | | "user": this.voiceUser, //用户名 |
| | | "DeviceType": this.voiceMediaType.toString(), // |
| | | "DeviceId": this.voiceDeviceid, // |
| | | "channel": this.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | this.ws.send(messageJson1); |
| | | console.log("关闭对讲请求"); |
| | | console.log(messageJson1); |
| | | }, |
| | | StartBroadcast: function (MediaServerName, VoiceTCPPort, MediaType, username, password) { |
| | | if ("WebSocket" in window) { |
| | | //alert("您的浏览器支持 WebSocket!"); |
| | | //创建socket,登录,设置定时心跳和关闭事件 |
| | | this.voiceUser = username; |
| | | this.voicePass = password; |
| | | this.voiceMediaType = MediaType; |
| | | this.voiceServerName = MediaServerName; |
| | | this.voiceTcpPort = VoiceTCPPort; |
| | | |
| | | var that = this; |
| | | if (this.ws != null) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | } |
| | | this.ws = new WebSocket("wss://" + MediaServerName + ":" + VoiceTCPPort); |
| | | this.ws.onopen = function () { |
| | | // Web Socket 已连接上,使用 send() 方法发送数据 |
| | | console.log("Connected"); |
| | | //var curtimestamp = Date.now(); |
| | | //var md5string = b64_md5(that.voicePass+curtimestamp.toString()); |
| | | //var messageObj = {cmd:"login",user:that.voiceUser,timestamp:curtimestamp,digest:md5string}; |
| | | // var messageJson = JSON.stringify(messageObj); |
| | | //that.ws.send(messageJson); |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var digest = b64_md5(that.voicePass + timestamp); |
| | | var data = { |
| | | "cmd": "login", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "digest": digest, // |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | // alert("登录已经发送..."); |
| | | console.log(messageJson); |
| | | }; |
| | | this.ws.onmessage = function (evt) { |
| | | var received_msg = evt.data; |
| | | console.log("recv:" + received_msg); |
| | | |
| | | var msg = JSON.parse(received_msg); |
| | | //alert("数据已接收..."+received_msg); |
| | | if (msg.response == "login") { |
| | | if (msg.result == 0) { |
| | | //alert("登录成功"); |
| | | console.log("登录成功"); |
| | | that.voiceinterval = self.setInterval(function () { |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "heartbeat", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | //setInterval(this.wsheart(),10000); |
| | | }, 10000); |
| | | //发起广播请求 |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "open_broadcast", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "DeviceType": that.voiceMediaType.toString(), // |
| | | "DeviceId": that.voiceDeviceid, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | that.ws.send(messageJson1); |
| | | console.log("发起广播请求"); |
| | | console.log(messageJson1); |
| | | } |
| | | else { |
| | | console.log("登录失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "open_broadcast") { |
| | | if (msg.result == 0) { |
| | | console.log("开启广播成功"); |
| | | |
| | | //that.openVideo(that.voiceServerName,that.voiceTcpPort,that.voiceDeviceid+"_"+that.voiceChannelID); |
| | | //打开录音机 |
| | | Recorder.get(function (rec) { |
| | | that.recorder = rec; |
| | | that.recorder.start(); |
| | | }, that.ws); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.innerHTML = "正在广播."; |
| | | item.style["display"] = "flex"; |
| | | } |
| | | else { |
| | | console.log("开启广播失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "close_broadcast") { |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | |
| | | }; |
| | | this.ws.onerror = function (e) { |
| | | //alert("错误"); |
| | | console.log("websocket error!" + e); |
| | | }; |
| | | this.ws.onclose = function (e) { |
| | | // 关闭 websocket |
| | | //alert("连接已关闭..."); |
| | | console.log("websocket closed! " + e.code + ", " + e.reason); |
| | | that.ws = null; |
| | | clearInterval(that.voiceinterval); |
| | | }; |
| | | |
| | | //打开语音通道接收流 |
| | | //打开录音,设置定时发送 |
| | | } |
| | | else { |
| | | alert("您的浏览器不支持 WebSocket!"); |
| | | return; |
| | | } |
| | | }, |
| | | CloseBroadcast: function () { |
| | | |
| | | //关闭录音 |
| | | this.recorder.stop(); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.style["display"] = "none"; |
| | | //关闭websocket |
| | | //this.ws.close(); |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "close_broadcast", //发送命令 |
| | | "user": this.voiceUser, //用户名 |
| | | "DeviceType": this.voiceMediaType.toString(), // |
| | | "DeviceId": this.voiceDeviceid, // |
| | | "channel": this.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | this.ws.send(messageJson1); |
| | | console.log("关闭广播请求"); |
| | | console.log(messageJson1); |
| | | }, |
| | | StartMonitor: function (MediaServerName, MediaTCPPort, VoiceTCPPort, deviceId, channelId, MediaType, username, password) { |
| | | if ("WebSocket" in window) { |
| | | //alert("您的浏览器支持 WebSocket!"); |
| | | //创建socket,登录,设置定时心跳和关闭事件 |
| | | this.voiceUser = username; |
| | | this.voicePass = password; |
| | | this.voiceDeviceid = deviceId; |
| | | this.voiceChannelID = channelId; |
| | | this.voiceMediaType = MediaType; |
| | | this.voiceServerName = MediaServerName; |
| | | this.voiceMediaTcpPort = MediaTCPPort; |
| | | |
| | | var that = this; |
| | | if (this.ws != null) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | } |
| | | this.ws = new WebSocket("wss://" + MediaServerName + ":" + VoiceTCPPort); |
| | | this.ws.onopen = function () { |
| | | // Web Socket 已连接上,使用 send() 方法发送数据 |
| | | console.log("Connected"); |
| | | //var curtimestamp = Date.now(); |
| | | //var md5string = b64_md5(that.voicePass+curtimestamp.toString()); |
| | | //var messageObj = {cmd:"login",user:that.voiceUser,timestamp:curtimestamp,digest:md5string}; |
| | | // var messageJson = JSON.stringify(messageObj); |
| | | //that.ws.send(messageJson); |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var digest = b64_md5(that.voicePass + timestamp); |
| | | var data = { |
| | | "cmd": "login", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "digest": digest, // |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | // alert("登录已经发送..."); |
| | | console.log(messageJson); |
| | | }; |
| | | this.ws.onmessage = function (evt) { |
| | | var received_msg = evt.data; |
| | | console.log("recv:" + received_msg); |
| | | if (evt.data instanceof Blob) {//收到数据 |
| | | that.player.addPlay(received_msg); |
| | | |
| | | |
| | | } |
| | | else { |
| | | var msg = JSON.parse(received_msg); |
| | | //alert("数据已接收..."+received_msg); |
| | | if (msg.response == "login") { |
| | | if (msg.result == 0) { |
| | | //alert("登录成功"); |
| | | console.log("登录成功"); |
| | | /*that.voiceinterval =self.setInterval(function() |
| | | { |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "heartbeat", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "timestamp": timestamp //时间戳 |
| | | } |
| | | var messageJson = JSON.stringify(data); |
| | | that.ws.send(messageJson); |
| | | //setInterval(this.wsheart(),10000); |
| | | },10000);*/ |
| | | //发起监听请求 |
| | | |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "open_monitor", //发送命令 |
| | | "user": that.voiceUser, //用户名 |
| | | "DeviceType": that.voiceMediaType.toString(), // |
| | | "DeviceId": that.voiceDeviceid, // |
| | | "channel": that.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | that.ws.send(messageJson1); |
| | | console.log("发起监听请求"); |
| | | console.log(messageJson1); |
| | | } |
| | | else { |
| | | console.log("登录失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "open_monitor") { |
| | | if (msg.result == 0) { |
| | | console.log("开启监听成功"); |
| | | //打开播放流 |
| | | Player.get(function (play) { |
| | | that.player = play; |
| | | that.player.start(); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.innerHTML = "正在监听:" + that.voiceDeviceid; |
| | | item.style["display"] = "flex"; |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | console.log("开启监听失败"); |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | else if (msg.response == "close_monitor") { |
| | | that.ws.close(); |
| | | that.ws = null; |
| | | } |
| | | } |
| | | |
| | | }; |
| | | this.ws.onerror = function (e) { |
| | | //alert("错误"); |
| | | console.log("websocket error!" + e); |
| | | }; |
| | | this.ws.onclose = function (e) { |
| | | // 关闭 websocket |
| | | //alert("连接已关闭..."); |
| | | console.log("websocket closed! " + e.code + ", " + e.reason); |
| | | that.ws = null; |
| | | clearInterval(that.voiceinterval); |
| | | }; |
| | | |
| | | //打开语音通道接收流 |
| | | //打开录音,设置定时发送 |
| | | } |
| | | else { |
| | | alert("您的浏览器不支持 WebSocket!"); |
| | | return; |
| | | } |
| | | }, |
| | | CloseMonitor: function (deviceId, channelId) { |
| | | //关闭播放 |
| | | this.player.stop(); |
| | | var item = document.getElementById("HstH5Video-audio"); |
| | | item.style["display"] = "none"; |
| | | //关闭websocket |
| | | //this.ws.close(); |
| | | var timestamp = (new Date()).valueOf(); |
| | | var data = { |
| | | "cmd": "close_monitor", //发送命令 |
| | | "user": this.voiceUser, //用户名 |
| | | "DeviceType": this.voiceMediaType.toString(), // |
| | | "DeviceId": this.voiceDeviceid, // |
| | | "channel": this.voiceChannelID, // |
| | | "timestamp": timestamp //时间戳 |
| | | |
| | | } |
| | | var messageJson1 = JSON.stringify(data); |
| | | this.ws.send(messageJson1); |
| | | console.log("关闭监听请求"); |
| | | console.log(messageJson1); |
| | | }, |
| | | StartRemotePlayback: function (server, port, devicechannel, starttime, endtime, callback) { |
| | | var that = this; |
| | | var index = -1; |
| | | //找到重复的 |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel + "_H") { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | that.startVideo(index, server, port, devicechannel); |
| | | } |
| | | else { |
| | | //找到空闲的窗口 |
| | | index = -1; |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == null) { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index == -1) { |
| | | if (Object.keys(that.devInfoMap).length < that.num) |
| | | index = Object.keys(that.devInfoMap).length; |
| | | else { |
| | | return;//满了 |
| | | } |
| | | } |
| | | |
| | | that.startVideo(index, server, port, devicechannel); |
| | | that.devInfoMap[index.toString()] = devicechannel + "_H"; |
| | | //增加进度条显示 |
| | | this.progressMap[index] = new scaleProcess(that.playVideos[index].container.id, starttime, endtime, callback); |
| | | |
| | | } |
| | | }, |
| | | CloseRemotePlayback: function (devicechannel) { |
| | | var that = this; |
| | | //找到播放的窗口 |
| | | var index = -1; |
| | | |
| | | for (var i = 0; i < Object.keys(that.devInfoMap).length; i++) { |
| | | if (that.devInfoMap[i.toString()] == devicechannel + "_H") { |
| | | index = i; |
| | | break; |
| | | } |
| | | } |
| | | if (index >= 0) { |
| | | that.stopVideo(index); |
| | | } |
| | | }, |
| | | startVideo: function (index, server, port, channel) { |
| | | var that = this; |
| | | if (!index && index !== 0) { |
| | | return |
| | | } |
| | | if (parseInt(index) >= that.num) { |
| | | return |
| | | } |
| | | |
| | | that.devInfoMap[index.toString()] = channel; |
| | | that.createUrlAndplay(index, server, port, channel, 1); |
| | | }, |
| | | /** |
| | | * |
| | | * @param index |
| | | * @param url |
| | | * @param type 当实时视频时,传1,监听时,传2,双向对讲时传3 广播功能 4 |
| | | */ |
| | | startVod: function (index, url, type, notDeleteTime) { |
| | | // url = 'http://cyberplayerplay.kaywang.cn/cyberplayer/demo201711-L1.flv' |
| | | var that = this; |
| | | //url = that.handleUrl(url); |
| | | //防止多次点击 |
| | | if (that.playWating) { |
| | | return; |
| | | } |
| | | if (!notDeleteTime) { |
| | | delete that.reloadMapTime[index] |
| | | } |
| | | |
| | | var itemId = this.itemPre + '-' + index; |
| | | var dp = that.playVideos[index]; |
| | | if (dp) { |
| | | dp.destroy(); |
| | | } |
| | | var videoType = 'flv' |
| | | if (url.indexOf('PLAYBEG=') == -1 && (url.indexOf('.mp4') > -1 || url.indexOf('.MP4') > -1)) { |
| | | videoType = 'normal' |
| | | } |
| | | if (url.indexOf('.m3u8') > -1 || url.indexOf('.m3u8') > -1) { |
| | | videoType = 'hls' |
| | | } |
| | | |
| | | var volume = that.options.volume; |
| | | if (this.beforeReconnectionVolume[index]) { |
| | | volume = this.beforeReconnectionVolume[index]; |
| | | } |
| | | dp = new DPlayer({ |
| | | container: document.getElementById(itemId), |
| | | live: true,//that.options.live, |
| | | liveText: that.videoText[index], |
| | | screenshot: that.options.screenshot, |
| | | autoplay: that.options.autoplay, |
| | | mutex: that.options.mutex, |
| | | loop: that.options.loop, |
| | | volume: volume, |
| | | lang: that.options.lang, |
| | | video: { |
| | | url: url, |
| | | type: videoType |
| | | }, |
| | | contextmenu: that.options.contextmenu |
| | | }); |
| | | delete this.beforeReconnectionVolume[index] |
| | | this.playVideos[index] = dp; |
| | | this.speedZeroNum[index] = 0; |
| | | this.bindDpEvent(dp, type); |
| | | this.emit(index, this.eventType.start) |
| | | this.setVideoFrame(); |
| | | var bcolor = that.options.tbarBgColor[index]; |
| | | bcolor = bcolor ? bcolor : '000'; |
| | | $('#' + dp.container.id).find('.dplayer-controller').css('background', '#' + bcolor); |
| | | }, |
| | | |
| | | /** |
| | | * @param index |
| | | * @param jsession |
| | | * @param devIdno |
| | | * @param channel |
| | | * @param stream |
| | | * @param type 当实时视频时,传1,监听时,传2,双向对讲时传3 广播功能 4 |
| | | * @returns {string} |
| | | */ |
| | | createUrlAndplay: function (index, server, port, channel, type) { |
| | | var that = this |
| | | index = index.toString(); |
| | | //var url = 'http://' + server + ':' + port + '/live/' + channel; |
| | | //根据当前网站用http还是https. |
| | | var url = window.location.protocol + '//' + server + ':' + port + '/live/' + channel; |
| | | //alert(url); |
| | | |
| | | |
| | | if (type === 1) { |
| | | that.setVideoInfo(index, channel); |
| | | that.startVod(index, url, type) |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | setVideoInfo: function (index, title) { |
| | | // dplayer-live-text |
| | | this.videoText[index] = title; |
| | | var video = this.playVideos[index]; |
| | | if (video) { |
| | | $(video.container).find('.dplayer-live-text').html(title); |
| | | video.options.liveText = title; |
| | | } |
| | | }, |
| | | getDataset: function (ele) { |
| | | if (ele.dataset) { |
| | | return ele.dataset; |
| | | } else { |
| | | var attrs = ele.attributes,//元素的属性集合 |
| | | dataset = {}, name, matchStr; |
| | | for (var i = 0; i < attrs.length; i++) { //是否是data- 开头 |
| | | matchStr = attrs[i].name.match(/^data-(.+)/); |
| | | if (matchStr) { //data-auto-play 转成驼峰写法 autoPlay |
| | | name = matchStr[1].replace(/-([\da-z])/gi, function (all, letter) { |
| | | return letter.toUpperCase(); |
| | | }); |
| | | dataset[name] = attrs[i].value; |
| | | } |
| | | } |
| | | return dataset; |
| | | } |
| | | }, |
| | | bindItemEvent: function (obj) { |
| | | var that = this; |
| | | obj.click(function () { |
| | | $('.ttx-video-h5-item').removeClass('ttx-video-h5-item-check'); |
| | | $(this).addClass('ttx-video-h5-item-check'); |
| | | that.hideAllMenu() |
| | | var dataset = that.getDataset(this) |
| | | that.selectIndex = dataset.index; |
| | | that.emit(that.selectIndex, that.eventType.select) |
| | | }) |
| | | obj.mousedown(function (e) { |
| | | if (3 == e.which) { |
| | | var dataset = that.getDataset(this) |
| | | that.selectMenuIndex = dataset.index.toString(); |
| | | that.options.rightMousedown(); |
| | | } |
| | | }) |
| | | obj.dblclick(function () { |
| | | if ($(this).hasClass('ttx-video-h5-item-full')) { |
| | | $(this).removeClass('ttx-video-h5-item-full') |
| | | $('.ttx-video-h5-item').show() |
| | | } else { |
| | | $('.ttx-video-h5-item').hide() |
| | | $(this).addClass('ttx-video-h5-item-full').show() |
| | | } |
| | | that.setVideoFrame(); |
| | | }) |
| | | }, |
| | | /** |
| | | * |
| | | * @param dp |
| | | * @param type 当实时视频时,传1,监听时,传2,双向对讲时传3 广播功能 4 |
| | | */ |
| | | bindDpEvent: function (dp, type) { |
| | | var that = this; |
| | | var index = dp.container.id.replace(that.itemPre + '-', ''); |
| | | if (type === 1) { |
| | | |
| | | dp.on('fullscreen', function () { |
| | | that.fullScreen() |
| | | $('.map_btn').css('z-index', 0) |
| | | }); |
| | | dp.on('volumechange', function () { |
| | | if (dp.volume() > 0) { |
| | | for (var index in that.playVideos) { |
| | | if (index != that.selectIndex && that.playVideos[index].volume() > 0) { |
| | | that.playVideos[index].volume(0, true, false) |
| | | } |
| | | } |
| | | if (that.soundDp && ttxPlayer && typeof ttxPlayer.doRightMenuMsg == "function") { |
| | | ttxPlayer.doRightMenuMsg(that.selectIndex, 'stopListen'); |
| | | } |
| | | } |
| | | }); |
| | | dp.on('progress', function () { |
| | | //console.log(dp.video.currentTime); |
| | | if (that.progressMap[index] != null) |
| | | that.progressMap[index].setProcessTime(dp.video.currentTime); |
| | | }); |
| | | if (!that.playVideosTimer[index]) { |
| | | that.playVideosTimer[index] = setInterval(function () { |
| | | if (!that.playVideos[index]) { |
| | | return; |
| | | } |
| | | var speed = 0 |
| | | if (that.playVideos[index].plugins.flvjs) { |
| | | speed = parseInt(that.playVideos[index].plugins.flvjs.statisticsInfo.speed) |
| | | } |
| | | if (isNaN(speed)) { |
| | | speed = 0 |
| | | } |
| | | var speedStr = speed + 'KB/S'; |
| | | if (that.playVideos[index].paused || !that.playVideos[index].plugins.flvjs) { |
| | | speedStr = ''; |
| | | } |
| | | var liveText; |
| | | if (that.videoText[index]) { |
| | | liveText = that.videoText[index] + ' ' + speedStr; |
| | | } else { |
| | | liveText = ' ' + speedStr; |
| | | } |
| | | if ($(that.playVideos[index].container).find('.dplayer-live-text').length > 0) { |
| | | $(that.playVideos[index].container).find('.dplayer-live-text').html(liveText).attr('title', liveText); |
| | | } else { |
| | | var liveTextHtml = |
| | | '<span class="dplayer-live-badge" title="' + liveText + '">' + |
| | | ' <span class="dplayer-live-text">' + liveText + '</span>' + |
| | | '</span>'; |
| | | $(that.playVideos[index].container).find('.dplayer-time').after(liveTextHtml); |
| | | } |
| | | }, 1000) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | bindEvent: function () { |
| | | var that = this; |
| | | $(document).mousedown(function (e) { |
| | | if (3 == e.which) { |
| | | that.hideAllMenu() |
| | | } |
| | | }) |
| | | try { |
| | | $(parent.document).mousedown(function (e) { |
| | | that.hideAllMenu() |
| | | }) |
| | | } catch (e) { |
| | | // TODO: handle exception |
| | | } |
| | | that.winDom.bind('contextmenu', function () { |
| | | return false; |
| | | }); |
| | | |
| | | $(document).keyup(function (e) { |
| | | var key = e.which || e.keyCode; |
| | | if (key == 27) { |
| | | that.exitFullScreen() |
| | | } |
| | | }); |
| | | window.onresize = function () { |
| | | if (!that.checkFull()) { |
| | | that.exitFullScreen() |
| | | } |
| | | } |
| | | if (that.options.reconnect) { |
| | | setInterval(function () { |
| | | for (var index in that.playVideos) { |
| | | var dpVideo = that.playVideos[index]; |
| | | that.reconnectionCheck(index, dpVideo) |
| | | if (that.soundDp) { |
| | | that.reconnectionCheck(-1, that.soundDp); |
| | | } |
| | | } |
| | | }, 500) |
| | | } |
| | | }, |
| | | /** |
| | | * 断线重连 |
| | | * @param index |
| | | * @param dpVideo |
| | | */ |
| | | reconnectionCheck: function (index, dpVideo) { |
| | | var that = this; |
| | | if (!that.speedZeroNum[index]) { |
| | | that.speedZeroNum[index] = 0 |
| | | } |
| | | if (dpVideo.plugins.flvjs) { |
| | | var speed = parseInt(dpVideo.plugins.flvjs.statisticsInfo.speed) |
| | | if (!speed && !dpVideo.paused) { |
| | | that.speedZeroNum[index]++; |
| | | } else { |
| | | that.speedZeroNum[index] = 0; |
| | | } |
| | | } |
| | | if (that.speedZeroNum[index] >= 60) { |
| | | var url = dpVideo.options.video.url; |
| | | { |
| | | that.beforeReconnectionVolume[index] = dpVideo.volume() |
| | | that.startVod(index, url, 1); |
| | | } |
| | | console.log('断线重连:' + index) |
| | | } |
| | | }, |
| | | getVideoPlayTime: function (index) { |
| | | var that = this; |
| | | index = index ? index : '0'; |
| | | var video = that.playVideos[index]; |
| | | if (video) { |
| | | var time = parseInt(video.video.currentTime); |
| | | if (this.reloadMapTime[index]) { |
| | | time = time + this.reloadMapTime[index]; |
| | | } |
| | | return time; |
| | | } |
| | | return 0; |
| | | }, |
| | | setVideoFocus: function (index) { |
| | | $('.ttx-video-h5-item:eq(' + index + ')').click(); |
| | | }, |
| | | fullScreen: function () { |
| | | this.winDom.addClass('ttx-video-h5-full') |
| | | $('body').addClass('ttx-video-body-full') |
| | | var el = document.documentElement; |
| | | if (el.requestFullscreen) { |
| | | el.requestFullscreen(); |
| | | } else if (el.mozRequestFullScreen) { |
| | | el.mozRequestFullScreen(); |
| | | } else if (el.webkitRequestFullscreen) { |
| | | el.webkitRequestFullscreen(); |
| | | } else if (el.msRequestFullscreen) { |
| | | el.msRequestFullscreen(); |
| | | } |
| | | }, |
| | | exitFullScreen: function () { |
| | | this.winDom.removeClass('ttx-video-h5-full') |
| | | $('body').removeClass('ttx-video-body-full') |
| | | }, |
| | | checkFull: function () { |
| | | return document.fullscreenElement || |
| | | document.msFullscreenElement || |
| | | document.mozFullScreenElement || |
| | | document.webkitFullscreenElement || false; |
| | | }, |
| | | emit: function (index, type) { |
| | | if (typeof onTtxVideoMsg == 'function') { |
| | | onTtxVideoMsg(index, type) |
| | | } |
| | | }, |
| | | setVideoFrame: function (viewSize) { |
| | | viewSize = viewSize ? viewSize : this.options.viewSize; |
| | | this.options.viewSize = viewSize |
| | | this.winDom.find('video').each(function (i, obj) { |
| | | var _obj = $(obj) |
| | | _obj.css('width', '100%').css('height', '100%') |
| | | var width = _obj.width(); |
| | | var height = _obj.height(); |
| | | if (viewSize === '4:3') { |
| | | if ((width / height) > (4 / 3)) { |
| | | _obj.css('width', (height * 4 / 3)) |
| | | } else { |
| | | _obj.css('height', (width * 3 / 4)) |
| | | } |
| | | } |
| | | if (viewSize === '16:9') { |
| | | if ((width / height) > (16 / 9)) { |
| | | _obj.css('width', (height * 16 / 9)) |
| | | } else { |
| | | _obj.css('height', (width * 9 / 16)) |
| | | } |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | /** |
| | | * 处理URL |
| | | * 如果是http直接访问c++ 端口,否则需要nginx转发 |
| | | */ |
| | | handleUrl: function (url) { |
| | | if (location.protocol == 'http:') { |
| | | return url; |
| | | } |
| | | /*if (url && url.startWith('https:')){ |
| | | return url; |
| | | }*/ |
| | | var portReg = /.+:(\d{1,5})/; |
| | | var urlPortArr = url.match(portReg); |
| | | if (!urlPortArr || urlPortArr.length < 2) { |
| | | return url; |
| | | } |
| | | var videoPort = urlPortArr[1]; |
| | | //用端口分开链接 |
| | | var urlArr = url.split(videoPort); |
| | | try { |
| | | if (rootParent && rootParent.httpsMapHttpPortParams) { |
| | | var httpsPort = rootParent.httpsMapHttpPortParams[videoPort]; |
| | | httpsPort = httpsPort ? httpsPort : ('1' + videoPort); |
| | | return 'https://' + location.hostname + ":" + httpsPort + urlArr[1]; |
| | | } |
| | | } catch (e) { |
| | | console.log(e) |
| | | } |
| | | return 'https://' + location.host + "/" + videoPort + urlArr[1]; |
| | | }, |
| | | /************************下面的方法无实际意义**********************************/ |
| | | embedSWF: function () { |
| | | |
| | | }, |
| | | setLanguage: function () { |
| | | |
| | | }, |
| | | setBufferTime: function () { |
| | | |
| | | }, |
| | | setBufferTimeMax: function () { |
| | | |
| | | }, |
| | | setListenParam: function () { |
| | | |
| | | }, |
| | | setVideoTbarBgColor: function (index, color) { |
| | | this.options.tbarBgColor[index] = color; |
| | | var dp = this.playVideos[index]; |
| | | if (dp && dp.container && dp.container.id) { |
| | | $('#' + dp.container.id).find('.dplayer-controller').css('background', '#' + color); |
| | | } |
| | | }, |
| | | clearVideoMenu: function () { |
| | | |
| | | } |
| | | } |
| | | |
| | | _global = (function () { |
| | | return this || (0, eval)('this'); |
| | | }()); |
| | | if (typeof module !== "undefined" && module.exports) { |
| | | module.exports = HstH5Video; |
| | | } else if (typeof define === "function" && define.amd) { |
| | | define(function () { |
| | | return HstH5Video; |
| | | }); |
| | | } else { |
| | | !('HstH5Video' in _global) && (_global.HstH5Video = HstH5Video); |
| | | } |
| | | |
| | | }()); |
New file |
| | |
| | | var _tokenID; |
| | | var _accessToken; |
| | | //var _mediaServerName; |
| | | //var _mediaTCPPort; |
| | | //var _mediaUserName; |
| | | //var _mediaPassword; |
| | | //var _voiceDomainName; |
| | | //var _voiceTCPPort; |
| | | var _mediaServerName;//请求广播时返回的服务器名,用于打于广播时 |
| | | var _mediaTCPPort;//请求广播时返回的服务器名,用于打于广播时 |
| | | var _deviceId; |
| | | var _channelId; |
| | | var _isHttps = 0; |
| | | |
| | | //获取流媒体配置信息 |
| | | //function getMeidaServerInfo() { |
| | | // httpGet("MediaAPI/BaseInfo/GetMeidaServerInfo", |
| | | // { accessToken: _accessToken }, function (result) { |
| | | // if (result.ResultState == 1) { |
| | | // _mediaServerName = result.ResultData.MediaServerName; |
| | | // _mediaTCPPort = result.ResultData.MediaTCPPort; |
| | | // _mediaUserName = result.ResultData.MediaUserName; |
| | | // _mediaPassword = result.ResultData.MediaPassword; |
| | | // _voiceDomainName = result.ResultData.VoiceDomainName; |
| | | // _voiceTCPPort = result.ResultData.VoiceTCPPort; |
| | | // if (window.location.protocol == "https:") { _isHttps = 1; } |
| | | // } |
| | | // else { |
| | | // alert(result.ResultMessage); |
| | | // } |
| | | // }); |
| | | //}; |
| | | function dateDigitToString (num) { |
| | | return num < 10 ? '0' + num : num; |
| | | }; |
| | | //前面补0 |
| | | function PrefixInteger(num, n) { |
| | | return (Array(n).join(0) + num).slice(-n); |
| | | } |
| | | //拖动 |
| | | function historyDragVideo(newtime) { |
| | | var year = dateDigitToString(newtime.getFullYear()), |
| | | month = dateDigitToString(newtime.getMonth() + 1), |
| | | date = dateDigitToString(newtime.getDate()), |
| | | hour = dateDigitToString(newtime.getHours()), |
| | | minute = dateDigitToString(newtime.getMinutes()), |
| | | second = dateDigitToString(newtime.getSeconds()), |
| | | formattedDateString = year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second; |
| | | httpGetAsync("MediaAPI/ReplayStream/ReplayControl", |
| | | { |
| | | accessToken: _accessToken, |
| | | deviceId: _deviceId, |
| | | channelId: _channelId, |
| | | playType: 5, |
| | | multiple: 0, |
| | | dragDropPosition: formattedDateString |
| | | }, function (data) { |
| | | if (data.ResultState == 1) { |
| | | alert("拖动成功"); |
| | | } |
| | | else { |
| | | alert("拖动失败"); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | var hstVideoPlay = { |
| | | /*------------公共功能开始--------------------------------*/ |
| | | //初始化 |
| | | init: function (tokenID, domId, params, wisdowCount) { |
| | | _tokenID = tokenID; |
| | | //视频插件宽度 |
| | | var width = document.getElementById(domId).style.width; |
| | | //视频插件高度 |
| | | var height = document.getElementById(domId).style.height; |
| | | hstVideoAll.init(domId, width, height, params); |
| | | hstVideoAll.setWindowCount(wisdowCount); |
| | | this.getToken(); |
| | | |
| | | }, |
| | | //只初始化语音,不包括视频。 |
| | | initVoice: function (tokenID) { |
| | | _tokenID = tokenID; |
| | | this.getToken(); |
| | | }, |
| | | getToken: function () { |
| | | var url = "MediaAPI/Token"; |
| | | httpGet(url, { token: _tokenID }, function (result) { |
| | | _accessToken = result.Access_Token; |
| | | if (window.location.protocol == "https:") { _isHttps = 1; } |
| | | //getMeidaServerInfo(); |
| | | }); |
| | | }, |
| | | setWindowCount: function (wisdowCount) { |
| | | hstVideoAll.setWindowCount(wisdowCount); |
| | | }, |
| | | |
| | | /*------------公共功能结束--------------------------------*/ |
| | | |
| | | /*------------历史播放开始--------------------------------*/ |
| | | //历史音视频资源检索 |
| | | historySeach: function (deviceId, channelId, startTime, endTime, alarmType, dataType, streamType, storageType) { |
| | | var resultOK; |
| | | if (_accessToken == "") { |
| | | getToken(); |
| | | } |
| | | _deviceId = deviceId; |
| | | _channelId = channelId; |
| | | var url = "MediaAPI/MediaSearch/SearchResourceList"; |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.startTime = startTime; |
| | | parms.endTime = endTime; |
| | | parms.alarmType = alarmType; |
| | | parms.dataType = dataType; |
| | | parms.streamType = streamType; |
| | | parms.storageType = storageType; |
| | | httpGetAsync(url, parms, function (result) { |
| | | resultOK = result; |
| | | }); |
| | | return resultOK; |
| | | }, |
| | | //打开历史播放 |
| | | historyOpenVideo:function (deviceId, channelId, dataType, streamType, storageType, startTime, endTime) { |
| | | httpGetAsync("MediaAPI/ReplayStream/ReplayVideo", |
| | | { |
| | | accessToken: _accessToken, |
| | | deviceId: deviceId, |
| | | channelId: channelId, |
| | | dataType: dataType, |
| | | streamType: streamType, |
| | | storageType: storageType, |
| | | playType: 0, |
| | | multiple: 0, |
| | | startTime: startTime, |
| | | endTime: endTime |
| | | }, function (result) { |
| | | if (result.ResultState == 1) { |
| | | _channelId = channelId; |
| | | var r = ""; |
| | | //设备类型为深圳标是加"-r"; |
| | | if (result.ResultData.MediaType == 1) { r = "-r" } |
| | | //设备类型为粤标通讯id补足20位; |
| | | //if (result.ResultData.MediaType == 4) { deviceId = PrefixInteger(deviceId, 20); } |
| | | _deviceId = deviceId; |
| | | if (_isHttps == 1) { |
| | | hstVideoAll.StartRemotePlayback( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_voiceTCPPort, |
| | | deviceId + "_" + channelId + r, |
| | | startTime, |
| | | endTime, |
| | | historyDragVideo); |
| | | } |
| | | else { |
| | | hstVideoAll.StartRemotePlayback( |
| | | result.ResultData.MediaServerName, |
| | | result.ResultData.MediaTCPPort, |
| | | //_mediaServerName, |
| | | //_mediaTCPPort, |
| | | deviceId + "_" + channelId + r, |
| | | startTime, |
| | | endTime, |
| | | historyDragVideo); |
| | | } |
| | | } |
| | | else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | }, |
| | | //关闭播放历史 |
| | | historyCloseVideo: function (deviceId, channelId) { |
| | | hstVideoAll.CloseRemotePlayback(deviceId + "_" + channelId); |
| | | httpGet("MediaAPI/ReplayStream/ReplayControl", { |
| | | accessToken: _accessToken, |
| | | deviceId: deviceId, |
| | | channelId: channelId, |
| | | playType: 2, |
| | | multiple: 0, |
| | | dragDropPosition: "2019/01/11" |
| | | }, function (data) { }); |
| | | }, |
| | | /*------------历史播放结束--------------------------------*/ |
| | | |
| | | /*------------实时播放开始--------------------------------*/ |
| | | //打开实时视频 |
| | | realTimeOpenVideo: function (deviceId, channelId) { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken, |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.dataType = 0; |
| | | parms.streamType = 1; |
| | | var url = "MediaAPI/RealTimeStream/OpenVideo"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState == 1) { |
| | | //设备类型为粤标通讯id补足20位; |
| | | //if (result.ResultData.MediaType == 4) { deviceId = PrefixInteger(deviceId, 20); } |
| | | if (_isHttps == 1) { |
| | | hstVideoAll.openVideo( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_voiceTCPPort, |
| | | deviceId + "_" + channelId); |
| | | } |
| | | else { |
| | | hstVideoAll.openVideo( |
| | | result.ResultData.MediaServerName, |
| | | result.ResultData.MediaTCPPort, |
| | | // _mediaServerName, |
| | | //_mediaTCPPort, |
| | | deviceId + "_" + channelId); |
| | | } |
| | | } else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | }, |
| | | //关闭实时视频 |
| | | realTimeCloseVideo: function (deviceId, channelId) { |
| | | hstVideoAll.closeVideo(deviceId + "_" + channelId); |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | var url = "MediaAPI/RealTimeStream/CloseVideo"; |
| | | httpGet(url, parms, function (result) {}); |
| | | }, |
| | | /*------------实时播放结束--------------------------------*/ |
| | | |
| | | /*------------实时语音开始--------------------------------*/ |
| | | //打开语音(广播分二步走,走完本方法后取的通道号,再调用realTimeOpenBroadcast) |
| | | realTimeOpenVoice: function (deviceId, channelId, dataType) { |
| | | |
| | | if (dataType == 3) { |
| | | //广播 |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | var url = "MediaAPI/RealTimeStream/BroadcastRequest"; |
| | | httpGet(url, parms, function (result) { |
| | | var guangboType = 1; |
| | | if (result.ResultData.MediaType != 1) { |
| | | guangboType = 2; |
| | | } |
| | | if (result.ResultState == 1) { |
| | | _mediaServerName = result.ResultData.MediaServerName; |
| | | _mediaTCPPort=result.ResultData.MediaTCPPort; |
| | | hstVideoAll.JsStartBroadcast( |
| | | result.ResultData.MediaServerName, |
| | | result.ResultData.MediaTCPPort, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_mediaTCPPort, |
| | | //_voiceTCPPort, |
| | | parseInt(guangboType), |
| | | result.ResultData.MediaUserName, |
| | | result.ResultData.MediaPassword); |
| | | //_mediaUserName, |
| | | //_mediaPassword); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.dataType = dataType; |
| | | parms.streamType = 1; |
| | | var url = "MediaAPI/RealTimeStream/OpenVoice"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState == 1) { |
| | | //对讲接口的结果 result.ResultData.MediaType协议类型 详细可参考接口文档 水务固定填1即可 |
| | | if (dataType == 1) {//对讲 |
| | | hstVideoAll.JsStartTalk( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaTCPPort, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_mediaTCPPort, |
| | | //_voiceTCPPort, |
| | | parms.deviceId, |
| | | parms.channelId, |
| | | result.ResultData.MediaType, |
| | | result.ResultData.MediaUserName, |
| | | result.ResultData.MediaPassword); |
| | | //_mediaUserName, |
| | | //_mediaPassword); |
| | | } |
| | | else if (dataType == 2) { |
| | | //监听 |
| | | hstVideoAll.JsStartMonitor( |
| | | result.ResultData.MediaServerDomainName, |
| | | result.ResultData.MediaTCPPort, |
| | | result.ResultData.MediaServerHttpsPort, |
| | | //_voiceDomainName, |
| | | //_mediaTCPPort, |
| | | //_voiceTCPPort, |
| | | parms.deviceId, |
| | | parms.channelId, |
| | | result.ResultData.MediaType, |
| | | result.ResultData.MediaUserName, |
| | | result.ResultData.MediaPassword); |
| | | //_mediaUserName, |
| | | //_mediaPassword); |
| | | } |
| | | } |
| | | else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | //广播时,得到通道号再下发命令。 |
| | | realTimeOpenBroadcast: function (deviceId, backChannelId) { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = backChannelId; |
| | | parms.streamType = 1; |
| | | parms.mediaServerName = _mediaServerName; |
| | | parms.mediaTCPPort = _mediaTCPPort; |
| | | var url = "MediaAPI/RealTimeStream/OpenBroadcast"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState != 1) { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | }, |
| | | //关闭语音 |
| | | realTimeCloseVoice: function (deviceId, channelId, dataType) { |
| | | var parms = {}; |
| | | parms.accessToken = _accessToken; |
| | | parms.deviceId = deviceId; |
| | | parms.channelId = channelId; |
| | | parms.dataType = dataType; |
| | | var url = "MediaAPI/RealTimeStream/CloseVoice"; |
| | | httpGet(url, parms, function (result) { |
| | | if (result.ResultState == 1) { |
| | | if (dataType == 1) {//对讲 |
| | | hstVideoAll.JsCloseTalk(parms.deviceId, parms.channelId); |
| | | } else if (dataType == 2) {//监听 |
| | | hstVideoAll.JsCloseMonitor(parms.deviceId, parms.channelId); |
| | | } else if (dataType == 3) {//广播 |
| | | hstVideoAll.JsCloseBroadcast(); |
| | | } |
| | | } else { |
| | | alert(result.ResultMessage); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /*------------实时语音结束--------------------------------*/ |
| | | } |
New file |
| | |
| | | button[data-balloon] { |
| | | overflow: visible |
| | | } |
| | | |
| | | [data-balloon] { |
| | | position: relative; |
| | | cursor: pointer |
| | | } |
| | | |
| | | [data-balloon]:after { |
| | | font-family: sans-serif !important; |
| | | font-weight: 400 !important; |
| | | font-style: normal !important; |
| | | text-shadow: none !important; |
| | | font-size: 12px !important; |
| | | background: hsla(0, 0%, 7%, .9); |
| | | border-radius: 4px; |
| | | color: #fff; |
| | | content: attr(data-balloon); |
| | | padding: .5em 1em; |
| | | white-space: nowrap |
| | | } |
| | | |
| | | [data-balloon]:after, [data-balloon]:before { |
| | | filter: alpha(opactiy=0); |
| | | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; |
| | | -moz-opacity: 0; |
| | | -khtml-opacity: 0; |
| | | opacity: 0; |
| | | pointer-events: none; |
| | | transition: all .18s ease-out .18s; |
| | | position: absolute; |
| | | z-index: 10 |
| | | } |
| | | |
| | | [data-balloon]:before { |
| | | background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002C14.285 12.002 8.594 0 2.658 0z'/%3E%3C/svg%3E"); |
| | | background-size: 100% auto; |
| | | width: 18px; |
| | | height: 6px; |
| | | content: "" |
| | | } |
| | | |
| | | [data-balloon]:hover:after, [data-balloon]:hover:before, [data-balloon][data-balloon-visible]:after, [data-balloon][data-balloon-visible]:before { |
| | | filter: alpha(opactiy=100); |
| | | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; |
| | | -moz-opacity: 1; |
| | | -khtml-opacity: 1; |
| | | opacity: 1; |
| | | pointer-events: auto |
| | | } |
| | | |
| | | [data-balloon].font-awesome:after { |
| | | font-family: FontAwesome |
| | | } |
| | | |
| | | [data-balloon][data-balloon-break]:after { |
| | | white-space: pre |
| | | } |
| | | |
| | | [data-balloon][data-balloon-blunt]:after, [data-balloon][data-balloon-blunt]:before { |
| | | transition: none |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up]:after { |
| | | margin-bottom: 11px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up]:after, [data-balloon][data-balloon-pos=up]:before { |
| | | bottom: 100%; |
| | | left: 50%; |
| | | -webkit-transform: translate(-50%, 10px); |
| | | transform: translate(-50%, 10px); |
| | | -webkit-transform-origin: top; |
| | | transform-origin: top |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up]:before { |
| | | margin-bottom: 5px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up]:hover:after, [data-balloon][data-balloon-pos=up]:hover:before, [data-balloon][data-balloon-pos=up][data-balloon-visible]:after, [data-balloon][data-balloon-pos=up][data-balloon-visible]:before { |
| | | -webkit-transform: translate(-50%); |
| | | transform: translate(-50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-left]:after { |
| | | left: 0; |
| | | margin-bottom: 11px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-left]:after, [data-balloon][data-balloon-pos=up-left]:before { |
| | | bottom: 100%; |
| | | -webkit-transform: translateY(10px); |
| | | transform: translateY(10px); |
| | | -webkit-transform-origin: top; |
| | | transform-origin: top |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-left]:before { |
| | | left: 5px; |
| | | margin-bottom: 5px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-left]:hover:after, [data-balloon][data-balloon-pos=up-left]:hover:before, [data-balloon][data-balloon-pos=up-left][data-balloon-visible]:after, [data-balloon][data-balloon-pos=up-left][data-balloon-visible]:before { |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-right]:after { |
| | | right: 0; |
| | | margin-bottom: 11px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-right]:after, [data-balloon][data-balloon-pos=up-right]:before { |
| | | bottom: 100%; |
| | | -webkit-transform: translateY(10px); |
| | | transform: translateY(10px); |
| | | -webkit-transform-origin: top; |
| | | transform-origin: top |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-right]:before { |
| | | right: 5px; |
| | | margin-bottom: 5px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up-right]:hover:after, [data-balloon][data-balloon-pos=up-right]:hover:before, [data-balloon][data-balloon-pos=up-right][data-balloon-visible]:after, [data-balloon][data-balloon-pos=up-right][data-balloon-visible]:before { |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down]:after { |
| | | margin-top: 11px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down]:after, [data-balloon][data-balloon-pos=down]:before { |
| | | left: 50%; |
| | | top: 100%; |
| | | -webkit-transform: translate(-50%, -10px); |
| | | transform: translate(-50%, -10px) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down]:before { |
| | | background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E"); |
| | | background-size: 100% auto; |
| | | width: 18px; |
| | | height: 6px; |
| | | margin-top: 5px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down]:hover:after, [data-balloon][data-balloon-pos=down]:hover:before, [data-balloon][data-balloon-pos=down][data-balloon-visible]:after, [data-balloon][data-balloon-pos=down][data-balloon-visible]:before { |
| | | -webkit-transform: translate(-50%); |
| | | transform: translate(-50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down-left]:after { |
| | | left: 0; |
| | | margin-top: 11px; |
| | | top: 100%; |
| | | -webkit-transform: translateY(-10px); |
| | | transform: translateY(-10px) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down-left]:before { |
| | | background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E"); |
| | | background-size: 100% auto; |
| | | width: 18px; |
| | | height: 6px; |
| | | left: 5px; |
| | | margin-top: 5px; |
| | | top: 100%; |
| | | -webkit-transform: translateY(-10px); |
| | | transform: translateY(-10px) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down-left]:hover:after, [data-balloon][data-balloon-pos=down-left]:hover:before, [data-balloon][data-balloon-pos=down-left][data-balloon-visible]:after, [data-balloon][data-balloon-pos=down-left][data-balloon-visible]:before { |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down-right]:after { |
| | | right: 0; |
| | | margin-top: 11px; |
| | | top: 100%; |
| | | -webkit-transform: translateY(-10px); |
| | | transform: translateY(-10px) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down-right]:before { |
| | | background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E"); |
| | | background-size: 100% auto; |
| | | width: 18px; |
| | | height: 6px; |
| | | right: 5px; |
| | | margin-top: 5px; |
| | | top: 100%; |
| | | -webkit-transform: translateY(-10px); |
| | | transform: translateY(-10px) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=down-right]:hover:after, [data-balloon][data-balloon-pos=down-right]:hover:before, [data-balloon][data-balloon-pos=down-right][data-balloon-visible]:after, [data-balloon][data-balloon-pos=down-right][data-balloon-visible]:before { |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=left]:after { |
| | | margin-right: 11px; |
| | | right: 100%; |
| | | top: 50%; |
| | | -webkit-transform: translate(10px, -50%); |
| | | transform: translate(10px, -50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=left]:before { |
| | | background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002C12.002 21.715 0 27.406 0 33.342z'/%3E%3C/svg%3E"); |
| | | background-size: 100% auto; |
| | | width: 6px; |
| | | height: 18px; |
| | | margin-right: 5px; |
| | | right: 100%; |
| | | top: 50%; |
| | | -webkit-transform: translate(10px, -50%); |
| | | transform: translate(10px, -50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=left]:hover:after, [data-balloon][data-balloon-pos=left]:hover:before, [data-balloon][data-balloon-pos=left][data-balloon-visible]:after, [data-balloon][data-balloon-pos=left][data-balloon-visible]:before { |
| | | -webkit-transform: translateY(-50%); |
| | | transform: translateY(-50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=right]:after { |
| | | left: 100%; |
| | | margin-left: 11px; |
| | | top: 50%; |
| | | -webkit-transform: translate(-10px, -50%); |
| | | transform: translate(-10px, -50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=right]:before { |
| | | background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002C-.002 14.285 12 8.594 12 2.658z'/%3E%3C/svg%3E"); |
| | | background-size: 100% auto; |
| | | width: 6px; |
| | | height: 18px; |
| | | left: 100%; |
| | | margin-left: 5px; |
| | | top: 50%; |
| | | -webkit-transform: translate(-10px, -50%); |
| | | transform: translate(-10px, -50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=right]:hover:after, [data-balloon][data-balloon-pos=right]:hover:before, [data-balloon][data-balloon-pos=right][data-balloon-visible]:after, [data-balloon][data-balloon-pos=right][data-balloon-visible]:before { |
| | | -webkit-transform: translateY(-50%); |
| | | transform: translateY(-50%) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-length=small]:after { |
| | | white-space: normal; |
| | | width: 80px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-length=medium]:after { |
| | | white-space: normal; |
| | | width: 150px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-length=large]:after { |
| | | white-space: normal; |
| | | width: 260px |
| | | } |
| | | |
| | | [data-balloon][data-balloon-length=xlarge]:after { |
| | | white-space: normal; |
| | | width: 380px |
| | | } |
| | | |
| | | @media screen and (max-width: 768px) { |
| | | [data-balloon][data-balloon-length=xlarge]:after { |
| | | white-space: normal; |
| | | width: 90vw |
| | | } |
| | | } |
| | | |
| | | [data-balloon][data-balloon-length=fit]:after { |
| | | white-space: normal; |
| | | width: 100% |
| | | } |
| | | |
| | | @-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 * { |
| | | box-sizing: content-box |
| | | } |
| | | |
| | | .dplayer svg { |
| | | width: 100%; |
| | | height: 100% |
| | | } |
| | | |
| | | .dplayer svg circle, .dplayer svg path { |
| | | fill: #fff |
| | | } |
| | | |
| | | .dplayer:-webkit-full-screen { |
| | | width: 100%; |
| | | height: 100%; |
| | | background: #000; |
| | | position: fixed; |
| | | z-index: 100000; |
| | | left: 0; |
| | | top: 0; |
| | | margin: 0; |
| | | padding: 0; |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | .dplayer:-moz-full-screen { |
| | | width: 100%; |
| | | height: 100%; |
| | | background: #000; |
| | | position: fixed; |
| | | z-index: 100000; |
| | | left: 0; |
| | | top: 0; |
| | | margin: 0; |
| | | padding: 0; |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | .dplayer:-ms-fullscreen { |
| | | width: 100%; |
| | | height: 100%; |
| | | background: #000; |
| | | position: fixed; |
| | | z-index: 100000; |
| | | left: 0; |
| | | top: 0; |
| | | margin: 0; |
| | | padding: 0; |
| | | -webkit-transform: translate(0); |
| | | transform: translate(0) |
| | | } |
| | | |
| | | .dplayer:fullscreen { |
| | | width: 100%; |
| | | height: 100%; |
| | | background: #000; |
| | | position: fixed; |
| | | z-index: 100000; |
| | | left: 0; |
| | | top: 0; |
| | | margin: 0; |
| | | padding: 0; |
| | | -webkit-transform: translate(0); |
| | | transform: translate(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: inherit; |
| | | animation-play-state: inherit |
| | | } |
| | | |
| | | .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: inherit; |
| | | animation-play-state: inherit |
| | | } |
| | | |
| | | .dplayer.dplayer-live .dplayer-bar-wrap, .dplayer.dplayer-live.dplayer-no-danmaku .dplayer-setting, .dplayer.dplayer-live .dplayer-setting-loop, .dplayer.dplayer-live .dplayer-setting-speed, .dplayer.dplayer-live .dplayer-time, .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-danunlimit, .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-arrow .dplayer-danmaku { |
| | | font-size: 18px |
| | | } |
| | | |
| | | .dplayer.dplayer-arrow .dplayer-icon { |
| | | margin: 0 -3px |
| | | } |
| | | |
| | | .dplayer.dplayer-playing .dplayer-danmaku .dplayer-danmaku-move { |
| | | -webkit-animation-play-state: running; |
| | | animation-play-state: running |
| | | } |
| | | |
| | | @media (min-width: 900px) { |
| | | /*.dplayer.dplayer-playing .dplayer-controller, .dplayer.dplayer-playing .dplayer-controller-mask {*/ |
| | | /* opacity: 0*/ |
| | | /*}*/ |
| | | .dplayer.dplayer-playing .dplayer-controller, .dplayer.dplayer-playing .dplayer-controller-mask { |
| | | opacity: 1 |
| | | } |
| | | .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.dplayer-loading .dplayer-danmaku-move, .dplayer.dplayer-paused .dplayer-danmaku, .dplayer.dplayer-paused .dplayer-danmaku-move { |
| | | -webkit-animation-play-state: paused; |
| | | animation-play-state: paused |
| | | } |
| | | |
| | | .dplayer.dplayer-hide-controller { |
| | | /*cursor: none*/ |
| | | } |
| | | |
| | | .dplayer.dplayer-hide-controller .dplayer-controller, .dplayer.dplayer-hide-controller .dplayer-controller-mask { |
| | | opacity: 1; |
| | | width: calc(100% - 10px); |
| | | /*-webkit-transform: translateY(100%);*/ |
| | | /*transform: translateY(100%)*/ |
| | | } |
| | | /*.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-controller .dplayer-icons .dplayer-camera-icon, .dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-volume { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon { |
| | | position: static; |
| | | display: inline-block |
| | | } |
| | | |
| | | .dplayer.dplayer-mobile .dplayer-bar-time { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-web-fullscreen-fix { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | margin: 0; |
| | | padding: 0 |
| | | } |
| | | |
| | | [data-balloon]:before { |
| | | display: none |
| | | } |
| | | |
| | | [data-balloon]:after { |
| | | padding: .3em .7em; |
| | | background: hsla(0, 0%, 7%, .7) |
| | | } |
| | | |
| | | [data-balloon][data-balloon-pos=up]:after { |
| | | margin-bottom: 0 |
| | | } |
| | | |
| | | .dplayer-bezel { |
| | | position: absolute; |
| | | left: 0; |
| | | right: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | font-size: 22px; |
| | | color: #fff; |
| | | pointer-events: none |
| | | } |
| | | |
| | | .dplayer-bezel .dplayer-bezel-icon { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | margin: -26px 0 0 -26px; |
| | | height: 52px; |
| | | width: 52px; |
| | | padding: 12px; |
| | | box-sizing: border-box; |
| | | background: rgba(0, 0, 0, .5); |
| | | border-radius: 50%; |
| | | opacity: 0; |
| | | pointer-events: none |
| | | } |
| | | |
| | | .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-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-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-bezel .diplayer-loading-icon .diplayer-loading-hide { |
| | | display: none |
| | | } |
| | | |
| | | .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; |
| | | -webkit-transform-origin: 4px 4px; |
| | | transform-origin: 4px 4px |
| | | } |
| | | |
| | | .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-7 { |
| | | -webkit-animation-delay: .7s; |
| | | animation-delay: .7s |
| | | } |
| | | |
| | | .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-6 { |
| | | -webkit-animation-delay: .6s; |
| | | animation-delay: .6s |
| | | } |
| | | |
| | | .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-5 { |
| | | -webkit-animation-delay: .5s; |
| | | animation-delay: .5s |
| | | } |
| | | |
| | | .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-4 { |
| | | -webkit-animation-delay: .4s; |
| | | animation-delay: .4s |
| | | } |
| | | |
| | | .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-3 { |
| | | -webkit-animation-delay: .3s; |
| | | animation-delay: .3s |
| | | } |
| | | |
| | | .dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-2 { |
| | | -webkit-animation-delay: .2s; |
| | | animation-delay: .2s |
| | | } |
| | | |
| | | .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-controller-mask { |
| | | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom; |
| | | height: 98px; |
| | | width: 100% |
| | | } |
| | | |
| | | .dplayer-controller, .dplayer-controller-mask { |
| | | position: absolute; |
| | | bottom: 0; |
| | | transition: all .3s ease |
| | | } |
| | | |
| | | .dplayer-controller { |
| | | background-color: #000; |
| | | left: 0; |
| | | right: 0; |
| | | height: 38px; |
| | | padding: 0 5px; |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none |
| | | } |
| | | |
| | | .dplayer-controller.dplayer-controller-comment .dplayer-icons { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller.dplayer-controller-comment .dplayer-icons.dplayer-comment-box { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap { |
| | | padding: 5px 0; |
| | | cursor: pointer; |
| | | position: absolute; |
| | | bottom: 33px; |
| | | width: 100%; |
| | | height: 3px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap:hover .dplayer-bar .dplayer-played .dplayer-thumb { |
| | | -webkit-transform: scale(1); |
| | | transform: scale(1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap:hover .dplayer-highlight { |
| | | display: block; |
| | | width: 8px; |
| | | -webkit-transform: translateX(-4px); |
| | | transform: translateX(-4px); |
| | | top: 4px; |
| | | height: 40% |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-highlight { |
| | | z-index: 12; |
| | | position: absolute; |
| | | top: 5px; |
| | | width: 6px; |
| | | height: 20%; |
| | | border-radius: 6px; |
| | | background-color: #fff; |
| | | text-align: center; |
| | | -webkit-transform: translateX(-3px); |
| | | transform: translateX(-3px); |
| | | transition: all .2s ease-in-out |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover .dplayer-highlight-text { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover ~ .dplayer-bar-preview, .dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover ~ .dplayer-bar-time { |
| | | opacity: 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-highlight .dplayer-highlight-text { |
| | | display: none; |
| | | position: absolute; |
| | | left: 50%; |
| | | top: -24px; |
| | | padding: 5px 8px; |
| | | background-color: rgba(0, 0, 0, .62); |
| | | color: #fff; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | white-space: nowrap; |
| | | -webkit-transform: translateX(-50%); |
| | | transform: translateX(-50%) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview { |
| | | position: absolute; |
| | | background: #fff; |
| | | pointer-events: none; |
| | | display: none; |
| | | background-size: 16000px 100% |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview-canvas { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | z-index: 1; |
| | | pointer-events: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar-time { |
| | | position: absolute; |
| | | left: 0; |
| | | top: -20px; |
| | | border-radius: 4px; |
| | | padding: 5px 7px; |
| | | background-color: rgba(0, 0, 0, .62); |
| | | color: #fff; |
| | | font-size: 12px; |
| | | text-align: center; |
| | | opacity: 1; |
| | | transition: opacity .1s ease-in-out; |
| | | word-wrap: normal; |
| | | word-break: normal; |
| | | z-index: 2; |
| | | pointer-events: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden { |
| | | opacity: 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar { |
| | | position: relative; |
| | | height: 3px; |
| | | width: 100%; |
| | | background: hsla(0, 0%, 100%, .2); |
| | | cursor: pointer |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded { |
| | | background: hsla(0, 0%, 100%, .6); |
| | | transition: all .5s ease |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded, .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | height: 3px; |
| | | will-change: width |
| | | } |
| | | |
| | | .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; |
| | | transition: all .3s ease-in-out; |
| | | -webkit-transform: scale(0); |
| | | transform: scale(0) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons { |
| | | height: 38px; |
| | | position: absolute; |
| | | bottom: 0; |
| | | display: flex; |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box { |
| | | display: none; |
| | | position: absolute; |
| | | transition: all .3s ease-in-out; |
| | | z-index: 2; |
| | | height: 38px; |
| | | bottom: 0; |
| | | left: 20px; |
| | | right: 20px; |
| | | color: #fff |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-icon { |
| | | padding: 7px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-icon { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-send-icon { |
| | | position: absolute; |
| | | right: 0; |
| | | top: 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box { |
| | | position: absolute; |
| | | background: rgba(28, 28, 28, .9); |
| | | bottom: 41px; |
| | | left: 0; |
| | | box-shadow: 0 0 25px rgba(0, 0, 0, .3); |
| | | border-radius: 4px; |
| | | padding: 10px 10px 16px; |
| | | font-size: 14px; |
| | | width: 204px; |
| | | transition: all .3s ease-in-out; |
| | | -webkit-transform: scale(0); |
| | | transform: scale(0) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box.dplayer-comment-setting-open { |
| | | -webkit-transform: scale(1); |
| | | transform: scale(1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box input[type=radio] { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box label { |
| | | cursor: pointer |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-title { |
| | | font-size: 13px; |
| | | color: #fff; |
| | | line-height: 30px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type { |
| | | font-size: 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type .dplayer-comment-setting-title { |
| | | margin-bottom: 6px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(2) span { |
| | | border-radius: 4px 0 0 4px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(4) span { |
| | | border-radius: 0 4px 4px 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.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: #fff; |
| | | border: 1px solid #fff; |
| | | margin-right: -1px; |
| | | box-sizing: border-box; |
| | | text-align: center; |
| | | cursor: pointer |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type input:checked + span { |
| | | background: #e4e4e6; |
| | | color: #1c1c1c |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color { |
| | | font-size: 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color label { |
| | | font-size: 0; |
| | | padding: 6px; |
| | | display: inline-block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span { |
| | | width: 22px; |
| | | height: 22px; |
| | | display: inline-block; |
| | | border-radius: 50%; |
| | | box-sizing: border-box; |
| | | cursor: pointer |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.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 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.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; |
| | | background: none; |
| | | margin: 0; |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | color: #fff |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-webkit-input-placeholder { |
| | | color: #fff; |
| | | opacity: .8 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input:-ms-input-placeholder, .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-input-placeholder { |
| | | color: #fff; |
| | | opacity: .8 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::placeholder { |
| | | color: #fff; |
| | | opacity: .8 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-clear { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-icons-left .dplayer-icon { |
| | | padding: 7px 0; |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-icons-right { |
| | | right: 5px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-icons-right .dplayer-icon { |
| | | padding: 8px 0 8px 2px; |
| | | margin: 0 2px; |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons.dplayer-icons-left { |
| | | width: calc(100% - 62px); |
| | | } |
| | | .dplayer-controller .dplayer-icons .dplayer-live-badge, .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; |
| | | width: calc(100% - 92px); |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-live-dot { |
| | | display: none; |
| | | width: 6px; |
| | | height: 6px; |
| | | vertical-align: 4%; |
| | | margin-right: 5px; |
| | | content: ""; |
| | | border-radius: 6px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon { |
| | | width: 22px; |
| | | height: 100%; |
| | | border: none; |
| | | background-color: transparent; |
| | | outline: none; |
| | | cursor: pointer; |
| | | vertical-align: middle; |
| | | box-sizing: border-box; |
| | | display: inline-block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon .dplayer-icon-content { |
| | | transition: all .2s ease-in-out; |
| | | opacity: .8 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon:hover .dplayer-icon-content { |
| | | opacity: 1 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon.dplayer-quality-icon { |
| | | color: #fff; |
| | | width: auto; |
| | | line-height: 22px; |
| | | font-size: 14px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon.dplayer-comment-icon { |
| | | padding: 10px 9px 9px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon.dplayer-setting-icon { |
| | | padding-top: 8.5px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-icon.dplayer-volume-icon { |
| | | width: 30px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume { |
| | | position: relative; |
| | | display: inline-block; |
| | | cursor: pointer; |
| | | height: 100%; |
| | | display: flex; |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar { |
| | | width: 45px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb { |
| | | -webkit-transform: scale(1); |
| | | transform: scale(1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar { |
| | | width: 45px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb { |
| | | -webkit-transform: scale(1); |
| | | transform: scale(1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap { |
| | | display: inline-block; |
| | | /*margin: 0 10px 0 -5px;*/ |
| | | margin: 0; |
| | | vertical-align: middle; |
| | | height: 100% |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar { |
| | | position: relative; |
| | | top: 17px; |
| | | width: 0; |
| | | height: 3px; |
| | | background: #aaa; |
| | | transition: all .3s ease-in-out |
| | | } |
| | | |
| | | .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%; |
| | | transition: all .1s ease; |
| | | will-change: width |
| | | } |
| | | |
| | | .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; |
| | | transition: all .3s ease-in-out; |
| | | -webkit-transform: scale(0); |
| | | transform: scale(0) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting, .dplayer-controller .dplayer-icons .dplayer-subtitle-btn { |
| | | display: inline-block; |
| | | height: 100% |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box { |
| | | position: absolute; |
| | | right: 0; |
| | | bottom: 50px; |
| | | -webkit-transform: scale(0); |
| | | transform: scale(0); |
| | | width: 150px; |
| | | border-radius: 2px; |
| | | background: rgba(28, 28, 28, .9); |
| | | padding: 7px 0; |
| | | transition: all .3s ease-in-out; |
| | | overflow: hidden; |
| | | z-index: 2 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box > div { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box > div.dplayer-setting-origin-panel { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-open { |
| | | -webkit-transform: scale(1); |
| | | transform: scale(1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-narrow { |
| | | width: 70px; |
| | | height: 180px; |
| | | text-align: center |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-origin-panel { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-speed-panel { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item, .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item { |
| | | height: 30px; |
| | | padding: 5px 10px; |
| | | box-sizing: border-box; |
| | | cursor: pointer; |
| | | position: relative |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item:hover, .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item:hover { |
| | | background-color: hsla(0, 0%, 100%, .1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku { |
| | | padding: 5px 0 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-label { |
| | | padding: 0 10px; |
| | | display: inline |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-label { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-danmaku-bar-wrap { |
| | | display: inline-block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-label { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-danmaku-bar-wrap { |
| | | display: inline-block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap { |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | display: none; |
| | | vertical-align: middle; |
| | | height: 100%; |
| | | width: 100% |
| | | } |
| | | |
| | | .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; |
| | | transition: all .3s ease-in-out |
| | | } |
| | | |
| | | .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%; |
| | | transition: all .1s ease; |
| | | background: #aaa; |
| | | will-change: width |
| | | } |
| | | |
| | | .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; |
| | | transition: all .3s ease-in-out; |
| | | background: #aaa |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-full { |
| | | display: inline-block; |
| | | height: 100%; |
| | | position: relative |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon { |
| | | position: absolute; |
| | | top: -30px; |
| | | z-index: 1; |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-quality { |
| | | position: relative; |
| | | display: inline-block; |
| | | height: 100%; |
| | | z-index: 2 |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list, .dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask { |
| | | display: none; |
| | | position: absolute; |
| | | bottom: 38px; |
| | | left: -18px; |
| | | width: 80px; |
| | | padding-bottom: 12px |
| | | } |
| | | |
| | | .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; |
| | | transition: all .3s ease-in-out; |
| | | overflow: hidden; |
| | | color: #fff; |
| | | text-align: center |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item { |
| | | height: 25px; |
| | | box-sizing: border-box; |
| | | cursor: pointer; |
| | | line-height: 25px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover { |
| | | background-color: hsla(0, 0%, 100%, .1) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-comment { |
| | | display: inline-block; |
| | | height: 100% |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-label { |
| | | color: #eee; |
| | | font-size: 13px; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | white-space: nowrap |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle { |
| | | width: 32px; |
| | | height: 20px; |
| | | text-align: center; |
| | | font-size: 0; |
| | | vertical-align: middle; |
| | | position: absolute; |
| | | top: 5px; |
| | | right: 10px |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input { |
| | | max-height: 0; |
| | | max-width: 0; |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input + label { |
| | | display: inline-block; |
| | | position: relative; |
| | | box-shadow: inset 0 0 0 0 #dfdfdf; |
| | | border: 1px solid #dfdfdf; |
| | | height: 20px; |
| | | width: 32px; |
| | | border-radius: 10px; |
| | | box-sizing: border-box; |
| | | cursor: pointer; |
| | | transition: .2s ease-in-out |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input + label:after, .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; |
| | | transition: .2s ease-in-out |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input + label:after { |
| | | background: #fff; |
| | | box-shadow: 0 1px 3px rgba(0, 0, 0, .4) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input:checked + label { |
| | | border-color: hsla(0, 0%, 100%, .5) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input:checked + label:before { |
| | | width: 30px; |
| | | background: hsla(0, 0%, 100%, .5) |
| | | } |
| | | |
| | | .dplayer-controller .dplayer-icons .dplayer-toggle input:checked + label:after { |
| | | left: 12px |
| | | } |
| | | |
| | | .dplayer-danmaku { |
| | | position: absolute; |
| | | left: 0; |
| | | right: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | font-size: 22px; |
| | | color: #fff |
| | | } |
| | | |
| | | .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-danmaku .dplayer-danmaku-item--demo { |
| | | position: absolute; |
| | | visibility: hidden |
| | | } |
| | | |
| | | .dplayer-danmaku .dplayer-danmaku-right { |
| | | position: absolute; |
| | | right: 0; |
| | | -webkit-transform: translateX(100%); |
| | | transform: translateX(100%) |
| | | } |
| | | |
| | | .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-danmaku .dplayer-danmaku-bottom, .dplayer-danmaku .dplayer-danmaku-top { |
| | | position: absolute; |
| | | width: 100%; |
| | | text-align: center; |
| | | visibility: hidden |
| | | } |
| | | |
| | | .dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move, .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-logo { |
| | | pointer-events: none; |
| | | position: absolute; |
| | | left: 20px; |
| | | top: 20px; |
| | | max-width: 50px; |
| | | max-height: 50px |
| | | } |
| | | |
| | | .dplayer-logo img { |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | background: none |
| | | } |
| | | |
| | | .dplayer-menu { |
| | | position: fixed; |
| | | width: 170px; |
| | | border-radius: 2px; |
| | | background: rgba(28, 28, 28, .85); |
| | | padding: 5px 0; |
| | | overflow: hidden; |
| | | z-index: 3; |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-menu.dplayer-menu-show { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-menu .dplayer-menu-item { |
| | | height: 30px; |
| | | box-sizing: border-box; |
| | | cursor: pointer |
| | | } |
| | | |
| | | .dplayer-menu .dplayer-menu-item:hover { |
| | | background-color: hsla(0, 0%, 100%, .1) |
| | | } |
| | | |
| | | .dplayer-menu .dplayer-menu-item a { |
| | | padding: 0 10px; |
| | | line-height: 30px; |
| | | color: #eee; |
| | | font-size: 13px; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden |
| | | } |
| | | |
| | | .dplayer-menu .dplayer-menu-item a:hover { |
| | | text-decoration: none |
| | | } |
| | | |
| | | .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; |
| | | transition: all .3s ease-in-out; |
| | | overflow: hidden; |
| | | color: #fff; |
| | | pointer-events: none |
| | | } |
| | | |
| | | .dplayer-subtitle { |
| | | position: absolute; |
| | | bottom: 40px; |
| | | width: 90%; |
| | | left: 5%; |
| | | text-align: center; |
| | | color: #fff; |
| | | text-shadow: .5px .5px .5px rgba(0, 0, 0, .5); |
| | | font-size: 20px |
| | | } |
| | | |
| | | .dplayer-subtitle.dplayer-subtitle-hide { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-mask { |
| | | position: absolute; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | z-index: 1; |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-mask.dplayer-mask-show { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-video-wrap { |
| | | position: relative; |
| | | background: #000; |
| | | font-size: 0; |
| | | width: 100%; |
| | | height: calc(100% - 38px); |
| | | } |
| | | |
| | | .dplayer-video-wrap .dplayer-video { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-video-wrap .dplayer-video-current { |
| | | display: block |
| | | } |
| | | |
| | | .dplayer-video-wrap .dplayer-video-prepare { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-info-panel { |
| | | position: absolute; |
| | | top: 10px; |
| | | left: 10px; |
| | | width: 400px; |
| | | background: rgba(28, 28, 28, .8); |
| | | padding: 10px; |
| | | color: #fff; |
| | | font-size: 12px; |
| | | border-radius: 2px |
| | | } |
| | | |
| | | .dplayer-info-panel-hide { |
| | | display: none |
| | | } |
| | | |
| | | .dplayer-info-panel .dplayer-info-panel-close { |
| | | cursor: pointer; |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 10px |
| | | } |
| | | |
| | | .dplayer-info-panel .dplayer-info-panel-item > span { |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | line-height: 15px; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden |
| | | } |
| | | |
| | | .dplayer-info-panel .dplayer-info-panel-item-title { |
| | | width: 100px; |
| | | text-align: right; |
| | | margin-right: 10px |
| | | } |
| | | |
| | | .dplayer-info-panel .dplayer-info-panel-item-data { |
| | | width: 260px |
| | | } |
| | | |
New file |
| | |
| | | .dplayer-live-text { |
| | | font-size: 12px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | display: inline-block; |
| | | width: 100%; |
| | | } |
| | | |
| | | .ttx-video-h5 { |
| | | background-color: #000; |
| | | } |
| | | |
| | | .ttx-video-h5-full { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%!important; |
| | | height: 100%!important; |
| | | z-index: 1; |
| | | } |
| | | .ttx-video-body-full{ |
| | | overflow: hidden; |
| | | } |
| | | .ttx-video-h5-item { |
| | | background: url("../images/tv_defaout.jpg") no-repeat; |
| | | background-size: 100% 100%; |
| | | border: 1px solid #353535; |
| | | float: left; |
| | | } |
| | | |
| | | |
| | | .ttx-video-h5-item-full { |
| | | width: 100% !important; |
| | | height: 100% !important; |
| | | border: none !important; |
| | | } |
| | | |
| | | .ttx-video-h5-item-check { |
| | | border: 1px solid green; |
| | | } |
| | | |
| | | .video-basis-1 { |
| | | width: 100%; |
| | | height: 100%; |
| | | border: none; |
| | | } |
| | | |
| | | /**2-4**/ |
| | | .video-basis-2 { |
| | | width: calc(50% - 2px); |
| | | height: calc(50% - 2px); |
| | | } |
| | | |
| | | /**5-9**/ |
| | | .video-basis-3 { |
| | | width: calc(33.33% - 2px); |
| | | height: calc(33.33% - 2px); |
| | | } |
| | | |
| | | /**10-16**/ |
| | | .video-basis-4 { |
| | | width: calc(25% - 2px); |
| | | height: calc(25% - 2px); |
| | | } |
| | | |
| | | /**17-25**/ |
| | | .video-basis-5 { |
| | | width: calc(20% - 2px); |
| | | height: calc(20% - 2px); |
| | | } |
| | | |
| | | /**26-36**/ |
| | | .video-basis-6 { |
| | | width: calc(16.66% - 2px); |
| | | height: calc(16.66% - 2px); |
| | | } |
| | | |
| | | /**6**/ |
| | | .video-basis-6-1 { |
| | | width: calc(66.6% - 2px); |
| | | height: calc(66.6% - 2px); |
| | | } |
| | | |
| | | /**8**/ |
| | | .video-basis-8-1 { |
| | | width: calc(75% - 2px); |
| | | height: calc(75% - 2px); |
| | | } |
| | | |
| | | .hide { |
| | | display: none !important; |
| | | } |
| | | |
| | | .dplayer-video-wrap .dplayer-video{ |
| | | object-fit: fill; |
| | | } |
| | | .dplayer-video-wrap{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | |
| | | .mask{ |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | opacity: 0.6; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #30333B; |
| | | z-index: 10000001; |
| | | display: none; |
| | | } |
| | | .mask-loading{ |
| | | display: block; |
| | | top: calc(50% - 100px); |
| | | height: 100px; |
| | | position: absolute; |
| | | left: calc(50% - 50px); |
| | | } |
| | | .mask-text{ |
| | | height: 30px; |
| | | width: 30px; |
| | | top: calc(50% - 65px); |
| | | position: absolute; |
| | | left: calc(50% - 15px); |
| | | color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | |
| | | <el-empty description="暂无视频信息" :image-size="80"></el-empty> |
| | | </div> |
| | | <canvas id="myCanvas" style="display:none"></canvas> |
| | | <!-- <el-button type="default" style="position: absolute; top: 20px;right: 60px;" |
| | | @click="goBack()">查看回放</el-button> --> |
| | | <el-button type="default" style="position: absolute; top: 20px;right: 60px;" |
| | | @click="goBack()">查看回放</el-button> |
| | | <div style="position: absolute; right: 11px; top: 20px"> |
| | | <div style="display: flex;flex-direction: column;align-items: center;justify-content: center; |
| | | background: #ffffff; padding: 3px 10px; border-radius: 6px;margin-bottom: 10px;" @click="fullScreen()"> |
| | |
| | | <template> |
| | | <div class="mainer"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <div class=""> |
| | | <ul class="info-list"> |
| | | <li class="flex"> |
| | | <span class="label">公司名称:</span> |
| | | <span class="content">{{ info.enterpriseName }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">车牌号码:</span> |
| | | <span class="content">{{ info.vehicleNumber }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">车牌颜色:</span> |
| | | <span class="content">{{ info.licensePlateColor }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">车辆营运类型:</span> |
| | | <span class="content">{{ info.operateType }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">经营区域:</span> |
| | | <span class="content">{{ info.operatingArea }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">所属车主:</span> |
| | | <span class="content">{{ info.driverName }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">联系电话:</span> |
| | | <span class="content">{{ info.driverPhone }}</span> |
| | | </li> |
| | | </ul> |
| | | <hr /> |
| | | <div class="mt--20 ml--20 mr--20"> |
| | | <div class="section-title mb--20">查看视频录像</div> |
| | | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> |
| | | <el-form-item label="开始时间"> |
| | | <el-date-picker v-model="searchForm.startTime" type="datetime" placeholder="选择开始时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss" :picker-options="startPickerOptions" |
| | | @change="handleStartTimeChange" /> |
| | | </el-form-item> |
| | | <el-form-item label="结束时间"> |
| | | <el-date-picker v-model="searchForm.endTime" type="datetime" placeholder="选择结束时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss" :picker-options="endPickerOptions" |
| | | @change="handleEndTimeChange" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="search">查询</el-button> |
| | | <el-button @click="resetForm">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <div class="grid-content" style=""> |
| | | <PlayLive v-if="urlLink" :serverPort="serverPort" :serverIp="serverIp" :carId="$route.query.id" |
| | | :urlLink="urlLink" @video-error="handleVideoError" /> |
| | | <div v-else class="empty-state"> |
| | | <el-empty description="请选择时间范围并点击查询获取视频" :image-size="80"></el-empty> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="mainer"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <div class=""> |
| | | <ul class="info-list"> |
| | | <li class="flex"> |
| | | <span class="label">公司名称:</span> |
| | | <span class="content">{{ info.enterpriseName }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">车牌号码:</span> |
| | | <span class="content">{{ info.vehicleNumber }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">车牌颜色:</span> |
| | | <span class="content">{{ info.licensePlateColor }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">车辆营运类型:</span> |
| | | <span class="content">{{ info.operateType }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">经营区域:</span> |
| | | <span class="content">{{ info.operatingArea }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">所属车主:</span> |
| | | <span class="content">{{ info.driverName }}</span> |
| | | </li> |
| | | <li class="flex"> |
| | | <span class="label">联系电话:</span> |
| | | <span class="content">{{ info.driverPhone }}</span> |
| | | </li> |
| | | </ul> |
| | | <hr /> |
| | | <div class="mt--20 ml--20 mr--20"> |
| | | <div class="section-title mb--20">查看视频录像</div> |
| | | <el-form |
| | | :inline="true" |
| | | :model="searchForm" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-form-item label="开始时间"> |
| | | <el-date-picker |
| | | v-model="searchForm.startTime" |
| | | type="datetime" |
| | | placeholder="选择开始时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | :picker-options="startPickerOptions" |
| | | @change="handleStartTimeChange" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="结束时间"> |
| | | <el-date-picker |
| | | v-model="searchForm.endTime" |
| | | type="datetime" |
| | | placeholder="选择结束时间" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | :picker-options="endPickerOptions" |
| | | @change="handleEndTimeChange" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="search">查询</el-button> |
| | | <el-button @click="resetForm">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <div class="grid-content" style=""> |
| | | <div id="hstplayer" style="width: 100%; height: 100%;"></div> |
| | | <!-- <PlayLive |
| | | v-if="urlLink" |
| | | :serverPort="serverPort" |
| | | :serverIp="serverIp" |
| | | :carId="$route.query.id" |
| | | :urlLink="urlLink" |
| | | @video-error="handleVideoError" |
| | | /> |
| | | <div v-else class="empty-state"> |
| | | <el-empty |
| | | description="请选择时间范围并点击查询获取视频" |
| | | :image-size="80" |
| | | ></el-empty> |
| | | </div> --> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDetail, getPlaybackVideo } from './service' |
| | | import PlayLive from '@/components/PlayLive' |
| | | import { getDetail, getPlaybackVideo } from "./service"; |
| | | import PlayLive from "@/components/PlayLive"; |
| | | |
| | | export default { |
| | | components: { |
| | | PlayLive |
| | | components: { |
| | | PlayLive, |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | video: null, |
| | | videoUrl: "", |
| | | searchForm: { |
| | | startTime: "", |
| | | endTime: "", |
| | | }, |
| | | startPickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | | }, |
| | | }, |
| | | endPickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | | }, |
| | | }, |
| | | serverIp: "", |
| | | serverPort: "", |
| | | urlLink: "", |
| | | tokenID: 'shehongchuzu' |
| | | }; |
| | | }, |
| | | created() { |
| | | getDetail(this.$route.query.id).then((res) => { |
| | | this.info = res; |
| | | }); |
| | | }, |
| | | mounted() { |
| | | // 动态加载脚本 |
| | | this.loadScripts().then(() => { |
| | | //视频参数 |
| | | var params = { |
| | | allowFullscreen: "true", |
| | | allowScriptAccess: "always", |
| | | bgcolor: "#FFFFFF", |
| | | wmode: "transparent", |
| | | }; |
| | | |
| | | //初始化视频插件 |
| | | window.hstVideoPlay.init(this.tokenID, "hstplayer", params, 1); // 设置为1个窗口 |
| | | }); |
| | | }, |
| | | methods: { |
| | | loadScripts() { |
| | | return new Promise((resolve, reject) => { |
| | | const scripts = [ |
| | | '/scripts/jquery-1.7.1.min.js', |
| | | '/scripts/md5.js', |
| | | '/scripts/request.js', |
| | | '/scripts/swfobject-all.js', |
| | | '/scripts/swfobject-play.js', |
| | | '/scripts/swfobject-h5.js', |
| | | '/scripts/flv.min.js', |
| | | '/scripts/DPlayer.min.js', |
| | | '/scripts/HZPlayer.js', |
| | | '/scripts/HZRecorder.js' |
| | | ]; |
| | | |
| | | const loadScript = (index) => { |
| | | if (index >= scripts.length) { |
| | | resolve(); |
| | | return; |
| | | } |
| | | |
| | | const script = document.createElement('script'); |
| | | script.src = scripts[index]; |
| | | script.onload = () => loadScript(index + 1); |
| | | script.onerror = reject; |
| | | document.head.appendChild(script); |
| | | }; |
| | | |
| | | loadScript(0); |
| | | }); |
| | | }, |
| | | data() { |
| | | return { |
| | | info: {}, |
| | | video: null, |
| | | videoUrl: '', |
| | | searchForm: { |
| | | startTime: '', |
| | | endTime: '' |
| | | }, |
| | | startPickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | | } |
| | | }, |
| | | endPickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | | } |
| | | }, |
| | | serverIp: '', |
| | | serverPort: '', |
| | | urlLink: '' |
| | | handleStartTimeChange(val) { |
| | | if (val && this.searchForm.endTime) { |
| | | if (new Date(val) > new Date(this.searchForm.endTime)) { |
| | | this.$message.warning("开始时间不能大于结束时间"); |
| | | this.searchForm.startTime = ""; |
| | | } |
| | | } |
| | | // 更新结束时间选择器的禁用时间 |
| | | this.endPickerOptions.disabledDate = (time) => { |
| | | return ( |
| | | time.getTime() > Date.now() || |
| | | (this.searchForm.startTime && |
| | | time.getTime() < new Date(this.searchForm.startTime).getTime()) |
| | | ); |
| | | }; |
| | | }, |
| | | created() { |
| | | getDetail(this.$route.query.id).then(res => { |
| | | this.info = res |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleStartTimeChange(val) { |
| | | if (val && this.searchForm.endTime) { |
| | | if (new Date(val) > new Date(this.searchForm.endTime)) { |
| | | this.$message.warning('开始时间不能大于结束时间'); |
| | | this.searchForm.startTime = ''; |
| | | } |
| | | } |
| | | // 更新结束时间选择器的禁用时间 |
| | | this.endPickerOptions.disabledDate = (time) => { |
| | | return time.getTime() > Date.now() || |
| | | (this.searchForm.startTime && time.getTime() < new Date(this.searchForm.startTime).getTime()); |
| | | }; |
| | | }, |
| | | handleEndTimeChange(val) { |
| | | if (val && this.searchForm.startTime) { |
| | | if (new Date(val) < new Date(this.searchForm.startTime)) { |
| | | this.$message.warning('结束时间不能小于开始时间'); |
| | | this.searchForm.endTime = ''; |
| | | } |
| | | } |
| | | }, |
| | | search() { |
| | | if (!this.searchForm.startTime || !this.searchForm.endTime) { |
| | | this.$message.warning('请选择开始时间和结束时间'); |
| | | return; |
| | | } |
| | | |
| | | // 验证时间范围 |
| | | const startTime = new Date(this.searchForm.startTime); |
| | | const endTime = new Date(this.searchForm.endTime); |
| | | const now = new Date(); |
| | | |
| | | if (startTime > now || endTime > now) { |
| | | this.$message.warning('选择的时间不能超过当前时间'); |
| | | return; |
| | | } |
| | | |
| | | if (startTime > endTime) { |
| | | this.$message.warning('开始时间不能大于结束时间'); |
| | | return; |
| | | } |
| | | |
| | | // 重置视频链接 |
| | | this.urlLink = ''; |
| | | this.serverIp = ''; |
| | | this.serverPort = ''; |
| | | |
| | | getPlaybackVideo({ |
| | | startTime: new Date(this.searchForm.startTime).getTime(), |
| | | endTime: new Date(this.searchForm.endTime).getTime(), |
| | | id: this.$route.query.id |
| | | }).then(res => { |
| | | if (res && res.serverIp && res.serverPort) { |
| | | // 构建完整的视频流地址 |
| | | this.serverIp = res.serverIp; |
| | | this.serverPort = res.serverPort; |
| | | this.urlLink = res.url; |
| | | } else { |
| | | this.$message.error('未获取到视频地址'); |
| | | } |
| | | }).catch(err => { |
| | | console.error('获取视频失败:', err); |
| | | this.$message.error('获取视频失败,请稍后重试'); |
| | | }); |
| | | }, |
| | | handleVideoError() { |
| | | this.urlLink = ''; |
| | | this.$message.error('视频加载失败,请稍后重试'); |
| | | }, |
| | | resetForm() { |
| | | this.searchForm.startTime = ''; |
| | | this.searchForm.endTime = ''; |
| | | // 重置结束时间选择器的禁用时间 |
| | | this.endPickerOptions.disabledDate = (time) => { |
| | | return time.getTime() > Date.now(); |
| | | }; |
| | | handleEndTimeChange(val) { |
| | | if (val && this.searchForm.startTime) { |
| | | if (new Date(val) < new Date(this.searchForm.startTime)) { |
| | | this.$message.warning("结束时间不能小于开始时间"); |
| | | this.searchForm.endTime = ""; |
| | | } |
| | | } |
| | | }, |
| | | search() { |
| | | if (!this.searchForm.startTime || !this.searchForm.endTime) { |
| | | this.$message.warning("请选择开始时间和结束时间"); |
| | | return; |
| | | } |
| | | |
| | | // 验证时间范围 |
| | | const startTime = new Date(this.searchForm.startTime); |
| | | const endTime = new Date(this.searchForm.endTime); |
| | | const now = new Date(); |
| | | |
| | | if (startTime > now || endTime > now) { |
| | | this.$message.warning("选择的时间不能超过当前时间"); |
| | | return; |
| | | } |
| | | |
| | | if (startTime > endTime) { |
| | | this.$message.warning("开始时间不能大于结束时间"); |
| | | return; |
| | | } |
| | | hstVideoPlay.realTimeOpenVideo('18800000075', '2') |
| | | // getPlaybackVideo({ |
| | | // startTime: new Date(this.searchForm.startTime).getTime(), |
| | | // endTime: new Date(this.searchForm.endTime).getTime(), |
| | | // id: this.$route.query.id, |
| | | // }) |
| | | // .then((res) => { |
| | | // if (res && res.serverIp && res.serverPort) { |
| | | // // 使用 videoPlay 组件播放视频 |
| | | // window.hstVideoPlay.historyOpenVideo( |
| | | // this.$route.query.id, // deviceId |
| | | // '1', // channelId |
| | | // 0, // dataType |
| | | // 1, // streamType |
| | | // 0, // storageType |
| | | // this.searchForm.startTime, // startTime |
| | | // this.searchForm.endTime // endTime |
| | | // ); |
| | | // } else { |
| | | // this.$message.error("未获取到视频地址"); |
| | | // } |
| | | // }) |
| | | // .catch((err) => { |
| | | // console.error("获取视频失败:", err); |
| | | // this.$message.error("获取视频失败,请稍后重试"); |
| | | // }); |
| | | }, |
| | | handleVideoError() { |
| | | this.urlLink = ""; |
| | | this.$message.error("视频加载失败,请稍后重试"); |
| | | }, |
| | | resetForm() { |
| | | this.searchForm.startTime = ""; |
| | | this.searchForm.endTime = ""; |
| | | // 重置结束时间选择器的禁用时间 |
| | | this.endPickerOptions.disabledDate = (time) => { |
| | | return time.getTime() > Date.now(); |
| | | }; |
| | | }, |
| | | }, |
| | | beforeDestroy() { |
| | | // 关闭视频播放 |
| | | if (this.$route.query.id) { |
| | | window.hstVideoPlay.historyCloseVideo(this.$route.query.id, '1'); |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .mainer { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .info-list { |
| | | list-style: none; |
| | | padding: 0; |
| | | margin: 20px 0; |
| | | list-style: none; |
| | | padding: 0; |
| | | margin: 20px 0; |
| | | |
| | | li { |
| | | margin-bottom: 12px; |
| | | font-size: 16px; |
| | | li { |
| | | margin-bottom: 12px; |
| | | font-size: 16px; |
| | | |
| | | .label { |
| | | width: 130px; |
| | | text-align: right; |
| | | margin-right: 12px; |
| | | color: #606266; |
| | | } |
| | | |
| | | .content { |
| | | flex: 1; |
| | | } |
| | | .label { |
| | | width: 130px; |
| | | text-align: right; |
| | | margin-right: 12px; |
| | | color: #606266; |
| | | } |
| | | |
| | | .content { |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .section-title { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | } |
| | | |
| | | .el-row { |
| | | flex: 1; |
| | | display: flex; |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | | |
| | | .el-col { |
| | | display: flex; |
| | | flex-direction: column; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .form-container { |
| | | .el-form-item { |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-form-item { |
| | | margin-bottom: 20px; |
| | | } |
| | | } |
| | | |
| | | .grid-content { |
| | | background: #000; |
| | | flex: 1; |
| | | position: relative; |
| | | overflow: hidden; |
| | | background: #000; |
| | | flex: 1; |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | video { |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | object-fit: contain; |
| | | max-width: 100%; |
| | | max-height: 100%; |
| | | object-fit: contain; |
| | | } |
| | | </style> |
| | | </style> |