Created
April 28, 2017 22:42
-
-
Save leonekmi/f84ec6292552d47d7e85b0170b60dd2c to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ADNCountDown(a, b, c, d) { | |
this.container = a, this.callback = d, this.currentTime = this.parseTime(b), this.startTime = this.parseTime(c), this.endTime = new Date(this.startTime.getTime() - (this.currentTime.getTime() - (new Date).getTime())), this.node = document.createElement("div"), this.node.className = "adn-player-countdown vjs-error-display adn-player-error"; | |
var e = document.createElement("div"); | |
e.className = "adn-player-countdown-content", e.innerHTML = "<div>Cette vidéo sera disponible dans :</div>", this.countdownNode = document.createElement("span"), this.countdownNode.className = "adn-player-countdown-value", e.appendChild(this.countdownNode), this.node.appendChild(e), this.container.appendChild(this.node); | |
var f = this; | |
this.timer = setInterval(function() { | |
f.sync() | |
}, 500), this.sync() | |
}! function(a) { | |
if ("object" == typeof exports && "undefined" != typeof module) module.exports = a(); | |
else if ("function" == typeof define && define.amd) define([], a); | |
else { | |
var b; | |
b = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, b.videojs = a() | |
} | |
}(function() { | |
var a; | |
return function b(a, c, d) { | |
function e(g, h) { | |
if (!c[g]) { | |
if (!a[g]) { | |
var i = "function" == typeof require && require; | |
if (!h && i) return i(g, !0); | |
if (f) return f(g, !0); | |
var j = new Error("Cannot find module '" + g + "'"); | |
throw j.code = "MODULE_NOT_FOUND", j | |
} | |
var k = c[g] = { | |
exports: {} | |
}; | |
a[g][0].call(k.exports, function(b) { | |
var c = a[g][1][b]; | |
return e(c ? c : b) | |
}, k, k.exports, b, a, c, d) | |
} | |
return c[g].exports | |
} | |
for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]); | |
return e | |
}({ | |
1: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(2), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-big-play-button" | |
}, b.prototype.handleClick = function() { | |
this.player_.play() | |
}, b | |
}(i["default"]); | |
l.prototype.controlText_ = "Play Video", k["default"].registerComponent("BigPlayButton", l), c["default"] = l | |
}, { | |
2: 2, | |
5: 5 | |
}], | |
2: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(3), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = a(87), | |
m = d(l), | |
n = a(147), | |
o = d(n), | |
p = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "button", | |
b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
c = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; | |
b = (0, o["default"])({ | |
className: this.buildCSSClass() | |
}, b), "button" !== a && (m["default"].warn("Creating a Button with an HTML element of " + a + " is deprecated; use ClickableComponent instead."), b = (0, o["default"])({ | |
tabIndex: 0 | |
}, b), c = (0, o["default"])({ | |
role: "button" | |
}, c)), c = (0, o["default"])({ | |
type: "button", | |
"aria-live": "polite" | |
}, c); | |
var d = k["default"].prototype.createEl.call(this, a, b, c); | |
return this.createControlTextEl(d), d | |
}, b.prototype.addChild = function(a) { | |
var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
c = this.constructor.name; | |
return m["default"].warn("Adding an actionable (user controllable) child to a Button (" + c + ") is not supported; use a ClickableComponent instead."), k["default"].prototype.addChild.call(this, a, b) | |
}, b.prototype.enable = function() { | |
a.prototype.enable.call(this), this.el_.removeAttribute("disabled") | |
}, b.prototype.disable = function() { | |
a.prototype.disable.call(this), this.el_.setAttribute("disabled", "disabled") | |
}, b.prototype.handleKeyPress = function(b) { | |
32 !== b.which && 13 !== b.which && a.prototype.handleKeyPress.call(this, b) | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("Button", p), c["default"] = p | |
}, { | |
147: 147, | |
3: 3, | |
5: 5, | |
87: 87 | |
}], | |
3: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(83), | |
n = d(m), | |
o = a(84), | |
p = d(o), | |
q = a(87), | |
r = e(q), | |
s = a(101), | |
t = e(s), | |
u = a(147), | |
v = e(u), | |
w = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.emitTapEvents(), e.enable(), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "div", | |
c = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
d = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; | |
c = (0, v["default"])({ | |
className: this.buildCSSClass(), | |
tabIndex: 0 | |
}, c), "button" === b && r["default"].error("Creating a ClickableComponent with an HTML element of " + b + " is not supported; use a Button instead."), d = (0, v["default"])({ | |
role: "button", | |
"aria-live": "polite" | |
}, d), this.tabIndex_ = c.tabIndex; | |
var e = a.prototype.createEl.call(this, b, c, d); | |
return this.createControlTextEl(e), e | |
}, b.prototype.createControlTextEl = function(a) { | |
return this.controlTextEl_ = l.createEl("span", { | |
className: "vjs-control-text" | |
}), a && a.appendChild(this.controlTextEl_), this.controlText(this.controlText_, a), this.controlTextEl_ | |
}, b.prototype.controlText = function(a) { | |
var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.el(); | |
if (!a) return this.controlText_ || "Need Text"; | |
var c = this.localize(a); | |
return this.controlText_ = a, this.controlTextEl_.innerHTML = c, b.setAttribute("title", c), this | |
}, b.prototype.buildCSSClass = function() { | |
return "vjs-control vjs-button " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.enable = function() { | |
return this.removeClass("vjs-disabled"), this.el_.setAttribute("aria-disabled", "false"), "undefined" != typeof this.tabIndex_ && this.el_.setAttribute("tabIndex", this.tabIndex_), this.on("tap", this.handleClick), this.on("click", this.handleClick), this.on("focus", this.handleFocus), this.on("blur", this.handleBlur), this | |
}, b.prototype.disable = function() { | |
return this.addClass("vjs-disabled"), this.el_.setAttribute("aria-disabled", "true"), "undefined" != typeof this.tabIndex_ && this.el_.removeAttribute("tabIndex"), this.off("tap", this.handleClick), this.off("click", this.handleClick), this.off("focus", this.handleFocus), this.off("blur", this.handleBlur), this | |
}, b.prototype.handleClick = function() {}, b.prototype.handleFocus = function() { | |
n.on(t["default"], "keydown", p.bind(this, this.handleKeyPress)) | |
}, b.prototype.handleKeyPress = function(b) { | |
32 === b.which || 13 === b.which ? (b.preventDefault(), this.handleClick(b)) : a.prototype.handleKeyPress && a.prototype.handleKeyPress.call(this, b) | |
}, b.prototype.handleBlur = function() { | |
n.off(t["default"], "keydown", p.bind(this, this.handleKeyPress)) | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("ClickableComponent", w), c["default"] = w | |
}, { | |
101: 101, | |
147: 147, | |
5: 5, | |
82: 82, | |
83: 83, | |
84: 84, | |
87: 87 | |
}], | |
4: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(2), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return g.controlText(d && d.controlText || g.localize("Close")), g | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-close-button " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.handleClick = function() { | |
this.trigger({ | |
type: "close", | |
bubbles: !1 | |
}) | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("CloseButton", l), c["default"] = l | |
}, { | |
2: 2, | |
5: 5 | |
}], | |
5: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
c.__esModule = !0; | |
var g = a(102), | |
h = e(g), | |
i = a(82), | |
j = d(i), | |
k = a(84), | |
l = d(k), | |
m = a(86), | |
n = d(m), | |
o = a(83), | |
p = d(o), | |
q = a(87), | |
r = e(q), | |
s = a(92), | |
t = e(s), | |
u = a(88), | |
v = e(u), | |
w = function() { | |
function a(b, c, d) { | |
if (f(this, a), !b && this.play ? this.player_ = b = this : this.player_ = b, this.options_ = (0, v["default"])({}, this.options_), c = this.options_ = (0, v["default"])(this.options_, c), this.id_ = c.id || c.el && c.el.id, !this.id_) { | |
var e = b && b.id && b.id() || "no_player"; | |
this.id_ = e + "_component_" + n.newGUID() | |
} | |
this.name_ = c.name || null, c.el ? this.el_ = c.el : c.createEl !== !1 && (this.el_ = this.createEl()), this.children_ = [], this.childIndex_ = {}, this.childNameIndex_ = {}, c.initChildren !== !1 && this.initChildren(), this.ready(d), c.reportTouchActivity !== !1 && this.enableTouchActivity() | |
} | |
return a.prototype.dispose = function() { | |
if (this.trigger({ | |
type: "dispose", | |
bubbles: !1 | |
}), this.children_) | |
for (var a = this.children_.length - 1; a >= 0; a--) this.children_[a].dispose && this.children_[a].dispose(); | |
this.children_ = null, this.childIndex_ = null, this.childNameIndex_ = null, this.off(), this.el_.parentNode && this.el_.parentNode.removeChild(this.el_), j.removeElData(this.el_), this.el_ = null | |
}, a.prototype.player = function() { | |
return this.player_ | |
}, a.prototype.options = function(a) { | |
return r["default"].warn("this.options() has been deprecated and will be moved to the constructor in 6.0"), a ? (this.options_ = (0, v["default"])(this.options_, a), this.options_) : this.options_ | |
}, a.prototype.el = function() { | |
return this.el_ | |
}, a.prototype.createEl = function(a, b, c) { | |
return j.createEl(a, b, c) | |
}, a.prototype.localize = function(a) { | |
var b = this.player_.language && this.player_.language(), | |
c = this.player_.languages && this.player_.languages(); | |
if (!b || !c) return a; | |
var d = c[b]; | |
if (d && d[a]) return d[a]; | |
var e = b.split("-")[0], | |
f = c[e]; | |
return f && f[a] ? f[a] : a | |
}, a.prototype.contentEl = function() { | |
return this.contentEl_ || this.el_ | |
}, a.prototype.id = function() { | |
return this.id_ | |
}, a.prototype.name = function() { | |
return this.name_ | |
}, a.prototype.children = function() { | |
return this.children_ | |
}, a.prototype.getChildById = function(a) { | |
return this.childIndex_[a] | |
}, a.prototype.getChild = function(a) { | |
return a ? (a = (0, t["default"])(a), this.childNameIndex_[a]) : void 0 | |
}, a.prototype.addChild = function(b) { | |
var c = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
d = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.children_.length, | |
e = void 0, | |
f = void 0; | |
if ("string" == typeof b) { | |
f = (0, t["default"])(b), c || (c = {}), c === !0 && (r["default"].warn("Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`."), c = {}); | |
var g = c.componentClass || f; | |
c.name = f; | |
var h = a.getComponent(g); | |
if (!h) throw new Error("Component " + g + " does not exist"); | |
if ("function" != typeof h) return null; | |
e = new h(this.player_ || this, c) | |
} else e = b; | |
if (this.children_.splice(d, 0, e), "function" == typeof e.id && (this.childIndex_[e.id()] = e), f = f || e.name && e.name(), f && (this.childNameIndex_[f] = e), "function" == typeof e.el && e.el()) { | |
var i = this.contentEl().children, | |
j = i[d] || null; | |
this.contentEl().insertBefore(e.el(), j) | |
} | |
return e | |
}, a.prototype.removeChild = function(a) { | |
if ("string" == typeof a && (a = this.getChild(a)), a && this.children_) { | |
for (var b = !1, c = this.children_.length - 1; c >= 0; c--) | |
if (this.children_[c] === a) { | |
b = !0, this.children_.splice(c, 1); | |
break | |
} | |
if (b) { | |
this.childIndex_[a.id()] = null, this.childNameIndex_[a.name()] = null; | |
var d = a.el(); | |
d && d.parentNode === this.contentEl() && this.contentEl().removeChild(a.el()) | |
} | |
} | |
}, a.prototype.initChildren = function() { | |
var b = this, | |
c = this.options_.children; | |
c && ! function() { | |
var d = b.options_, | |
e = function(a) { | |
var c = a.name, | |
e = a.opts; | |
if (void 0 !== d[c] && (e = d[c]), e !== !1) { | |
e === !0 && (e = {}), e.playerOptions = b.options_.playerOptions; | |
var f = b.addChild(c, e); | |
f && (b[c] = f) | |
} | |
}, | |
f = void 0, | |
g = a.getComponent("Tech"); | |
f = Array.isArray(c) ? c : Object.keys(c), f.concat(Object.keys(b.options_).filter(function(a) { | |
return !f.some(function(b) { | |
return "string" == typeof b ? a === b : a === b.name | |
}) | |
})).map(function(a) { | |
var d = void 0, | |
e = void 0; | |
return "string" == typeof a ? (d = a, e = c[d] || b.options_[d] || {}) : (d = a.name, e = a), { | |
name: d, | |
opts: e | |
} | |
}).filter(function(b) { | |
var c = a.getComponent(b.opts.componentClass || (0, t["default"])(b.name)); | |
return c && !g.isTech(c) | |
}).forEach(e) | |
}() | |
}, a.prototype.buildCSSClass = function() { | |
return "" | |
}, a.prototype.on = function(a, b, c) { | |
var d = this; | |
return "string" == typeof a || Array.isArray(a) ? p.on(this.el_, a, l.bind(this, b)) : ! function() { | |
var e = a, | |
f = b, | |
g = l.bind(d, c), | |
h = function() { | |
return d.off(e, f, g) | |
}; | |
h.guid = g.guid, d.on("dispose", h); | |
var i = function() { | |
return d.off("dispose", h) | |
}; | |
i.guid = g.guid, a.nodeName ? (p.on(e, f, g), p.on(e, "dispose", i)) : "function" == typeof a.on && (e.on(f, g), e.on("dispose", i)) | |
}(), this | |
}, a.prototype.off = function(a, b, c) { | |
if (!a || "string" == typeof a || Array.isArray(a)) p.off(this.el_, a, b); | |
else { | |
var d = a, | |
e = b, | |
f = l.bind(this, c); | |
this.off("dispose", f), a.nodeName ? (p.off(d, e, f), p.off(d, "dispose", f)) : (d.off(e, f), d.off("dispose", f)) | |
} | |
return this | |
}, a.prototype.one = function(a, b, c) { | |
var d = this, | |
e = arguments; | |
return "string" == typeof a || Array.isArray(a) ? p.one(this.el_, a, l.bind(this, b)) : ! function() { | |
var f = a, | |
g = b, | |
h = l.bind(d, c), | |
i = function j() { | |
d.off(f, g, j), h.apply(null, e) | |
}; | |
i.guid = h.guid, d.on(f, g, i) | |
}(), this | |
}, a.prototype.trigger = function(a, b) { | |
return p.trigger(this.el_, a, b), this | |
}, a.prototype.ready = function(a) { | |
var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : !1; | |
return a && (this.isReady_ ? b ? a.call(this) : this.setTimeout(a, 1) : (this.readyQueue_ = this.readyQueue_ || [], this.readyQueue_.push(a))), this | |
}, a.prototype.triggerReady = function() { | |
this.isReady_ = !0, this.setTimeout(function() { | |
var a = this.readyQueue_; | |
this.readyQueue_ = [], a && a.length > 0 && a.forEach(function(a) { | |
a.call(this) | |
}, this), this.trigger("ready") | |
}, 1) | |
}, a.prototype.$ = function(a, b) { | |
return j.$(a, b || this.contentEl()) | |
}, a.prototype.$$ = function(a, b) { | |
return j.$$(a, b || this.contentEl()) | |
}, a.prototype.hasClass = function(a) { | |
return j.hasElClass(this.el_, a) | |
}, a.prototype.addClass = function(a) { | |
return j.addElClass(this.el_, a), this | |
}, a.prototype.removeClass = function(a) { | |
return j.removeElClass(this.el_, a), this | |
}, a.prototype.toggleClass = function(a, b) { | |
return j.toggleElClass(this.el_, a, b), this | |
}, a.prototype.show = function() { | |
return this.removeClass("vjs-hidden"), this | |
}, a.prototype.hide = function() { | |
return this.addClass("vjs-hidden"), this | |
}, a.prototype.lockShowing = function() { | |
return this.addClass("vjs-lock-showing"), this | |
}, a.prototype.unlockShowing = function() { | |
return this.removeClass("vjs-lock-showing"), this | |
}, a.prototype.getAttribute = function(a) { | |
return j.getAttribute(this.el_, a) | |
}, a.prototype.setAttribute = function(a, b) { | |
return j.setAttribute(this.el_, a, b), this | |
}, a.prototype.removeAttribute = function(a) { | |
return j.removeAttribute(this.el_, a), this | |
}, a.prototype.width = function(a, b) { | |
return this.dimension("width", a, b) | |
}, a.prototype.height = function(a, b) { | |
return this.dimension("height", a, b) | |
}, a.prototype.dimensions = function(a, b) { | |
return this.width(a, !0).height(b) | |
}, a.prototype.dimension = function(a, b, c) { | |
if (void 0 !== b) return (null === b || b !== b) && (b = 0), -1 !== ("" + b).indexOf("%") || -1 !== ("" + b).indexOf("px") ? this.el_.style[a] = b : "auto" === b ? this.el_.style[a] = "" : this.el_.style[a] = b + "px", c || this.trigger("resize"), this; | |
if (!this.el_) return 0; | |
var d = this.el_.style[a], | |
e = d.indexOf("px"); | |
return -1 !== e ? parseInt(d.slice(0, e), 10) : parseInt(this.el_["offset" + (0, t["default"])(a)], 10) | |
}, a.prototype.currentDimension = function(a) { | |
var b = 0; | |
if ("width" !== a && "height" !== a) throw new Error("currentDimension only accepts width or height value"); | |
if ("function" == typeof h["default"].getComputedStyle) { | |
var c = h["default"].getComputedStyle(this.el_); | |
b = c.getPropertyValue(a) || c[a] | |
} | |
if (b = parseFloat(b), 0 === b) { | |
var d = "offset" + (0, t["default"])(a); | |
b = this.el_[d] | |
} | |
return b | |
}, a.prototype.currentDimensions = function() { | |
return { | |
width: this.currentDimension("width"), | |
height: this.currentDimension("height") | |
} | |
}, a.prototype.currentWidth = function() { | |
return this.currentDimension("width") | |
}, a.prototype.currentHeight = function() { | |
return this.currentDimension("height") | |
}, a.prototype.emitTapEvents = function() { | |
var a = 0, | |
b = null, | |
c = 10, | |
d = 200, | |
e = void 0; | |
this.on("touchstart", function(c) { | |
1 === c.touches.length && (b = { | |
pageX: c.touches[0].pageX, | |
pageY: c.touches[0].pageY | |
}, a = (new Date).getTime(), e = !0) | |
}), this.on("touchmove", function(a) { | |
if (a.touches.length > 1) e = !1; | |
else if (b) { | |
var d = a.touches[0].pageX - b.pageX, | |
f = a.touches[0].pageY - b.pageY, | |
g = Math.sqrt(d * d + f * f); | |
g > c && (e = !1) | |
} | |
}); | |
var f = function() { | |
e = !1 | |
}; | |
this.on("touchleave", f), this.on("touchcancel", f), this.on("touchend", function(c) { | |
if (b = null, e === !0) { | |
var f = (new Date).getTime() - a; | |
d > f && (c.preventDefault(), this.trigger("tap")) | |
} | |
}) | |
}, a.prototype.enableTouchActivity = function() { | |
if (this.player() && this.player().reportUserActivity) { | |
var a = l.bind(this.player(), this.player().reportUserActivity), | |
b = void 0; | |
this.on("touchstart", function() { | |
a(), this.clearInterval(b), b = this.setInterval(a, 250) | |
}); | |
var c = function(c) { | |
a(), this.clearInterval(b) | |
}; | |
this.on("touchmove", a), this.on("touchend", c), this.on("touchcancel", c) | |
} | |
}, a.prototype.setTimeout = function(a, b) { | |
a = l.bind(this, a); | |
var c = h["default"].setTimeout(a, b), | |
d = function() { | |
this.clearTimeout(c) | |
}; | |
return d.guid = "vjs-timeout-" + c, this.on("dispose", d), c | |
}, a.prototype.clearTimeout = function(a) { | |
h["default"].clearTimeout(a); | |
var b = function() {}; | |
return b.guid = "vjs-timeout-" + a, this.off("dispose", b), a | |
}, a.prototype.setInterval = function(a, b) { | |
a = l.bind(this, a); | |
var c = h["default"].setInterval(a, b), | |
d = function() { | |
this.clearInterval(c) | |
}; | |
return d.guid = "vjs-interval-" + c, this.on("dispose", d), c | |
}, a.prototype.clearInterval = function(a) { | |
h["default"].clearInterval(a); | |
var b = function() {}; | |
return b.guid = "vjs-interval-" + a, this.off("dispose", b), a | |
}, a.registerComponent = function(b, c) { | |
return b ? (b = (0, t["default"])(b), a.components_ || (a.components_ = {}), a.components_[b] = c, c) : void 0 | |
}, a.getComponent = function(b) { | |
return b ? (b = (0, t["default"])(b), a.components_ && a.components_[b] ? a.components_[b] : h["default"] && h["default"].videojs && h["default"].videojs[b] ? (r["default"].warn("The " + b + " component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"), h["default"].videojs[b]) : void 0) : void 0 | |
}, a.extend = function(b) { | |
b = b || {}, r["default"].warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead"); | |
var c = b.init || b.init || this.prototype.init || this.prototype.init || function() {}, | |
d = function() { | |
c.apply(this, arguments) | |
}; | |
d.prototype = Object.create(this.prototype), d.prototype.constructor = d, d.extend = a.extend; | |
for (var e in b) b.hasOwnProperty(e) && (d.prototype[e] = b[e]); | |
return d | |
}, a | |
}(); | |
w.registerComponent("Component", w), c["default"] = w | |
}, { | |
102: 102, | |
82: 82, | |
83: 83, | |
84: 84, | |
86: 86, | |
87: 87, | |
88: 88, | |
92: 92 | |
}], | |
6: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(36), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = a(7), | |
m = d(l), | |
n = function(a) { | |
function b(c) { | |
var d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | |
e(this, b), d.tracks = c.audioTracks && c.audioTracks(); | |
var g = f(this, a.call(this, c, d)); | |
return g.el_.setAttribute("aria-label", "Audio Menu"), g | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-audio-button " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.createItems = function() { | |
var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], | |
b = this.player_.audioTracks && this.player_.audioTracks(); | |
if (!b) return a; | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
a.push(new m["default"](this.player_, { | |
track: d, | |
selectable: !0 | |
})) | |
} | |
return a | |
}, b | |
}(i["default"]); | |
n.prototype.controlText_ = "Audio Track", k["default"].registerComponent("AudioTrackButton", n), c["default"] = n | |
}, { | |
36: 36, | |
5: 5, | |
7: 7 | |
}], | |
7: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(48), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = d.track, | |
h = c.audioTracks(); | |
d.label = e.label || e.language || "Unknown", d.selected = e.enabled; | |
var i = g(this, a.call(this, c, d)); | |
return i.track = e, h && ! function() { | |
var a = n.bind(i, i.handleTracksChange); | |
h.addEventListener("change", a), i.on("dispose", function() { | |
h.removeEventListener("change", a) | |
}) | |
}(), i | |
} | |
return h(b, a), b.prototype.handleClick = function(b) { | |
var c = this.player_.audioTracks(); | |
if (a.prototype.handleClick.call(this, b), c) | |
for (var d = 0; d < c.length; d++) { | |
var e = c[d]; | |
e.enabled = e === this.track | |
} | |
}, b.prototype.handleTracksChange = function(a) { | |
this.selected(this.track.enabled) | |
}, b | |
}(j["default"]); | |
l["default"].registerComponent("AudioTrackMenuItem", o), c["default"] = o | |
}, { | |
48: 48, | |
5: 5, | |
84: 84 | |
}], | |
8: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h); | |
a(12), a(32), a(33), a(35), a(34), a(10), a(18), a(9), a(38), a(40), a(11), a(25), a(27), a(29), a(24), a(6), a(13), a(21); | |
var j = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-control-bar", | |
dir: "ltr" | |
}, { | |
role: "group" | |
}) | |
}, b | |
}(i["default"]); | |
j.prototype.options_ = { | |
children: ["playToggle", "volumeMenuButton", "currentTimeDisplay", "timeDivider", "durationDisplay", "progressControl", "liveDisplay", "remainingTimeDisplay", "customControlSpacer", "playbackRateMenuButton", "chaptersButton", "descriptionsButton", "subtitlesButton", "captionsButton", "audioTrackButton", "fullscreenToggle"] | |
}, i["default"].registerComponent("ControlBar", j), c["default"] = j | |
}, { | |
10: 10, | |
11: 11, | |
12: 12, | |
13: 13, | |
18: 18, | |
21: 21, | |
24: 24, | |
25: 25, | |
27: 27, | |
29: 29, | |
32: 32, | |
33: 33, | |
34: 34, | |
35: 35, | |
38: 38, | |
40: 40, | |
5: 5, | |
6: 6, | |
9: 9 | |
}], | |
9: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(2), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return g.on(c, "fullscreenchange", g.handleFullscreenChange), g | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-fullscreen-control " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.handleFullscreenChange = function() { | |
this.player_.isFullscreen() ? this.controlText("Non-Fullscreen") : this.controlText("Fullscreen") | |
}, b.prototype.handleClick = function() { | |
this.player_.isFullscreen() ? this.player_.exitFullscreen() : this.player_.requestFullscreen() | |
}, b | |
}(i["default"]); | |
l.prototype.controlText_ = "Fullscreen", k["default"].registerComponent("FullscreenToggle", l), c["default"] = l | |
}, { | |
2: 2, | |
5: 5 | |
}], | |
10: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.updateShowing(), e.on(e.player(), "durationchange", e.updateShowing), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this, "div", { | |
className: "vjs-live-control vjs-control" | |
}); | |
return this.contentEl_ = l.createEl("div", { | |
className: "vjs-live-display", | |
innerHTML: '<span class="vjs-control-text">' + this.localize("Stream Type") + "</span>" + this.localize("LIVE") | |
}, { | |
"aria-live": "off" | |
}), b.appendChild(this.contentEl_), b | |
}, b.prototype.updateShowing = function() { | |
this.player().duration() === 1 / 0 ? this.show() : this.hide() | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("LiveDisplay", m), c["default"] = m | |
}, { | |
5: 5, | |
82: 82 | |
}], | |
11: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(2), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(82), | |
n = d(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.on(c, "volumechange", e.update), c.tech_ && c.tech_.featuresVolumeControl === !1 && e.addClass("vjs-hidden"), e.on(c, "loadstart", function() { | |
this.update(), c.tech_.featuresVolumeControl === !1 ? this.addClass("vjs-hidden") : this.removeClass("vjs-hidden") | |
}), e | |
} | |
return h(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-mute-control " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.handleClick = function() { | |
this.player_.muted(this.player_.muted() ? !1 : !0) | |
}, b.prototype.update = function() { | |
var a = this.player_.volume(), | |
b = 3; | |
0 === a || this.player_.muted() ? b = 0 : .33 > a ? b = 1 : .67 > a && (b = 2); | |
var c = this.player_.muted() ? "Unmute" : "Mute"; | |
this.controlText() !== c && this.controlText(c); | |
for (var d = 0; 4 > d; d++) n.removeElClass(this.el_, "vjs-vol-" + d); | |
n.addElClass(this.el_, "vjs-vol-" + b) | |
}, b | |
}(j["default"]); | |
o.prototype.controlText_ = "Mute", l["default"].registerComponent("MuteToggle", o), c["default"] = o | |
}, { | |
2: 2, | |
5: 5, | |
82: 82 | |
}], | |
12: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(2), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return g.on(c, "play", g.handlePlay), g.on(c, "pause", g.handlePause), g | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-play-control " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.handleClick = function() { | |
this.player_.paused() ? this.player_.play() : this.player_.pause() | |
}, b.prototype.handlePlay = function() { | |
this.removeClass("vjs-paused"), this.addClass("vjs-playing"), this.controlText("Pause") | |
}, b.prototype.handlePause = function() { | |
this.removeClass("vjs-playing"), this.addClass("vjs-paused"), this.controlText("Play") | |
}, b | |
}(i["default"]); | |
l.prototype.controlText_ = "Play", k["default"].registerComponent("PlayToggle", l), c["default"] = l | |
}, { | |
2: 2, | |
5: 5 | |
}], | |
13: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(47), | |
j = e(i), | |
k = a(49), | |
l = e(k), | |
m = a(14), | |
n = e(m), | |
o = a(5), | |
p = e(o), | |
q = a(82), | |
r = d(q), | |
s = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.updateVisibility(), e.updateLabel(), e.on(c, "loadstart", e.updateVisibility), e.on(c, "ratechange", e.updateLabel), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this); | |
return this.labelEl_ = r.createEl("div", { | |
className: "vjs-playback-rate-value", | |
innerHTML: 1 | |
}), b.appendChild(this.labelEl_), b | |
}, b.prototype.buildCSSClass = function() { | |
return "vjs-playback-rate " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.createMenu = function() { | |
var a = new l["default"](this.player()), | |
b = this.playbackRates(); | |
if (b) | |
for (var c = b.length - 1; c >= 0; c--) a.addChild(new n["default"](this.player(), { | |
rate: b[c] + "x" | |
})); | |
return a | |
}, b.prototype.updateARIAAttributes = function() { | |
this.el().setAttribute("aria-valuenow", this.player().playbackRate()) | |
}, b.prototype.handleClick = function() { | |
for (var a = this.player().playbackRate(), b = this.playbackRates(), c = b[0], d = 0; d < b.length; d++) | |
if (b[d] > a) { | |
c = b[d]; | |
break | |
} | |
this.player().playbackRate(c) | |
}, b.prototype.playbackRates = function() { | |
return this.options_.playbackRates || this.options_.playerOptions && this.options_.playerOptions.playbackRates | |
}, b.prototype.playbackRateSupported = function() { | |
return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0 | |
}, b.prototype.updateVisibility = function() { | |
this.playbackRateSupported() ? this.removeClass("vjs-hidden") : this.addClass("vjs-hidden") | |
}, b.prototype.updateLabel = function() { | |
this.playbackRateSupported() && (this.labelEl_.innerHTML = this.player().playbackRate() + "x") | |
}, b | |
}(j["default"]); | |
s.prototype.controlText_ = "Playback Rate", p["default"].registerComponent("PlaybackRateMenuButton", s), c["default"] = s | |
}, { | |
14: 14, | |
47: 47, | |
49: 49, | |
5: 5, | |
82: 82 | |
}], | |
14: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(48), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = d.rate, | |
h = parseFloat(g, 10); | |
d.label = g, d.selected = 1 === h; | |
var i = f(this, a.call(this, c, d)); | |
return i.label = g, i.rate = h, i.on(c, "ratechange", i.update), i | |
} | |
return g(b, a), b.prototype.handleClick = function() { | |
a.prototype.handleClick.call(this), this.player().playbackRate(this.rate) | |
}, b.prototype.update = function() { | |
this.selected(this.player().playbackRate() === this.rate) | |
}, b | |
}(i["default"]); | |
l.prototype.contentElType = "button", k["default"].registerComponent("PlaybackRateMenuItem", l), c["default"] = l | |
}, { | |
48: 48, | |
5: 5 | |
}], | |
15: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.partEls_ = [], e.on(c, "progress", e.update), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-load-progress", | |
innerHTML: '<span class="vjs-control-text"><span>' + this.localize("Loaded") + "</span>: 0%</span>" | |
}) | |
}, b.prototype.update = function() { | |
var a = this.player_.buffered(), | |
b = this.player_.duration(), | |
c = this.player_.bufferedEnd(), | |
d = this.partEls_, | |
e = function(a, b) { | |
var c = a / b || 0; | |
return 100 * (c >= 1 ? 1 : c) + "%" | |
}; | |
this.el_.style.width = e(c, b); | |
for (var f = 0; f < a.length; f++) { | |
var g = a.start(f), | |
h = a.end(f), | |
i = d[f]; | |
i || (i = this.el_.appendChild(l.createEl()), d[f] = i), i.style.left = e(g, c), i.style.width = e(h - g, c) | |
} | |
for (var j = d.length; j > a.length; j--) this.el_.removeChild(d[j - 1]); | |
d.length = a.length | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("LoadProgressBar", m), c["default"] = m | |
}, { | |
5: 5, | |
82: 82 | |
}], | |
16: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(84), | |
n = d(m), | |
o = a(85), | |
p = e(o), | |
q = a(107), | |
r = e(q), | |
s = a(81), | |
t = e(s), | |
u = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return d.playerOptions && d.playerOptions.controlBar && d.playerOptions.controlBar.progressControl && d.playerOptions.controlBar.progressControl.keepTooltipsInside && (e.keepTooltipsInside = d.playerOptions.controlBar.progressControl.keepTooltipsInside), e.keepTooltipsInside && (e.tooltip = l.createEl("div", { | |
className: "vjs-time-tooltip" | |
}), e.el().appendChild(e.tooltip), e.addClass("vjs-keep-tooltips-inside")), e.update(0, 0), c.on("ready", function() { | |
e.on(c.controlBar.progressControl.el(), "mousemove", (0, r["default"])(n.bind(e, e.handleMouseMove), 25)) | |
}), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-mouse-display" | |
}) | |
}, b.prototype.handleMouseMove = function(a) { | |
var b = this.player_.duration(), | |
c = this.calculateDistance(a) * b, | |
d = a.pageX - l.findElPosition(this.el().parentNode).left; | |
this.update(c, d) | |
}, b.prototype.update = function(a, b) { | |
var c = (0, p["default"])(a, this.player_.duration()); | |
if (this.el().style.left = b + "px", this.el().setAttribute("data-current-time", c), this.keepTooltipsInside) { | |
var d = this.clampPosition_(b), | |
e = b - d + 1, | |
f = parseFloat((0, t["default"])(this.tooltip, "width")), | |
g = f / 2; | |
this.tooltip.innerHTML = c, this.tooltip.style.right = "-" + (g - e) + "px" | |
} | |
}, b.prototype.calculateDistance = function(a) { | |
return l.getPointerPosition(this.el().parentNode, a).x | |
}, b.prototype.clampPosition_ = function(a) { | |
if (!this.keepTooltipsInside) return a; | |
var b = parseFloat((0, t["default"])(this.player().el(), "width")), | |
c = parseFloat((0, t["default"])(this.tooltip, "width")), | |
d = c / 2, | |
e = a; | |
return d > a ? e = Math.ceil(d) : a > b - d && (e = Math.floor(b - d)), e | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("MouseTimeDisplay", u), c["default"] = u | |
}, { | |
107: 107, | |
5: 5, | |
81: 81, | |
82: 82, | |
84: 84, | |
85: 85 | |
}], | |
17: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(84), | |
l = d(k), | |
m = a(85), | |
n = e(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.updateDataAttr(), e.on(c, "timeupdate", e.updateDataAttr), c.ready(l.bind(e, e.updateDataAttr)), d.playerOptions && d.playerOptions.controlBar && d.playerOptions.controlBar.progressControl && d.playerOptions.controlBar.progressControl.keepTooltipsInside && (e.keepTooltipsInside = d.playerOptions.controlBar.progressControl.keepTooltipsInside), e.keepTooltipsInside && e.addClass("vjs-keep-tooltips-inside"), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-play-progress vjs-slider-bar", | |
innerHTML: '<span class="vjs-control-text"><span>' + this.localize("Progress") + "</span>: 0%</span>" | |
}) | |
}, b.prototype.updateDataAttr = function() { | |
var a = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); | |
this.el_.setAttribute("data-current-time", (0, n["default"])(a, this.player_.duration())) | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("PlayProgressBar", o), c["default"] = o | |
}, { | |
5: 5, | |
84: 84, | |
85: 85 | |
}], | |
18: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h); | |
a(19), a(16); | |
var j = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-progress-control vjs-control" | |
}) | |
}, b | |
}(i["default"]); | |
j.prototype.options_ = { | |
children: ["seekBar"] | |
}, i["default"].registerComponent("ProgressControl", j), c["default"] = j | |
}, { | |
16: 16, | |
19: 19, | |
5: 5 | |
}], | |
19: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(57), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = a(85), | |
p = e(o), | |
q = a(81), | |
r = e(q); | |
a(15), a(17), a(20); | |
var s = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.on(c, "timeupdate", e.updateProgress), e.on(c, "ended", e.updateProgress), c.ready(n.bind(e, e.updateProgress)), d.playerOptions && d.playerOptions.controlBar && d.playerOptions.controlBar.progressControl && d.playerOptions.controlBar.progressControl.keepTooltipsInside && (e.keepTooltipsInside = d.playerOptions.controlBar.progressControl.keepTooltipsInside), e.keepTooltipsInside && (e.tooltipProgressBar = e.addChild("TooltipProgressBar")), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-progress-holder" | |
}, { | |
"aria-label": "progress bar" | |
}) | |
}, b.prototype.updateProgress = function() { | |
if (this.updateAriaAttributes(this.el_), this.keepTooltipsInside) { | |
this.updateAriaAttributes(this.tooltipProgressBar.el_), this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width; | |
var a = parseFloat((0, r["default"])(this.player().el(), "width")), | |
b = parseFloat((0, r["default"])(this.tooltipProgressBar.tooltip, "width")), | |
c = this.tooltipProgressBar.el().style; | |
c.maxWidth = Math.floor(a - b / 2) + "px", c.minWidth = Math.ceil(b / 2) + "px", c.right = "-" + b / 2 + "px" | |
} | |
}, b.prototype.updateAriaAttributes = function(a) { | |
var b = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); | |
a.setAttribute("aria-valuenow", (100 * this.getPercent()).toFixed(2)), a.setAttribute("aria-valuetext", (0, p["default"])(b, this.player_.duration())) | |
}, b.prototype.getPercent = function() { | |
var a = this.player_.currentTime() / this.player_.duration(); | |
return a >= 1 ? 1 : a | |
}, b.prototype.handleMouseDown = function(b) { | |
a.prototype.handleMouseDown.call(this, b), this.player_.scrubbing(!0), this.videoWasPlaying = !this.player_.paused(), this.player_.pause() | |
}, b.prototype.handleMouseMove = function(a) { | |
var b = this.calculateDistance(a) * this.player_.duration(); | |
b === this.player_.duration() && (b -= .1), this.player_.currentTime(b) | |
}, b.prototype.handleMouseUp = function(b) { | |
a.prototype.handleMouseUp.call(this, b), this.player_.scrubbing(!1), this.videoWasPlaying && this.player_.play() | |
}, b.prototype.stepForward = function() { | |
this.player_.currentTime(this.player_.currentTime() + 5) | |
}, b.prototype.stepBack = function() { | |
this.player_.currentTime(this.player_.currentTime() - 5) | |
}, b | |
}(j["default"]); | |
s.prototype.options_ = { | |
children: ["loadProgressBar", "mouseTimeDisplay", "playProgressBar"], | |
barName: "playProgressBar" | |
}, s.prototype.playerEvent = "timeupdate", l["default"].registerComponent("SeekBar", s), c["default"] = s | |
}, { | |
15: 15, | |
17: 17, | |
20: 20, | |
5: 5, | |
57: 57, | |
81: 81, | |
84: 84, | |
85: 85 | |
}], | |
20: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(84), | |
l = d(k), | |
m = a(85), | |
n = e(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.updateDataAttr(), e.on(c, "timeupdate", e.updateDataAttr), c.ready(l.bind(e, e.updateDataAttr)), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this, "div", { | |
className: "vjs-tooltip-progress-bar vjs-slider-bar", | |
innerHTML: '<div class="vjs-time-tooltip"></div>\n <span class="vjs-control-text"><span>' + this.localize("Progress") + "</span>: 0%</span>" | |
}); | |
return this.tooltip = b.querySelector(".vjs-time-tooltip"), b | |
}, b.prototype.updateDataAttr = function() { | |
var a = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(), | |
b = (0, n["default"])(a, this.player_.duration()); | |
this.el_.setAttribute("data-current-time", b), this.tooltip.innerHTML = b | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("TooltipProgressBar", o), c["default"] = o | |
}, { | |
5: 5, | |
84: 84, | |
85: 85 | |
}], | |
21: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(22), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-custom-control-spacer " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this, { | |
className: this.buildCSSClass() | |
}); | |
return b.innerHTML = " ", b | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("CustomControlSpacer", l), c["default"] = l | |
}, { | |
22: 22, | |
5: 5 | |
}], | |
22: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h), | |
j = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-spacer " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: this.buildCSSClass() | |
}) | |
}, b | |
}(i["default"]); | |
i["default"].registerComponent("Spacer", j), c["default"] = j | |
}, { | |
5: 5 | |
}], | |
23: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(31), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d) { | |
e(this, b), d.track = { | |
player: c, | |
kind: d.kind, | |
label: d.kind + " settings", | |
selectable: !1, | |
"default": !1, | |
mode: "disabled" | |
}, d.selectable = !1; | |
var g = f(this, a.call(this, c, d)); | |
return g.addClass("vjs-texttrack-settings"), g.controlText(", opens " + d.kind + " settings dialog"), g | |
} | |
return g(b, a), b.prototype.handleClick = function() { | |
this.player().getChild("textTrackSettings").show(), this.player().getChild("textTrackSettings").el_.focus() | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("CaptionSettingsMenuItem", l), c["default"] = l | |
}, { | |
31: 31, | |
5: 5 | |
}], | |
24: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(30), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = a(23), | |
m = d(l), | |
n = function(a) { | |
function b(c, d, g) { | |
e(this, b); | |
var h = f(this, a.call(this, c, d, g)); | |
return h.el_.setAttribute("aria-label", "Captions Menu"), h | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-captions-button " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.update = function() { | |
var b = 2; | |
a.prototype.update.call(this), this.player().tech_ && this.player().tech_.featuresNativeTextTracks && (b = 1), this.items && this.items.length > b ? this.show() : this.hide() | |
}, b.prototype.createItems = function() { | |
var b = []; | |
return this.player().tech_ && this.player().tech_.featuresNativeTextTracks || b.push(new m["default"](this.player_, { | |
kind: this.kind_ | |
})), a.prototype.createItems.call(this, b) | |
}, b | |
}(i["default"]); | |
n.prototype.kind_ = "captions", n.prototype.controlText_ = "Captions", k["default"].registerComponent("CaptionsButton", n), c["default"] = n | |
}, { | |
23: 23, | |
30: 30, | |
5: 5 | |
}], | |
25: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(30), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(31), | |
n = e(m), | |
o = a(26), | |
p = e(o), | |
q = a(49), | |
r = e(q), | |
s = a(82), | |
t = d(s), | |
u = a(92), | |
v = e(u), | |
w = function(a) { | |
function b(c, d, e) { | |
f(this, b); | |
var h = g(this, a.call(this, c, d, e)); | |
return h.el_.setAttribute("aria-label", "Chapters Menu"), h | |
} | |
return h(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-chapters-button " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.createItems = function() { | |
var a = [], | |
b = this.player_.textTracks(); | |
if (!b) return a; | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.kind === this.kind_ && a.push(new n["default"](this.player_, { | |
track: d | |
})) | |
} | |
return a | |
}, b.prototype.createMenu = function() { | |
for (var a = this, b = this.player_.textTracks() || [], c = void 0, d = this.items || [], e = b.length - 1; e >= 0; e--) { | |
var f = b[e]; | |
if (f.kind === this.kind_) { | |
c = f; | |
break | |
} | |
} | |
var g = this.menu; | |
if (void 0 === g) { | |
g = new r["default"](this.player_); | |
var h = t.createEl("li", { | |
className: "vjs-menu-title", | |
innerHTML: (0, v["default"])(this.kind_), | |
tabIndex: -1 | |
}); | |
g.children_.unshift(h), t.insertElFirst(h, g.contentEl()) | |
} else d.forEach(function(a) { | |
return g.removeChild(a) | |
}), d = []; | |
if (c && (null === c.cues || void 0 === c.cues)) { | |
c.mode = "hidden"; | |
var i = this.player_.remoteTextTrackEls().getTrackElementByTrack_(c); | |
i && i.addEventListener("load", function(b) { | |
return a.update() | |
}) | |
} | |
if (c && c.cues && c.cues.length > 0) | |
for (var j = c.cues, k = 0, l = j.length; l > k; k++) { | |
var m = j[k], | |
n = new p["default"](this.player_, { | |
cue: m, | |
track: c | |
}); | |
d.push(n), g.addChild(n) | |
} | |
return d.length > 0 && this.show(), this.items = d, g | |
}, b | |
}(j["default"]); | |
w.prototype.kind_ = "chapters", w.prototype.controlText_ = "Chapters", l["default"].registerComponent("ChaptersButton", w), c["default"] = w | |
}, { | |
26: 26, | |
30: 30, | |
31: 31, | |
49: 49, | |
5: 5, | |
82: 82, | |
92: 92 | |
}], | |
26: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(48), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = d.track, | |
h = d.cue, | |
i = c.currentTime(); | |
d.label = h.text, d.selected = h.startTime <= i && i < h.endTime; | |
var j = g(this, a.call(this, c, d)); | |
return j.track = e, j.cue = h, e.addEventListener("cuechange", n.bind(j, j.update)), j | |
} | |
return h(b, a), b.prototype.handleClick = function() { | |
a.prototype.handleClick.call(this), this.player_.currentTime(this.cue.startTime), this.update(this.cue.startTime) | |
}, b.prototype.update = function() { | |
var a = this.cue, | |
b = this.player_.currentTime(); | |
this.selected(a.startTime <= b && b < a.endTime) | |
}, b | |
}(j["default"]); | |
l["default"].registerComponent("ChaptersTrackMenuItem", o), c["default"] = o | |
}, { | |
48: 48, | |
5: 5, | |
84: 84 | |
}], | |
27: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(30), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = function(a) { | |
function b(c, d, e) { | |
f(this, b); | |
var h = g(this, a.call(this, c, d, e)); | |
h.el_.setAttribute("aria-label", "Descriptions Menu"); | |
var i = c.textTracks(); | |
return i && ! function() { | |
var a = n.bind(h, h.handleTracksChange); | |
i.addEventListener("change", a), h.on("dispose", function() { | |
i.removeEventListener("change", a) | |
}) | |
}(), h | |
} | |
return h(b, a), b.prototype.handleTracksChange = function(a) { | |
for (var b = this.player().textTracks(), c = !1, d = 0, e = b.length; e > d; d++) { | |
var f = b[d]; | |
if (f.kind !== this.kind_ && "showing" === f.mode) { | |
c = !0; | |
break | |
} | |
} | |
c ? this.disable() : this.enable() | |
}, b.prototype.buildCSSClass = function() { | |
return "vjs-descriptions-button " + a.prototype.buildCSSClass.call(this) | |
}, b | |
}(j["default"]); | |
o.prototype.kind_ = "descriptions", o.prototype.controlText_ = "Descriptions", l["default"].registerComponent("DescriptionsButton", o), c["default"] = o | |
}, { | |
30: 30, | |
5: 5, | |
84: 84 | |
}], | |
28: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(31), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d) { | |
e(this, b), d.track = { | |
player: c, | |
kind: d.kind, | |
label: d.kind + " off", | |
"default": !1, | |
mode: "disabled" | |
}, d.selectable = !0; | |
var g = f(this, a.call(this, c, d)); | |
return g.selected(!0), g | |
} | |
return g(b, a), b.prototype.handleTracksChange = function(a) { | |
for (var b = this.player().textTracks(), c = !0, d = 0, e = b.length; e > d; d++) { | |
var f = b[d]; | |
if (f.kind === this.track.kind && "showing" === f.mode) { | |
c = !1; | |
break | |
} | |
} | |
this.selected(c) | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("OffTextTrackMenuItem", l), c["default"] = l | |
}, { | |
31: 31, | |
5: 5 | |
}], | |
29: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(30), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c, d, g) { | |
e(this, b); | |
var h = f(this, a.call(this, c, d, g)); | |
return h.el_.setAttribute("aria-label", "Subtitles Menu"), h | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-subtitles-button " + a.prototype.buildCSSClass.call(this) | |
}, b | |
}(i["default"]); | |
l.prototype.kind_ = "subtitles", l.prototype.controlText_ = "Subtitles", k["default"].registerComponent("SubtitlesButton", l), c["default"] = l | |
}, { | |
30: 30, | |
5: 5 | |
}], | |
30: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(36), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = a(31), | |
m = d(l), | |
n = a(28), | |
o = d(n), | |
p = function(a) { | |
function b(c) { | |
var d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | |
return e(this, b), d.tracks = c.textTracks(), f(this, a.call(this, c, d)) | |
} | |
return g(b, a), b.prototype.createItems = function() { | |
var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; | |
a.push(new o["default"](this.player_, { | |
kind: this.kind_ | |
})); | |
var b = this.player_.textTracks(); | |
if (!b) return a; | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.kind === this.kind_ && a.push(new m["default"](this.player_, { | |
track: d, | |
selectable: !0 | |
})) | |
} | |
return a | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("TextTrackButton", p), c["default"] = p | |
}, { | |
28: 28, | |
31: 31, | |
36: 36, | |
5: 5 | |
}], | |
31: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
j = a(48), | |
k = e(j), | |
l = a(5), | |
m = e(l), | |
n = a(84), | |
o = d(n), | |
p = a(102), | |
q = e(p), | |
r = a(101), | |
s = e(r), | |
t = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = d.track, | |
h = c.textTracks(); | |
d.label = e.label || e.language || "Unknown", d.selected = e["default"] || "showing" === e.mode; | |
var j = g(this, a.call(this, c, d)); | |
return j.track = e, h && ! function() { | |
var a = o.bind(j, j.handleTracksChange); | |
h.addEventListener("change", a), j.on("dispose", function() { | |
h.removeEventListener("change", a) | |
}) | |
}(), h && void 0 === h.onchange && ! function() { | |
var a = void 0; | |
j.on(["tap", "click"], function() { | |
if ("object" !== i(q["default"].Event)) try { | |
a = new q["default"].Event("change") | |
} catch (b) {} | |
a || (a = s["default"].createEvent("Event"), a.initEvent("change", !0, !0)), h.dispatchEvent(a) | |
}) | |
}(), j | |
} | |
return h(b, a), b.prototype.handleClick = function(b) { | |
var c = this.track.kind, | |
d = this.player_.textTracks(); | |
if (a.prototype.handleClick.call(this, b), d) | |
for (var e = 0; e < d.length; e++) { | |
var f = d[e]; | |
f.kind === c && (f === this.track ? f.mode = "showing" : f.mode = "disabled") | |
} | |
}, b.prototype.handleTracksChange = function(a) { | |
this.selected("showing" === this.track.mode) | |
}, b | |
}(k["default"]); | |
m["default"].registerComponent("TextTrackMenuItem", t), c["default"] = t | |
}, { | |
101: 101, | |
102: 102, | |
48: 48, | |
5: 5, | |
84: 84 | |
}], | |
32: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(85), | |
n = e(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.on(c, "timeupdate", e.updateContent), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this, "div", { | |
className: "vjs-current-time vjs-time-control vjs-control" | |
}); | |
return this.contentEl_ = l.createEl("div", { | |
className: "vjs-current-time-display", | |
innerHTML: '<span class="vjs-control-text">Current Time </span>0:00' | |
}, { | |
"aria-live": "off" | |
}), b.appendChild(this.contentEl_), b | |
}, b.prototype.updateContent = function() { | |
var a = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(), | |
b = this.localize("Current Time"), | |
c = (0, n["default"])(a, this.player_.duration()); | |
c !== this.formattedTime_ && (this.formattedTime_ = c, this.contentEl_.innerHTML = '<span class="vjs-control-text">' + b + "</span> " + c) | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("CurrentTimeDisplay", o), c["default"] = o | |
}, { | |
5: 5, | |
82: 82, | |
85: 85 | |
}], | |
33: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(85), | |
n = e(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.on(c, "durationchange", e.updateContent), e.on(c, "timeupdate", e.updateContent), e.on(c, "loadedmetadata", e.updateContent), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this, "div", { | |
className: "vjs-duration vjs-time-control vjs-control" | |
}); | |
return this.contentEl_ = l.createEl("div", { | |
className: "vjs-duration-display", | |
innerHTML: '<span class="vjs-control-text">' + this.localize("Duration Time") + "</span> 0:00" | |
}, { | |
"aria-live": "off" | |
}), b.appendChild(this.contentEl_), b | |
}, b.prototype.updateContent = function() { | |
var a = this.player_.duration(); | |
if (a && this.duration_ !== a) { | |
this.duration_ = a; | |
var b = this.localize("Duration Time"), | |
c = (0, n["default"])(a); | |
this.contentEl_.innerHTML = '<span class="vjs-control-text">' + b + "</span> " + c | |
} | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("DurationDisplay", o), c["default"] = o | |
}, { | |
5: 5, | |
82: 82, | |
85: 85 | |
}], | |
34: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(85), | |
n = e(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.on(c, "timeupdate", e.updateContent), e.on(c, "durationchange", e.updateContent), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var b = a.prototype.createEl.call(this, "div", { | |
className: "vjs-remaining-time vjs-time-control vjs-control" | |
}); | |
return this.contentEl_ = l.createEl("div", { | |
className: "vjs-remaining-time-display", | |
innerHTML: '<span class="vjs-control-text">' + this.localize("Remaining Time") + "</span> -0:00" | |
}, { | |
"aria-live": "off" | |
}), b.appendChild(this.contentEl_), b | |
}, b.prototype.updateContent = function() { | |
if (this.player_.duration()) { | |
var a = this.localize("Remaining Time"), | |
b = (0, n["default"])(this.player_.remainingTime()); | |
b !== this.formattedTime_ && (this.formattedTime_ = b, this.contentEl_.innerHTML = '<span class="vjs-control-text">' + a + "</span> -" + b) | |
} | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("RemainingTimeDisplay", o), c["default"] = o | |
}, { | |
5: 5, | |
82: 82, | |
85: 85 | |
}], | |
35: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h), | |
j = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-time-control vjs-time-divider", | |
innerHTML: "<div><span>/</span></div>" | |
}) | |
}, b | |
}(i["default"]); | |
i["default"].registerComponent("TimeDivider", j), c["default"] = j | |
}, { | |
5: 5 | |
}], | |
36: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(47), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = d.tracks, | |
h = g(this, a.call(this, c, d)); | |
if (h.items.length <= 1 && h.hide(), !e) return g(h); | |
var i = n.bind(h, h.update); | |
return e.addEventListener("removetrack", i), e.addEventListener("addtrack", i), h.player_.on("dispose", function() { | |
e.removeEventListener("removetrack", i), e.removeEventListener("addtrack", i) | |
}), h | |
} | |
return h(b, a), b | |
}(j["default"]); | |
l["default"].registerComponent("TrackButton", o), c["default"] = o | |
}, { | |
47: 47, | |
5: 5, | |
84: 84 | |
}], | |
37: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(57), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m); | |
a(39); | |
var o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.on(c, "volumechange", e.updateARIAAttributes), c.ready(n.bind(e, e.updateARIAAttributes)), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-volume-bar vjs-slider-bar" | |
}, { | |
"aria-label": "volume level" | |
}) | |
}, b.prototype.handleMouseMove = function(a) { | |
this.checkMuted(), this.player_.volume(this.calculateDistance(a)) | |
}, b.prototype.checkMuted = function() { | |
this.player_.muted() && this.player_.muted(!1) | |
}, b.prototype.getPercent = function() { | |
return this.player_.muted() ? 0 : this.player_.volume() | |
}, b.prototype.stepForward = function() { | |
this.checkMuted(), this.player_.volume(this.player_.volume() + .1) | |
}, b.prototype.stepBack = function() { | |
this.checkMuted(), this.player_.volume(this.player_.volume() - .1) | |
}, b.prototype.updateARIAAttributes = function() { | |
var a = (100 * this.player_.volume()).toFixed(2); | |
this.el_.setAttribute("aria-valuenow", a), this.el_.setAttribute("aria-valuetext", a + "%") | |
}, b | |
}(j["default"]); | |
o.prototype.options_ = { | |
children: ["volumeLevel"], | |
barName: "volumeLevel" | |
}, o.prototype.playerEvent = "volumechange", l["default"].registerComponent("VolumeBar", o), c["default"] = o | |
}, { | |
39: 39, | |
5: 5, | |
57: 57, | |
84: 84 | |
}], | |
38: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h); | |
a(37); | |
var j = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return c.tech_ && c.tech_.featuresVolumeControl === !1 && g.addClass("vjs-hidden"), g.on(c, "loadstart", function() { | |
c.tech_.featuresVolumeControl === !1 ? this.addClass("vjs-hidden") : this.removeClass("vjs-hidden") | |
}), g | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-volume-control vjs-control" | |
}) | |
}, b | |
}(i["default"]); | |
j.prototype.options_ = { | |
children: ["volumeBar"] | |
}, i["default"].registerComponent("VolumeControl", j), c["default"] = j | |
}, { | |
37: 37, | |
5: 5 | |
}], | |
39: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h), | |
j = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-volume-level", | |
innerHTML: '<span class="vjs-control-text"></span>' | |
}) | |
}, b | |
}(i["default"]); | |
i["default"].registerComponent("VolumeLevel", j), c["default"] = j | |
}, { | |
5: 5 | |
}], | |
40: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(84), | |
j = e(i), | |
k = a(5), | |
l = d(k), | |
m = a(54), | |
n = d(m), | |
o = a(53), | |
p = d(o), | |
q = a(11), | |
r = d(q), | |
s = a(37), | |
t = d(s), | |
u = function(a) { | |
function b(c) { | |
function d() { | |
c.tech_ && c.tech_.featuresVolumeControl === !1 ? this.addClass("vjs-hidden") : this.removeClass("vjs-hidden") | |
} | |
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | |
f(this, b), void 0 === e.inline && (e.inline = !0), void 0 === e.vertical && (e.inline ? e.vertical = !1 : e.vertical = !0), e.volumeBar = e.volumeBar || {}, e.volumeBar.vertical = !!e.vertical; | |
var h = g(this, a.call(this, c, e)); | |
return h.on(c, "volumechange", h.volumeUpdate), h.on(c, "loadstart", h.volumeUpdate), d.call(h), h.on(c, "loadstart", d), h.on(h.volumeBar, ["slideractive", "focus"], function() { | |
this.addClass("vjs-slider-active") | |
}), h.on(h.volumeBar, ["sliderinactive", "blur"], function() { | |
this.removeClass("vjs-slider-active") | |
}), h.on(h.volumeBar, ["focus"], function() { | |
this.addClass("vjs-lock-showing") | |
}), h.on(h.volumeBar, ["blur"], function() { | |
this.removeClass("vjs-lock-showing") | |
}), h | |
} | |
return h(b, a), b.prototype.buildCSSClass = function() { | |
var b = ""; | |
return b = this.options_.vertical ? "vjs-volume-menu-button-vertical" : "vjs-volume-menu-button-horizontal", "vjs-volume-menu-button " + a.prototype.buildCSSClass.call(this) + " " + b | |
}, b.prototype.createPopup = function() { | |
var a = new n["default"](this.player_, { | |
contentElType: "div" | |
}), | |
b = new t["default"](this.player_, this.options_.volumeBar); | |
return a.addChild(b), this.menuContent = a, this.volumeBar = b, this.attachVolumeBarEvents(), a | |
}, b.prototype.handleClick = function() { | |
r["default"].prototype.handleClick.call(this), a.prototype.handleClick.call(this) | |
}, b.prototype.attachVolumeBarEvents = function() { | |
this.menuContent.on(["mousedown", "touchdown"], j.bind(this, this.handleMouseDown)) | |
}, b.prototype.handleMouseDown = function(a) { | |
this.on(["mousemove", "touchmove"], j.bind(this.volumeBar, this.volumeBar.handleMouseMove)), this.on(this.el_.ownerDocument, ["mouseup", "touchend"], this.handleMouseUp) | |
}, b.prototype.handleMouseUp = function(a) { | |
this.off(["mousemove", "touchmove"], j.bind(this.volumeBar, this.volumeBar.handleMouseMove)) | |
}, b | |
}(p["default"]); | |
u.prototype.volumeUpdate = r["default"].prototype.update, u.prototype.controlText_ = "Mute", l["default"].registerComponent("VolumeMenuButton", u), c["default"] = u | |
}, { | |
11: 11, | |
37: 37, | |
5: 5, | |
53: 53, | |
54: 54, | |
84: 84 | |
}], | |
41: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h), | |
j = a(50), | |
k = d(j), | |
l = a(88), | |
m = d(l), | |
n = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return g.on(c, "error", g.open), g | |
} | |
return g(b, a), b.prototype.buildCSSClass = function() { | |
return "vjs-error-display " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.content = function() { | |
var a = this.player().error(); | |
return a ? this.localize(a.message) : "" | |
}, b | |
}(k["default"]); | |
n.prototype.options_ = (0, m["default"])(k["default"].prototype.options_, { | |
fillAlways: !0, | |
temporary: !1, | |
uncloseable: !0 | |
}), i["default"].registerComponent("ErrorDisplay", n), c["default"] = n | |
}, { | |
5: 5, | |
50: 50, | |
88: 88 | |
}], | |
42: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
c.__esModule = !0; | |
var e = a(83), | |
f = d(e), | |
g = function() {}; | |
g.prototype.allowedEvents_ = {}, g.prototype.on = function(a, b) { | |
var c = this.addEventListener; | |
this.addEventListener = function() {}, f.on(this, a, b), this.addEventListener = c | |
}, g.prototype.addEventListener = g.prototype.on, g.prototype.off = function(a, b) { | |
f.off(this, a, b) | |
}, g.prototype.removeEventListener = g.prototype.off, g.prototype.one = function(a, b) { | |
var c = this.addEventListener; | |
this.addEventListener = function() {}, f.one(this, a, b), this.addEventListener = c | |
}, g.prototype.trigger = function(a) { | |
var b = a.type || a; | |
"string" == typeof a && (a = { | |
type: b | |
}), a = f.fixEvent(a), this.allowedEvents_[b] && this["on" + b] && this["on" + b](a), f.trigger(this, a) | |
}, g.prototype.dispatchEvent = g.prototype.trigger, c["default"] = g | |
}, { | |
83: 83 | |
}], | |
43: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0; | |
var e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
f = a(87), | |
g = d(f), | |
h = function(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + ("undefined" == typeof b ? "undefined" : e(b))); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (a.super_ = b) | |
}, | |
i = function(a) { | |
var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
c = function() { | |
a.apply(this, arguments) | |
}, | |
d = {}; | |
"object" === ("undefined" == typeof b ? "undefined" : e(b)) ? ("function" == typeof b.init && (g["default"].warn("Constructor logic via init() is deprecated; please use constructor() instead."), b.constructor = b.init), b.constructor !== Object.prototype.constructor && (c = b.constructor), d = b) : "function" == typeof b && (c = b), h(c, a); | |
for (var f in d) d.hasOwnProperty(f) && (c.prototype[f] = d[f]); | |
return c | |
}; | |
c["default"] = i | |
}, { | |
87: 87 | |
}], | |
44: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0; | |
for (var e = a(101), f = d(e), g = {}, h = [ | |
["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], | |
["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], | |
["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], | |
["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], | |
["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"] | |
], i = h[0], j = void 0, k = 0; k < h.length; k++) | |
if (h[k][1] in f["default"]) { | |
j = h[k]; | |
break | |
} | |
if (j) | |
for (var l = 0; l < j.length; l++) g[i[l]] = j[l]; | |
c["default"] = g | |
}, { | |
101: 101 | |
}], | |
45: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h), | |
j = function(a) { | |
function b() { | |
return e(this, b), f(this, a.apply(this, arguments)) | |
} | |
return g(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-loading-spinner", | |
dir: "ltr" | |
}) | |
}, b | |
}(i["default"]); | |
i["default"].registerComponent("LoadingSpinner", j), c["default"] = j | |
}, { | |
5: 5 | |
}], | |
46: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
return a instanceof e ? a : ("number" == typeof a ? this.code = a : "string" == typeof a ? this.message = a : "object" === ("undefined" == typeof a ? "undefined" : f(a)) && ("number" == typeof a.code && (this.code = a.code), (0, h["default"])(this, a)), void(this.message || (this.message = e.defaultMessages[this.code] || ""))) | |
} | |
c.__esModule = !0; | |
var f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
g = a(147), | |
h = d(g); | |
e.prototype.code = 0, e.prototype.message = "", e.prototype.status = null, e.errorTypes = ["MEDIA_ERR_CUSTOM", "MEDIA_ERR_ABORTED", "MEDIA_ERR_NETWORK", "MEDIA_ERR_DECODE", "MEDIA_ERR_SRC_NOT_SUPPORTED", "MEDIA_ERR_ENCRYPTED"], e.defaultMessages = { | |
1: "You aborted the media playback", | |
2: "A network error caused the media download to fail part-way.", | |
3: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.", | |
4: "The media could not be loaded, either because the server or network failed or because the format is not supported.", | |
5: "The media is encrypted and we do not have the keys to decrypt it." | |
}; | |
for (var i = 0; i < e.errorTypes.length; i++) e[e.errorTypes[i]] = i, e.prototype[e.errorTypes[i]] = i; | |
c["default"] = e | |
}, { | |
147: 147 | |
}], | |
47: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(3), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(49), | |
n = e(m), | |
o = a(82), | |
p = d(o), | |
q = a(84), | |
r = d(q), | |
s = a(92), | |
t = e(s), | |
u = function(a) { | |
function b(c) { | |
var d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.update(), e.enabled_ = !0, e.el_.setAttribute("aria-haspopup", "true"), e.el_.setAttribute("role", "menuitem"), e.on("keydown", e.handleSubmenuKeyPress), e | |
} | |
return h(b, a), b.prototype.update = function() { | |
var a = this.createMenu(); | |
this.menu && this.removeChild(this.menu), this.menu = a, this.addChild(a), this.buttonPressed_ = !1, this.el_.setAttribute("aria-expanded", "false"), this.items && 0 === this.items.length ? this.hide() : this.items && this.items.length > 1 && this.show() | |
}, b.prototype.createMenu = function() { | |
var a = new n["default"](this.player_); | |
if (this.options_.title) { | |
var b = p.createEl("li", { | |
className: "vjs-menu-title", | |
innerHTML: (0, t["default"])(this.options_.title), | |
tabIndex: -1 | |
}); | |
a.children_.unshift(b), p.insertElFirst(b, a.contentEl()) | |
} | |
if (this.items = this.createItems(), this.items) | |
for (var c = 0; c < this.items.length; c++) a.addItem(this.items[c]); | |
return a | |
}, b.prototype.createItems = function() {}, b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: this.buildCSSClass() | |
}) | |
}, b.prototype.buildCSSClass = function() { | |
var b = "vjs-menu-button"; | |
return b += this.options_.inline === !0 ? "-inline" : "-popup", "vjs-menu-button " + b + " " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.handleClick = function() { | |
this.one(this.menu.contentEl(), "mouseleave", r.bind(this, function(a) { | |
this.unpressButton(), this.el_.blur() | |
})), this.buttonPressed_ ? this.unpressButton() : this.pressButton() | |
}, b.prototype.handleKeyPress = function(b) { | |
27 === b.which || 9 === b.which ? (this.buttonPressed_ && this.unpressButton(), 9 !== b.which && b.preventDefault()) : 38 === b.which || 40 === b.which ? this.buttonPressed_ || (this.pressButton(), b.preventDefault()) : a.prototype.handleKeyPress.call(this, b) | |
}, b.prototype.handleSubmenuKeyPress = function(a) { | |
(27 === a.which || 9 === a.which) && (this.buttonPressed_ && this.unpressButton(), 9 !== a.which && a.preventDefault()) | |
}, b.prototype.pressButton = function() { | |
this.enabled_ && (this.buttonPressed_ = !0, this.menu.lockShowing(), this.el_.setAttribute("aria-expanded", "true"), this.menu.focus()) | |
}, b.prototype.unpressButton = function() { | |
this.enabled_ && (this.buttonPressed_ = !1, this.menu.unlockShowing(), this.el_.setAttribute("aria-expanded", "false"), this.el_.focus()) | |
}, b.prototype.disable = function() { | |
return this.buttonPressed_ = !1, this.menu.unlockShowing(), this.el_.setAttribute("aria-expanded", "false"), this.enabled_ = !1, a.prototype.disable.call(this) | |
}, b.prototype.enable = function() { | |
return this.enabled_ = !0, a.prototype.enable.call(this) | |
}, b | |
}(j["default"]); | |
l["default"].registerComponent("MenuButton", u), c["default"] = u | |
}, { | |
3: 3, | |
49: 49, | |
5: 5, | |
82: 82, | |
84: 84, | |
92: 92 | |
}], | |
48: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(3), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = a(147), | |
m = d(l), | |
n = function(a) { | |
function b(c, d) { | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return g.selectable = d.selectable, g.selected(d.selected), g.selectable ? g.el_.setAttribute("role", "menuitemcheckbox") : g.el_.setAttribute("role", "menuitem"), g | |
} | |
return g(b, a), b.prototype.createEl = function(b, c, d) { | |
return a.prototype.createEl.call(this, "li", (0, m["default"])({ | |
className: "vjs-menu-item", | |
innerHTML: this.localize(this.options_.label), | |
tabIndex: -1 | |
}, c), d) | |
}, b.prototype.handleClick = function() { | |
this.selected(!0) | |
}, b.prototype.selected = function(a) { | |
this.selectable && (a ? (this.addClass("vjs-selected"), this.el_.setAttribute("aria-checked", "true"), this.controlText(", selected")) : (this.removeClass("vjs-selected"), this.el_.setAttribute("aria-checked", "false"), this.controlText(" "))) | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("MenuItem", n), c["default"] = n | |
}, { | |
147: 147, | |
3: 3, | |
5: 5 | |
}], | |
49: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(84), | |
n = d(m), | |
o = a(83), | |
p = d(o), | |
q = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.focusedChild_ = -1, e.on("keydown", e.handleKeyPress), e | |
} | |
return h(b, a), b.prototype.addItem = function(a) { | |
this.addChild(a), a.on("click", n.bind(this, function() { | |
this.unlockShowing() | |
})) | |
}, b.prototype.createEl = function() { | |
var b = this.options_.contentElType || "ul"; | |
this.contentEl_ = l.createEl(b, { | |
className: "vjs-menu-content" | |
}), this.contentEl_.setAttribute("role", "menu"); | |
var c = a.prototype.createEl.call(this, "div", { | |
append: this.contentEl_, | |
className: "vjs-menu" | |
}); | |
return c.setAttribute("role", "presentation"), c.appendChild(this.contentEl_), p.on(c, "click", function(a) { | |
a.preventDefault(), a.stopImmediatePropagation() | |
}), c | |
}, b.prototype.handleKeyPress = function(a) { | |
37 === a.which || 40 === a.which ? (a.preventDefault(), this.stepForward()) : (38 === a.which || 39 === a.which) && (a.preventDefault(), this.stepBack()) | |
}, b.prototype.stepForward = function() { | |
var a = 0; | |
void 0 !== this.focusedChild_ && (a = this.focusedChild_ + 1), this.focus(a) | |
}, b.prototype.stepBack = function() { | |
var a = 0; | |
void 0 !== this.focusedChild_ && (a = this.focusedChild_ - 1), this.focus(a) | |
}, b.prototype.focus = function() { | |
var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, | |
b = this.children().slice(), | |
c = b.length && b[0].className && /vjs-menu-title/.test(b[0].className); | |
c && b.shift(), b.length > 0 && (0 > a ? a = 0 : a >= b.length && (a = b.length - 1), this.focusedChild_ = a, b[a].el_.focus()) | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("Menu", q), c["default"] = q | |
}, { | |
5: 5, | |
82: 82, | |
83: 83, | |
84: 84 | |
}], | |
50: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(82), | |
j = e(i), | |
k = a(84), | |
l = e(k), | |
m = a(5), | |
n = d(m), | |
o = "vjs-modal-dialog", | |
p = 27, | |
q = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.opened_ = e.hasBeenOpened_ = e.hasBeenFilled_ = !1, e.closeable(!e.options_.uncloseable), e.content(e.options_.content), e.contentEl_ = j.createEl("div", { | |
className: o + "-content" | |
}, { | |
role: "document" | |
}), e.descEl_ = j.createEl("p", { | |
className: o + "-description vjs-offscreen", | |
id: e.el().getAttribute("aria-describedby") | |
}), j.textContent(e.descEl_, e.description()), e.el_.appendChild(e.descEl_), e.el_.appendChild(e.contentEl_), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: this.buildCSSClass(), | |
tabIndex: -1 | |
}, { | |
"aria-describedby": this.id() + "_description", | |
"aria-hidden": "true", | |
"aria-label": this.label(), | |
role: "dialog" | |
}) | |
}, b.prototype.buildCSSClass = function() { | |
return o + " vjs-hidden " + a.prototype.buildCSSClass.call(this) | |
}, b.prototype.handleKeyPress = function(a) { | |
a.which === p && this.closeable() && this.close() | |
}, b.prototype.label = function() { | |
return this.options_.label || this.localize("Modal Window") | |
}, b.prototype.description = function() { | |
var a = this.options_.description || this.localize("This is a modal window."); | |
return this.closeable() && (a += " " + this.localize("This modal can be closed by pressing the Escape key or activating the close button.")), a | |
}, b.prototype.open = function() { | |
if (!this.opened_) { | |
var a = this.player(); | |
this.trigger("beforemodalopen"), this.opened_ = !0, (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) && this.fill(), this.wasPlaying_ = !a.paused(), this.wasPlaying_ && a.pause(), this.closeable() && this.on(this.el_.ownerDocument, "keydown", l.bind(this, this.handleKeyPress)), a.controls(!1), this.show(), this.el().setAttribute("aria-hidden", "false"), this.trigger("modalopen"), this.hasBeenOpened_ = !0 | |
} | |
return this | |
}, b.prototype.opened = function(a) { | |
return "boolean" == typeof a && this[a ? "open" : "close"](), this.opened_ | |
}, b.prototype.close = function() { | |
if (this.opened_) { | |
var a = this.player(); | |
this.trigger("beforemodalclose"), this.opened_ = !1, this.wasPlaying_ && a.play(), this.closeable() && this.off(this.el_.ownerDocument, "keydown", l.bind(this, this.handleKeyPress)), a.controls(!0), this.hide(), this.el().setAttribute("aria-hidden", "true"), this.trigger("modalclose"), | |
this.options_.temporary && this.dispose() | |
} | |
return this | |
}, b.prototype.closeable = function c(a) { | |
if ("boolean" == typeof a) { | |
var c = this.closeable_ = !!a, | |
b = this.getChild("closeButton"); | |
if (c && !b) { | |
var d = this.contentEl_; | |
this.contentEl_ = this.el_, b = this.addChild("closeButton", { | |
controlText: "Close Modal Dialog" | |
}), this.contentEl_ = d, this.on(b, "close", this.close) | |
}!c && b && (this.off(b, "close", this.close), this.removeChild(b), b.dispose()) | |
} | |
return this.closeable_ | |
}, b.prototype.fill = function() { | |
return this.fillWith(this.content()) | |
}, b.prototype.fillWith = function(a) { | |
var b = this.contentEl(), | |
c = b.parentNode, | |
d = b.nextSibling; | |
return this.trigger("beforemodalfill"), this.hasBeenFilled_ = !0, c.removeChild(b), this.empty(), j.insertContent(b, a), this.trigger("modalfill"), d ? c.insertBefore(b, d) : c.appendChild(b), this | |
}, b.prototype.empty = function() { | |
return this.trigger("beforemodalempty"), j.emptyEl(this.contentEl()), this.trigger("modalempty"), this | |
}, b.prototype.content = function(a) { | |
return "undefined" != typeof a && (this.content_ = a), this.content_ | |
}, b | |
}(n["default"]); | |
q.prototype.options_ = { | |
temporary: !0 | |
}, n["default"].registerComponent("ModalDialog", q), c["default"] = q | |
}, { | |
5: 5, | |
82: 82, | |
84: 84 | |
}], | |
51: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(101), | |
l = e(k), | |
m = a(102), | |
n = e(m), | |
o = a(83), | |
p = d(o), | |
q = a(82), | |
r = d(q), | |
s = a(84), | |
t = d(s), | |
u = a(86), | |
v = d(u), | |
w = a(79), | |
x = d(w), | |
y = a(87), | |
z = e(y), | |
A = a(92), | |
B = e(A), | |
C = a(91), | |
D = a(80), | |
E = a(90), | |
F = d(E), | |
G = a(44), | |
H = e(G), | |
I = a(46), | |
J = e(I), | |
K = a(152), | |
L = e(K), | |
M = a(147), | |
N = e(M), | |
O = a(88), | |
P = e(O), | |
Q = a(70), | |
R = e(Q), | |
S = a(50), | |
T = e(S), | |
U = a(63), | |
V = e(U), | |
W = a(64), | |
X = e(W), | |
Y = a(77), | |
Z = e(Y); | |
a(62), a(60), a(55), a(69), a(45), a(1), a(4), a(8), a(41), a(72), a(61); | |
var $ = ["progress", "abort", "suspend", "emptied", "stalled", "loadedmetadata", "loadeddata", "timeupdate", "ratechange", "volumechange", "texttrackchange"], | |
_ = function(a) { | |
function b(c, d, e) { | |
if (f(this, b), c.id = c.id || "vjs_video_" + v.newGUID(), d = (0, N["default"])(b.getTagSettings(c), d), d.initChildren = !1, d.createEl = !1, d.reportTouchActivity = !1, !d.language) | |
if ("function" == typeof c.closest) { | |
var h = c.closest("[lang]"); | |
h && (d.language = h.getAttribute("lang")) | |
} else | |
for (var i = c; i && 1 === i.nodeType;) { | |
if (r.getElAttributes(i).hasOwnProperty("lang")) { | |
d.language = i.getAttribute("lang"); | |
break | |
} | |
i = i.parentNode | |
} | |
var j = g(this, a.call(this, null, d, e)); | |
if (!j.options_ || !j.options_.techOrder || !j.options_.techOrder.length) throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?"); | |
j.tag = c, j.tagAttributes = c && r.getElAttributes(c), j.language(j.options_.language), d.languages ? ! function() { | |
var a = {}; | |
Object.getOwnPropertyNames(d.languages).forEach(function(b) { | |
a[b.toLowerCase()] = d.languages[b] | |
}), j.languages_ = a | |
}() : j.languages_ = b.prototype.options_.languages, j.cache_ = {}, j.poster_ = d.poster || "", j.controls_ = !!d.controls, c.controls = !1, j.scrubbing_ = !1, j.el_ = j.createEl(); | |
var k = (0, P["default"])(j.options_); | |
return d.plugins && ! function() { | |
var a = d.plugins; | |
Object.getOwnPropertyNames(a).forEach(function(b) { | |
"function" == typeof this[b] ? this[b](a[b]) : z["default"].error("Unable to find plugin:", b) | |
}, j) | |
}(), j.options_.playerOptions = k, j.initChildren(), j.isAudio("audio" === c.nodeName.toLowerCase()), j.controls() ? j.addClass("vjs-controls-enabled") : j.addClass("vjs-controls-disabled"), j.el_.setAttribute("role", "region"), j.isAudio() ? j.el_.setAttribute("aria-label", "audio player") : j.el_.setAttribute("aria-label", "video player"), j.isAudio() && j.addClass("vjs-audio"), j.flexNotSupported_() && j.addClass("vjs-no-flex"), x.IS_IOS || j.addClass("vjs-workinghover"), b.players[j.id_] = j, j.userActive(!0), j.reportUserActivity(), j.listenForUserActivity_(), j.on("fullscreenchange", j.handleFullscreenChange_), j.on("stageclick", j.handleStageClick_), j | |
} | |
return h(b, a), b.prototype.dispose = function() { | |
this.trigger("dispose"), this.off("dispose"), this.styleEl_ && this.styleEl_.parentNode && this.styleEl_.parentNode.removeChild(this.styleEl_), b.players[this.id_] = null, this.tag && this.tag.player && (this.tag.player = null), this.el_ && this.el_.player && (this.el_.player = null), this.tech_ && this.tech_.dispose(), a.prototype.dispose.call(this) | |
}, b.prototype.createEl = function() { | |
var b = this.el_ = a.prototype.createEl.call(this, "div"), | |
c = this.tag; | |
c.removeAttribute("width"), c.removeAttribute("height"); | |
var d = r.getElAttributes(c); | |
if (Object.getOwnPropertyNames(d).forEach(function(a) { | |
"class" === a ? b.className = d[a] : b.setAttribute(a, d[a]) | |
}), c.playerId = c.id, c.id += "_html5_api", c.className = "vjs-tech", c.player = b.player = this, this.addClass("vjs-paused"), n["default"].VIDEOJS_NO_DYNAMIC_STYLE !== !0) { | |
this.styleEl_ = F.createStyleElement("vjs-styles-dimensions"); | |
var e = r.$(".vjs-styles-defaults"), | |
f = r.$("head"); | |
f.insertBefore(this.styleEl_, e ? e.nextSibling : f.firstChild) | |
} | |
this.width(this.options_.width), this.height(this.options_.height), this.fluid(this.options_.fluid), this.aspectRatio(this.options_.aspectRatio); | |
for (var g = c.getElementsByTagName("a"), h = 0; h < g.length; h++) { | |
var i = g.item(h); | |
r.addElClass(i, "vjs-hidden"), i.setAttribute("hidden", "hidden") | |
} | |
return c.initNetworkState_ = c.networkState, c.parentNode && c.parentNode.insertBefore(b, c), r.insertElFirst(c, b), this.children_.unshift(c), this.el_ = b, b | |
}, b.prototype.width = function(a) { | |
return this.dimension("width", a) | |
}, b.prototype.height = function(a) { | |
return this.dimension("height", a) | |
}, b.prototype.dimension = function(a, b) { | |
var c = a + "_"; | |
if (void 0 === b) return this[c] || 0; | |
if ("" === b) this[c] = void 0; | |
else { | |
var d = parseFloat(b); | |
if (isNaN(d)) return z["default"].error('Improper value "' + b + '" supplied for for ' + a), this; | |
this[c] = d | |
} | |
return this.updateStyleEl_(), this | |
}, b.prototype.fluid = function(a) { | |
return void 0 === a ? !!this.fluid_ : (this.fluid_ = !!a, a ? this.addClass("vjs-fluid") : this.removeClass("vjs-fluid"), void this.updateStyleEl_()) | |
}, b.prototype.aspectRatio = function(a) { | |
if (void 0 === a) return this.aspectRatio_; | |
if (!/^\d+\:\d+$/.test(a)) throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9."); | |
this.aspectRatio_ = a, this.fluid(!0), this.updateStyleEl_() | |
}, b.prototype.updateStyleEl_ = function() { | |
if (n["default"].VIDEOJS_NO_DYNAMIC_STYLE === !0) { | |
var a = "number" == typeof this.width_ ? this.width_ : this.options_.width, | |
b = "number" == typeof this.height_ ? this.height_ : this.options_.height, | |
c = this.tech_ && this.tech_.el(); | |
return void(c && (a >= 0 && (c.width = a), b >= 0 && (c.height = b))) | |
} | |
var d = void 0, | |
e = void 0, | |
f = void 0, | |
g = void 0; | |
f = void 0 !== this.aspectRatio_ && "auto" !== this.aspectRatio_ ? this.aspectRatio_ : this.videoWidth() > 0 ? this.videoWidth() + ":" + this.videoHeight() : "16:9"; | |
var h = f.split(":"), | |
i = h[1] / h[0]; | |
d = void 0 !== this.width_ ? this.width_ : void 0 !== this.height_ ? this.height_ / i : this.videoWidth() || 300, e = void 0 !== this.height_ ? this.height_ : d * i, g = /^[^a-zA-Z]/.test(this.id()) ? "dimensions-" + this.id() : this.id() + "-dimensions", this.addClass(g), F.setTextContent(this.styleEl_, "\n ." + g + " {\n width: " + d + "px;\n height: " + e + "px;\n }\n\n ." + g + ".vjs-fluid {\n padding-top: " + 100 * i + "%;\n }\n ") | |
}, b.prototype.loadTech_ = function(a, b) { | |
var c = this; | |
this.tech_ && this.unloadTech_(), "Html5" !== a && this.tag && (V["default"].getTech("Html5").disposeMediaElement(this.tag), this.tag.player = null, this.tag = null), this.techName_ = a, this.isReady_ = !1; | |
var d = (0, N["default"])({ | |
source: b, | |
nativeControlsForTouch: this.options_.nativeControlsForTouch, | |
playerId: this.id(), | |
techId: this.id() + "_" + a + "_api", | |
videoTracks: this.videoTracks_, | |
textTracks: this.textTracks_, | |
audioTracks: this.audioTracks_, | |
autoplay: this.options_.autoplay, | |
preload: this.options_.preload, | |
loop: this.options_.loop, | |
muted: this.options_.muted, | |
poster: this.poster(), | |
language: this.language(), | |
"vtt.js": this.options_["vtt.js"] | |
}, this.options_[a.toLowerCase()]); | |
this.tag && (d.tag = this.tag), b && (this.currentType_ = b.type, b.src === this.cache_.src && this.cache_.currentTime > 0 && (d.startTime = this.cache_.currentTime), this.cache_.sources = null, this.cache_.source = b, this.cache_.src = b.src); | |
var e = V["default"].getTech(a); | |
e || (e = j["default"].getComponent(a)), this.tech_ = new e(d), this.tech_.ready(t.bind(this, this.handleTechReady_), !0), R["default"].jsonToTextTracks(this.textTracksJson_ || [], this.tech_), $.forEach(function(a) { | |
c.on(c.tech_, a, c["handleTech" + (0, B["default"])(a) + "_"]) | |
}), this.on(this.tech_, "loadstart", this.handleTechLoadStart_), this.on(this.tech_, "waiting", this.handleTechWaiting_), this.on(this.tech_, "canplay", this.handleTechCanPlay_), this.on(this.tech_, "canplaythrough", this.handleTechCanPlayThrough_), this.on(this.tech_, "playing", this.handleTechPlaying_), this.on(this.tech_, "ended", this.handleTechEnded_), this.on(this.tech_, "seeking", this.handleTechSeeking_), this.on(this.tech_, "seeked", this.handleTechSeeked_), this.on(this.tech_, "play", this.handleTechPlay_), this.on(this.tech_, "firstplay", this.handleTechFirstPlay_), this.on(this.tech_, "pause", this.handleTechPause_), this.on(this.tech_, "durationchange", this.handleTechDurationChange_), this.on(this.tech_, "fullscreenchange", this.handleTechFullscreenChange_), this.on(this.tech_, "error", this.handleTechError_), this.on(this.tech_, "loadedmetadata", this.updateStyleEl_), this.on(this.tech_, "posterchange", this.handleTechPosterChange_), this.on(this.tech_, "textdata", this.handleTechTextData_), this.usingNativeControls(this.techGet_("controls")), this.controls() && !this.usingNativeControls() && this.addTechControlsListeners_(), this.tech_.el().parentNode === this.el() || "Html5" === a && this.tag || r.insertElFirst(this.tech_.el(), this.el()), this.tag && (this.tag.player = null, this.tag = null) | |
}, b.prototype.unloadTech_ = function() { | |
this.videoTracks_ = this.videoTracks(), this.textTracks_ = this.textTracks(), this.audioTracks_ = this.audioTracks(), this.textTracksJson_ = R["default"].textTracksToJson(this.tech_), this.isReady_ = !1, this.tech_.dispose(), this.tech_ = !1 | |
}, b.prototype.tech = function(a) { | |
if (a && a.IWillNotUseThisInPlugins) return this.tech_; | |
var b = "\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n "; | |
throw n["default"].alert(b), new Error(b) | |
}, b.prototype.addTechControlsListeners_ = function() { | |
this.removeTechControlsListeners_(), this.on(this.tech_, "mousedown", this.handleTechClick_), this.on(this.tech_, "touchstart", this.handleTechTouchStart_), this.on(this.tech_, "touchmove", this.handleTechTouchMove_), this.on(this.tech_, "touchend", this.handleTechTouchEnd_), this.on(this.tech_, "tap", this.handleTechTap_) | |
}, b.prototype.removeTechControlsListeners_ = function() { | |
this.off(this.tech_, "tap", this.handleTechTap_), this.off(this.tech_, "touchstart", this.handleTechTouchStart_), this.off(this.tech_, "touchmove", this.handleTechTouchMove_), this.off(this.tech_, "touchend", this.handleTechTouchEnd_), this.off(this.tech_, "mousedown", this.handleTechClick_) | |
}, b.prototype.handleTechReady_ = function() { | |
if (this.triggerReady(), this.cache_.volume && this.techCall_("setVolume", this.cache_.volume), this.handleTechPosterChange_(), this.handleTechDurationChange_(), (this.src() || this.currentSrc()) && this.tag && this.options_.autoplay && this.paused()) { | |
try { | |
delete this.tag.poster | |
} catch (a) { | |
(0, z["default"])("deleting tag.poster throws in some browsers", a) | |
} | |
this.play() | |
} | |
}, b.prototype.handleTechLoadStart_ = function() { | |
this.removeClass("vjs-ended"), this.error(null), this.paused() ? (this.hasStarted(!1), this.trigger("loadstart")) : (this.trigger("loadstart"), this.trigger("firstplay")) | |
}, b.prototype.hasStarted = function(a) { | |
return void 0 !== a ? (this.hasStarted_ !== a && (this.hasStarted_ = a, a ? (this.addClass("vjs-has-started"), this.trigger("firstplay")) : this.removeClass("vjs-has-started")), this) : !!this.hasStarted_ | |
}, b.prototype.handleTechPlay_ = function() { | |
this.removeClass("vjs-ended"), this.removeClass("vjs-paused"), this.addClass("vjs-playing"), this.hasStarted(!0), this.trigger("play") | |
}, b.prototype.handleTechWaiting_ = function() { | |
var a = this; | |
this.addClass("vjs-waiting"), this.trigger("waiting"), this.one("timeupdate", function() { | |
return a.removeClass("vjs-waiting") | |
}) | |
}, b.prototype.handleTechCanPlay_ = function() { | |
this.removeClass("vjs-waiting"), this.trigger("canplay") | |
}, b.prototype.handleTechCanPlayThrough_ = function() { | |
this.removeClass("vjs-waiting"), this.trigger("canplaythrough") | |
}, b.prototype.handleTechPlaying_ = function() { | |
this.removeClass("vjs-waiting"), this.trigger("playing") | |
}, b.prototype.handleTechSeeking_ = function() { | |
this.addClass("vjs-seeking"), this.trigger("seeking") | |
}, b.prototype.handleTechSeeked_ = function() { | |
this.removeClass("vjs-seeking"), this.trigger("seeked") | |
}, b.prototype.handleTechFirstPlay_ = function() { | |
this.options_.starttime && this.currentTime(this.options_.starttime), this.addClass("vjs-has-started"), this.trigger("firstplay") | |
}, b.prototype.handleTechPause_ = function() { | |
this.removeClass("vjs-playing"), this.addClass("vjs-paused"), this.trigger("pause") | |
}, b.prototype.handleTechEnded_ = function() { | |
this.addClass("vjs-ended"), this.options_.loop ? (this.currentTime(0), this.play()) : this.paused() || this.pause(), this.trigger("ended") | |
}, b.prototype.handleTechDurationChange_ = function() { | |
this.duration(this.techGet_("duration")) | |
}, b.prototype.handleTechClick_ = function(a) { | |
0 === a.button && this.controls() && (this.paused() ? this.play() : this.pause()) | |
}, b.prototype.handleTechTap_ = function() { | |
this.userActive(!this.userActive()) | |
}, b.prototype.handleTechTouchStart_ = function() { | |
this.userWasActive = this.userActive() | |
}, b.prototype.handleTechTouchMove_ = function() { | |
this.userWasActive && this.reportUserActivity() | |
}, b.prototype.handleTechTouchEnd_ = function(a) { | |
a.preventDefault() | |
}, b.prototype.handleFullscreenChange_ = function() { | |
this.isFullscreen() ? this.addClass("vjs-fullscreen") : this.removeClass("vjs-fullscreen") | |
}, b.prototype.handleStageClick_ = function() { | |
this.reportUserActivity() | |
}, b.prototype.handleTechFullscreenChange_ = function(a, b) { | |
b && this.isFullscreen(b.isFullscreen), this.trigger("fullscreenchange") | |
}, b.prototype.handleTechError_ = function() { | |
var a = this.tech_.error(); | |
this.error(a) | |
}, b.prototype.handleTechTextData_ = function() { | |
var a = null; | |
arguments.length > 1 && (a = arguments[1]), this.trigger("textdata", a) | |
}, b.prototype.getCache = function() { | |
return this.cache_ | |
}, b.prototype.techCall_ = function(a, b) { | |
if (this.tech_ && !this.tech_.isReady_) this.tech_.ready(function() { | |
this[a](b) | |
}, !0); | |
else try { | |
this.tech_ && this.tech_[a](b) | |
} catch (c) { | |
throw (0, z["default"])(c), c | |
} | |
}, b.prototype.techGet_ = function(a) { | |
if (this.tech_ && this.tech_.isReady_) try { | |
return this.tech_[a]() | |
} catch (b) { | |
throw void 0 === this.tech_[a] ? (0, z["default"])("Video.js: " + a + " method not defined for " + this.techName_ + " playback technology.", b) : "TypeError" === b.name ? ((0, z["default"])("Video.js: " + a + " unavailable on " + this.techName_ + " playback technology element.", b), this.tech_.isReady_ = !1) : (0, z["default"])(b), b | |
} | |
}, b.prototype.play = function() { | |
return this.src() || this.currentSrc() ? this.techCall_("play") : this.tech_.one("loadstart", function() { | |
this.play() | |
}), this | |
}, b.prototype.pause = function() { | |
return this.techCall_("pause"), this | |
}, b.prototype.paused = function() { | |
return this.techGet_("paused") === !1 ? !1 : !0 | |
}, b.prototype.scrubbing = function(a) { | |
return void 0 !== a ? (this.scrubbing_ = !!a, a ? this.addClass("vjs-scrubbing") : this.removeClass("vjs-scrubbing"), this) : this.scrubbing_ | |
}, b.prototype.currentTime = function(a) { | |
return void 0 !== a ? (this.techCall_("setCurrentTime", a), this) : (this.cache_.currentTime = this.techGet_("currentTime") || 0, this.cache_.currentTime) | |
}, b.prototype.duration = function(a) { | |
return void 0 === a ? this.cache_.duration || 0 : (a = parseFloat(a) || 0, 0 > a && (a = 1 / 0), a !== this.cache_.duration && (this.cache_.duration = a, a === 1 / 0 ? this.addClass("vjs-live") : this.removeClass("vjs-live"), this.trigger("durationchange")), this) | |
}, b.prototype.remainingTime = function() { | |
return this.duration() - this.currentTime() | |
}, b.prototype.buffered = function c() { | |
var c = this.techGet_("buffered"); | |
return c && c.length || (c = (0, C.createTimeRange)(0, 0)), c | |
}, b.prototype.bufferedPercent = function() { | |
return (0, D.bufferedPercent)(this.buffered(), this.duration()) | |
}, b.prototype.bufferedEnd = function() { | |
var a = this.buffered(), | |
b = this.duration(), | |
c = a.end(a.length - 1); | |
return c > b && (c = b), c | |
}, b.prototype.volume = function(a) { | |
var b = void 0; | |
return void 0 !== a ? (b = Math.max(0, Math.min(1, parseFloat(a))), this.cache_.volume = b, this.techCall_("setVolume", b), this) : (b = parseFloat(this.techGet_("volume")), isNaN(b) ? 1 : b) | |
}, b.prototype.muted = function(a) { | |
return void 0 !== a ? (this.techCall_("setMuted", a), this) : this.techGet_("muted") || !1 | |
}, b.prototype.supportsFullScreen = function() { | |
return this.techGet_("supportsFullScreen") || !1 | |
}, b.prototype.isFullscreen = function(a) { | |
return void 0 !== a ? (this.isFullscreen_ = !!a, this) : !!this.isFullscreen_ | |
}, b.prototype.requestFullscreen = function() { | |
var a = H["default"]; | |
return this.isFullscreen(!0), a.requestFullscreen ? (p.on(l["default"], a.fullscreenchange, t.bind(this, function b(c) { | |
this.isFullscreen(l["default"][a.fullscreenElement]), this.isFullscreen() === !1 && p.off(l["default"], a.fullscreenchange, b), this.trigger("fullscreenchange") | |
})), this.el_[a.requestFullscreen]()) : this.tech_.supportsFullScreen() ? this.techCall_("enterFullScreen") : (this.enterFullWindow(), this.trigger("fullscreenchange")), this | |
}, b.prototype.exitFullscreen = function() { | |
var a = H["default"]; | |
return this.isFullscreen(!1), a.requestFullscreen ? l["default"][a.exitFullscreen]() : this.tech_.supportsFullScreen() ? this.techCall_("exitFullScreen") : (this.exitFullWindow(), this.trigger("fullscreenchange")), this | |
}, b.prototype.enterFullWindow = function() { | |
this.isFullWindow = !0, this.docOrigOverflow = l["default"].documentElement.style.overflow, p.on(l["default"], "keydown", t.bind(this, this.fullWindowOnEscKey)), l["default"].documentElement.style.overflow = "hidden", r.addElClass(l["default"].body, "vjs-full-window"), this.trigger("enterFullWindow") | |
}, b.prototype.fullWindowOnEscKey = function(a) { | |
27 === a.keyCode && (this.isFullscreen() === !0 ? this.exitFullscreen() : this.exitFullWindow()) | |
}, b.prototype.exitFullWindow = function() { | |
this.isFullWindow = !1, p.off(l["default"], "keydown", this.fullWindowOnEscKey), l["default"].documentElement.style.overflow = this.docOrigOverflow, r.removeElClass(l["default"].body, "vjs-full-window"), this.trigger("exitFullWindow") | |
}, b.prototype.canPlayType = function(a) { | |
for (var b = void 0, c = 0, d = this.options_.techOrder; c < d.length; c++) { | |
var e = (0, B["default"])(d[c]), | |
f = V["default"].getTech(e); | |
if (f || (f = j["default"].getComponent(e)), f) { | |
if (f.isSupported() && (b = f.canPlayType(a))) return b | |
} else z["default"].error('The "' + e + '" tech is undefined. Skipped browser support check for that tech.') | |
} | |
return "" | |
}, b.prototype.selectSource = function(a) { | |
var b = this, | |
c = this.options_.techOrder.map(B["default"]).map(function(a) { | |
return [a, V["default"].getTech(a) || j["default"].getComponent(a)] | |
}).filter(function(a) { | |
var b = a[0], | |
c = a[1]; | |
return c ? c.isSupported() : (z["default"].error('The "' + b + '" tech is undefined. Skipped browser support check for that tech.'), !1) | |
}), | |
d = function(a, b, c) { | |
var d = void 0; | |
return a.some(function(a) { | |
return b.some(function(b) { | |
return d = c(a, b), d ? !0 : void 0 | |
}) | |
}), d | |
}, | |
e = void 0, | |
f = function(a) { | |
return function(b, c) { | |
return a(c, b) | |
} | |
}, | |
g = function(a, c) { | |
var d = a[0], | |
e = a[1]; | |
return e.canPlaySource(c, b.options_[d.toLowerCase()]) ? { | |
source: c, | |
tech: d | |
} : void 0 | |
}; | |
return e = this.options_.sourceOrder ? d(a, c, f(g)) : d(c, a, g), e || !1 | |
}, b.prototype.src = function(a) { | |
if (void 0 === a) return this.techGet_("src"); | |
var b = V["default"].getTech(this.techName_); | |
return b || (b = j["default"].getComponent(this.techName_)), Array.isArray(a) ? this.sourceList_(a) : "string" == typeof a ? this.src({ | |
src: a | |
}) : a instanceof Object && (a.type && !b.canPlaySource(a, this.options_[this.techName_.toLowerCase()]) ? this.sourceList_([a]) : (this.cache_.sources = null, this.cache_.source = a, this.cache_.src = a.src, this.currentType_ = a.type || "", this.ready(function() { | |
b.prototype.hasOwnProperty("setSource") ? this.techCall_("setSource", a) : this.techCall_("src", a.src), "auto" === this.options_.preload && this.load(), this.options_.autoplay && this.play() | |
}, !0))), this | |
}, b.prototype.sourceList_ = function(a) { | |
var b = this.selectSource(a); | |
b ? (b.tech === this.techName_ ? this.src(b.source) : this.loadTech_(b.tech, b.source), this.cache_.sources = a) : (this.setTimeout(function() { | |
this.error({ | |
code: 4, | |
message: this.localize(this.options_.notSupportedMessage) | |
}) | |
}, 0), this.triggerReady()) | |
}, b.prototype.load = function() { | |
return this.techCall_("load"), this | |
}, b.prototype.reset = function() { | |
return this.loadTech_((0, B["default"])(this.options_.techOrder[0]), null), this.techCall_("reset"), this | |
}, b.prototype.currentSources = function() { | |
var a = this.currentSource(), | |
b = []; | |
return 0 !== Object.keys(a).length && b.push(a), this.cache_.sources || b | |
}, b.prototype.currentSource = function() { | |
var a = {}, | |
b = this.currentSrc(); | |
return b && (a.src = b), this.cache_.source || a | |
}, b.prototype.currentSrc = function() { | |
return this.techGet_("currentSrc") || this.cache_.src || "" | |
}, b.prototype.currentType = function() { | |
return this.currentType_ || "" | |
}, b.prototype.preload = function(a) { | |
return void 0 !== a ? (this.techCall_("setPreload", a), this.options_.preload = a, this) : this.techGet_("preload") | |
}, b.prototype.autoplay = function(a) { | |
return void 0 !== a ? (this.techCall_("setAutoplay", a), this.options_.autoplay = a, this) : this.techGet_("autoplay", a) | |
}, b.prototype.loop = function(a) { | |
return void 0 !== a ? (this.techCall_("setLoop", a), this.options_.loop = a, this) : this.techGet_("loop") | |
}, b.prototype.poster = function(a) { | |
return void 0 === a ? this.poster_ : (a || (a = ""), this.poster_ = a, this.techCall_("setPoster", a), this.trigger("posterchange"), this) | |
}, b.prototype.handleTechPosterChange_ = function() { | |
!this.poster_ && this.tech_ && this.tech_.poster && (this.poster_ = this.tech_.poster() || "", this.trigger("posterchange")) | |
}, b.prototype.controls = function(a) { | |
return void 0 !== a ? (a = !!a, this.controls_ !== a && (this.controls_ = a, this.usingNativeControls() && this.techCall_("setControls", a), a ? (this.removeClass("vjs-controls-disabled"), this.addClass("vjs-controls-enabled"), this.trigger("controlsenabled"), this.usingNativeControls() || this.addTechControlsListeners_()) : (this.removeClass("vjs-controls-enabled"), this.addClass("vjs-controls-disabled"), this.trigger("controlsdisabled"), this.usingNativeControls() || this.removeTechControlsListeners_())), this) : !!this.controls_ | |
}, b.prototype.usingNativeControls = function(a) { | |
return void 0 !== a ? (a = !!a, this.usingNativeControls_ !== a && (this.usingNativeControls_ = a, a ? (this.addClass("vjs-using-native-controls"), this.trigger("usingnativecontrols")) : (this.removeClass("vjs-using-native-controls"), this.trigger("usingcustomcontrols"))), this) : !!this.usingNativeControls_ | |
}, b.prototype.error = function(a) { | |
return void 0 === a ? this.error_ || null : null === a ? (this.error_ = a, this.removeClass("vjs-error"), this.errorDisplay && this.errorDisplay.close(), this) : (this.error_ = new J["default"](a), this.addClass("vjs-error"), z["default"].error("(CODE:" + this.error_.code + " " + J["default"].errorTypes[this.error_.code] + ")", this.error_.message, this.error_), this.trigger("error"), this) | |
}, b.prototype.reportUserActivity = function(a) { | |
this.userActivity_ = !0 | |
}, b.prototype.userActive = function(a) { | |
return void 0 !== a ? (a = !!a, a !== this.userActive_ && (this.userActive_ = a, a ? (this.userActivity_ = !0, this.removeClass("vjs-user-inactive"), this.addClass("vjs-user-active"), this.trigger("useractive")) : (this.userActivity_ = !1, this.tech_ && this.tech_.one("mousemove", function(a) { | |
a.stopPropagation(), a.preventDefault() | |
}), this.removeClass("vjs-user-active"), this.addClass("vjs-user-inactive"), this.trigger("userinactive"))), this) : this.userActive_ | |
}, b.prototype.listenForUserActivity_ = function() { | |
var a = void 0, | |
b = void 0, | |
c = void 0, | |
d = t.bind(this, this.reportUserActivity), | |
e = function(a) { | |
(a.screenX !== b || a.screenY !== c) && (b = a.screenX, c = a.screenY, d()) | |
}, | |
f = function() { | |
d(), this.clearInterval(a), a = this.setInterval(d, 250) | |
}, | |
g = function(b) { | |
d(), this.clearInterval(a) | |
}; | |
this.on("mousedown", f), this.on("mousemove", e), this.on("mouseup", g), this.on("keydown", d), this.on("keyup", d); | |
var h = void 0; | |
this.setInterval(function() { | |
if (this.userActivity_) { | |
this.userActivity_ = !1, this.userActive(!0), this.clearTimeout(h); | |
var a = this.options_.inactivityTimeout; | |
a > 0 && (h = this.setTimeout(function() { | |
this.userActivity_ || this.userActive(!1) | |
}, a)) | |
} | |
}, 250) | |
}, b.prototype.playbackRate = function(a) { | |
return void 0 !== a ? (this.techCall_("setPlaybackRate", a), this) : this.tech_ && this.tech_.featuresPlaybackRate ? this.techGet_("playbackRate") : 1 | |
}, b.prototype.isAudio = function(a) { | |
return void 0 !== a ? (this.isAudio_ = !!a, this) : !!this.isAudio_ | |
}, b.prototype.videoTracks = function() { | |
return this.tech_ ? this.tech_.videoTracks() : (this.videoTracks_ = this.videoTracks_ || new Z["default"], this.videoTracks_) | |
}, b.prototype.audioTracks = function() { | |
return this.tech_ ? this.tech_.audioTracks() : (this.audioTracks_ = this.audioTracks_ || new X["default"], this.audioTracks_) | |
}, b.prototype.textTracks = function() { | |
return this.tech_ ? this.tech_.textTracks() : void 0 | |
}, b.prototype.remoteTextTracks = function() { | |
return this.tech_ ? this.tech_.remoteTextTracks() : void 0 | |
}, b.prototype.remoteTextTrackEls = function() { | |
return this.tech_ ? this.tech_.remoteTextTrackEls() : void 0 | |
}, b.prototype.addTextTrack = function(a, b, c) { | |
return this.tech_ ? this.tech_.addTextTrack(a, b, c) : void 0 | |
}, b.prototype.addRemoteTextTrack = function(a) { | |
return this.tech_ ? this.tech_.addRemoteTextTrack(a) : void 0 | |
}, b.prototype.removeRemoteTextTrack = function() { | |
var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, | |
b = a.track, | |
c = void 0 === b ? arguments[0] : b; | |
return this.tech_ ? this.tech_.removeRemoteTextTrack(c) : void 0 | |
}, b.prototype.videoWidth = function() { | |
return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0 | |
}, b.prototype.videoHeight = function() { | |
return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0 | |
}, b.prototype.language = function(a) { | |
return void 0 === a ? this.language_ : (this.language_ = String(a).toLowerCase(), this) | |
}, b.prototype.languages = function() { | |
return (0, P["default"])(b.prototype.options_.languages, this.languages_) | |
}, b.prototype.toJSON = function() { | |
var a = (0, P["default"])(this.options_), | |
b = a.tracks; | |
a.tracks = []; | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d = (0, P["default"])(d), d.player = void 0, a.tracks[c] = d | |
} | |
return a | |
}, b.prototype.createModal = function(a, b) { | |
var c = this; | |
b = b || {}, b.content = a || ""; | |
var d = new T["default"](this, b); | |
return this.addChild(d), d.on("dispose", function() { | |
c.removeChild(d) | |
}), d.open() | |
}, b.getTagSettings = function(a) { | |
var b = { | |
sources: [], | |
tracks: [] | |
}, | |
c = r.getElAttributes(a), | |
d = c["data-setup"]; | |
if (r.hasElClass(a, "vjs-fluid") && (c.fluid = !0), null !== d) { | |
var e = (0, L["default"])(d || "{}"), | |
f = e[0], | |
g = e[1]; | |
f && z["default"].error(f), (0, N["default"])(c, g) | |
} | |
if ((0, N["default"])(b, c), a.hasChildNodes()) | |
for (var h = a.childNodes, i = 0, j = h.length; j > i; i++) { | |
var k = h[i], | |
l = k.nodeName.toLowerCase(); | |
"source" === l ? b.sources.push(r.getElAttributes(k)) : "track" === l && b.tracks.push(r.getElAttributes(k)) | |
} | |
return b | |
}, b.prototype.flexNotSupported_ = function() { | |
var a = l["default"].createElement("i"); | |
return !("flexBasis" in a.style || "webkitFlexBasis" in a.style || "mozFlexBasis" in a.style || "msFlexBasis" in a.style || "msFlexOrder" in a.style) | |
}, b | |
}(j["default"]); | |
_.players = {}; | |
var aa = n["default"].navigator; | |
_.prototype.options_ = { | |
techOrder: ["html5", "flash"], | |
html5: {}, | |
flash: {}, | |
defaultVolume: 0, | |
inactivityTimeout: 2e3, | |
playbackRates: [], | |
children: ["mediaLoader", "posterImage", "textTrackDisplay", "loadingSpinner", "bigPlayButton", "controlBar", "errorDisplay", "textTrackSettings"], | |
language: aa && (aa.languages && aa.languages[0] || aa.userLanguage || aa.language) || "en", | |
languages: {}, | |
notSupportedMessage: "No compatible source was found for this media." | |
}, ["ended", "seeking", "seekable", "networkState", "readyState"].forEach(function(a) { | |
_.prototype[a] = function() { | |
return this.techGet_(a) | |
} | |
}), $.forEach(function(a) { | |
_.prototype["handleTech" + (0, B["default"])(a) + "_"] = function() { | |
return this.trigger(a) | |
} | |
}), j["default"].registerComponent("Player", _), c["default"] = _ | |
}, { | |
1: 1, | |
101: 101, | |
102: 102, | |
147: 147, | |
152: 152, | |
4: 4, | |
41: 41, | |
44: 44, | |
45: 45, | |
46: 46, | |
5: 5, | |
50: 50, | |
55: 55, | |
60: 60, | |
61: 61, | |
62: 62, | |
63: 63, | |
64: 64, | |
69: 69, | |
70: 70, | |
72: 72, | |
77: 77, | |
79: 79, | |
8: 8, | |
80: 80, | |
82: 82, | |
83: 83, | |
84: 84, | |
86: 86, | |
87: 87, | |
88: 88, | |
90: 90, | |
91: 91, | |
92: 92 | |
}], | |
52: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0; | |
var e = a(51), | |
f = d(e), | |
g = function(a, b) { | |
f["default"].prototype[a] = b | |
}; | |
c["default"] = g | |
}, { | |
51: 51 | |
}], | |
53: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(3), | |
i = d(h), | |
j = a(5), | |
k = d(j), | |
l = function(a) { | |
function b(c) { | |
var d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | |
e(this, b); | |
var g = f(this, a.call(this, c, d)); | |
return g.update(), g | |
} | |
return g(b, a), b.prototype.update = function() { | |
var a = this.createPopup(); | |
this.popup && this.removeChild(this.popup), this.popup = a, this.addChild(a), this.items && 0 === this.items.length ? this.hide() : this.items && this.items.length > 1 && this.show() | |
}, b.prototype.createPopup = function() {}, b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: this.buildCSSClass() | |
}) | |
}, b.prototype.buildCSSClass = function() { | |
var b = "vjs-menu-button"; | |
return b += this.options_.inline === !0 ? "-inline" : "-popup", "vjs-menu-button " + b + " " + a.prototype.buildCSSClass.call(this) | |
}, b | |
}(i["default"]); | |
k["default"].registerComponent("PopupButton", l), c["default"] = l | |
}, { | |
3: 3, | |
5: 5 | |
}], | |
54: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(84), | |
n = d(m), | |
o = a(83), | |
p = d(o), | |
q = function(a) { | |
function b() { | |
return f(this, b), g(this, a.apply(this, arguments)) | |
} | |
return h(b, a), b.prototype.addItem = function(a) { | |
this.addChild(a), a.on("click", n.bind(this, function() { | |
this.unlockShowing() | |
})) | |
}, b.prototype.createEl = function() { | |
var b = this.options_.contentElType || "ul"; | |
this.contentEl_ = l.createEl(b, { | |
className: "vjs-menu-content" | |
}); | |
var c = a.prototype.createEl.call(this, "div", { | |
append: this.contentEl_, | |
className: "vjs-menu" | |
}); | |
return c.appendChild(this.contentEl_), p.on(c, "click", function(a) { | |
a.preventDefault(), a.stopImmediatePropagation() | |
}), c | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("Popup", q), c["default"] = q | |
}, { | |
5: 5, | |
82: 82, | |
83: 83, | |
84: 84 | |
}], | |
55: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(3), | |
j = e(i), | |
k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = a(82), | |
p = d(o), | |
q = a(79), | |
r = d(q), | |
s = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.update(), c.on("posterchange", n.bind(e, e.update)), e | |
} | |
return h(b, a), b.prototype.dispose = function() { | |
this.player().off("posterchange", this.update), a.prototype.dispose.call(this) | |
}, b.prototype.createEl = function() { | |
var a = p.createEl("div", { | |
className: "vjs-poster", | |
tabIndex: -1 | |
}); | |
return r.BACKGROUND_SIZE_SUPPORTED || (this.fallbackImg_ = p.createEl("img"), a.appendChild(this.fallbackImg_)), a | |
}, b.prototype.update = function() { | |
var a = this.player().poster(); | |
this.setSrc(a), a ? this.show() : this.hide() | |
}, b.prototype.setSrc = function(a) { | |
if (this.fallbackImg_) this.fallbackImg_.src = a; | |
else { | |
var b = ""; | |
a && (b = 'url("' + a + '")'), this.el_.style.backgroundImage = b | |
} | |
}, b.prototype.handleClick = function() { | |
this.player_.paused() ? this.player_.play() : this.player_.pause() | |
}, b | |
}(j["default"]); | |
l["default"].registerComponent("PosterImage", s), c["default"] = s | |
}, { | |
3: 3, | |
5: 5, | |
79: 79, | |
82: 82, | |
84: 84 | |
}], | |
56: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
b && (n = b), setTimeout(o, a) | |
} | |
c.__esModule = !0, c.hasLoaded = c.autoSetupTimeout = c.autoSetup = void 0; | |
var g = a(83), | |
h = e(g), | |
i = a(101), | |
j = d(i), | |
k = a(102), | |
l = d(k), | |
m = !1, | |
n = void 0, | |
o = function() { | |
var a = j["default"].getElementsByTagName("video"), | |
b = j["default"].getElementsByTagName("audio"), | |
c = []; | |
if (a && a.length > 0) | |
for (var d = 0, e = a.length; e > d; d++) c.push(a[d]); | |
if (b && b.length > 0) | |
for (var g = 0, h = b.length; h > g; g++) c.push(b[g]); | |
if (c && c.length > 0) | |
for (var i = 0, k = c.length; k > i; i++) { | |
var l = c[i]; | |
if (!l || !l.getAttribute) { | |
f(1); | |
break | |
} | |
if (void 0 === l.player) { | |
var o = l.getAttribute("data-setup"); | |
null !== o && n(l) | |
} | |
} else m || f(1) | |
}; | |
"complete" === j["default"].readyState ? m = !0 : h.one(l["default"], "load", function() { | |
m = !0 | |
}); | |
var p = function() { | |
return m | |
}; | |
c.autoSetup = o, c.autoSetupTimeout = f, c.hasLoaded = p | |
}, { | |
101: 101, | |
102: 102, | |
83: 83 | |
}], | |
57: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(5), | |
j = e(i), | |
k = a(82), | |
l = d(k), | |
m = a(147), | |
n = e(m), | |
o = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.bar = e.getChild(e.options_.barName), e.vertical(!!e.options_.vertical), e.on("mousedown", e.handleMouseDown), e.on("touchstart", e.handleMouseDown), e.on("focus", e.handleFocus), e.on("blur", e.handleBlur), e.on("click", e.handleClick), e.on(c, "controlsvisible", e.update), e.on(c, e.playerEvent, e.update), e | |
} | |
return h(b, a), b.prototype.createEl = function(b) { | |
var c = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
d = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; | |
return c.className = c.className + " vjs-slider", c = (0, n["default"])({ | |
tabIndex: 0 | |
}, c), d = (0, n["default"])({ | |
role: "slider", | |
"aria-valuenow": 0, | |
"aria-valuemin": 0, | |
"aria-valuemax": 100, | |
tabIndex: 0 | |
}, d), a.prototype.createEl.call(this, b, c, d) | |
}, b.prototype.handleMouseDown = function(a) { | |
var b = this.bar.el_.ownerDocument; | |
a.preventDefault(), l.blockTextSelection(), this.addClass("vjs-sliding"), this.trigger("slideractive"), this.on(b, "mousemove", this.handleMouseMove), this.on(b, "mouseup", this.handleMouseUp), this.on(b, "touchmove", this.handleMouseMove), this.on(b, "touchend", this.handleMouseUp), this.handleMouseMove(a) | |
}, b.prototype.handleMouseMove = function() {}, b.prototype.handleMouseUp = function() { | |
var a = this.bar.el_.ownerDocument; | |
l.unblockTextSelection(), this.removeClass("vjs-sliding"), this.trigger("sliderinactive"), this.off(a, "mousemove", this.handleMouseMove), this.off(a, "mouseup", this.handleMouseUp), this.off(a, "touchmove", this.handleMouseMove), this.off(a, "touchend", this.handleMouseUp), this.update() | |
}, b.prototype.update = function() { | |
if (this.el_) { | |
var a = this.getPercent(), | |
b = this.bar; | |
if (b) { | |
("number" != typeof a || a !== a || 0 > a || a === 1 / 0) && (a = 0); | |
var c = (100 * a).toFixed(2) + "%"; | |
this.vertical() ? b.el().style.height = c : b.el().style.width = c | |
} | |
} | |
}, b.prototype.calculateDistance = function(a) { | |
var b = l.getPointerPosition(this.el_, a); | |
return this.vertical() ? b.y : b.x | |
}, b.prototype.handleFocus = function() { | |
this.on(this.bar.el_.ownerDocument, "keydown", this.handleKeyPress) | |
}, b.prototype.handleKeyPress = function(a) { | |
37 === a.which || 40 === a.which ? (a.preventDefault(), this.stepBack()) : (38 === a.which || 39 === a.which) && (a.preventDefault(), this.stepForward()) | |
}, b.prototype.handleBlur = function() { | |
this.off(this.bar.el_.ownerDocument, "keydown", this.handleKeyPress) | |
}, b.prototype.handleClick = function(a) { | |
a.stopImmediatePropagation(), a.preventDefault() | |
}, b.prototype.vertical = function(a) { | |
return void 0 === a ? this.vertical_ || !1 : (this.vertical_ = !!a, this.vertical_ ? this.addClass("vjs-slider-vertical") : this.addClass("vjs-slider-horizontal"), this) | |
}, b | |
}(j["default"]); | |
j["default"].registerComponent("Slider", o), c["default"] = o | |
}, { | |
147: 147, | |
5: 5, | |
82: 82 | |
}], | |
58: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
var c = function() { | |
var d = (new Date).getTime(); | |
return d - c.lastCheckTime_ >= b && (c.lastCheckTime_ = d, c.cache_ = a()), c.cache_ | |
}; | |
return c.lastCheckTime_ = -(1 / 0), c | |
} | |
c.__esModule = !0, c["default"] = d | |
}, {}], | |
59: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a.streamingFormats = { | |
"rtmp/mp4": "MP4", | |
"rtmp/flv": "FLV" | |
}, a.streamFromParts = function(a, b) { | |
return a + "&" + b | |
}, a.streamToParts = function(a) { | |
var b = { | |
connection: "", | |
stream: "" | |
}; | |
if (!a) return b; | |
var c = a.search(/&(?!\w+=)/), | |
d = void 0; | |
return -1 !== c ? d = c + 1 : (c = d = a.lastIndexOf("/") + 1, 0 === c && (c = d = a.length)), b.connection = a.substring(0, c), b.stream = a.substring(d, a.length), b | |
}, a.isStreamingType = function(b) { | |
return b in a.streamingFormats | |
}, a.RTMP_RE = /^rtmp[set]?:\/\//i, a.isStreamingSrc = function(b) { | |
return a.RTMP_RE.test(b) | |
}, a.rtmpSourceHandler = {}, a.rtmpSourceHandler.canPlayType = function(b) { | |
return a.isStreamingType(b) ? "maybe" : "" | |
}, a.rtmpSourceHandler.canHandleSource = function(b, c) { | |
var d = a.rtmpSourceHandler.canPlayType(b.type); | |
return d ? d : a.isStreamingSrc(b.src) ? "maybe" : "" | |
}, a.rtmpSourceHandler.handleSource = function(b, c, d) { | |
var e = a.streamToParts(b.src); | |
c.setRtmpConnection(e.connection), c.setRtmpStream(e.stream) | |
}, a.registerSourceHandler(a.rtmpSourceHandler), a | |
} | |
c.__esModule = !0, c["default"] = d | |
}, {}], | |
60: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
function i(a) { | |
var b = a.charAt(0).toUpperCase() + a.slice(1); | |
D["set" + b] = function(b) { | |
return this.el_.vjs_setProperty(a, b) | |
} | |
} | |
function j(a) { | |
D[a] = function() { | |
return this.el_.vjs_getProperty(a) | |
} | |
} | |
c.__esModule = !0; | |
for (var k = a(63), l = e(k), m = a(82), n = d(m), o = a(93), p = d(o), q = a(91), r = a(59), s = e(r), t = a(58), u = e(t), v = a(5), w = e(v), x = a(102), y = e(x), z = a(147), A = e(z), B = y["default"].navigator, C = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
c.source && e.ready(function() { | |
this.setSource(c.source) | |
}, !0), c.startTime && e.ready(function() { | |
this.load(), this.play(), this.currentTime(c.startTime) | |
}, !0), y["default"].videojs = y["default"].videojs || {}, y["default"].videojs.Flash = y["default"].videojs.Flash || {}, y["default"].videojs.Flash.onReady = b.onReady, y["default"].videojs.Flash.onEvent = b.onEvent, y["default"].videojs.Flash.onError = b.onError, e.on("seeked", function() { | |
this.lastSeekTarget_ = void 0 | |
}); | |
var h = (0, u["default"])(function() { | |
return e.el_.vjs_getProperty("currentTime") | |
}, 100); | |
return e.currentTime = function(a) { | |
return e.seeking() ? e.lastSeekTarget_ || 0 : h() | |
}, e.buffered = (0, u["default"])(function() { | |
var a = e.el_.vjs_getProperty("buffered"); | |
return 0 === a.length ? (0, q.createTimeRange)() : (0, q.createTimeRange)(a[0][0], a[0][1]) | |
}, 100), e | |
} | |
return h(b, a), b.prototype.createEl = function() { | |
var a = this.options_; | |
if (!a.swf) { | |
var c = "5.1.0"; | |
a.swf = "//vjs.zencdn.net/swf/" + c + "/video-js.swf" | |
} | |
var d = a.techId, | |
e = (0, A["default"])({ | |
readyFunction: "videojs.Flash.onReady", | |
eventProxyFunction: "videojs.Flash.onEvent", | |
errorEventProxyFunction: "videojs.Flash.onError", | |
autoplay: a.autoplay, | |
preload: a.preload, | |
loop: a.loop, | |
muted: a.muted | |
}, a.flashVars), | |
f = (0, A["default"])({ | |
wmode: "opaque", | |
bgcolor: "#000000" | |
}, a.params), | |
g = (0, A["default"])({ | |
id: d, | |
name: d, | |
"class": "vjs-tech" | |
}, a.attributes); | |
return this.el_ = b.embed(a.swf, e, f, g), this.el_.tech = this, this.el_ | |
}, b.prototype.play = function() { | |
this.ended() && this.setCurrentTime(0), this.el_.vjs_play() | |
}, b.prototype.pause = function() { | |
this.el_.vjs_pause() | |
}, b.prototype.src = function(a) { | |
return void 0 === a ? this.currentSrc() : this.setSrc(a) | |
}, b.prototype.setSrc = function(a) { | |
var b = this; | |
a = p.getAbsoluteURL(a), this.el_.vjs_src(a), this.autoplay() && this.setTimeout(function() { | |
return b.play() | |
}, 0) | |
}, b.prototype.seeking = function() { | |
return void 0 !== this.lastSeekTarget_ | |
}, b.prototype.setCurrentTime = function(b) { | |
var c = this.seekable(); | |
c.length && (b = b > c.start(0) ? b : c.start(0), b = b < c.end(c.length - 1) ? b : c.end(c.length - 1), this.lastSeekTarget_ = b, this.trigger("seeking"), this.el_.vjs_setProperty("currentTime", b), a.prototype.setCurrentTime.call(this)) | |
}, b.prototype.currentSrc = function() { | |
return this.currentSource_ ? this.currentSource_.src : this.el_.vjs_getProperty("currentSrc") | |
}, b.prototype.duration = function c() { | |
if (0 === this.readyState()) return NaN; | |
var c = this.el_.vjs_getProperty("duration"); | |
return c >= 0 ? c : 1 / 0 | |
}, b.prototype.load = function() { | |
this.el_.vjs_load() | |
}, b.prototype.poster = function() { | |
this.el_.vjs_getProperty("poster") | |
}, b.prototype.setPoster = function() {}, b.prototype.seekable = function() { | |
var a = this.duration(); | |
return 0 === a ? (0, q.createTimeRange)() : (0, q.createTimeRange)(0, a) | |
}, b.prototype.supportsFullScreen = function() { | |
return !1 | |
}, b.prototype.enterFullScreen = function() { | |
return !1 | |
}, b | |
}(l["default"]), D = C.prototype, E = "rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","), F = "networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight".split(","), G = 0; G < E.length; G++) j(E[G]), i(E[G]); | |
for (var H = 0; H < F.length; H++) j(F[H]); | |
C.isSupported = function() { | |
return C.version()[0] >= 10 | |
}, l["default"].withSourceHandlers(C), C.nativeSourceHandler = {}, C.nativeSourceHandler.canPlayType = function(a) { | |
return a in C.formats ? "maybe" : "" | |
}, C.nativeSourceHandler.canHandleSource = function(a, b) { | |
function c(a) { | |
var b = p.getFileExtension(a); | |
return b ? "video/" + b : "" | |
} | |
var d = void 0; | |
return d = a.type ? a.type.replace(/;.*/, "").toLowerCase() : c(a.src), C.nativeSourceHandler.canPlayType(d) | |
}, C.nativeSourceHandler.handleSource = function(a, b, c) { | |
b.setSrc(a.src) | |
}, C.nativeSourceHandler.dispose = function() {}, C.registerSourceHandler(C.nativeSourceHandler), C.formats = { | |
"video/flv": "FLV", | |
"video/x-flv": "FLV", | |
"video/mp4": "MP4", | |
"video/m4v": "MP4" | |
}, C.onReady = function(a) { | |
var b = n.getEl(a), | |
c = b && b.tech; | |
c && c.el() && C.checkReady(c) | |
}, C.checkReady = function(a) { | |
a.el() && (a.el().vjs_getProperty ? a.triggerReady() : this.setTimeout(function() { | |
C.checkReady(a) | |
}, 50)) | |
}, C.onEvent = function(a, b) { | |
var c = n.getEl(a).tech, | |
d = Array.prototype.slice.call(arguments, 2); | |
c.setTimeout(function() { | |
c.trigger(b, d) | |
}, 1) | |
}, C.onError = function(a, b) { | |
var c = n.getEl(a).tech; | |
return "srcnotfound" === b ? c.error(4) : void c.error("FLASH: " + b) | |
}, C.version = function() { | |
var a = "0,0,0"; | |
try { | |
a = new y["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1] | |
} catch (b) { | |
try { | |
B.mimeTypes["application/x-shockwave-flash"].enabledPlugin && (a = (B.plugins["Shockwave Flash 2.0"] || B.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]) | |
} catch (c) {} | |
} | |
return a.split(",") | |
}, C.embed = function(a, b, c, d) { | |
var e = C.getEmbedCode(a, b, c, d), | |
f = n.createEl("div", { | |
innerHTML: e | |
}).childNodes[0]; | |
return f | |
}, C.getEmbedCode = function(a, b, c, d) { | |
var e = '<object type="application/x-shockwave-flash" ', | |
f = "", | |
g = "", | |
h = ""; | |
return b && Object.getOwnPropertyNames(b).forEach(function(a) { | |
f += a + "=" + b[a] + "&" | |
}), c = (0, A["default"])({ | |
movie: a, | |
flashvars: f, | |
allowScriptAccess: "always", | |
allowNetworking: "all" | |
}, c), Object.getOwnPropertyNames(c).forEach(function(a) { | |
g += '<param name="' + a + '" value="' + c[a] + '" />' | |
}), d = (0, A["default"])({ | |
data: a, | |
width: "100%", | |
height: "100%" | |
}, d), Object.getOwnPropertyNames(d).forEach(function(a) { | |
h += a + '="' + d[a] + '" ' | |
}), "" + e + h + ">" + g + "</object>" | |
}, (0, s["default"])(C), w["default"].registerComponent("Flash", C), l["default"].registerTech("Flash", C), c["default"] = C | |
}, { | |
102: 102, | |
147: 147, | |
5: 5, | |
58: 58, | |
59: 59, | |
63: 63, | |
82: 82, | |
91: 91, | |
93: 93 | |
}], | |
61: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
return a.raw = b, a | |
} | |
function g(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function h(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function i(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var j = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
k = f(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."], ["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]), | |
l = a(63), | |
m = e(l), | |
n = a(5), | |
o = e(n), | |
p = a(82), | |
q = d(p), | |
r = a(93), | |
s = d(r), | |
t = a(84), | |
u = d(t), | |
v = a(87), | |
w = e(v), | |
x = a(154), | |
y = e(x), | |
z = a(79), | |
A = d(z), | |
B = a(101), | |
C = e(B), | |
D = a(102), | |
E = e(D), | |
F = a(147), | |
G = e(F), | |
H = a(88), | |
I = e(H), | |
J = a(92), | |
K = e(J), | |
L = function(a) { | |
function b(c, d) { | |
g(this, b); | |
var e = h(this, a.call(this, c, d)), | |
f = c.source, | |
i = !1; | |
if (f && (e.el_.currentSrc !== f.src || c.tag && 3 === c.tag.initNetworkState_) ? e.setSource(f) : e.handleLateInit_(e.el_), e.el_.hasChildNodes()) { | |
for (var j = e.el_.childNodes, l = j.length, m = []; l--;) { | |
var n = j[l], | |
o = n.nodeName.toLowerCase(); | |
"track" === o && (e.featuresNativeTextTracks ? (e.remoteTextTrackEls().addTrackElement_(n), e.remoteTextTracks().addTrack_(n.track), i || e.el_.hasAttribute("crossorigin") || !s.isCrossOrigin(n.src) || (i = !0)) : m.push(n)) | |
} | |
for (var p = 0; p < m.length; p++) e.el_.removeChild(m[p]) | |
} | |
var q = ["audio", "video"]; | |
return q.forEach(function(a) { | |
var b = e.el()[a + "Tracks"], | |
c = e[a + "Tracks"](), | |
d = (0, K["default"])(a); | |
e["featuresNative" + d + "Tracks"] && b && b.addEventListener && (e["handle" + d + "TrackChange_"] = function(a) { | |
c.trigger({ | |
type: "change", | |
target: c, | |
currentTarget: c, | |
srcElement: c | |
}) | |
}, e["handle" + d + "TrackAdd_"] = function(a) { | |
return c.addTrack(a.track) | |
}, e["handle" + d + "TrackRemove_"] = function(a) { | |
return c.removeTrack(a.track) | |
}, b.addEventListener("change", e["handle" + d + "TrackChange_"]), b.addEventListener("addtrack", e["handle" + d + "TrackAdd_"]), b.addEventListener("removetrack", e["handle" + d + "TrackRemove_"]), e["removeOld" + d + "Tracks_"] = function(a) { | |
return e.removeOldTracks_(c, b) | |
}, e.on("loadstart", e["removeOld" + d + "Tracks_"])) | |
}), e.featuresNativeTextTracks && (i && w["default"].warn((0, y["default"])(k)), e.handleTextTrackChange_ = u.bind(e, e.handleTextTrackChange), e.handleTextTrackAdd_ = u.bind(e, e.handleTextTrackAdd), e.handleTextTrackRemove_ = u.bind(e, e.handleTextTrackRemove), e.proxyNativeTextTracks_()), (A.TOUCH_ENABLED || A.IS_IPHONE || A.IS_NATIVE_ANDROID) && c.nativeControlsForTouch === !0 && e.setControls(!0), e.proxyWebkitFullscreen_(), e.triggerReady(), e | |
} | |
return i(b, a), b.prototype.dispose = function() { | |
var c = this; | |
["audio", "video", "text"].forEach(function(a) { | |
var b = (0, K["default"])(a), | |
d = c.el_[a + "Tracks"]; | |
d && d.removeEventListener && (d.removeEventListener("change", c["handle" + b + "TrackChange_"]), d.removeEventListener("addtrack", c["handle" + b + "TrackAdd_"]), d.removeEventListener("removetrack", c["handle" + b + "TrackRemove_"])), d && c.off("loadstart", c["removeOld" + b + "Tracks_"]) | |
}), b.disposeMediaElement(this.el_), a.prototype.dispose.call(this) | |
}, b.prototype.createEl = function() { | |
var a = this.options_.tag; | |
if (!a || this.movingMediaElementInDOM === !1) { | |
if (a) { | |
var c = a.cloneNode(!0); | |
a.parentNode.insertBefore(c, a), b.disposeMediaElement(a), a = c | |
} else { | |
a = C["default"].createElement("video"); | |
var d = this.options_.tag && q.getElAttributes(this.options_.tag), | |
e = (0, I["default"])({}, d); | |
A.TOUCH_ENABLED && this.options_.nativeControlsForTouch === !0 || delete e.controls, q.setElAttributes(a, (0, G["default"])(e, { | |
id: this.options_.techId, | |
"class": "vjs-tech" | |
})) | |
} | |
a.playerId = this.options_.playerId | |
} | |
for (var f = ["autoplay", "preload", "loop", "muted"], g = f.length - 1; g >= 0; g--) { | |
var h = f[g], | |
i = {}; | |
"undefined" != typeof this.options_[h] && (i[h] = this.options_[h]), q.setElAttributes(a, i) | |
} | |
return a | |
}, b.prototype.handleLateInit_ = function(a) { | |
var b = this; | |
if (0 !== a.networkState && 3 !== a.networkState) { | |
if (0 === a.readyState) { | |
var c = function() { | |
var a = !1, | |
c = function() { | |
a = !0 | |
}; | |
b.on("loadstart", c); | |
var d = function() { | |
a || this.trigger("loadstart") | |
}; | |
return b.on("loadedmetadata", d), b.ready(function() { | |
this.off("loadstart", c), this.off("loadedmetadata", d), a || this.trigger("loadstart") | |
}), { | |
v: void 0 | |
} | |
}(); | |
if ("object" === ("undefined" == typeof c ? "undefined" : j(c))) return c.v | |
} | |
var d = ["loadstart"]; | |
d.push("loadedmetadata"), a.readyState >= 2 && d.push("loadeddata"), a.readyState >= 3 && d.push("canplay"), a.readyState >= 4 && d.push("canplaythrough"), this.ready(function() { | |
d.forEach(function(a) { | |
this.trigger(a) | |
}, this) | |
}) | |
} | |
}, b.prototype.proxyNativeTextTracks_ = function() { | |
var a = this.el().textTracks; | |
if (a) { | |
for (var b = 0; b < a.length; b++) this.textTracks().addTrack_(a[b]); | |
a.addEventListener && (a.addEventListener("change", this.handleTextTrackChange_), a.addEventListener("addtrack", this.handleTextTrackAdd_), a.addEventListener("removetrack", this.handleTextTrackRemove_)), this.on("loadstart", this.removeOldTextTracks_) | |
} | |
}, b.prototype.handleTextTrackChange = function(a) { | |
var b = this.textTracks(); | |
this.textTracks().trigger({ | |
type: "change", | |
target: b, | |
currentTarget: b, | |
srcElement: b | |
}) | |
}, b.prototype.handleTextTrackAdd = function(a) { | |
this.textTracks().addTrack_(a.track) | |
}, b.prototype.handleTextTrackRemove = function(a) { | |
this.textTracks().removeTrack_(a.track) | |
}, b.prototype.removeOldTracks_ = function(a, b) { | |
var c = []; | |
if (b) { | |
for (var d = 0; d < a.length; d++) { | |
for (var e = a[d], f = !1, g = 0; g < b.length; g++) | |
if (b[g] === e) { | |
f = !0; | |
break | |
} | |
f || c.push(e) | |
} | |
for (var h = 0; h < c.length; h++) { | |
var i = c[h]; | |
a.removeTrack_(i) | |
} | |
} | |
}, b.prototype.removeOldTextTracks_ = function() { | |
var a = this.textTracks(), | |
b = this.el().textTracks; | |
this.removeOldTracks_(a, b) | |
}, b.prototype.play = function() { | |
var a = this.el_.play(); | |
void 0 !== a && "function" == typeof a.then && a.then(null, function(a) {}) | |
}, b.prototype.setCurrentTime = function(a) { | |
try { | |
this.el_.currentTime = a | |
} catch (b) { | |
(0, w["default"])(b, "Video is not ready. (Video.js)") | |
} | |
}, b.prototype.duration = function() { | |
var a = this; | |
if (this.el_.duration === 1 / 0 && A.IS_ANDROID && A.IS_CHROME && 0 === this.el_.currentTime) { | |
var b = function() { | |
var b = function c() { | |
a.el_.currentTime > 0 && (a.el_.duration === 1 / 0 && a.trigger("durationchange"), a.off(a.player_, "timeupdate", c)) | |
}; | |
return a.on(a.player_, "timeupdate", b), { | |
v: NaN | |
} | |
}(); | |
if ("object" === ("undefined" == typeof b ? "undefined" : j(b))) return b.v | |
} | |
return this.el_.duration || NaN | |
}, b.prototype.width = function() { | |
return this.el_.offsetWidth | |
}, b.prototype.height = function() { | |
return this.el_.offsetHeight | |
}, b.prototype.proxyWebkitFullscreen_ = function() { | |
var a = this; | |
if ("webkitDisplayingFullscreen" in this.el_) { | |
var b = function() { | |
this.trigger("fullscreenchange", { | |
isFullscreen: !1 | |
}) | |
}, | |
c = function() { | |
this.one("webkitendfullscreen", b), this.trigger("fullscreenchange", { | |
isFullscreen: !0 | |
}) | |
}; | |
this.on("webkitbeginfullscreen", c), this.on("dispose", function() { | |
a.off("webkitbeginfullscreen", c), a.off("webkitendfullscreen", b) | |
}) | |
} | |
}, b.prototype.supportsFullScreen = function() { | |
if ("function" == typeof this.el_.webkitEnterFullScreen) { | |
var a = E["default"].navigator && E["default"].navigator.userAgent || ""; | |
if (/Android/.test(a) || !/Chrome|Mac OS X 10.5/.test(a)) return !0 | |
} | |
return !1 | |
}, b.prototype.enterFullScreen = function() { | |
var a = this.el_; | |
a.paused && a.networkState <= a.HAVE_METADATA ? (this.el_.play(), this.setTimeout(function() { | |
a.pause(), a.webkitEnterFullScreen() | |
}, 0)) : a.webkitEnterFullScreen() | |
}, b.prototype.exitFullScreen = function() { | |
this.el_.webkitExitFullScreen() | |
}, b.prototype.src = function(a) { | |
return void 0 === a ? this.el_.src : void this.setSrc(a) | |
}, b.prototype.reset = function() { | |
b.resetMediaElement(this.el_) | |
}, b.prototype.currentSrc = function() { | |
return this.currentSource_ ? this.currentSource_.src : this.el_.currentSrc | |
}, b.prototype.setControls = function(a) { | |
this.el_.controls = !!a | |
}, b.prototype.addTextTrack = function(b, c, d) { | |
return this.featuresNativeTextTracks ? this.el_.addTextTrack(b, c, d) : a.prototype.addTextTrack.call(this, b, c, d) | |
}, b.prototype.addRemoteTextTrack = function() { | |
var b = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; | |
if (!this.featuresNativeTextTracks) return a.prototype.addRemoteTextTrack.call(this, b); | |
var c = C["default"].createElement("track"); | |
return b.kind && (c.kind = b.kind), b.label && (c.label = b.label), (b.language || b.srclang) && (c.srclang = b.language || b.srclang), b["default"] && (c["default"] = b["default"]), b.id && (c.id = b.id), b.src && (c.src = b.src), this.el().appendChild(c), this.remoteTextTrackEls().addTrackElement_(c), this.remoteTextTracks().addTrack_(c.track), c | |
}, b.prototype.removeRemoteTextTrack = function(b) { | |
if (!this.featuresNativeTextTracks) return a.prototype.removeRemoteTextTrack.call(this, b); | |
var c = this.remoteTextTrackEls().getTrackElementByTrack_(b); | |
this.remoteTextTrackEls().removeTrackElement_(c), this.remoteTextTracks().removeTrack_(b); | |
for (var d = this.$$("track"), e = d.length; e--;)(b === d[e] || b === d[e].track) && this.el().removeChild(d[e]) | |
}, b | |
}(m["default"]); | |
L.TEST_VID = C["default"].createElement("video"); | |
var M = C["default"].createElement("track"); | |
M.kind = "captions", M.srclang = "en", M.label = "English", L.TEST_VID.appendChild(M), L.isSupported = function() { | |
try { | |
L.TEST_VID.volume = .5 | |
} catch (a) { | |
return !1 | |
} | |
return !!L.TEST_VID.canPlayType | |
}, L.canControlVolume = function() { | |
try { | |
var a = L.TEST_VID.volume; | |
return L.TEST_VID.volume = a / 2 + .1, a !== L.TEST_VID.volume | |
} catch (b) { | |
return !1 | |
} | |
}, L.canControlPlaybackRate = function() { | |
if (A.IS_ANDROID && A.IS_CHROME) return !1; | |
try { | |
var a = L.TEST_VID.playbackRate; | |
return L.TEST_VID.playbackRate = a / 2 + .1, a !== L.TEST_VID.playbackRate | |
} catch (b) { | |
return !1 | |
} | |
}, L.supportsNativeTextTracks = function() { | |
var a = void 0; | |
return a = !!L.TEST_VID.textTracks, a && L.TEST_VID.textTracks.length > 0 && (a = "number" != typeof L.TEST_VID.textTracks[0].mode), a && A.IS_FIREFOX && (a = !1), !a || "onremovetrack" in L.TEST_VID.textTracks || (a = !1), a | |
}, L.supportsNativeVideoTracks = function() { | |
var a = !!L.TEST_VID.videoTracks; | |
return a | |
}, L.supportsNativeAudioTracks = function() { | |
var a = !!L.TEST_VID.audioTracks; | |
return a | |
}, L.Events = ["loadstart", "suspend", "abort", "error", "emptied", "stalled", "loadedmetadata", "loadeddata", "canplay", "canplaythrough", "playing", "waiting", "seeking", "seeked", "ended", "durationchange", "timeupdate", "progress", "play", "pause", "ratechange", "volumechange"], L.prototype.featuresVolumeControl = L.canControlVolume(), L.prototype.featuresPlaybackRate = L.canControlPlaybackRate(), L.prototype.movingMediaElementInDOM = !A.IS_IOS, L.prototype.featuresFullscreenResize = !0, L.prototype.featuresProgressEvents = !0, L.prototype.featuresTimeupdateEvents = !1, L.prototype.featuresNativeTextTracks = L.supportsNativeTextTracks(), L.prototype.featuresNativeVideoTracks = L.supportsNativeVideoTracks(), L.prototype.featuresNativeAudioTracks = L.supportsNativeAudioTracks(); | |
var N = void 0, | |
O = /^application\/(?:x-|vnd\.apple\.)mpegurl/i, | |
P = /^video\/mp4/i; | |
L.patchCanPlayType = function() { | |
A.ANDROID_VERSION >= 4 && !A.IS_FIREFOX && (N || (N = L.TEST_VID.constructor.prototype.canPlayType), L.TEST_VID.constructor.prototype.canPlayType = function(a) { | |
return a && O.test(a) ? "maybe" : N.call(this, a) | |
}), A.IS_OLD_ANDROID && (N || (N = L.TEST_VID.constructor.prototype.canPlayType), L.TEST_VID.constructor.prototype.canPlayType = function(a) { | |
return a && P.test(a) ? "maybe" : N.call(this, a) | |
}) | |
}, L.unpatchCanPlayType = function() { | |
var a = L.TEST_VID.constructor.prototype.canPlayType; | |
return L.TEST_VID.constructor.prototype.canPlayType = N, N = null, a | |
}, L.patchCanPlayType(), L.disposeMediaElement = function(a) { | |
if (a) { | |
for (a.parentNode && a.parentNode.removeChild(a); a.hasChildNodes();) a.removeChild(a.firstChild); | |
a.removeAttribute("src"), "function" == typeof a.load && ! function() { | |
try { | |
a.load() | |
} catch (b) {} | |
}() | |
} | |
}, L.resetMediaElement = function(a) { | |
if (a) { | |
for (var b = a.querySelectorAll("source"), c = b.length; c--;) a.removeChild(b[c]); | |
a.removeAttribute("src"), "function" == typeof a.load && ! function() { | |
try { | |
a.load() | |
} catch (b) {} | |
}() | |
} | |
}, ["paused", "currentTime", "buffered", "volume", "muted", "poster", "preload", "autoplay", "controls", "loop", "error", "seeking", "seekable", "ended", "defaultMuted", "playbackRate", "played", "networkState", "readyState", "videoWidth", "videoHeight"].forEach(function(a) { | |
L.prototype[a] = function() { | |
return this.el_[a] | |
} | |
}), ["volume", "muted", "src", "poster", "preload", "autoplay", "loop", "playbackRate"].forEach(function(a) { | |
L.prototype["set" + (0, K["default"])(a)] = function(b) { | |
this.el_[a] = b | |
} | |
}), ["pause", "load"].forEach(function(a) { | |
L.prototype[a] = function() { | |
return this.el_[a]() | |
} | |
}), m["default"].withSourceHandlers(L), L.nativeSourceHandler = {}, L.nativeSourceHandler.canPlayType = function(a) { | |
try { | |
return L.TEST_VID.canPlayType(a) | |
} catch (b) { | |
return "" | |
} | |
}, L.nativeSourceHandler.canHandleSource = function(a, b) { | |
if (a.type) return L.nativeSourceHandler.canPlayType(a.type); | |
if (a.src) { | |
var c = s.getFileExtension(a.src); | |
return L.nativeSourceHandler.canPlayType("video/" + c) | |
} | |
return "" | |
}, L.nativeSourceHandler.handleSource = function(a, b, c) { | |
b.setSrc(a.src) | |
}, L.nativeSourceHandler.dispose = function() {}, L.registerSourceHandler(L.nativeSourceHandler), o["default"].registerComponent("Html5", L), m["default"].registerTech("Html5", L), c["default"] = L | |
}, { | |
101: 101, | |
102: 102, | |
147: 147, | |
154: 154, | |
5: 5, | |
63: 63, | |
79: 79, | |
82: 82, | |
84: 84, | |
87: 87, | |
88: 88, | |
92: 92, | |
93: 93 | |
}], | |
62: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var h = a(5), | |
i = d(h), | |
j = a(63), | |
k = d(j), | |
l = a(92), | |
m = d(l), | |
n = function(a) { | |
function b(c, d, g) { | |
e(this, b); | |
var h = f(this, a.call(this, c, d, g)); | |
if (d.playerOptions.sources && 0 !== d.playerOptions.sources.length) c.src(d.playerOptions.sources); | |
else | |
for (var j = 0, l = d.playerOptions.techOrder; j < l.length; j++) { | |
var n = (0, m["default"])(l[j]), | |
o = k["default"].getTech(n); | |
if (n || (o = i["default"].getComponent(n)), o && o.isSupported()) { | |
c.loadTech_(n); | |
break | |
} | |
} | |
return h | |
} | |
return g(b, a), b | |
}(i["default"]); | |
i["default"].registerComponent("MediaLoader", n), c["default"] = n | |
}, { | |
5: 5, | |
63: 63, | |
92: 92 | |
}], | |
63: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
function i(a, b, c, d) { | |
var e = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {}, | |
f = a.textTracks(); | |
e.kind = b, c && (e.label = c), d && (e.language = d), e.tech = a; | |
var g = new s["default"](e); | |
return f.addTrack_(g), g | |
} | |
c.__esModule = !0; | |
var j = a(5), | |
k = e(j), | |
l = a(67), | |
m = e(l), | |
n = a(66), | |
o = e(n), | |
p = a(88), | |
q = e(p), | |
r = a(73), | |
s = e(r), | |
t = a(71), | |
u = e(t), | |
v = a(77), | |
w = e(v), | |
x = a(64), | |
y = e(x), | |
z = a(84), | |
A = d(z), | |
B = a(87), | |
C = e(B), | |
D = a(91), | |
E = a(80), | |
F = a(46), | |
G = e(F), | |
H = a(102), | |
I = e(H), | |
J = a(101), | |
K = e(J), | |
L = function(a) { | |
function b() { | |
var c = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, | |
d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function() {}; | |
f(this, b), c.reportTouchActivity = !1; | |
var e = g(this, a.call(this, null, c, d)); | |
return e.hasStarted_ = !1, e.on("playing", function() { | |
this.hasStarted_ = !0 | |
}), e.on("loadstart", function() { | |
this.hasStarted_ = !1 | |
}), e.textTracks_ = c.textTracks, e.videoTracks_ = c.videoTracks, e.audioTracks_ = c.audioTracks, e.featuresProgressEvents || e.manualProgressOn(), e.featuresTimeupdateEvents || e.manualTimeUpdatesOn(), (c.nativeCaptions === !1 || c.nativeTextTracks === !1) && (e.featuresNativeTextTracks = !1), e.featuresNativeTextTracks || e.on("ready", e.emulateTextTracks), e.initTextTrackListeners(), e.initTrackListeners(), e.emitTapEvents(), e | |
} | |
return h(b, a), b.prototype.manualProgressOn = function() { | |
this.on("durationchange", this.onDurationChange), this.manualProgress = !0, this.one("ready", this.trackProgress) | |
}, b.prototype.manualProgressOff = function() { | |
this.manualProgress = !1, this.stopTrackingProgress(), this.off("durationchange", this.onDurationChange) | |
}, b.prototype.trackProgress = function() { | |
this.stopTrackingProgress(), this.progressInterval = this.setInterval(A.bind(this, function() { | |
var a = this.bufferedPercent(); | |
this.bufferedPercent_ !== a && this.trigger("progress"), this.bufferedPercent_ = a, 1 === a && this.stopTrackingProgress() | |
}), 500) | |
}, b.prototype.onDurationChange = function() { | |
this.duration_ = this.duration() | |
}, b.prototype.buffered = function() { | |
return (0, D.createTimeRange)(0, 0) | |
}, b.prototype.bufferedPercent = function() { | |
return (0, E.bufferedPercent)(this.buffered(), this.duration_) | |
}, b.prototype.stopTrackingProgress = function() { | |
this.clearInterval(this.progressInterval) | |
}, b.prototype.manualTimeUpdatesOn = function() { | |
this.manualTimeUpdates = !0, this.on("play", this.trackCurrentTime), this.on("pause", this.stopTrackingCurrentTime) | |
}, b.prototype.manualTimeUpdatesOff = function() { | |
this.manualTimeUpdates = !1, this.stopTrackingCurrentTime(), this.off("play", this.trackCurrentTime), this.off("pause", this.stopTrackingCurrentTime) | |
}, b.prototype.trackCurrentTime = function() { | |
this.manualTimeUpdatesActive_ = !0, this.manualTimeUpdateTicker_() | |
}, b.prototype.manualTimeUpdateTicker_ = function() { | |
var a = I["default"].requestAnimationFrame || I["default"].webkitRequestAnimationFrame || I["default"].mozRequestAnimationFrame || function(a) { | |
setTimeout(a, 16) | |
}; | |
this.trigger({ | |
type: "timeupdate", | |
target: this, | |
manuallyTriggered: !0 | |
}), this.manualTimeUpdatesActive_ && a(A.bind(this, this.manualTimeUpdateTicker_)) | |
}, b.prototype.stopTrackingCurrentTime = function() { | |
this.manualTimeUpdatesActive_ = !1 | |
}, b.prototype.dispose = function() { | |
this.clearTracks(["audio", "video", "text"]), this.manualProgress && this.manualProgressOff(), this.manualTimeUpdates && this.manualTimeUpdatesOff(), | |
a.prototype.dispose.call(this) | |
}, b.prototype.clearTracks = function(a) { | |
var b = this; | |
a = [].concat(a), a.forEach(function(a) { | |
for (var c = b[a + "Tracks"]() || [], d = c.length; d--;) { | |
var e = c[d]; | |
"text" === a && b.removeRemoteTextTrack(e), c.removeTrack_(e) | |
} | |
}) | |
}, b.prototype.reset = function() {}, b.prototype.error = function(a) { | |
return void 0 !== a && (this.error_ = new G["default"](a), this.trigger("error")), this.error_ | |
}, b.prototype.played = function() { | |
return this.hasStarted_ ? (0, D.createTimeRange)(0, 0) : (0, D.createTimeRange)() | |
}, b.prototype.setCurrentTime = function() { | |
this.manualTimeUpdates && this.trigger({ | |
type: "timeupdate", | |
target: this, | |
manuallyTriggered: !0 | |
}) | |
}, b.prototype.initTextTrackListeners = function() { | |
var a = A.bind(this, function() { | |
this.trigger("texttrackchange") | |
}), | |
b = this.textTracks(); | |
b && (b.addEventListener("removetrack", a), b.addEventListener("addtrack", a), this.on("dispose", A.bind(this, function() { | |
b.removeEventListener("removetrack", a), b.removeEventListener("addtrack", a) | |
}))) | |
}, b.prototype.initTrackListeners = function() { | |
var a = this, | |
b = ["video", "audio"]; | |
b.forEach(function(b) { | |
var c = function() { | |
a.trigger(b + "trackchange") | |
}, | |
d = a[b + "Tracks"](); | |
d.addEventListener("removetrack", c), d.addEventListener("addtrack", c), a.on("dispose", function() { | |
d.removeEventListener("removetrack", c), d.removeEventListener("addtrack", c) | |
}) | |
}) | |
}, b.prototype.emulateTextTracks = function() { | |
var a = this, | |
b = this.textTracks(); | |
if (b) { | |
I["default"].WebVTT || null === this.el().parentNode || void 0 === this.el().parentNode || ! function() { | |
var b = K["default"].createElement("script"); | |
b.src = a.options_["vtt.js"] || "https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js", b.onload = function() { | |
a.trigger("vttjsloaded") | |
}, b.onerror = function() { | |
a.trigger("vttjserror") | |
}, a.on("dispose", function() { | |
b.onload = null, b.onerror = null | |
}), I["default"].WebVTT = !0, a.el().parentNode.appendChild(b) | |
}(); | |
var c = function() { | |
return a.trigger("texttrackchange") | |
}, | |
d = function() { | |
c(); | |
for (var a = 0; a < b.length; a++) { | |
var d = b[a]; | |
d.removeEventListener("cuechange", c), "showing" === d.mode && d.addEventListener("cuechange", c) | |
} | |
}; | |
d(), b.addEventListener("change", d), this.on("dispose", function() { | |
b.removeEventListener("change", d) | |
}) | |
} | |
}, b.prototype.videoTracks = function() { | |
return this.videoTracks_ = this.videoTracks_ || new w["default"], this.videoTracks_ | |
}, b.prototype.audioTracks = function() { | |
return this.audioTracks_ = this.audioTracks_ || new y["default"], this.audioTracks_ | |
}, b.prototype.textTracks = function() { | |
return this.textTracks_ = this.textTracks_ || new u["default"], this.textTracks_ | |
}, b.prototype.remoteTextTracks = function() { | |
return this.remoteTextTracks_ = this.remoteTextTracks_ || new u["default"], this.remoteTextTracks_ | |
}, b.prototype.remoteTextTrackEls = function() { | |
return this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new o["default"], this.remoteTextTrackEls_ | |
}, b.prototype.addTextTrack = function(a, b, c) { | |
if (!a) throw new Error("TextTrack kind is required but was not provided"); | |
return i(this, a, b, c) | |
}, b.prototype.addRemoteTextTrack = function(a) { | |
var b = (0, q["default"])(a, { | |
tech: this | |
}), | |
c = new m["default"](b); | |
return this.remoteTextTrackEls().addTrackElement_(c), this.remoteTextTracks().addTrack_(c.track), this.textTracks().addTrack_(c.track), c | |
}, b.prototype.removeRemoteTextTrack = function(a) { | |
this.textTracks().removeTrack_(a); | |
var b = this.remoteTextTrackEls().getTrackElementByTrack_(a); | |
this.remoteTextTrackEls().removeTrackElement_(b), this.remoteTextTracks().removeTrack_(a) | |
}, b.prototype.setPoster = function() {}, b.prototype.canPlayType = function() { | |
return "" | |
}, b.isTech = function(a) { | |
return a.prototype instanceof b || a instanceof b || a === b | |
}, b.registerTech = function(a, c) { | |
if (b.techs_ || (b.techs_ = {}), !b.isTech(c)) throw new Error("Tech " + a + " must be a Tech"); | |
return b.techs_[a] = c, c | |
}, b.getTech = function(a) { | |
return b.techs_ && b.techs_[a] ? b.techs_[a] : I["default"] && I["default"].videojs && I["default"].videojs[a] ? (C["default"].warn("The " + a + " tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"), I["default"].videojs[a]) : void 0 | |
}, b | |
}(k["default"]); | |
L.prototype.textTracks_, L.prototype.audioTracks_, L.prototype.videoTracks_, L.prototype.featuresVolumeControl = !0, L.prototype.featuresFullscreenResize = !1, L.prototype.featuresPlaybackRate = !1, L.prototype.featuresProgressEvents = !1, L.prototype.featuresTimeupdateEvents = !1, L.prototype.featuresNativeTextTracks = !1, L.withSourceHandlers = function(a) { | |
a.registerSourceHandler = function(b, c) { | |
var d = a.sourceHandlers; | |
d || (d = a.sourceHandlers = []), void 0 === c && (c = d.length), d.splice(c, 0, b) | |
}, a.canPlayType = function(b) { | |
for (var c = a.sourceHandlers || [], d = void 0, e = 0; e < c.length; e++) | |
if (d = c[e].canPlayType(b)) return d; | |
return "" | |
}, a.selectSourceHandler = function(b, c) { | |
for (var d = a.sourceHandlers || [], e = void 0, f = 0; f < d.length; f++) | |
if (e = d[f].canHandleSource(b, c)) return d[f]; | |
return null | |
}, a.canPlaySource = function(b, c) { | |
var d = a.selectSourceHandler(b, c); | |
return d ? d.canHandleSource(b, c) : "" | |
}; | |
var b = ["seekable", "duration"]; | |
b.forEach(function(a) { | |
var b = this[a]; | |
"function" == typeof b && (this[a] = function() { | |
return this.sourceHandler_ && this.sourceHandler_[a] ? this.sourceHandler_[a].apply(this.sourceHandler_, arguments) : b.apply(this, arguments) | |
}) | |
}, a.prototype), a.prototype.setSource = function(b) { | |
var c = a.selectSourceHandler(b, this.options_); | |
return c || (a.nativeSourceHandler ? c = a.nativeSourceHandler : C["default"].error("No source hander found for the current source.")), this.disposeSourceHandler(), this.off("dispose", this.disposeSourceHandler), this.currentSource_ && (this.clearTracks(["audio", "video"]), this.currentSource_ = null), c !== a.nativeSourceHandler && (this.currentSource_ = b, this.off(this.el_, "loadstart", a.prototype.firstLoadStartListener_), this.off(this.el_, "loadstart", a.prototype.successiveLoadStartListener_), this.one(this.el_, "loadstart", a.prototype.firstLoadStartListener_)), this.sourceHandler_ = c.handleSource(b, this, this.options_), this.on("dispose", this.disposeSourceHandler), this | |
}, a.prototype.firstLoadStartListener_ = function() { | |
this.one(this.el_, "loadstart", a.prototype.successiveLoadStartListener_) | |
}, a.prototype.successiveLoadStartListener_ = function() { | |
this.currentSource_ = null, this.disposeSourceHandler(), this.one(this.el_, "loadstart", a.prototype.successiveLoadStartListener_) | |
}, a.prototype.disposeSourceHandler = function() { | |
this.sourceHandler_ && this.sourceHandler_.dispose && (this.off(this.el_, "loadstart", a.prototype.firstLoadStartListener_), this.off(this.el_, "loadstart", a.prototype.successiveLoadStartListener_), this.sourceHandler_.dispose(), this.sourceHandler_ = null) | |
} | |
}, k["default"].registerComponent("Tech", L), k["default"].registerComponent("MediaTechController", L), L.registerTech("Tech", L), c["default"] = L | |
}, { | |
101: 101, | |
102: 102, | |
46: 46, | |
5: 5, | |
64: 64, | |
66: 66, | |
67: 67, | |
71: 71, | |
73: 73, | |
77: 77, | |
80: 80, | |
84: 84, | |
87: 87, | |
88: 88, | |
91: 91 | |
}], | |
64: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(75), | |
j = e(i), | |
k = a(79), | |
l = d(k), | |
m = a(101), | |
n = e(m), | |
o = function(a, b) { | |
for (var c = 0; c < a.length; c++) b.id !== a[c].id && (a[c].enabled = !1) | |
}, | |
p = function(a) { | |
function b() { | |
var c, d, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; | |
f(this, b); | |
for (var h = void 0, i = e.length - 1; i >= 0; i--) | |
if (e[i].enabled) { | |
o(e, e[i]); | |
break | |
} | |
if (l.IS_IE8) { | |
h = n["default"].createElement("custom"); | |
for (var k in j["default"].prototype) "constructor" !== k && (h[k] = j["default"].prototype[k]); | |
for (var m in b.prototype) "constructor" !== m && (h[m] = b.prototype[m]) | |
} | |
return h = c = g(this, a.call(this, e, h)), h.changing_ = !1, d = h, g(c, d) | |
} | |
return h(b, a), b.prototype.addTrack_ = function(b) { | |
var c = this; | |
b.enabled && o(this, b), a.prototype.addTrack_.call(this, b), b.addEventListener && b.addEventListener("enabledchange", function() { | |
c.changing_ || (c.changing_ = !0, o(c, b), c.changing_ = !1, c.trigger("change")) | |
}) | |
}, b.prototype.addTrack = function(a) { | |
this.addTrack_(a) | |
}, b.prototype.removeTrack = function(b) { | |
a.prototype.removeTrack_.call(this, b) | |
}, b | |
}(j["default"]); | |
c["default"] = p | |
}, { | |
101: 101, | |
75: 75, | |
79: 79 | |
}], | |
65: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(74), | |
j = a(76), | |
k = e(j), | |
l = a(88), | |
m = e(l), | |
n = a(79), | |
o = d(n), | |
p = function(a) { | |
function b() { | |
var c, d, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; | |
f(this, b); | |
var h = (0, m["default"])(e, { | |
kind: i.AudioTrackKind[e.kind] || "" | |
}), | |
j = c = g(this, a.call(this, h)), | |
k = !1; | |
if (o.IS_IE8) | |
for (var l in b.prototype) "constructor" !== l && (j[l] = b.prototype[l]); | |
return Object.defineProperty(j, "enabled", { | |
get: function() { | |
return k | |
}, | |
set: function(a) { | |
"boolean" == typeof a && a !== k && (k = a, this.trigger("enabledchange")) | |
} | |
}), h.enabled && (j.enabled = h.enabled), j.loaded_ = !0, d = j, g(c, d) | |
} | |
return h(b, a), b | |
}(k["default"]); | |
c["default"] = p | |
}, { | |
74: 74, | |
76: 76, | |
79: 79, | |
88: 88 | |
}], | |
66: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
c.__esModule = !0; | |
var g = a(79), | |
h = e(g), | |
i = a(101), | |
j = d(i), | |
k = function() { | |
function a() { | |
var b = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; | |
f(this, a); | |
var c = this; | |
if (h.IS_IE8) { | |
c = j["default"].createElement("custom"); | |
for (var d in a.prototype) "constructor" !== d && (c[d] = a.prototype[d]) | |
} | |
c.trackElements_ = [], Object.defineProperty(c, "length", { | |
get: function() { | |
return this.trackElements_.length | |
} | |
}); | |
for (var e = 0, g = b.length; g > e; e++) c.addTrackElement_(b[e]); | |
return h.IS_IE8 ? c : void 0 | |
} | |
return a.prototype.addTrackElement_ = function(a) { | |
this.trackElements_.push(a) | |
}, a.prototype.getTrackElementByTrack_ = function(a) { | |
for (var b = void 0, c = 0, d = this.trackElements_.length; d > c; c++) | |
if (a === this.trackElements_[c].track) { | |
b = this.trackElements_[c]; | |
break | |
} | |
return b | |
}, a.prototype.removeTrackElement_ = function(a) { | |
for (var b = 0, c = this.trackElements_.length; c > b; b++) | |
if (a === this.trackElements_[b]) { | |
this.trackElements_.splice(b, 1); | |
break | |
} | |
}, a | |
}(); | |
c["default"] = k | |
}, { | |
101: 101, | |
79: 79 | |
}], | |
67: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(79), | |
j = e(i), | |
k = a(101), | |
l = d(k), | |
m = a(42), | |
n = d(m), | |
o = a(73), | |
p = d(o), | |
q = 0, | |
r = 1, | |
s = 2, | |
t = 3, | |
u = function(a) { | |
function b() { | |
var c = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; | |
f(this, b); | |
var d = g(this, a.call(this)), | |
e = void 0, | |
h = d; | |
if (j.IS_IE8) { | |
h = l["default"].createElement("custom"); | |
for (var i in b.prototype) "constructor" !== i && (h[i] = b.prototype[i]) | |
} | |
var k = new p["default"](c); | |
if (h.kind = k.kind, h.src = k.src, h.srclang = k.language, h.label = k.label, h["default"] = k["default"], Object.defineProperty(h, "readyState", { | |
get: function() { | |
return e | |
} | |
}), Object.defineProperty(h, "track", { | |
get: function() { | |
return k | |
} | |
}), e = q, k.addEventListener("loadeddata", function() { | |
e = s, h.trigger({ | |
type: "load", | |
target: h | |
}) | |
}), j.IS_IE8) { | |
var m; | |
return m = h, g(d, m) | |
} | |
return d | |
} | |
return h(b, a), b | |
}(n["default"]); | |
u.prototype.allowedEvents_ = { | |
load: "load" | |
}, u.NONE = q, u.LOADING = r, u.LOADED = s, u.ERROR = t, c["default"] = u | |
}, { | |
101: 101, | |
42: 42, | |
73: 73, | |
79: 79 | |
}], | |
68: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
c.__esModule = !0; | |
var g = a(79), | |
h = e(g), | |
i = a(101), | |
j = d(i), | |
k = function() { | |
function a(b) { | |
f(this, a); | |
var c = this; | |
if (h.IS_IE8) { | |
c = j["default"].createElement("custom"); | |
for (var d in a.prototype) "constructor" !== d && (c[d] = a.prototype[d]) | |
} | |
return a.prototype.setCues_.call(c, b), Object.defineProperty(c, "length", { | |
get: function() { | |
return this.length_ | |
} | |
}), h.IS_IE8 ? c : void 0 | |
} | |
return a.prototype.setCues_ = function(a) { | |
var b = this.length || 0, | |
c = 0, | |
d = a.length; | |
this.cues_ = a, this.length_ = a.length; | |
var e = function(a) { | |
"" + a in this || Object.defineProperty(this, "" + a, { | |
get: function() { | |
return this.cues_[a] | |
} | |
}) | |
}; | |
if (d > b) | |
for (c = b; d > c; c++) e.call(this, c) | |
}, a.prototype.getCueById = function(a) { | |
for (var b = null, c = 0, d = this.length; d > c; c++) { | |
var e = this[c]; | |
if (e.id === a) { | |
b = e; | |
break | |
} | |
} | |
return b | |
}, a | |
}(); | |
c["default"] = k | |
}, { | |
101: 101, | |
79: 79 | |
}], | |
69: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
function i(a, b) { | |
return "rgba(" + parseInt(a[1] + a[1], 16) + "," + parseInt(a[2] + a[2], 16) + "," + parseInt(a[3] + a[3], 16) + "," + b + ")" | |
} | |
function j(a, b, c) { | |
try { | |
a.style[b] = c | |
} catch (d) { | |
return | |
} | |
} | |
c.__esModule = !0; | |
var k = a(5), | |
l = e(k), | |
m = a(84), | |
n = d(m), | |
o = a(102), | |
p = e(o), | |
q = "#222", | |
r = "#ccc", | |
s = { | |
monospace: "monospace", | |
sansSerif: "sans-serif", | |
serif: "serif", | |
monospaceSansSerif: '"Andale Mono", "Lucida Console", monospace', | |
monospaceSerif: '"Courier New", monospace', | |
proportionalSansSerif: "sans-serif", | |
proportionalSerif: "serif", | |
casual: '"Comic Sans MS", Impact, fantasy', | |
script: '"Monotype Corsiva", cursive', | |
smallcaps: '"Andale Mono", "Lucida Console", monospace, sans-serif' | |
}, | |
t = function(a) { | |
function b(c, d, e) { | |
f(this, b); | |
var h = g(this, a.call(this, c, d, e)); | |
return c.on("loadstart", n.bind(h, h.toggleDisplay)), c.on("texttrackchange", n.bind(h, h.updateDisplay)), c.ready(n.bind(h, function() { | |
if (c.tech_ && c.tech_.featuresNativeTextTracks) return void this.hide(); | |
c.on("fullscreenchange", n.bind(this, this.updateDisplay)); | |
for (var a = this.options_.playerOptions.tracks || [], b = 0; b < a.length; b++) this.player_.addRemoteTextTrack(a[b]); | |
var d = { | |
captions: 1, | |
subtitles: 1 | |
}, | |
e = this.player_.textTracks(), | |
f = void 0, | |
g = void 0; | |
if (e) { | |
for (var h = 0; h < e.length; h++) { | |
var i = e[h]; | |
i["default"] && ("descriptions" !== i.kind || f ? i.kind in d && !g && (g = i) : f = i) | |
} | |
g ? g.mode = "showing" : f && (f.mode = "showing") | |
} | |
})), h | |
} | |
return h(b, a), b.prototype.toggleDisplay = function() { | |
this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks ? this.hide() : this.show() | |
}, b.prototype.createEl = function() { | |
return a.prototype.createEl.call(this, "div", { | |
className: "vjs-text-track-display" | |
}, { | |
"aria-live": "off", | |
"aria-atomic": "true" | |
}) | |
}, b.prototype.clearDisplay = function() { | |
"function" == typeof p["default"].WebVTT && p["default"].WebVTT.processCues(p["default"], [], this.el_) | |
}, b.prototype.updateDisplay = function() { | |
var a = this.player_.textTracks(); | |
if (this.clearDisplay(), a) { | |
for (var b = null, c = null, d = a.length; d--;) { | |
var e = a[d]; | |
"showing" === e.mode && ("descriptions" === e.kind ? b = e : c = e) | |
} | |
c ? ("off" !== this.getAttribute("aria-live") && this.setAttribute("aria-live", "off"), this.updateForTrack(c)) : b && ("assertive" !== this.getAttribute("aria-live") && this.setAttribute("aria-live", "assertive"), this.updateForTrack(b)) | |
} | |
}, b.prototype.updateForTrack = function(a) { | |
if ("function" == typeof p["default"].WebVTT && a.activeCues) { | |
for (var b = this.player_.textTrackSettings.getValues(), c = [], d = 0; d < a.activeCues.length; d++) c.push(a.activeCues[d]); | |
p["default"].WebVTT.processCues(p["default"], c, this.el_); | |
for (var e = c.length; e--;) { | |
var f = c[e]; | |
if (f) { | |
var g = f.displayState; | |
if (b.color && (g.firstChild.style.color = b.color), b.textOpacity && j(g.firstChild, "color", i(b.color || "#fff", b.textOpacity)), b.backgroundColor && (g.firstChild.style.backgroundColor = b.backgroundColor), b.backgroundOpacity && j(g.firstChild, "backgroundColor", i(b.backgroundColor || "#000", b.backgroundOpacity)), b.windowColor && (b.windowOpacity ? j(g, "backgroundColor", i(b.windowColor, b.windowOpacity)) : g.style.backgroundColor = b.windowColor), b.edgeStyle && ("dropshadow" === b.edgeStyle ? g.firstChild.style.textShadow = "2px 2px 3px " + q + ", 2px 2px 4px " + q + ", 2px 2px 5px " + q : "raised" === b.edgeStyle ? g.firstChild.style.textShadow = "1px 1px " + q + ", 2px 2px " + q + ", 3px 3px " + q : "depressed" === b.edgeStyle ? g.firstChild.style.textShadow = "1px 1px " + r + ", 0 1px " + r + ", -1px -1px " + q + ", 0 -1px " + q : "uniform" === b.edgeStyle && (g.firstChild.style.textShadow = "0 0 4px " + q + ", 0 0 4px " + q + ", 0 0 4px " + q + ", 0 0 4px " + q)), b.fontPercent && 1 !== b.fontPercent) { | |
var h = p["default"].parseFloat(g.style.fontSize); | |
g.style.fontSize = h * b.fontPercent + "px", g.style.height = "auto", g.style.top = "auto", g.style.bottom = "2px" | |
} | |
b.fontFamily && "default" !== b.fontFamily && ("small-caps" === b.fontFamily ? g.firstChild.style.fontVariant = "small-caps" : g.firstChild.style.fontFamily = s[b.fontFamily]) | |
} | |
} | |
} | |
}, b | |
}(l["default"]); | |
l["default"].registerComponent("TextTrackDisplay", t), c["default"] = t | |
}, { | |
102: 102, | |
5: 5, | |
84: 84 | |
}], | |
70: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
var d = function(a) { | |
var b = ["kind", "label", "language", "id", "inBandMetadataTrackDispatchType", "mode", "src"].reduce(function(b, c, d) { | |
return a[c] && (b[c] = a[c]), b | |
}, { | |
cues: a.cues && Array.prototype.map.call(a.cues, function(a) { | |
return { | |
startTime: a.startTime, | |
endTime: a.endTime, | |
text: a.text, | |
id: a.id | |
} | |
}) | |
}); | |
return b | |
}, | |
e = function(a) { | |
var b = a.$$("track"), | |
c = Array.prototype.map.call(b, function(a) { | |
return a.track | |
}), | |
e = Array.prototype.map.call(b, function(a) { | |
var b = d(a.track); | |
return a.src && (b.src = a.src), b | |
}); | |
return e.concat(Array.prototype.filter.call(a.textTracks(), function(a) { | |
return -1 === c.indexOf(a) | |
}).map(d)) | |
}, | |
f = function(a, b) { | |
return a.forEach(function(a) { | |
var c = b.addRemoteTextTrack(a).track; | |
!a.src && a.cues && a.cues.forEach(function(a) { | |
return c.addCue(a) | |
}) | |
}), b.textTracks() | |
}; | |
c["default"] = { | |
textTracksToJson: e, | |
jsonToTextTracks: f, | |
trackToJson_: d | |
} | |
}, {}], | |
71: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(75), | |
j = e(i), | |
k = a(84), | |
l = d(k), | |
m = a(79), | |
n = d(m), | |
o = a(101), | |
p = e(o), | |
q = function(a) { | |
function b() { | |
var c, d, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; | |
f(this, b); | |
var h = void 0; | |
if (n.IS_IE8) { | |
h = p["default"].createElement("custom"); | |
for (var i in j["default"].prototype) "constructor" !== i && (h[i] = j["default"].prototype[i]); | |
for (var k in b.prototype) "constructor" !== k && (h[k] = b.prototype[k]) | |
} | |
return h = c = g(this, a.call(this, e, h)), d = h, g(c, d) | |
} | |
return h(b, a), b.prototype.addTrack_ = function(b) { | |
a.prototype.addTrack_.call(this, b), b.addEventListener("modechange", l.bind(this, function() { | |
this.trigger("change") | |
})) | |
}, b.prototype.removeTrack_ = function(a) { | |
for (var b = void 0, c = 0, d = this.length; d > c; c++) | |
if (this[c] === a) { | |
b = this[c], b.off && b.off(), this.tracks_.splice(c, 1); | |
break | |
} | |
b && this.trigger({ | |
track: b, | |
type: "removetrack" | |
}) | |
}, b.prototype.getTrackById = function(a) { | |
for (var b = null, c = 0, d = this.length; d > c; c++) { | |
var e = this[c]; | |
if (e.id === a) { | |
b = e; | |
break | |
} | |
} | |
return b | |
}, b | |
}(j["default"]); | |
c["default"] = q | |
}, { | |
101: 101, | |
75: 75, | |
79: 79, | |
84: 84 | |
}], | |
72: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
function i(a, b) { | |
return b && (a = b(a)), a && "none" !== a ? a : void 0 | |
} | |
function j(a, b) { | |
var c = a.options[a.options.selectedIndex].value; | |
return i(c, b) | |
} | |
function k(a, b, c) { | |
if (b) | |
for (var d = 0; d < a.options.length; d++) | |
if (i(a.options[d].value, c) === b) { | |
a.selectedIndex = d; | |
break | |
} | |
} | |
c.__esModule = !0; | |
var l = a(102), | |
m = e(l), | |
n = a(5), | |
o = e(n), | |
p = a(82), | |
q = a(84), | |
r = d(q), | |
s = a(89), | |
t = d(s), | |
u = a(87), | |
v = e(u), | |
w = "vjs-text-track-settings", | |
x = ["#000", "Black"], | |
y = ["#00F", "Blue"], | |
z = ["#0FF", "Cyan"], | |
A = ["#0F0", "Green"], | |
B = ["#F0F", "Magenta"], | |
C = ["#F00", "Red"], | |
D = ["#FFF", "White"], | |
E = ["#FF0", "Yellow"], | |
F = ["1", "Opaque"], | |
G = ["0.5", "Semi-Transparent"], | |
H = ["0", "Transparent"], | |
I = { | |
backgroundColor: { | |
selector: ".vjs-bg-color > select", | |
id: "captions-background-color-%s", | |
label: "Color", | |
options: [x, D, C, A, y, E, B, z] | |
}, | |
backgroundOpacity: { | |
selector: ".vjs-bg-opacity > select", | |
id: "captions-background-opacity-%s", | |
label: "Transparency", | |
options: [F, G, H] | |
}, | |
color: { | |
selector: ".vjs-fg-color > select", | |
id: "captions-foreground-color-%s", | |
label: "Color", | |
options: [D, x, C, A, y, E, B, z] | |
}, | |
edgeStyle: { | |
selector: ".vjs-edge-style > select", | |
id: "%s", | |
label: "Text Edge Style", | |
options: [ | |
["none", "None"], | |
["raised", "Raised"], | |
["depressed", "Depressed"], | |
["uniform", "Uniform"], | |
["dropshadow", "Dropshadow"] | |
] | |
}, | |
fontFamily: { | |
selector: ".vjs-font-family > select", | |
id: "captions-font-family-%s", | |
label: "Font Family", | |
options: [ | |
["proportionalSansSerif", "Proportional Sans-Serif"], | |
["monospaceSansSerif", "Monospace Sans-Serif"], | |
["proportionalSerif", "Proportional Serif"], | |
["monospaceSerif", "Monospace Serif"], | |
["casual", "Casual"], | |
["script", "Script"], | |
["small-caps", "Small Caps"] | |
] | |
}, | |
fontPercent: { | |
selector: ".vjs-font-percent > select", | |
id: "captions-font-size-%s", | |
label: "Font Size", | |
options: [ | |
["0.50", "50%"], | |
["0.75", "75%"], | |
["1.00", "100%"], | |
["1.25", "125%"], | |
["1.50", "150%"], | |
["1.75", "175%"], | |
["2.00", "200%"], | |
["3.00", "300%"], | |
["4.00", "400%"] | |
], | |
"default": 2, | |
parser: function(a) { | |
return "1.00" === a ? null : Number(a) | |
} | |
}, | |
textOpacity: { | |
selector: ".vjs-text-opacity > select", | |
id: "captions-foreground-opacity-%s", | |
label: "Transparency", | |
options: [F, G] | |
}, | |
windowColor: { | |
selector: ".vjs-window-color > select", | |
id: "captions-window-color-%s", | |
label: "Color" | |
}, | |
windowOpacity: { | |
selector: ".vjs-window-opacity > select", | |
id: "captions-window-opacity-%s", | |
label: "Transparency", | |
options: [H, G, F] | |
} | |
}; | |
I.windowColor.options = I.backgroundColor.options; | |
var J = function(a) { | |
function b(c, d) { | |
f(this, b); | |
var e = g(this, a.call(this, c, d)); | |
return e.setDefaults(), e.hide(), e.updateDisplay = r.bind(e, e.updateDisplay), void 0 === d.persistTextTrackSettings && (e.options_.persistTextTrackSettings = e.options_.playerOptions.persistTextTrackSettings), e.on(e.$(".vjs-done-button"), "click", function() { | |
e.saveSettings(), e.hide() | |
}), e.on(e.$(".vjs-default-button"), "click", function() { | |
e.setDefaults(), e.updateDisplay() | |
}), t.each(I, function(a) { | |
e.on(e.$(a.selector), "change", e.updateDisplay) | |
}), e.options_.persistTextTrackSettings && e.restoreSettings(), e | |
} | |
return h(b, a), b.prototype.createElSelect_ = function(a) { | |
var b = this, | |
c = I[a], | |
d = c.id.replace("%s", this.id_); | |
return [(0, p.createEl)("label", { | |
className: "vjs-label", | |
textContent: c.label | |
}, { | |
"for": d | |
}), (0, p.createEl)("select", { | |
id: d | |
}, void 0, c.options.map(function(a) { | |
return (0, p.createEl)("option", { | |
textContent: b.localize(a[1]), | |
value: a[0] | |
}) | |
}))] | |
}, b.prototype.createElFgColor_ = function() { | |
var a = (0, p.createEl)("legend", { | |
textContent: this.localize("Text") | |
}), | |
b = this.createElSelect_("color"), | |
c = (0, p.createEl)("span", { | |
className: "vjs-text-opacity vjs-opacity" | |
}, void 0, this.createElSelect_("textOpacity")); | |
return (0, p.createEl)("fieldset", { | |
className: "vjs-fg-color vjs-tracksetting" | |
}, void 0, [a].concat(b, c)) | |
}, b.prototype.createElBgColor_ = function() { | |
var a = (0, p.createEl)("legend", { | |
textContent: this.localize("Background") | |
}), | |
b = this.createElSelect_("backgroundColor"), | |
c = (0, p.createEl)("span", { | |
className: "vjs-bg-opacity vjs-opacity" | |
}, void 0, this.createElSelect_("backgroundOpacity")); | |
return (0, p.createEl)("fieldset", { | |
className: "vjs-bg-color vjs-tracksetting" | |
}, void 0, [a].concat(b, c)) | |
}, b.prototype.createElWinColor_ = function() { | |
var a = (0, p.createEl)("legend", { | |
textContent: this.localize("Window") | |
}), | |
b = this.createElSelect_("windowColor"), | |
c = (0, p.createEl)("span", { | |
className: "vjs-window-opacity vjs-opacity" | |
}, void 0, this.createElSelect_("windowOpacity")); | |
return (0, p.createEl)("fieldset", { | |
className: "vjs-window-color vjs-tracksetting" | |
}, void 0, [a].concat(b, c)) | |
}, b.prototype.createElColors_ = function() { | |
return (0, p.createEl)("div", { | |
className: "vjs-tracksettings-colors" | |
}, void 0, [this.createElFgColor_(), this.createElBgColor_(), this.createElWinColor_()]) | |
}, b.prototype.createElFont_ = function() { | |
var a = (0, p.createEl)("div", { | |
className: "vjs-font-percent vjs-tracksetting" | |
}, void 0, this.createElSelect_("fontPercent")), | |
b = (0, p.createEl)("div", { | |
className: "vjs-edge-style vjs-tracksetting" | |
}, void 0, this.createElSelect_("edgeStyle")), | |
c = (0, p.createEl)("div", { | |
className: "vjs-font-family vjs-tracksetting" | |
}, void 0, this.createElSelect_("fontFamily")); | |
return (0, p.createEl)("div", { | |
className: "vjs-tracksettings-font" | |
}, void 0, [a, b, c]) | |
}, b.prototype.createElControls_ = function() { | |
var a = (0, p.createEl)("button", { | |
className: "vjs-default-button", | |
textContent: this.localize("Defaults") | |
}), | |
b = (0, p.createEl)("button", { | |
className: "vjs-done-button", | |
textContent: "Done" | |
}); | |
return (0, p.createEl)("div", { | |
className: "vjs-tracksettings-controls" | |
}, void 0, [a, b]) | |
}, b.prototype.createEl = function() { | |
var a = (0, p.createEl)("div", { | |
className: "vjs-tracksettings" | |
}, void 0, [this.createElColors_(), this.createElFont_(), this.createElControls_()]), | |
b = (0, p.createEl)("div", { | |
className: "vjs-control-text", | |
id: "TTsettingsDialogLabel-" + this.id_, | |
textContent: "Caption Settings Dialog" | |
}, { | |
"aria-level": "1", | |
role: "heading" | |
}), | |
c = (0, p.createEl)("div", { | |
className: "vjs-control-text", | |
id: "TTsettingsDialogDescription-" + this.id_, | |
textContent: "Beginning of dialog window. Escape will cancel and close the window." | |
}), | |
d = (0, p.createEl)("div", void 0, { | |
role: "document" | |
}, [b, c, a]); | |
return (0, p.createEl)("div", { | |
className: "vjs-caption-settings vjs-modal-overlay", | |
tabIndex: -1 | |
}, { | |
role: "dialog", | |
"aria-labelledby": b.id, | |
"aria-describedby": c.id | |
}, d) | |
}, b.prototype.getValues = function() { | |
var a = this; | |
return t.reduce(I, function(b, c, d) { | |
var e = j(a.$(c.selector), c.parser); | |
return void 0 !== e && (b[d] = e), b | |
}, {}) | |
}, b.prototype.setValues = function(a) { | |
var b = this; | |
t.each(I, function(c, d) { | |
k(b.$(c.selector), a[d], c.parser) | |
}) | |
}, b.prototype.setDefaults = function() { | |
var a = this; | |
t.each(I, function(b) { | |
var c = b.hasOwnProperty("default") ? b["default"] : 0; | |
a.$(b.selector).selectedIndex = c | |
}) | |
}, b.prototype.restoreSettings = function() { | |
var a = void 0; | |
try { | |
a = JSON.parse(m["default"].localStorage.getItem(w)) | |
} catch (b) { | |
v["default"].warn(b) | |
} | |
a && this.setValues(a) | |
}, b.prototype.saveSettings = function() { | |
if (this.options_.persistTextTrackSettings) { | |
var a = this.getValues(); | |
try { | |
Object.keys(a).length ? m["default"].localStorage.setItem(w, JSON.stringify(a)) : m["default"].localStorage.removeItem(w) | |
} catch (b) { | |
v["default"].warn(b) | |
} | |
} | |
}, b.prototype.updateDisplay = function() { | |
var a = this.player_.getChild("textTrackDisplay"); | |
a && a.updateDisplay() | |
}, b | |
}(o["default"]); | |
o["default"].registerComponent("TextTrackSettings", J), c["default"] = J | |
}, { | |
102: 102, | |
5: 5, | |
82: 82, | |
84: 84, | |
87: 87, | |
89: 89 | |
}], | |
73: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(68), | |
j = e(i), | |
k = a(84), | |
l = d(k), | |
m = a(74), | |
n = a(87), | |
o = e(n), | |
p = a(102), | |
q = e(p), | |
r = a(76), | |
s = e(r), | |
t = a(93), | |
u = a(155), | |
v = e(u), | |
w = a(88), | |
x = e(w), | |
y = a(79), | |
z = d(y), | |
A = function(a, b) { | |
var c = new q["default"].WebVTT.Parser(q["default"], q["default"].vttjs, q["default"].WebVTT.StringDecoder()), | |
d = []; | |
c.oncue = function(a) { | |
b.addCue(a) | |
}, c.onparsingerror = function(a) { | |
d.push(a) | |
}, c.onflush = function() { | |
b.trigger({ | |
type: "loadeddata", | |
target: b | |
}) | |
}, c.parse(a), d.length > 0 && (q["default"].console && q["default"].console.groupCollapsed && q["default"].console.groupCollapsed("Text Track parsing errors for " + b.src), d.forEach(function(a) { | |
return o["default"].error(a) | |
}), q["default"].console && q["default"].console.groupEnd && q["default"].console.groupEnd()), c.flush() | |
}, | |
B = function(a, b) { | |
var c = { | |
uri: a | |
}, | |
d = (0, t.isCrossOrigin)(a); | |
d && (c.cors = d), (0, v["default"])(c, l.bind(this, function(a, c, d) { | |
return a ? o["default"].error(a, c) : (b.loaded_ = !0, void("function" != typeof q["default"].WebVTT ? b.tech_ && ! function() { | |
var a = function() { | |
return A(d, b) | |
}; | |
b.tech_.on("vttjsloaded", a), b.tech_.on("vttjserror", function() { | |
o["default"].error("vttjs failed to load, stopping trying to process " + b.src), b.tech_.off("vttjsloaded", a) | |
}) | |
}() : A(d, b))) | |
})) | |
}, | |
C = function(a) { | |
function b() { | |
var c, d, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; | |
if (f(this, b), !e.tech) throw new Error("A tech was not provided."); | |
var h = (0, x["default"])(e, { | |
kind: m.TextTrackKind[e.kind] || "subtitles", | |
language: e.language || e.srclang || "" | |
}), | |
i = m.TextTrackMode[h.mode] || "disabled", | |
k = h["default"]; | |
("metadata" === h.kind || "chapters" === h.kind) && (i = "hidden"); | |
var n = c = g(this, a.call(this, h)); | |
if (n.tech_ = h.tech, z.IS_IE8) | |
for (var o in b.prototype) "constructor" !== o && (n[o] = b.prototype[o]); | |
n.cues_ = [], n.activeCues_ = []; | |
var p = new j["default"](n.cues_), | |
q = new j["default"](n.activeCues_), | |
r = !1, | |
s = l.bind(n, function() { | |
this.activeCues, r && (this.trigger("cuechange"), r = !1) | |
}); | |
return "disabled" !== i && n.tech_.on("timeupdate", s), Object.defineProperty(n, "default", { | |
get: function() { | |
return k | |
}, | |
set: function() {} | |
}), Object.defineProperty(n, "mode", { | |
get: function() { | |
return i | |
}, | |
set: function(a) { | |
m.TextTrackMode[a] && (i = a, "showing" === i && this.tech_.on("timeupdate", s), this.trigger("modechange")) | |
} | |
}), Object.defineProperty(n, "cues", { | |
get: function() { | |
return this.loaded_ ? p : null | |
}, | |
set: function() {} | |
}), Object.defineProperty(n, "activeCues", { | |
get: function() { | |
if (!this.loaded_) return null; | |
if (0 === this.cues.length) return q; | |
for (var a = this.tech_.currentTime(), b = [], c = 0, d = this.cues.length; d > c; c++) { | |
var e = this.cues[c]; | |
e.startTime <= a && e.endTime >= a ? b.push(e) : e.startTime === e.endTime && e.startTime <= a && e.startTime + .5 >= a && b.push(e) | |
} | |
if (r = !1, b.length !== this.activeCues_.length) r = !0; | |
else | |
for (var f = 0; f < b.length; f++) - 1 === this.activeCues_.indexOf(b[f]) && (r = !0); | |
return this.activeCues_ = b, q.setCues_(this.activeCues_), q | |
}, | |
set: function() {} | |
}), h.src ? (n.src = h.src, B(h.src, n)) : n.loaded_ = !0, d = n, g(c, d) | |
} | |
return h(b, a), b.prototype.addCue = function(a) { | |
var b = this.tech_.textTracks(); | |
if (b) | |
for (var c = 0; c < b.length; c++) b[c] !== this && b[c].removeCue(a); | |
this.cues_.push(a), this.cues.setCues_(this.cues_) | |
}, b.prototype.removeCue = function(a) { | |
for (var b = !1, c = 0, d = this.cues_.length; d > c; c++) { | |
var e = this.cues_[c]; | |
e === a && (this.cues_.splice(c, 1), b = !0) | |
} | |
b && this.cues.setCues_(this.cues_) | |
}, b | |
}(s["default"]); | |
C.prototype.allowedEvents_ = { | |
cuechange: "cuechange" | |
}, c["default"] = C | |
}, { | |
102: 102, | |
155: 155, | |
68: 68, | |
74: 74, | |
76: 76, | |
79: 79, | |
84: 84, | |
87: 87, | |
88: 88, | |
93: 93 | |
}], | |
74: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0; | |
c.VideoTrackKind = { | |
alternative: "alternative", | |
captions: "captions", | |
main: "main", | |
sign: "sign", | |
subtitles: "subtitles", | |
commentary: "commentary" | |
}, c.AudioTrackKind = { | |
alternative: "alternative", | |
descriptions: "descriptions", | |
main: "main", | |
"main-desc": "main-desc", | |
translation: "translation", | |
commentary: "commentary" | |
}, c.TextTrackKind = { | |
subtitles: "subtitles", | |
captions: "captions", | |
descriptions: "descriptions", | |
chapters: "chapters", | |
metadata: "metadata" | |
}, c.TextTrackMode = { | |
disabled: "disabled", | |
hidden: "hidden", | |
showing: "showing" | |
} | |
}, {}], | |
75: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(42), | |
j = e(i), | |
k = a(79), | |
l = d(k), | |
m = a(101), | |
n = e(m), | |
o = function(a) { | |
function b() { | |
var c, d = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], | |
e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; | |
f(this, b); | |
var h = g(this, a.call(this)); | |
if (!e && (e = h, l.IS_IE8)) { | |
e = n["default"].createElement("custom"); | |
for (var i in b.prototype) "constructor" !== i && (e[i] = b.prototype[i]) | |
} | |
e.tracks_ = [], Object.defineProperty(e, "length", { | |
get: function() { | |
return this.tracks_.length | |
} | |
}); | |
for (var j = 0; j < d.length; j++) e.addTrack_(d[j]); | |
return c = e, g(h, c) | |
} | |
return h(b, a), b.prototype.addTrack_ = function(a) { | |
var b = this.tracks_.length; | |
"" + b in this || Object.defineProperty(this, b, { | |
get: function() { | |
return this.tracks_[b] | |
} | |
}), -1 === this.tracks_.indexOf(a) && (this.tracks_.push(a), this.trigger({ | |
track: a, | |
type: "addtrack" | |
})) | |
}, b.prototype.removeTrack_ = function(a) { | |
for (var b = void 0, c = 0, d = this.length; d > c; c++) | |
if (this[c] === a) { | |
b = this[c], b.off && b.off(), this.tracks_.splice(c, 1); | |
break | |
} | |
b && this.trigger({ | |
track: b, | |
type: "removetrack" | |
}) | |
}, b.prototype.getTrackById = function(a) { | |
for (var b = null, c = 0, d = this.length; d > c; c++) { | |
var e = this[c]; | |
if (e.id === a) { | |
b = e; | |
break | |
} | |
} | |
return b | |
}, b | |
}(j["default"]); | |
o.prototype.allowedEvents_ = { | |
change: "change", | |
addtrack: "addtrack", | |
removetrack: "removetrack" | |
}; | |
for (var p in o.prototype.allowedEvents_) o.prototype["on" + p] = null; | |
c["default"] = o | |
}, { | |
101: 101, | |
42: 42, | |
79: 79 | |
}], | |
76: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(79), | |
j = e(i), | |
k = a(101), | |
l = d(k), | |
m = a(86), | |
n = e(m), | |
o = a(42), | |
p = d(o), | |
q = function(a) { | |
function b() { | |
var c, d = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; | |
f(this, b); | |
var e = g(this, a.call(this)), | |
h = e; | |
if (j.IS_IE8) { | |
h = l["default"].createElement("custom"); | |
for (var i in b.prototype) "constructor" !== i && (h[i] = b.prototype[i]) | |
} | |
var k = { | |
id: d.id || "vjs_track_" + n.newGUID(), | |
kind: d.kind || "", | |
label: d.label || "", | |
language: d.language || "" | |
}, | |
m = function(a) { | |
Object.defineProperty(h, a, { | |
get: function() { | |
return k[a] | |
}, | |
set: function() {} | |
}) | |
}; | |
for (var o in k) m(o); | |
return c = h, g(e, c) | |
} | |
return h(b, a), b | |
}(p["default"]); | |
c["default"] = q | |
}, { | |
101: 101, | |
42: 42, | |
79: 79, | |
86: 86 | |
}], | |
77: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(75), | |
j = e(i), | |
k = a(79), | |
l = d(k), | |
m = a(101), | |
n = e(m), | |
o = function(a, b) { | |
for (var c = 0; c < a.length; c++) b.id !== a[c].id && (a[c].selected = !1) | |
}, | |
p = function(a) { | |
function b() { | |
var c, d, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; | |
f(this, b); | |
for (var h = void 0, i = e.length - 1; i >= 0; i--) | |
if (e[i].selected) { | |
o(e, e[i]); | |
break | |
} | |
if (l.IS_IE8) { | |
h = n["default"].createElement("custom"); | |
for (var k in j["default"].prototype) "constructor" !== k && (h[k] = j["default"].prototype[k]); | |
for (var m in b.prototype) "constructor" !== m && (h[m] = b.prototype[m]) | |
} | |
return h = c = g(this, a.call(this, e, h)), h.changing_ = !1, Object.defineProperty(h, "selectedIndex", { | |
get: function() { | |
for (var a = 0; a < this.length; a++) | |
if (this[a].selected) return a; | |
return -1 | |
}, | |
set: function() {} | |
}), d = h, g(c, d) | |
} | |
return h(b, a), b.prototype.addTrack_ = function(b) { | |
var c = this; | |
b.selected && o(this, b), a.prototype.addTrack_.call(this, b), b.addEventListener && b.addEventListener("selectedchange", function() { | |
c.changing_ || (c.changing_ = !0, o(c, b), c.changing_ = !1, c.trigger("change")) | |
}) | |
}, b.prototype.addTrack = function(a) { | |
this.addTrack_(a) | |
}, b.prototype.removeTrack = function(b) { | |
a.prototype.removeTrack_.call(this, b) | |
}, b | |
}(j["default"]); | |
c["default"] = p | |
}, { | |
101: 101, | |
75: 75, | |
79: 79 | |
}], | |
78: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function g(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function h(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
c.__esModule = !0; | |
var i = a(74), | |
j = a(76), | |
k = e(j), | |
l = a(88), | |
m = e(l), | |
n = a(79), | |
o = d(n), | |
p = function(a) { | |
function b() { | |
var c, d, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; | |
f(this, b); | |
var h = (0, m["default"])(e, { | |
kind: i.VideoTrackKind[e.kind] || "" | |
}), | |
j = c = g(this, a.call(this, h)), | |
k = !1; | |
if (o.IS_IE8) | |
for (var l in b.prototype) "constructor" !== l && (j[l] = b.prototype[l]); | |
return Object.defineProperty(j, "selected", { | |
get: function() { | |
return k | |
}, | |
set: function(a) { | |
"boolean" == typeof a && a !== k && (k = a, this.trigger("selectedchange")) | |
} | |
}), h.selected && (j.selected = h.selected), d = j, g(c, d) | |
} | |
return h(b, a), b | |
}(k["default"]); | |
c["default"] = p | |
}, { | |
74: 74, | |
76: 76, | |
79: 79, | |
88: 88 | |
}], | |
79: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0, c.BACKGROUND_SIZE_SUPPORTED = c.TOUCH_ENABLED = c.IE_VERSION = c.IS_IE8 = c.IS_CHROME = c.IS_EDGE = c.IS_FIREFOX = c.IS_NATIVE_ANDROID = c.IS_OLD_ANDROID = c.ANDROID_VERSION = c.IS_ANDROID = c.IOS_VERSION = c.IS_IOS = c.IS_IPOD = c.IS_IPHONE = c.IS_IPAD = void 0; | |
var e = a(101), | |
f = d(e), | |
g = a(102), | |
h = d(g), | |
i = h["default"].navigator && h["default"].navigator.userAgent || "", | |
j = /AppleWebKit\/([\d.]+)/i.exec(i), | |
k = j ? parseFloat(j.pop()) : null, | |
l = c.IS_IPAD = /iPad/i.test(i), | |
m = c.IS_IPHONE = /iPhone/i.test(i) && !l, | |
n = c.IS_IPOD = /iPod/i.test(i), | |
o = (c.IS_IOS = m || l || n, c.IOS_VERSION = function() { | |
var a = i.match(/OS (\d+)_/i); | |
return a && a[1] ? a[1] : null | |
}(), c.IS_ANDROID = /Android/i.test(i)), | |
p = c.ANDROID_VERSION = function() { | |
var a = i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i); | |
if (!a) return null; | |
var b = a[1] && parseFloat(a[1]), | |
c = a[2] && parseFloat(a[2]); | |
return b && c ? parseFloat(a[1] + "." + a[2]) : b ? b : null | |
}(), | |
q = (c.IS_OLD_ANDROID = o && /webkit/i.test(i) && 2.3 > p, c.IS_NATIVE_ANDROID = o && 5 > p && 537 > k, c.IS_FIREFOX = /Firefox/i.test(i), c.IS_EDGE = /Edge/i.test(i)); | |
c.IS_CHROME = !q && /Chrome/i.test(i), c.IS_IE8 = /MSIE\s8\.0/.test(i), c.IE_VERSION = function(a) { | |
return a && parseFloat(a[1]) | |
}(/MSIE\s(\d+)\.\d/.exec(i)), c.TOUCH_ENABLED = !!("ontouchstart" in h["default"] || h["default"].DocumentTouch && f["default"] instanceof h["default"].DocumentTouch), c.BACKGROUND_SIZE_SUPPORTED = "backgroundSize" in f["default"].createElement("video").style | |
}, { | |
101: 101, | |
102: 102 | |
}], | |
80: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
var c = 0, | |
d = void 0, | |
f = void 0; | |
if (!b) return 0; | |
a && a.length || (a = (0, e.createTimeRange)(0, 0)); | |
for (var g = 0; g < a.length; g++) d = a.start(g), f = a.end(g), f > b && (f = b), c += f - d; | |
return c / b | |
} | |
c.__esModule = !0, c.bufferedPercent = d; | |
var e = a(91) | |
}, { | |
91: 91 | |
}], | |
81: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!a || !b) return ""; | |
if ("function" == typeof g["default"].getComputedStyle) { | |
var c = g["default"].getComputedStyle(a); | |
return c ? c[b] : "" | |
} | |
return a.currentStyle[b] || "" | |
} | |
c.__esModule = !0, c["default"] = e; | |
var f = a(102), | |
g = d(f) | |
}, { | |
102: 102 | |
}], | |
82: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function e(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function f(a, b) { | |
return a.raw = b, a | |
} | |
function g(a) { | |
return "string" == typeof a && /\S/.test(a) | |
} | |
function h(a) { | |
if (/\s/.test(a)) throw new Error("class has illegal whitespace characters") | |
} | |
function i(a) { | |
return new RegExp("(^|\\s)" + a + "($|\\s)") | |
} | |
function j(a) { | |
return !!a && "object" === ("undefined" == typeof a ? "undefined" : K(a)) && 1 === a.nodeType | |
} | |
function k(a) { | |
return function(b, c) { | |
if (!g(b)) return N["default"][a](null); | |
g(c) && (c = N["default"].querySelector(c)); | |
var d = j(c) ? c : N["default"]; | |
return d[a] && d[a](b) | |
} | |
} | |
function l(a) { | |
return 0 === a.indexOf("#") && (a = a.slice(1)), N["default"].getElementById(a) | |
} | |
function m() { | |
var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "div", | |
b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, | |
c = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, | |
d = arguments[3], | |
e = N["default"].createElement(a); | |
return Object.getOwnPropertyNames(b).forEach(function(a) { | |
var c = b[a]; - 1 !== a.indexOf("aria-") || "role" === a || "type" === a ? (T["default"].warn((0, V["default"])(L, a, c)), e.setAttribute(a, c)) : "textContent" === a ? n(e, c) : e[a] = c | |
}), Object.getOwnPropertyNames(c).forEach(function(a) { | |
e.setAttribute(a, c[a]) | |
}), d && I(e, d), e | |
} | |
function n(a, b) { | |
return "undefined" == typeof a.textContent ? a.innerText = b : a.textContent = b, a | |
} | |
function o(a, b) { | |
b.firstChild ? b.insertBefore(a, b.firstChild) : b.appendChild(a) | |
} | |
function p(a) { | |
var b = a[X]; | |
return b || (b = a[X] = R.newGUID()), W[b] || (W[b] = {}), W[b] | |
} | |
function q(a) { | |
var b = a[X]; | |
return b ? !!Object.getOwnPropertyNames(W[b]).length : !1 | |
} | |
function r(a) { | |
var b = a[X]; | |
if (b) { | |
delete W[b]; | |
try { | |
delete a[X] | |
} catch (c) { | |
a.removeAttribute ? a.removeAttribute(X) : a[X] = null | |
} | |
} | |
} | |
function s(a, b) { | |
return h(b), a.classList ? a.classList.contains(b) : i(b).test(a.className) | |
} | |
function t(a, b) { | |
return a.classList ? a.classList.add(b) : s(a, b) || (a.className = (a.className + " " + b).trim()), a | |
} | |
function u(a, b) { | |
return a.classList ? a.classList.remove(b) : (h(b), a.className = a.className.split(/\s+/).filter(function(a) { | |
return a !== b | |
}).join(" ")), a | |
} | |
function v(a, b, c) { | |
var d = s(a, b); | |
return "function" == typeof c && (c = c(a, b)), "boolean" != typeof c && (c = !d), c !== d ? (c ? t(a, b) : u(a, b), a) : void 0 | |
} | |
function w(a, b) { | |
Object.getOwnPropertyNames(b).forEach(function(c) { | |
var d = b[c]; | |
null === d || "undefined" == typeof d || d === !1 ? a.removeAttribute(c) : a.setAttribute(c, d === !0 ? "" : d) | |
}) | |
} | |
function x(a) { | |
var b = {}, | |
c = ",autoplay,controls,loop,muted,default,"; | |
if (a && a.attributes && a.attributes.length > 0) | |
for (var d = a.attributes, e = d.length - 1; e >= 0; e--) { | |
var f = d[e].name, | |
g = d[e].value; | |
("boolean" == typeof a[f] || -1 !== c.indexOf("," + f + ",")) && (g = null !== g ? !0 : !1), b[f] = g | |
} | |
return b | |
} | |
function y(a, b) { | |
return a.getAttribute(b) | |
} | |
function z(a, b, c) { | |
a.setAttribute(b, c) | |
} | |
function A(a, b) { | |
a.removeAttribute(b) | |
} | |
function B() { | |
N["default"].body.focus(), N["default"].onselectstart = function() { | |
return !1 | |
} | |
} | |
function C() { | |
N["default"].onselectstart = function() { | |
return !0 | |
} | |
} | |
function D(a) { | |
var b = void 0; | |
if (a.getBoundingClientRect && a.parentNode && (b = a.getBoundingClientRect()), !b) return { | |
left: 0, | |
top: 0 | |
}; | |
var c = N["default"].documentElement, | |
d = N["default"].body, | |
e = c.clientLeft || d.clientLeft || 0, | |
f = P["default"].pageXOffset || d.scrollLeft, | |
g = b.left + f - e, | |
h = c.clientTop || d.clientTop || 0, | |
i = P["default"].pageYOffset || d.scrollTop, | |
j = b.top + i - h; | |
return { | |
left: Math.round(g), | |
top: Math.round(j) | |
} | |
} | |
function E(a, b) { | |
var c = {}, | |
d = D(a), | |
e = a.offsetWidth, | |
f = a.offsetHeight, | |
g = d.top, | |
h = d.left, | |
i = b.pageY, | |
j = b.pageX; | |
return b.changedTouches && (j = b.changedTouches[0].pageX, i = b.changedTouches[0].pageY), c.y = Math.max(0, Math.min(1, (g - i + f) / f)), c.x = Math.max(0, Math.min(1, (j - h) / e)), c | |
} | |
function F(a) { | |
return !!a && "object" === ("undefined" == typeof a ? "undefined" : K(a)) && 3 === a.nodeType | |
} | |
function G(a) { | |
for (; a.firstChild;) a.removeChild(a.firstChild); | |
return a | |
} | |
function H(a) { | |
return "function" == typeof a && (a = a()), (Array.isArray(a) ? a : [a]).map(function(a) { | |
return "function" == typeof a && (a = a()), j(a) || F(a) ? a : "string" == typeof a && /\S/.test(a) ? N["default"].createTextNode(a) : void 0 | |
}).filter(function(a) { | |
return a | |
}) | |
} | |
function I(a, b) { | |
return H(b).forEach(function(b) { | |
return a.appendChild(b) | |
}), a | |
} | |
function J(a, b) { | |
return I(G(a), b) | |
} | |
c.__esModule = !0, c.$$ = c.$ = void 0; | |
var K = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
L = f(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ", " to ", "."], ["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ", " to ", "."]); | |
c.isEl = j, c.getEl = l, c.createEl = m, c.textContent = n, c.insertElFirst = o, c.getElData = p, c.hasElData = q, c.removeElData = r, c.hasElClass = s, c.addElClass = t, c.removeElClass = u, c.toggleElClass = v, c.setElAttributes = w, c.getElAttributes = x, c.getAttribute = y, c.setAttribute = z, c.removeAttribute = A, c.blockTextSelection = B, c.unblockTextSelection = C, c.findElPosition = D, c.getPointerPosition = E, c.isTextNode = F, c.emptyEl = G, c.normalizeContent = H, c.appendContent = I, c.insertContent = J; | |
var M = a(101), | |
N = e(M), | |
O = a(102), | |
P = e(O), | |
Q = a(86), | |
R = d(Q), | |
S = a(87), | |
T = e(S), | |
U = a(154), | |
V = e(U), | |
W = {}, | |
X = "vdata" + (new Date).getTime(); | |
c.$ = k("querySelector"), c.$$ = k("querySelectorAll") | |
}, { | |
101: 101, | |
102: 102, | |
154: 154, | |
86: 86, | |
87: 87 | |
}], | |
83: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a, b) { | |
var c = n.getElData(a); | |
0 === c.handlers[b].length && (delete c.handlers[b], a.removeEventListener ? a.removeEventListener(b, c.dispatcher, !1) : a.detachEvent && a.detachEvent("on" + b, c.dispatcher)), Object.getOwnPropertyNames(c.handlers).length <= 0 && (delete c.handlers, delete c.dispatcher, delete c.disabled), 0 === Object.getOwnPropertyNames(c).length && n.removeElData(a) | |
} | |
function g(a, b, c, d) { | |
c.forEach(function(c) { | |
a(b, c, d) | |
}) | |
} | |
function h(a) { | |
function b() { | |
return !0 | |
} | |
function c() { | |
return !1 | |
} | |
return a && a.isPropagationStopped || ! function() { | |
var d = a || t["default"].event; | |
a = {}; | |
for (var e in d) "layerX" !== e && "layerY" !== e && "keyLocation" !== e && "webkitMovementX" !== e && "webkitMovementY" !== e && ("returnValue" === e && d.preventDefault || (a[e] = d[e])); | |
if (a.target || (a.target = a.srcElement || v["default"]), a.relatedTarget || (a.relatedTarget = a.fromElement === a.target ? a.toElement : a.fromElement), a.preventDefault = function() { | |
d.preventDefault && d.preventDefault(), a.returnValue = !1, d.returnValue = !1, a.defaultPrevented = !0 | |
}, a.defaultPrevented = !1, a.stopPropagation = function() { | |
d.stopPropagation && d.stopPropagation(), a.cancelBubble = !0, d.cancelBubble = !0, a.isPropagationStopped = b | |
}, a.isPropagationStopped = c, a.stopImmediatePropagation = function() { | |
d.stopImmediatePropagation && d.stopImmediatePropagation(), a.isImmediatePropagationStopped = b, a.stopPropagation() | |
}, a.isImmediatePropagationStopped = c, null !== a.clientX && void 0 !== a.clientX) { | |
var f = v["default"].documentElement, | |
g = v["default"].body; | |
a.pageX = a.clientX + (f && f.scrollLeft || g && g.scrollLeft || 0) - (f && f.clientLeft || g && g.clientLeft || 0), a.pageY = a.clientY + (f && f.scrollTop || g && g.scrollTop || 0) - (f && f.clientTop || g && g.clientTop || 0) | |
} | |
a.which = a.charCode || a.keyCode, null !== a.button && void 0 !== a.button && (a.button = 1 & a.button ? 0 : 4 & a.button ? 1 : 2 & a.button ? 2 : 0) | |
}(), a | |
} | |
function i(a, b, c) { | |
if (Array.isArray(b)) return g(i, a, b, c); | |
var d = n.getElData(a); | |
d.handlers || (d.handlers = {}), d.handlers[b] || (d.handlers[b] = []), c.guid || (c.guid = p.newGUID()), d.handlers[b].push(c), d.dispatcher || (d.disabled = !1, d.dispatcher = function(b, c) { | |
if (!d.disabled) { | |
b = h(b); | |
var e = d.handlers[b.type]; | |
if (e) | |
for (var f = e.slice(0), g = 0, i = f.length; i > g && !b.isImmediatePropagationStopped(); g++) try { | |
f[g].call(a, b, c) | |
} catch (j) { | |
r["default"].error(j) | |
} | |
} | |
}), 1 === d.handlers[b].length && (a.addEventListener ? a.addEventListener(b, d.dispatcher, !1) : a.attachEvent && a.attachEvent("on" + b, d.dispatcher)) | |
} | |
function j(a, b, c) { | |
if (n.hasElData(a)) { | |
var d = n.getElData(a); | |
if (d.handlers) { | |
if (Array.isArray(b)) return g(j, a, b, c); | |
var e = function(b) { | |
d.handlers[b] = [], f(a, b) | |
}; | |
if (b) { | |
var h = d.handlers[b]; | |
if (h) { | |
if (!c) return void e(b); | |
if (c.guid) | |
for (var i = 0; i < h.length; i++) h[i].guid === c.guid && h.splice(i--, 1); | |
f(a, b) | |
} | |
} else | |
for (var k in d.handlers) e(k) | |
} | |
} | |
} | |
function k(a, b, c) { | |
var d = n.hasElData(a) ? n.getElData(a) : {}, | |
e = a.parentNode || a.ownerDocument; | |
if ("string" == typeof b && (b = { | |
type: b, | |
target: a | |
}), b = h(b), d.dispatcher && d.dispatcher.call(a, b, c), e && !b.isPropagationStopped() && b.bubbles === !0) k.call(null, e, b, c); | |
else if (!e && !b.defaultPrevented) { | |
var f = n.getElData(b.target); | |
b.target[b.type] && (f.disabled = !0, "function" == typeof b.target[b.type] && b.target[b.type](), f.disabled = !1) | |
} | |
return !b.defaultPrevented | |
} | |
function l(a, b, c) { | |
if (Array.isArray(b)) return g(l, a, b, c); | |
var d = function e() { | |
j(a, b, e), c.apply(this, arguments) | |
}; | |
d.guid = c.guid = c.guid || p.newGUID(), i(a, b, d) | |
} | |
c.__esModule = !0, c.fixEvent = h, c.on = i, c.off = j, c.trigger = k, c.one = l; | |
var m = a(82), | |
n = e(m), | |
o = a(86), | |
p = e(o), | |
q = a(87), | |
r = d(q), | |
s = a(102), | |
t = d(s), | |
u = a(101), | |
v = d(u) | |
}, { | |
101: 101, | |
102: 102, | |
82: 82, | |
86: 86, | |
87: 87 | |
}], | |
84: [function(a, b, c) { | |
"use strict"; | |
c.__esModule = !0, c.bind = void 0; | |
var d = a(86); | |
c.bind = function(a, b, c) { | |
b.guid || (b.guid = (0, d.newGUID)()); | |
var e = function() { | |
return b.apply(a, arguments) | |
}; | |
return e.guid = c ? c + "_" + b.guid : b.guid, e | |
} | |
}, { | |
86: 86 | |
}], | |
85: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : a; | |
a = 0 > a ? 0 : a; | |
var c = Math.floor(a % 60), | |
d = Math.floor(a / 60 % 60), | |
e = Math.floor(a / 3600), | |
f = Math.floor(b / 60 % 60), | |
g = Math.floor(b / 3600); | |
return (isNaN(a) || a === 1 / 0) && (e = d = c = "-"), e = e > 0 || g > 0 ? e + ":" : "", d = ((e || f >= 10) && 10 > d ? "0" + d : d) + ":", c = 10 > c ? "0" + c : c, e + d + c | |
} | |
c.__esModule = !0, c["default"] = d | |
}, {}], | |
86: [function(a, b, c) { | |
"use strict"; | |
function d() { | |
return e++ | |
} | |
c.__esModule = !0, c.newGUID = d; | |
var e = 1 | |
}, {}], | |
87: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0, c.logByType = void 0; | |
var e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
f = a(102), | |
g = d(f), | |
h = a(79), | |
i = void 0, | |
j = c.logByType = function(a, b) { | |
var c = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : !!h.IE_VERSION && h.IE_VERSION < 11; | |
"log" !== a && b.unshift(a.toUpperCase() + ":"), i.history.push(b), b.unshift("VIDEOJS:"); | |
var d = g["default"].console && g["default"].console[a]; | |
d && (c && (b = b.map(function(a) { | |
if (a && "object" === ("undefined" == typeof a ? "undefined" : e(a)) || Array.isArray(a)) try { | |
return JSON.stringify(a) | |
} catch (b) { | |
return String(a) | |
} | |
return String(a) | |
}).join(" ")), d.apply ? d[Array.isArray(b) ? "apply" : "call"](g["default"].console, b) : d(b)) | |
}; | |
i = function() { | |
for (var a = arguments.length, b = Array(a), c = 0; a > c; c++) b[c] = arguments[c]; | |
j("log", b) | |
}, i.history = [], i.error = function() { | |
for (var a = arguments.length, b = Array(a), c = 0; a > c; c++) b[c] = arguments[c]; | |
return j("error", b) | |
}, i.warn = function() { | |
for (var a = arguments.length, b = Array(a), c = 0; a > c; c++) b[c] = arguments[c]; | |
return j("warn", b) | |
}, c["default"] = i | |
}, { | |
102: 102, | |
79: 79 | |
}], | |
88: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a) { | |
return !!a && "object" === ("undefined" == typeof a ? "undefined" : h(a)) && "[object Object]" === a.toString() && a.constructor === Object | |
} | |
function f(a, b) { | |
return e(b) ? e(a) ? void 0 : g(b) : b | |
} | |
function g() { | |
for (var a = arguments.length, b = Array(a), c = 0; a > c; c++) b[c] = arguments[c]; | |
return b.unshift({}), b.push(f), j["default"].apply(null, b), b[0] | |
} | |
c.__esModule = !0; | |
var h = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}; | |
c["default"] = g; | |
var i = a(140), | |
j = d(i) | |
}, { | |
140: 140 | |
}], | |
89: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
Object.keys(a).forEach(function(c) { | |
return b(a[c], c) | |
}) | |
} | |
function e(a, b) { | |
var c = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0; | |
return Object.keys(a).reduce(function(c, d) { | |
return b(c, a[d], d) | |
}, c) | |
} | |
c.__esModule = !0, c.each = d, c.reduce = e | |
}, {}], | |
90: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0, c.setTextContent = c.createStyleElement = void 0; | |
var e = a(101), | |
f = d(e); | |
c.createStyleElement = function(a) { | |
var b = f["default"].createElement("style"); | |
return b.className = a, b | |
}, c.setTextContent = function(a, b) { | |
a.styleSheet ? a.styleSheet.cssText = b : a.textContent = b | |
} | |
}, { | |
101: 101 | |
}], | |
91: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b, c) { | |
if (0 > b || b > c) throw new Error("Failed to execute '" + a + "' on 'TimeRanges': The index provided (" + b + ") is greater than or equal to the maximum bound (" + c + ").") | |
} | |
function f(a, b, c, d) { | |
return void 0 === d && (j["default"].warn("DEPRECATED: Function '" + a + "' on 'TimeRanges' called without an index argument."), d = 0), e(a, d, c.length - 1), c[d][b] | |
} | |
function g(a) { | |
return void 0 === a || 0 === a.length ? { | |
length: 0, | |
start: function() { | |
throw new Error("This TimeRanges object is empty") | |
}, | |
end: function() { | |
throw new Error("This TimeRanges object is empty") | |
} | |
} : { | |
length: a.length, | |
start: f.bind(null, "start", 0, a), | |
end: f.bind(null, "end", 1, a) | |
} | |
} | |
function h(a, b) { | |
return Array.isArray(a) ? g(a) : void 0 === a || void 0 === b ? g() : g([ | |
[a, b] | |
]) | |
} | |
c.__esModule = !0, c.createTimeRange = void 0, c.createTimeRanges = h; | |
var i = a(87), | |
j = d(i); | |
c.createTimeRange = h | |
}, { | |
87: 87 | |
}], | |
92: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return "string" != typeof a ? a : a.charAt(0).toUpperCase() + a.slice(1) | |
} | |
c.__esModule = !0, c["default"] = d | |
}, {}], | |
93: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
c.__esModule = !0, c.isCrossOrigin = c.getFileExtension = c.getAbsoluteURL = c.parseUrl = void 0; | |
var e = a(101), | |
f = d(e), | |
g = a(102), | |
h = d(g), | |
i = c.parseUrl = function(a) { | |
var b = ["protocol", "hostname", "port", "pathname", "search", "hash", "host"], | |
c = f["default"].createElement("a"); | |
c.href = a; | |
var d = "" === c.host && "file:" !== c.protocol, | |
e = void 0; | |
d && (e = f["default"].createElement("div"), e.innerHTML = '<a href="' + a + '"></a>', c = e.firstChild, e.setAttribute("style", "display:none; position:absolute;"), f["default"].body.appendChild(e)); | |
for (var g = {}, h = 0; h < b.length; h++) g[b[h]] = c[b[h]]; | |
return "http:" === g.protocol && (g.host = g.host.replace(/:80$/, "")), "https:" === g.protocol && (g.host = g.host.replace(/:443$/, "")), d && f["default"].body.removeChild(e), g | |
}; | |
c.getAbsoluteURL = function(a) { | |
if (!a.match(/^https?:\/\//)) { | |
var b = f["default"].createElement("div"); | |
b.innerHTML = '<a href="' + a + '">x</a>', a = b.firstChild.href | |
} | |
return a | |
}, c.getFileExtension = function(a) { | |
if ("string" == typeof a) { | |
var b = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i, | |
c = b.exec(a); | |
if (c) return c.pop().toLowerCase() | |
} | |
return "" | |
}, c.isCrossOrigin = function(a) { | |
var b = h["default"].location, | |
c = i(a), | |
d = ":" === c.protocol ? b.protocol : c.protocol, | |
e = d + c.host !== b.protocol + b.host; | |
return e | |
} | |
}, { | |
101: 101, | |
102: 102 | |
}], | |
94: [function(b, c, d) { | |
"use strict"; | |
function e(a) { | |
if (a && a.__esModule) return a; | |
var b = {}; | |
if (null != a) | |
for (var c in a) Object.prototype.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
return b["default"] = a, b | |
} | |
function f(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function g(a, b, c) { | |
var d = void 0; | |
if (b = b || {}, "string" == typeof a) { | |
if (0 === a.indexOf("#") && (a = a.slice(1)), g.getPlayers()[a]) return b && O["default"].warn('Player "' + a + '" is already initialised. Options will not be applied.'), c && g.getPlayers()[a].ready(c), g.getPlayers()[a]; | |
d = Q.getEl(a) | |
} else d = a; | |
if (!d || !d.nodeName) throw new TypeError("The element or ID supplied is not valid. (videojs)"); | |
if (d.player || x["default"].players[d.playerId]) return d.player || x["default"].players[d.playerId]; | |
g.hooks("beforesetup").forEach(function(a) { | |
var c = a(d, (0, B["default"])(b)); | |
return !c || "object" !== ("undefined" == typeof c ? "undefined" : h(c)) || Array.isArray(c) ? void g.log.error("please return an object in beforesetup hooks") : void(b = (0, B["default"])(b, c)) | |
}); | |
var e = new x["default"](d, b, c); | |
return g.hooks("setup").forEach(function(a) { | |
return a(e) | |
}), e | |
} | |
d.__esModule = !0; | |
var h = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a | |
}, | |
i = b(102), | |
j = f(i), | |
k = b(101), | |
l = f(k), | |
m = b(56), | |
n = e(m), | |
o = b(90), | |
p = e(o), | |
q = b(5), | |
r = f(q), | |
s = b(42), | |
t = f(s), | |
u = b(83), | |
v = e(u), | |
w = b(51), | |
x = f(w), | |
y = b(52), | |
z = f(y), | |
A = b(88), | |
B = f(A), | |
C = b(84), | |
D = e(C), | |
E = b(73), | |
F = f(E), | |
G = b(65), | |
H = f(G), | |
I = b(78), | |
J = f(I), | |
K = b(91), | |
L = b(85), | |
M = f(L), | |
N = b(87), | |
O = f(N), | |
P = b(82), | |
Q = e(P), | |
R = b(79), | |
S = e(R), | |
T = b(93), | |
U = e(T), | |
V = b(81), | |
W = f(V), | |
X = b(43), | |
Y = f(X), | |
Z = b(140), | |
$ = f(Z), | |
_ = b(155), | |
aa = f(_), | |
ba = b(63), | |
ca = f(ba); | |
if ("undefined" == typeof HTMLVideoElement && j["default"].document && j["default"].document.createElement && (l["default"].createElement("video"), l["default"].createElement("audio"), l["default"].createElement("track")), g.hooks_ = {}, g.hooks = function(a, b) { | |
return g.hooks_[a] = g.hooks_[a] || [], b && (g.hooks_[a] = g.hooks_[a].concat(b)), g.hooks_[a] | |
}, g.hook = function(a, b) { | |
g.hooks(a, b) | |
}, g.removeHook = function(a, b) { | |
var c = g.hooks(a).indexOf(b); | |
return -1 >= c ? !1 : (g.hooks_[a] = g.hooks_[a].slice(), g.hooks_[a].splice(c, 1), !0) | |
}, j["default"].VIDEOJS_NO_DYNAMIC_STYLE !== !0) { | |
var da = Q.$(".vjs-styles-defaults"); | |
if (!da) { | |
da = p.createStyleElement("vjs-styles-defaults"); | |
var ea = Q.$("head"); | |
ea && ea.insertBefore(da, ea.firstChild), p.setTextContent(da, "\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ") | |
} | |
} | |
n.autoSetupTimeout(1, g), g.VERSION = "5.12.6", g.options = x["default"].prototype.options_, g.getPlayers = function() { | |
return x["default"].players | |
}, g.players = x["default"].players, g.getComponent = r["default"].getComponent, g.registerComponent = function(a, b) { | |
ca["default"].isTech(b) && O["default"].warn("The " + a + " tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"), r["default"].registerComponent.call(r["default"], a, b) | |
}, g.getTech = ca["default"].getTech, g.registerTech = ca["default"].registerTech, g.browser = S, g.TOUCH_ENABLED = S.TOUCH_ENABLED, g.extend = Y["default"], g.mergeOptions = B["default"], g.bind = D.bind, g.plugin = z["default"], g.addLanguage = function(a, b) { | |
var c; | |
return a = ("" + a).toLowerCase(), (0, $["default"])(g.options.languages, (c = {}, c[a] = b, c))[a] | |
}, g.log = O["default"], g.createTimeRange = g.createTimeRanges = K.createTimeRanges, g.formatTime = M["default"], g.parseUrl = U.parseUrl, g.isCrossOrigin = U.isCrossOrigin, g.EventTarget = t["default"], g.on = v.on, g.one = v.one, g.off = v.off, g.trigger = v.trigger, g.xhr = aa["default"], g.TextTrack = F["default"], g.AudioTrack = H["default"], g.VideoTrack = J["default"], g.isEl = Q.isEl, g.isTextNode = Q.isTextNode, g.createEl = Q.createEl, g.hasClass = Q.hasElClass, g.addClass = Q.addElClass, g.removeClass = Q.removeElClass, g.toggleClass = Q.toggleElClass, g.setAttributes = Q.setElAttributes, g.getAttributes = Q.getElAttributes, g.emptyEl = Q.emptyEl, g.appendContent = Q.appendContent, g.insertContent = Q.insertContent, g.computedStyle = W["default"], "function" == typeof a && a.amd ? a("videojs", [], function() { | |
return g | |
}) : "object" === ("undefined" == typeof d ? "undefined" : h(d)) && "object" === ("undefined" == typeof c ? "undefined" : h(c)) && (c.exports = g), d["default"] = g | |
}, { | |
101: 101, | |
102: 102, | |
140: 140, | |
155: 155, | |
42: 42, | |
43: 43, | |
5: 5, | |
51: 51, | |
52: 52, | |
56: 56, | |
63: 63, | |
65: 65, | |
73: 73, | |
78: 78, | |
79: 79, | |
81: 81, | |
82: 82, | |
83: 83, | |
84: 84, | |
85: 85, | |
87: 87, | |
88: 88, | |
90: 90, | |
91: 91, | |
93: 93 | |
}], | |
95: [function(a, b, c) {}, {}], | |
96: [function(a, b, c) { | |
"use strict"; | |
var d = a(143), | |
e = a(98), | |
f = "function" == typeof Symbol && "symbol" == typeof Symbol(), | |
g = Object.prototype.toString, | |
h = function(a) { | |
return "function" == typeof a && "[object Function]" === g.call(a) | |
}, | |
i = function() { | |
var a = {}; | |
try { | |
Object.defineProperty(a, "x", { | |
enumerable: !1, | |
value: a | |
}); | |
for (var b in a) return !1; | |
return a.x === a | |
} catch (c) { | |
return !1 | |
} | |
}, | |
j = Object.defineProperty && i(), | |
k = function(a, b, c, d) { | |
(!(b in a) || h(d) && d()) && (j ? Object.defineProperty(a, b, { | |
configurable: !0, | |
enumerable: !1, | |
value: c, | |
writable: !0 | |
}) : a[b] = c) | |
}, | |
l = function(a, b) { | |
var c = arguments.length > 2 ? arguments[2] : {}, | |
g = d(b); | |
f && (g = g.concat(Object.getOwnPropertySymbols(b))), e(g, function(d) { | |
k(a, d, b[d], c[d]) | |
}) | |
}; | |
l.supportsDescriptors = !!j, b.exports = l | |
}, { | |
143: 143, | |
98: 98 | |
}], | |
97: [function(a, b, c) { | |
function d(a, b, c) { | |
if (!h(b)) throw new TypeError("iterator must be a function"); | |
arguments.length < 3 && (c = this), "[object Array]" === i.call(a) ? e(a, b, c) : "string" == typeof a ? f(a, b, c) : g(a, b, c) | |
} | |
function e(a, b, c) { | |
for (var d = 0, e = a.length; e > d; d++) j.call(a, d) && b.call(c, a[d], d, a) | |
} | |
function f(a, b, c) { | |
for (var d = 0, e = a.length; e > d; d++) b.call(c, a.charAt(d), d, a) | |
} | |
function g(a, b, c) { | |
for (var d in a) j.call(a, d) && b.call(c, a[d], d, a) | |
} | |
var h = a(103); | |
b.exports = d; | |
var i = Object.prototype.toString, | |
j = Object.prototype.hasOwnProperty | |
}, { | |
103: 103 | |
}], | |
98: [function(a, b, c) { | |
var d = Object.prototype.hasOwnProperty, | |
e = Object.prototype.toString; | |
b.exports = function(a, b, c) { | |
if ("[object Function]" !== e.call(b)) throw new TypeError("iterator must be a function"); | |
var f = a.length; | |
if (f === +f) | |
for (var g = 0; f > g; g++) b.call(c, a[g], g, a); | |
else | |
for (var h in a) d.call(a, h) && b.call(c, a[h], h, a) | |
} | |
}, {}], | |
99: [function(a, b, c) { | |
var d = "Function.prototype.bind called on incompatible ", | |
e = Array.prototype.slice, | |
f = Object.prototype.toString, | |
g = "[object Function]"; | |
b.exports = function(a) { | |
var b = this; | |
if ("function" != typeof b || f.call(b) !== g) throw new TypeError(d + b); | |
for (var c, h = e.call(arguments, 1), i = function() { | |
if (this instanceof c) { | |
var d = b.apply(this, h.concat(e.call(arguments))); | |
return Object(d) === d ? d : this | |
} | |
return b.apply(a, h.concat(e.call(arguments))) | |
}, j = Math.max(0, b.length - h.length), k = [], l = 0; j > l; l++) k.push("$" + l); | |
if (c = Function("binder", "return function (" + k.join(",") + "){ return binder.apply(this,arguments); }")(i), | |
b.prototype) { | |
var m = function() {}; | |
m.prototype = b.prototype, c.prototype = new m, m.prototype = null | |
} | |
return c | |
} | |
}, {}], | |
100: [function(a, b, c) { | |
var d = a(99); | |
b.exports = Function.prototype.bind || d | |
}, { | |
99: 99 | |
}], | |
101: [function(a, b, c) { | |
(function(c) { | |
var d = "undefined" != typeof c ? c : "undefined" != typeof window ? window : {}, | |
e = a(95); | |
if ("undefined" != typeof document) b.exports = document; | |
else { | |
var f = d["__GLOBAL_DOCUMENT_CACHE@4"]; | |
f || (f = d["__GLOBAL_DOCUMENT_CACHE@4"] = e), b.exports = f | |
} | |
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) | |
}, { | |
95: 95 | |
}], | |
102: [function(a, b, c) { | |
(function(a) { | |
"undefined" != typeof window ? b.exports = window : "undefined" != typeof a ? b.exports = a : "undefined" != typeof self ? b.exports = self : b.exports = {} | |
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) | |
}, {}], | |
103: [function(a, b, c) { | |
function d(a) { | |
var b = e.call(a); | |
return "[object Function]" === b || "function" == typeof a && "[object RegExp]" !== b || "undefined" != typeof window && (a === window.setTimeout || a === window.alert || a === window.confirm || a === window.prompt) | |
} | |
b.exports = d; | |
var e = Object.prototype.toString | |
}, {}], | |
104: [function(a, b, c) { | |
var d = a(120), | |
e = d(Date, "now"), | |
f = e || function() { | |
return (new Date).getTime() | |
}; | |
b.exports = f | |
}, { | |
120: 120 | |
}], | |
105: [function(a, b, c) { | |
function d(a, b, c) { | |
function d() { | |
r && clearTimeout(r), n && clearTimeout(n), t = 0, n = r = s = void 0 | |
} | |
function i(b, c) { | |
c && clearTimeout(c), n = r = s = void 0, b && (t = f(), o = a.apply(q, m), r || n || (m = q = void 0)) | |
} | |
function j() { | |
var a = b - (f() - p); | |
0 >= a || a > b ? i(s, n) : r = setTimeout(j, a) | |
} | |
function k() { | |
i(v, r) | |
} | |
function l() { | |
if (m = arguments, p = f(), q = this, s = v && (r || !w), u === !1) var c = w && !r; | |
else { | |
n || w || (t = p); | |
var d = u - (p - t), | |
e = 0 >= d || d > u; | |
e ? (n && (n = clearTimeout(n)), t = p, o = a.apply(q, m)) : n || (n = setTimeout(k, d)) | |
} | |
return e && r ? r = clearTimeout(r) : r || b === u || (r = setTimeout(j, b)), c && (e = !0, o = a.apply(q, m)), !e || r || n || (m = q = void 0), o | |
} | |
var m, n, o, p, q, r, s, t = 0, | |
u = !1, | |
v = !0; | |
if ("function" != typeof a) throw new TypeError(g); | |
if (b = 0 > b ? 0 : +b || 0, c === !0) { | |
var w = !0; | |
v = !1 | |
} else e(c) && (w = !!c.leading, u = "maxWait" in c && h(+c.maxWait || 0, b), v = "trailing" in c ? !!c.trailing : v); | |
return l.cancel = d, l | |
} | |
var e = a(133), | |
f = a(104), | |
g = "Expected a function", | |
h = Math.max; | |
b.exports = d | |
}, { | |
104: 104, | |
133: 133 | |
}], | |
106: [function(a, b, c) { | |
function d(a, b) { | |
if ("function" != typeof a) throw new TypeError(e); | |
return b = f(void 0 === b ? a.length - 1 : +b || 0, 0), | |
function() { | |
for (var c = arguments, d = -1, e = f(c.length - b, 0), g = Array(e); ++d < e;) g[d] = c[b + d]; | |
switch (b) { | |
case 0: | |
return a.call(this, g); | |
case 1: | |
return a.call(this, c[0], g); | |
case 2: | |
return a.call(this, c[0], c[1], g) | |
} | |
var h = Array(b + 1); | |
for (d = -1; ++d < b;) h[d] = c[d]; | |
return h[b] = g, a.apply(this, h) | |
} | |
} | |
var e = "Expected a function", | |
f = Math.max; | |
b.exports = d | |
}, {}], | |
107: [function(a, b, c) { | |
function d(a, b, c) { | |
var d = !0, | |
h = !0; | |
if ("function" != typeof a) throw new TypeError(g); | |
return c === !1 ? d = !1 : f(c) && (d = "leading" in c ? !!c.leading : d, h = "trailing" in c ? !!c.trailing : h), e(a, b, { | |
leading: d, | |
maxWait: +b, | |
trailing: h | |
}) | |
} | |
var e = a(105), | |
f = a(133), | |
g = "Expected a function"; | |
b.exports = d | |
}, { | |
105: 105, | |
133: 133 | |
}], | |
108: [function(a, b, c) { | |
function d(a, b) { | |
var c = -1, | |
d = a.length; | |
for (b || (b = Array(d)); ++c < d;) b[c] = a[c]; | |
return b | |
} | |
b.exports = d | |
}, {}], | |
109: [function(a, b, c) { | |
function d(a, b) { | |
for (var c = -1, d = a.length; ++c < d && b(a[c], c, a) !== !1;); | |
return a | |
} | |
b.exports = d | |
}, {}], | |
110: [function(a, b, c) { | |
function d(a, b, c) { | |
c || (c = {}); | |
for (var d = -1, e = b.length; ++d < e;) { | |
var f = b[d]; | |
c[f] = a[f] | |
} | |
return c | |
} | |
b.exports = d | |
}, {}], | |
111: [function(a, b, c) { | |
var d = a(118), | |
e = d(); | |
b.exports = e | |
}, { | |
118: 118 | |
}], | |
112: [function(a, b, c) { | |
function d(a, b) { | |
return e(a, b, f) | |
} | |
var e = a(111), | |
f = a(139); | |
b.exports = d | |
}, { | |
111: 111, | |
139: 139 | |
}], | |
113: [function(a, b, c) { | |
function d(a, b, c, m, n) { | |
if (!i(a)) return a; | |
var o = h(b) && (g(b) || k(b)), | |
p = o ? void 0 : l(b); | |
return e(p || b, function(e, g) { | |
if (p && (g = e, e = b[g]), j(e)) m || (m = []), n || (n = []), f(a, b, g, d, c, m, n); | |
else { | |
var h = a[g], | |
i = c ? c(h, e, g, a, b) : void 0, | |
k = void 0 === i; | |
k && (i = e), void 0 === i && (!o || g in a) || !k && (i === i ? i === h : h !== h) || (a[g] = i) | |
} | |
}), a | |
} | |
var e = a(109), | |
f = a(114), | |
g = a(130), | |
h = a(121), | |
i = a(133), | |
j = a(126), | |
k = a(136), | |
l = a(138); | |
b.exports = d | |
}, { | |
109: 109, | |
114: 114, | |
121: 121, | |
126: 126, | |
130: 130, | |
133: 133, | |
136: 136, | |
138: 138 | |
}], | |
114: [function(a, b, c) { | |
function d(a, b, c, d, l, m, n) { | |
for (var o = m.length, p = b[c]; o--;) | |
if (m[o] == p) return void(a[c] = n[o]); | |
var q = a[c], | |
r = l ? l(q, p, c, a, b) : void 0, | |
s = void 0 === r; | |
s && (r = p, h(p) && (g(p) || j(p)) ? r = g(q) ? q : h(q) ? e(q) : [] : i(p) || f(p) ? r = f(q) ? k(q) : i(q) ? q : {} : s = !1), m.push(p), n.push(r), s ? a[c] = d(r, p, l, m, n) : (r === r ? r !== q : q === q) && (a[c] = r) | |
} | |
var e = a(108), | |
f = a(129), | |
g = a(130), | |
h = a(121), | |
i = a(134), | |
j = a(136), | |
k = a(137); | |
b.exports = d | |
}, { | |
108: 108, | |
121: 121, | |
129: 129, | |
130: 130, | |
134: 134, | |
136: 136, | |
137: 137 | |
}], | |
115: [function(a, b, c) { | |
function d(a) { | |
return function(b) { | |
return null == b ? void 0 : e(b)[a] | |
} | |
} | |
var e = a(128); | |
b.exports = d | |
}, { | |
128: 128 | |
}], | |
116: [function(a, b, c) { | |
function d(a, b, c) { | |
if ("function" != typeof a) return e; | |
if (void 0 === b) return a; | |
switch (c) { | |
case 1: | |
return function(c) { | |
return a.call(b, c) | |
}; | |
case 3: | |
return function(c, d, e) { | |
return a.call(b, c, d, e) | |
}; | |
case 4: | |
return function(c, d, e, f) { | |
return a.call(b, c, d, e, f) | |
}; | |
case 5: | |
return function(c, d, e, f, g) { | |
return a.call(b, c, d, e, f, g) | |
} | |
} | |
return function() { | |
return a.apply(b, arguments) | |
} | |
} | |
var e = a(142); | |
b.exports = d | |
}, { | |
142: 142 | |
}], | |
117: [function(a, b, c) { | |
function d(a) { | |
return g(function(b, c) { | |
var d = -1, | |
g = null == b ? 0 : c.length, | |
h = g > 2 ? c[g - 2] : void 0, | |
i = g > 2 ? c[2] : void 0, | |
j = g > 1 ? c[g - 1] : void 0; | |
for ("function" == typeof h ? (h = e(h, j, 5), g -= 2) : (h = "function" == typeof j ? j : void 0, g -= h ? 1 : 0), i && f(c[0], c[1], i) && (h = 3 > g ? void 0 : h, g = 1); ++d < g;) { | |
var k = c[d]; | |
k && a(b, k, h) | |
} | |
return b | |
}) | |
} | |
var e = a(116), | |
f = a(124), | |
g = a(106); | |
b.exports = d | |
}, { | |
106: 106, | |
116: 116, | |
124: 124 | |
}], | |
118: [function(a, b, c) { | |
function d(a) { | |
return function(b, c, d) { | |
for (var f = e(b), g = d(b), h = g.length, i = a ? h : -1; a ? i-- : ++i < h;) { | |
var j = g[i]; | |
if (c(f[j], j, f) === !1) break | |
} | |
return b | |
} | |
} | |
var e = a(128); | |
b.exports = d | |
}, { | |
128: 128 | |
}], | |
119: [function(a, b, c) { | |
var d = a(115), | |
e = d("length"); | |
b.exports = e | |
}, { | |
115: 115 | |
}], | |
120: [function(a, b, c) { | |
function d(a, b) { | |
var c = null == a ? void 0 : a[b]; | |
return e(c) ? c : void 0 | |
} | |
var e = a(132); | |
b.exports = d | |
}, { | |
132: 132 | |
}], | |
121: [function(a, b, c) { | |
function d(a) { | |
return null != a && f(e(a)) | |
} | |
var e = a(119), | |
f = a(125); | |
b.exports = d | |
}, { | |
119: 119, | |
125: 125 | |
}], | |
122: [function(a, b, c) { | |
var d = function() { | |
try { | |
Object({ | |
toString: 0 | |
} + "") | |
} catch (a) { | |
return function() { | |
return !1 | |
} | |
} | |
return function(a) { | |
return "function" != typeof a.toString && "string" == typeof(a + "") | |
} | |
}(); | |
b.exports = d | |
}, {}], | |
123: [function(a, b, c) { | |
function d(a, b) { | |
return a = "number" == typeof a || e.test(a) ? +a : -1, b = null == b ? f : b, a > -1 && a % 1 == 0 && b > a | |
} | |
var e = /^\d+$/, | |
f = 9007199254740991; | |
b.exports = d | |
}, {}], | |
124: [function(a, b, c) { | |
function d(a, b, c) { | |
if (!g(c)) return !1; | |
var d = typeof b; | |
if ("number" == d ? e(c) && f(b, c.length) : "string" == d && b in c) { | |
var h = c[b]; | |
return a === a ? a === h : h !== h | |
} | |
return !1 | |
} | |
var e = a(121), | |
f = a(123), | |
g = a(133); | |
b.exports = d | |
}, { | |
121: 121, | |
123: 123, | |
133: 133 | |
}], | |
125: [function(a, b, c) { | |
function d(a) { | |
return "number" == typeof a && a > -1 && a % 1 == 0 && e >= a | |
} | |
var e = 9007199254740991; | |
b.exports = d | |
}, {}], | |
126: [function(a, b, c) { | |
function d(a) { | |
return !!a && "object" == typeof a | |
} | |
b.exports = d | |
}, {}], | |
127: [function(a, b, c) { | |
function d(a) { | |
for (var b = j(a), c = b.length, d = c && a.length, k = !!d && h(d) && (f(a) || e(a) || i(a)), m = -1, n = []; ++m < c;) { | |
var o = b[m]; | |
(k && g(o, d) || l.call(a, o)) && n.push(o) | |
} | |
return n | |
} | |
var e = a(129), | |
f = a(130), | |
g = a(123), | |
h = a(125), | |
i = a(135), | |
j = a(139), | |
k = Object.prototype, | |
l = k.hasOwnProperty; | |
b.exports = d | |
}, { | |
123: 123, | |
125: 125, | |
129: 129, | |
130: 130, | |
135: 135, | |
139: 139 | |
}], | |
128: [function(a, b, c) { | |
function d(a) { | |
if (g.unindexedChars && f(a)) { | |
for (var b = -1, c = a.length, d = Object(a); ++b < c;) d[b] = a.charAt(b); | |
return d | |
} | |
return e(a) ? a : Object(a) | |
} | |
var e = a(133), | |
f = a(135), | |
g = a(141); | |
b.exports = d | |
}, { | |
133: 133, | |
135: 135, | |
141: 141 | |
}], | |
129: [function(a, b, c) { | |
function d(a) { | |
return f(a) && e(a) && h.call(a, "callee") && !i.call(a, "callee") | |
} | |
var e = a(121), | |
f = a(126), | |
g = Object.prototype, | |
h = g.hasOwnProperty, | |
i = g.propertyIsEnumerable; | |
b.exports = d | |
}, { | |
121: 121, | |
126: 126 | |
}], | |
130: [function(a, b, c) { | |
var d = a(120), | |
e = a(125), | |
f = a(126), | |
g = "[object Array]", | |
h = Object.prototype, | |
i = h.toString, | |
j = d(Array, "isArray"), | |
k = j || function(a) { | |
return f(a) && e(a.length) && i.call(a) == g | |
}; | |
b.exports = k | |
}, { | |
120: 120, | |
125: 125, | |
126: 126 | |
}], | |
131: [function(a, b, c) { | |
function d(a) { | |
return e(a) && h.call(a) == f | |
} | |
var e = a(133), | |
f = "[object Function]", | |
g = Object.prototype, | |
h = g.toString; | |
b.exports = d | |
}, { | |
133: 133 | |
}], | |
132: [function(a, b, c) { | |
function d(a) { | |
return null == a ? !1 : e(a) ? l.test(j.call(a)) : g(a) && (f(a) ? l : h).test(a) | |
} | |
var e = a(131), | |
f = a(122), | |
g = a(126), | |
h = /^\[object .+?Constructor\]$/, | |
i = Object.prototype, | |
j = Function.prototype.toString, | |
k = i.hasOwnProperty, | |
l = RegExp("^" + j.call(k).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); | |
b.exports = d | |
}, { | |
122: 122, | |
126: 126, | |
131: 131 | |
}], | |
133: [function(a, b, c) { | |
function d(a) { | |
var b = typeof a; | |
return !!a && ("object" == b || "function" == b) | |
} | |
b.exports = d | |
}, {}], | |
134: [function(a, b, c) { | |
function d(a) { | |
var b; | |
if (!h(a) || m.call(a) != j || g(a) || f(a) || !l.call(a, "constructor") && (b = a.constructor, "function" == typeof b && !(b instanceof b))) return !1; | |
var c; | |
return i.ownLast ? (e(a, function(a, b, d) { | |
return c = l.call(d, b), !1 | |
}), c !== !1) : (e(a, function(a, b) { | |
c = b | |
}), void 0 === c || l.call(a, c)) | |
} | |
var e = a(112), | |
f = a(129), | |
g = a(122), | |
h = a(126), | |
i = a(141), | |
j = "[object Object]", | |
k = Object.prototype, | |
l = k.hasOwnProperty, | |
m = k.toString; | |
b.exports = d | |
}, { | |
112: 112, | |
122: 122, | |
126: 126, | |
129: 129, | |
141: 141 | |
}], | |
135: [function(a, b, c) { | |
function d(a) { | |
return "string" == typeof a || e(a) && h.call(a) == f | |
} | |
var e = a(126), | |
f = "[object String]", | |
g = Object.prototype, | |
h = g.toString; | |
b.exports = d | |
}, { | |
126: 126 | |
}], | |
136: [function(a, b, c) { | |
function d(a) { | |
return f(a) && e(a.length) && !!D[F.call(a)] | |
} | |
var e = a(125), | |
f = a(126), | |
g = "[object Arguments]", | |
h = "[object Array]", | |
i = "[object Boolean]", | |
j = "[object Date]", | |
k = "[object Error]", | |
l = "[object Function]", | |
m = "[object Map]", | |
n = "[object Number]", | |
o = "[object Object]", | |
p = "[object RegExp]", | |
q = "[object Set]", | |
r = "[object String]", | |
s = "[object WeakMap]", | |
t = "[object ArrayBuffer]", | |
u = "[object Float32Array]", | |
v = "[object Float64Array]", | |
w = "[object Int8Array]", | |
x = "[object Int16Array]", | |
y = "[object Int32Array]", | |
z = "[object Uint8Array]", | |
A = "[object Uint8ClampedArray]", | |
B = "[object Uint16Array]", | |
C = "[object Uint32Array]", | |
D = {}; | |
D[u] = D[v] = D[w] = D[x] = D[y] = D[z] = D[A] = D[B] = D[C] = !0, D[g] = D[h] = D[t] = D[i] = D[j] = D[k] = D[l] = D[m] = D[n] = D[o] = D[p] = D[q] = D[r] = D[s] = !1; | |
var E = Object.prototype, | |
F = E.toString; | |
b.exports = d | |
}, { | |
125: 125, | |
126: 126 | |
}], | |
137: [function(a, b, c) { | |
function d(a) { | |
return e(a, f(a)) | |
} | |
var e = a(110), | |
f = a(139); | |
b.exports = d | |
}, { | |
110: 110, | |
139: 139 | |
}], | |
138: [function(a, b, c) { | |
var d = a(120), | |
e = a(121), | |
f = a(133), | |
g = a(127), | |
h = a(141), | |
i = d(Object, "keys"), | |
j = i ? function(a) { | |
var b = null == a ? void 0 : a.constructor; | |
return "function" == typeof b && b.prototype === a || ("function" == typeof a ? h.enumPrototypes : e(a)) ? g(a) : f(a) ? i(a) : [] | |
} : g; | |
b.exports = j | |
}, { | |
120: 120, | |
121: 121, | |
127: 127, | |
133: 133, | |
141: 141 | |
}], | |
139: [function(a, b, c) { | |
function d(a) { | |
if (null == a) return []; | |
k(a) || (a = Object(a)); | |
var b = a.length; | |
b = b && j(b) && (g(a) || f(a) || l(a)) && b || 0; | |
for (var c = a.constructor, d = -1, e = h(c) && c.prototype || y, n = e === a, o = Array(b), p = b > 0, r = m.enumErrorProps && (a === x || a instanceof Error), s = m.enumPrototypes && h(a); ++d < b;) o[d] = d + ""; | |
for (var u in a) s && "prototype" == u || r && ("message" == u || "name" == u) || p && i(u, b) || "constructor" == u && (n || !A.call(a, u)) || o.push(u); | |
if (m.nonEnumShadows && a !== y) { | |
var D = a === z ? v : a === x ? q : B.call(a), | |
E = C[D] || C[t]; | |
for (D == t && (e = y), b = w.length; b--;) { | |
u = w[b]; | |
var F = E[u]; | |
n && F || (F ? !A.call(a, u) : a[u] === e[u]) || o.push(u) | |
} | |
} | |
return o | |
} | |
var e = a(109), | |
f = a(129), | |
g = a(130), | |
h = a(131), | |
i = a(123), | |
j = a(125), | |
k = a(133), | |
l = a(135), | |
m = a(141), | |
n = "[object Array]", | |
o = "[object Boolean]", | |
p = "[object Date]", | |
q = "[object Error]", | |
r = "[object Function]", | |
s = "[object Number]", | |
t = "[object Object]", | |
u = "[object RegExp]", | |
v = "[object String]", | |
w = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"], | |
x = Error.prototype, | |
y = Object.prototype, | |
z = String.prototype, | |
A = y.hasOwnProperty, | |
B = y.toString, | |
C = {}; | |
C[n] = C[p] = C[s] = { | |
constructor: !0, | |
toLocaleString: !0, | |
toString: !0, | |
valueOf: !0 | |
}, C[o] = C[v] = { | |
constructor: !0, | |
toString: !0, | |
valueOf: !0 | |
}, C[q] = C[r] = C[u] = { | |
constructor: !0, | |
toString: !0 | |
}, C[t] = { | |
constructor: !0 | |
}, e(w, function(a) { | |
for (var b in C) | |
if (A.call(C, b)) { | |
var c = C[b]; | |
c[a] = A.call(c, a) | |
} | |
}), b.exports = d | |
}, { | |
109: 109, | |
123: 123, | |
125: 125, | |
129: 129, | |
130: 130, | |
131: 131, | |
133: 133, | |
135: 135, | |
141: 141 | |
}], | |
140: [function(a, b, c) { | |
var d = a(113), | |
e = a(117), | |
f = e(d); | |
b.exports = f | |
}, { | |
113: 113, | |
117: 117 | |
}], | |
141: [function(a, b, c) { | |
var d = Array.prototype, | |
e = Error.prototype, | |
f = Object.prototype, | |
g = f.propertyIsEnumerable, | |
h = d.splice, | |
i = {}; | |
! function(a) { | |
var b = function() { | |
this.x = a | |
}, | |
c = { | |
0: a, | |
length: a | |
}, | |
d = []; | |
b.prototype = { | |
valueOf: a, | |
y: a | |
}; | |
for (var f in new b) d.push(f); | |
i.enumErrorProps = g.call(e, "message") || g.call(e, "name"), i.enumPrototypes = g.call(b, "prototype"), i.nonEnumShadows = !/valueOf/.test(d), i.ownLast = "x" != d[0], i.spliceObjects = (h.call(c, 0, 1), !c[0]), i.unindexedChars = "x" [0] + Object("x")[0] != "xx" | |
}(1, 0), b.exports = i | |
}, {}], | |
142: [function(a, b, c) { | |
function d(a) { | |
return a | |
} | |
b.exports = d | |
}, {}], | |
143: [function(a, b, c) { | |
"use strict"; | |
var d = Object.prototype.hasOwnProperty, | |
e = Object.prototype.toString, | |
f = Array.prototype.slice, | |
g = a(144), | |
h = Object.prototype.propertyIsEnumerable, | |
i = !h.call({ | |
toString: null | |
}, "toString"), | |
j = h.call(function() {}, "prototype"), | |
k = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], | |
l = function(a) { | |
var b = a.constructor; | |
return b && b.prototype === a | |
}, | |
m = { | |
$console: !0, | |
$external: !0, | |
$frame: !0, | |
$frameElement: !0, | |
$frames: !0, | |
$innerHeight: !0, | |
$innerWidth: !0, | |
$outerHeight: !0, | |
$outerWidth: !0, | |
$pageXOffset: !0, | |
$pageYOffset: !0, | |
$parent: !0, | |
$scrollLeft: !0, | |
$scrollTop: !0, | |
$scrollX: !0, | |
$scrollY: !0, | |
$self: !0, | |
$webkitIndexedDB: !0, | |
$webkitStorageInfo: !0, | |
$window: !0 | |
}, | |
n = function() { | |
if ("undefined" == typeof window) return !1; | |
for (var a in window) try { | |
if (!m["$" + a] && d.call(window, a) && null !== window[a] && "object" == typeof window[a]) try { | |
l(window[a]) | |
} catch (b) { | |
return !0 | |
} | |
} catch (b) { | |
return !0 | |
} | |
return !1 | |
}(), | |
o = function(a) { | |
if ("undefined" == typeof window || !n) return l(a); | |
try { | |
return l(a) | |
} catch (b) { | |
return !1 | |
} | |
}, | |
p = function(a) { | |
var b = null !== a && "object" == typeof a, | |
c = "[object Function]" === e.call(a), | |
f = g(a), | |
h = b && "[object String]" === e.call(a), | |
l = []; | |
if (!b && !c && !f) throw new TypeError("Object.keys called on a non-object"); | |
var m = j && c; | |
if (h && a.length > 0 && !d.call(a, 0)) | |
for (var n = 0; n < a.length; ++n) l.push(String(n)); | |
if (f && a.length > 0) | |
for (var p = 0; p < a.length; ++p) l.push(String(p)); | |
else | |
for (var q in a) m && "prototype" === q || !d.call(a, q) || l.push(String(q)); | |
if (i) | |
for (var r = o(a), s = 0; s < k.length; ++s) r && "constructor" === k[s] || !d.call(a, k[s]) || l.push(k[s]); | |
return l | |
}; | |
p.shim = function() { | |
if (Object.keys) { | |
var a = function() { | |
return 2 === (Object.keys(arguments) || "").length | |
}(1, 2); | |
if (!a) { | |
var b = Object.keys; | |
Object.keys = function(a) { | |
return b(g(a) ? f.call(a) : a) | |
} | |
} | |
} else Object.keys = p; | |
return Object.keys || p | |
}, b.exports = p | |
}, { | |
144: 144 | |
}], | |
144: [function(a, b, c) { | |
"use strict"; | |
var d = Object.prototype.toString; | |
b.exports = function(a) { | |
var b = d.call(a), | |
c = "[object Arguments]" === b; | |
return c || (c = "[object Array]" !== b && null !== a && "object" == typeof a && "number" == typeof a.length && a.length >= 0 && "[object Function]" === d.call(a.callee)), c | |
} | |
}, {}], | |
145: [function(a, b, c) { | |
"use strict"; | |
var d = a(143); | |
b.exports = function() { | |
if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1; | |
if ("symbol" == typeof Symbol.iterator) return !0; | |
var a = {}, | |
b = Symbol("test"), | |
c = Object(b); | |
if ("string" == typeof b) return !1; | |
if ("[object Symbol]" !== Object.prototype.toString.call(b)) return !1; | |
if ("[object Symbol]" !== Object.prototype.toString.call(c)) return !1; | |
var e = 42; | |
a[b] = e; | |
for (b in a) return !1; | |
if (0 !== d(a).length) return !1; | |
if ("function" == typeof Object.keys && 0 !== Object.keys(a).length) return !1; | |
if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(a).length) return !1; | |
var f = Object.getOwnPropertySymbols(a); | |
if (1 !== f.length || f[0] !== b) return !1; | |
if (!Object.prototype.propertyIsEnumerable.call(a, b)) return !1; | |
if ("function" == typeof Object.getOwnPropertyDescriptor) { | |
var g = Object.getOwnPropertyDescriptor(a, b); | |
if (g.value !== e || g.enumerable !== !0) return !1 | |
} | |
return !0 | |
} | |
}, { | |
143: 143 | |
}], | |
146: [function(a, b, c) { | |
"use strict"; | |
var d = a(143), | |
e = a(100), | |
f = function(a) { | |
return "undefined" != typeof a && null !== a | |
}, | |
g = a(145)(), | |
h = Object, | |
i = e.call(Function.call, Array.prototype.push), | |
j = e.call(Function.call, Object.prototype.propertyIsEnumerable), | |
k = g ? Object.getOwnPropertySymbols : null; | |
b.exports = function(a, b) { | |
if (!f(a)) throw new TypeError("target must be an object"); | |
var c, e, l, m, n, o, p, q = h(a); | |
for (c = 1; c < arguments.length; ++c) { | |
e = h(arguments[c]), m = d(e); | |
var r = g && (Object.getOwnPropertySymbols || k); | |
if (r) | |
for (n = r(e), l = 0; l < n.length; ++l) p = n[l], j(e, p) && i(m, p); | |
for (l = 0; l < m.length; ++l) p = m[l], o = e[p], j(e, p) && (q[p] = o) | |
} | |
return q | |
} | |
}, { | |
100: 100, | |
143: 143, | |
145: 145 | |
}], | |
147: [function(a, b, c) { | |
"use strict"; | |
var d = a(96), | |
e = a(146), | |
f = a(148), | |
g = a(149), | |
h = f(); | |
d(h, { | |
implementation: e, | |
getPolyfill: f, | |
shim: g | |
}), b.exports = h | |
}, { | |
146: 146, | |
148: 148, | |
149: 149, | |
96: 96 | |
}], | |
148: [function(a, b, c) { | |
"use strict"; | |
var d = a(146), | |
e = function() { | |
if (!Object.assign) return !1; | |
for (var a = "abcdefghijklmnopqrst", b = a.split(""), c = {}, d = 0; d < b.length; ++d) c[b[d]] = b[d]; | |
var e = Object.assign({}, c), | |
f = ""; | |
for (var g in e) f += g; | |
return a !== f | |
}, | |
f = function() { | |
if (!Object.assign || !Object.preventExtensions) return !1; | |
var a = Object.preventExtensions({ | |
1: 2 | |
}); | |
try { | |
Object.assign(a, "xy") | |
} catch (b) { | |
return "y" === a[1] | |
} | |
return !1 | |
}; | |
b.exports = function() { | |
return Object.assign ? e() ? d : f() ? d : Object.assign : d | |
} | |
}, { | |
146: 146 | |
}], | |
149: [function(a, b, c) { | |
"use strict"; | |
var d = a(96), | |
e = a(148); | |
b.exports = function() { | |
var a = e(); | |
return d(Object, { | |
assign: a | |
}, { | |
assign: function() { | |
return Object.assign !== a | |
} | |
}), a | |
} | |
}, { | |
148: 148, | |
96: 96 | |
}], | |
150: [function(a, b, c) { | |
function d(a) { | |
var b = !1; | |
return function() { | |
return b ? void 0 : (b = !0, a.apply(this, arguments)) | |
} | |
} | |
b.exports = d, d.proto = d(function() { | |
Object.defineProperty(Function.prototype, "once", { | |
value: function() { | |
return d(this) | |
}, | |
configurable: !0 | |
}) | |
}) | |
}, {}], | |
151: [function(a, b, c) { | |
var d = a(153), | |
e = a(97), | |
f = function(a) { | |
return "[object Array]" === Object.prototype.toString.call(a) | |
}; | |
b.exports = function(a) { | |
if (!a) return {}; | |
var b = {}; | |
return e(d(a).split("\n"), function(a) { | |
var c = a.indexOf(":"), | |
e = d(a.slice(0, c)).toLowerCase(), | |
g = d(a.slice(c + 1)); | |
"undefined" == typeof b[e] ? b[e] = g : f(b[e]) ? b[e].push(g) : b[e] = [b[e], g] | |
}), b | |
} | |
}, { | |
153: 153, | |
97: 97 | |
}], | |
152: [function(a, b, c) { | |
function d(a, b) { | |
var c, d = null; | |
try { | |
c = JSON.parse(a, b) | |
} catch (e) { | |
d = e | |
} | |
return [d, c] | |
} | |
b.exports = d | |
}, {}], | |
153: [function(a, b, c) { | |
function d(a) { | |
return a.replace(/^\s*|\s*$/g, "") | |
} | |
c = b.exports = d, c.left = function(a) { | |
return a.replace(/^\s*/, "") | |
}, c.right = function(a) { | |
return a.replace(/\s*$/, "") | |
} | |
}, {}], | |
154: [function(a, b, c) { | |
function d(a) { | |
return a.replace(/\n\r?\s*/g, "") | |
} | |
b.exports = function(a) { | |
for (var b = "", c = 0; c < arguments.length; c++) b += d(a[c]) + (arguments[c + 1] || ""); | |
return b | |
} | |
}, {}], | |
155: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
for (var c = 0; c < a.length; c++) b(a[c]) | |
} | |
function e(a) { | |
for (var b in a) | |
if (a.hasOwnProperty(b)) return !1; | |
return !0 | |
} | |
function f(a, b, c) { | |
var d = a; | |
return l(b) ? (c = b, "string" == typeof a && (d = { | |
uri: a | |
})) : d = n(b, { | |
uri: a | |
}), d.callback = c, d | |
} | |
function g(a, b, c) { | |
return b = f(a, b, c), h(b) | |
} | |
function h(a) { | |
function b() { | |
4 === j.readyState && f() | |
} | |
function c() { | |
var a = void 0; | |
if (j.response ? a = j.response : "text" !== j.responseType && j.responseType || (a = j.responseText || j.responseXML), u) try { | |
a = JSON.parse(a) | |
} catch (b) {} | |
return a | |
} | |
function d(a) { | |
clearTimeout(o), a instanceof Error || (a = new Error("" + (a || "Unknown XMLHttpRequest Error"))), a.statusCode = 0, h(a, i) | |
} | |
function f() { | |
if (!n) { | |
var b; | |
clearTimeout(o), b = a.useXDR && void 0 === j.status ? 200 : 1223 === j.status ? 204 : j.status; | |
var d = i, | |
e = null; | |
0 !== b ? (d = { | |
body: c(), | |
statusCode: b, | |
method: q, | |
headers: {}, | |
url: p, | |
rawRequest: j | |
}, j.getAllResponseHeaders && (d.headers = m(j.getAllResponseHeaders()))) : e = new Error("Internal XMLHttpRequest Error"), h(e, d, d.body) | |
} | |
} | |
var h = a.callback; | |
if ("undefined" == typeof h) throw new Error("callback argument missing"); | |
h = k(h); | |
var i = { | |
body: void 0, | |
headers: {}, | |
statusCode: 0, | |
method: q, | |
url: p, | |
rawRequest: j | |
}, | |
j = a.xhr || null; | |
j || (j = a.cors || a.useXDR ? new g.XDomainRequest : new g.XMLHttpRequest); | |
var l, n, o, p = j.url = a.uri || a.url, | |
q = j.method = a.method || "GET", | |
r = a.body || a.data || null, | |
s = j.headers = a.headers || {}, | |
t = !!a.sync, | |
u = !1; | |
if ("json" in a && (u = !0, s.accept || s.Accept || (s.Accept = "application/json"), "GET" !== q && "HEAD" !== q && (s["content-type"] || s["Content-Type"] || (s["Content-Type"] = "application/json"), r = JSON.stringify(a.json))), j.onreadystatechange = b, j.onload = f, j.onerror = d, j.onprogress = function() {}, j.ontimeout = d, j.open(q, p, !t, a.username, a.password), t || (j.withCredentials = !!a.withCredentials), !t && a.timeout > 0 && (o = setTimeout(function() { | |
n = !0, j.abort("timeout"); | |
var a = new Error("XMLHttpRequest timeout"); | |
a.code = "ETIMEDOUT", d(a) | |
}, a.timeout)), j.setRequestHeader) | |
for (l in s) s.hasOwnProperty(l) && j.setRequestHeader(l, s[l]); | |
else if (a.headers && !e(a.headers)) throw new Error("Headers cannot be set on an XDomainRequest object"); | |
return "responseType" in a && (j.responseType = a.responseType), "beforeSend" in a && "function" == typeof a.beforeSend && a.beforeSend(j), j.send(r), j | |
} | |
function i() {} | |
var j = a(102), | |
k = a(150), | |
l = a(103), | |
m = a(151), | |
n = a(156); | |
b.exports = g, g.XMLHttpRequest = j.XMLHttpRequest || i, g.XDomainRequest = "withCredentials" in new g.XMLHttpRequest ? g.XMLHttpRequest : j.XDomainRequest, d(["get", "put", "post", "patch", "head", "delete"], function(a) { | |
g["delete" === a ? "del" : a] = function(b, c, d) { | |
return c = f(b, c, d), c.method = a.toUpperCase(), h(c) | |
} | |
}) | |
}, { | |
102: 102, | |
103: 103, | |
150: 150, | |
151: 151, | |
156: 156 | |
}], | |
156: [function(a, b, c) { | |
function d() { | |
for (var a = {}, b = 0; b < arguments.length; b++) { | |
var c = arguments[b]; | |
for (var d in c) e.call(c, d) && (a[d] = c[d]) | |
} | |
return a | |
} | |
b.exports = d; | |
var e = Object.prototype.hasOwnProperty | |
}, {}] | |
}, {}, [94])(94) | |
}); | |
var ADNUtils = ADNUtils || function(a, b) { | |
var c = {}, | |
d = c.lib = {}, | |
e = function() {}, | |
f = d.Base = { | |
extend: function(a) { | |
e.prototype = this; | |
var b = new e; | |
return a && b.mixIn(a), b.hasOwnProperty("init") || (b.init = function() { | |
b.$super.init.apply(this, arguments) | |
}), b.init.prototype = b, b.$super = this, b | |
}, | |
create: function() { | |
var a = this.extend(); | |
return a.init.apply(a, arguments), a | |
}, | |
init: function() {}, | |
mixIn: function(a) { | |
for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]); | |
a.hasOwnProperty("toString") && (this.toString = a.toString) | |
}, | |
clone: function() { | |
return this.init.prototype.extend(this) | |
} | |
}, | |
g = d.WordArray = f.extend({ | |
init: function(a, c) { | |
a = this.words = a || [], this.sigBytes = c != b ? c : 4 * a.length | |
}, | |
toString: function(a) { | |
return (a || i).stringify(this) | |
}, | |
concat: function(a) { | |
var b = this.words, | |
c = a.words, | |
d = this.sigBytes; | |
if (a = a.sigBytes, this.clamp(), d % 4) | |
for (var e = 0; a > e; e++) b[d + e >>> 2] |= (c[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((d + e) % 4); | |
else if (65535 < c.length) | |
for (e = 0; a > e; e += 4) b[d + e >>> 2] = c[e >>> 2]; | |
else b.push.apply(b, c); | |
return this.sigBytes += a, this | |
}, | |
clamp: function() { | |
var b = this.words, | |
c = this.sigBytes; | |
b[c >>> 2] &= 4294967295 << 32 - 8 * (c % 4), b.length = a.ceil(c / 4) | |
}, | |
clone: function() { | |
var a = f.clone.call(this); | |
return a.words = this.words.slice(0), a | |
}, | |
random: function(b) { | |
for (var c = [], d = 0; b > d; d += 4) c.push(4294967296 * a.random() | 0); | |
return new g.init(c, b) | |
} | |
}), | |
h = c.enc = {}, | |
i = h.Hex = { | |
stringify: function(a) { | |
var b = a.words; | |
a = a.sigBytes; | |
for (var c = [], d = 0; a > d; d++) { | |
var e = b[d >>> 2] >>> 24 - 8 * (d % 4) & 255; | |
c.push((e >>> 4).toString(16)), c.push((15 & e).toString(16)) | |
} | |
return c.join("") | |
}, | |
parse: function(a) { | |
for (var b = a.length, c = [], d = 0; b > d; d += 2) c[d >>> 3] |= parseInt(a.substr(d, 2), 16) << 24 - 4 * (d % 8); | |
return new g.init(c, b / 2) | |
} | |
}, | |
j = h.Latin1 = { | |
stringify: function(a) { | |
var b = a.words; | |
a = a.sigBytes; | |
for (var c = [], d = 0; a > d; d++) c.push(String.fromCharCode(b[d >>> 2] >>> 24 - 8 * (d % 4) & 255)); | |
return c.join("") | |
}, | |
parse: function(a) { | |
for (var b = a.length, c = [], d = 0; b > d; d++) c[d >>> 2] |= (255 & a.charCodeAt(d)) << 24 - 8 * (d % 4); | |
return new g.init(c, b) | |
} | |
}, | |
k = h.Utf8 = { | |
stringify: function(a) { | |
try { | |
return decodeURIComponent(escape(j.stringify(a))) | |
} catch (b) { | |
throw Error("Malformed UTF-8 data") | |
} | |
}, | |
parse: function(a) { | |
return j.parse(unescape(encodeURIComponent(a))) | |
} | |
}, | |
l = d.BufferedBlockAlgorithm = f.extend({ | |
reset: function() { | |
this._data = new g.init, this._nDataBytes = 0 | |
}, | |
_append: function(a) { | |
"string" == typeof a && (a = k.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes | |
}, | |
_process: function(b) { | |
var c = this._data, | |
d = c.words, | |
e = c.sigBytes, | |
f = this.blockSize, | |
h = e / (4 * f), | |
h = b ? a.ceil(h) : a.max((0 | h) - this._minBufferSize, 0); | |
if (b = h * f, e = a.min(4 * b, e), b) { | |
for (var i = 0; b > i; i += f) this._doProcessBlock(d, i); | |
i = d.splice(0, b), c.sigBytes -= e | |
} | |
return new g.init(i, e) | |
}, | |
clone: function() { | |
var a = f.clone.call(this); | |
return a._data = this._data.clone(), a | |
}, | |
_minBufferSize: 0 | |
}); | |
d.Hasher = l.extend({ | |
cfg: f.extend(), | |
init: function(a) { | |
this.cfg = this.cfg.extend(a), this.reset() | |
}, | |
reset: function() { | |
l.reset.call(this), this._doReset() | |
}, | |
update: function(a) { | |
return this._append(a), this._process(), this | |
}, | |
finalize: function(a) { | |
return a && this._append(a), this._doFinalize() | |
}, | |
blockSize: 16, | |
_createHelper: function(a) { | |
return function(b, c) { | |
return new a.init(c).finalize(b) | |
} | |
}, | |
_createHmacHelper: function(a) { | |
return function(b, c) { | |
return new m.HMAC.init(a, c).finalize(b) | |
} | |
} | |
}); | |
var m = c.algo = {}; | |
return c | |
}(Math); | |
! function() { | |
var a = ADNUtils, | |
b = a.lib.WordArray; | |
a.enc.Base64 = { | |
stringify: function(a) { | |
var b = a.words, | |
c = a.sigBytes, | |
d = this._map; | |
a.clamp(), a = []; | |
for (var e = 0; c > e; e += 3) | |
for (var f = (b[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 16 | (b[e + 1 >>> 2] >>> 24 - 8 * ((e + 1) % 4) & 255) << 8 | b[e + 2 >>> 2] >>> 24 - 8 * ((e + 2) % 4) & 255, g = 0; 4 > g && c > e + .75 * g; g++) a.push(d.charAt(f >>> 6 * (3 - g) & 63)); | |
if (b = d.charAt(64)) | |
for (; a.length % 4;) a.push(b); | |
return a.join("") | |
}, | |
parse: function(a) { | |
var c = a.length, | |
d = this._map, | |
e = d.charAt(64); | |
e && (e = a.indexOf(e), -1 != e && (c = e)); | |
for (var e = [], f = 0, g = 0; c > g; g++) | |
if (g % 4) { | |
var h = d.indexOf(a.charAt(g - 1)) << 2 * (g % 4), | |
i = d.indexOf(a.charAt(g)) >>> 6 - 2 * (g % 4); | |
e[f >>> 2] |= (h | i) << 24 - 8 * (f % 4), f++ | |
} | |
return b.create(e, f) | |
}, | |
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |
} | |
}(), | |
function(a) { | |
function b(a, b, c, d, e, f, g) { | |
return a = a + (b & c | ~b & d) + e + g, (a << f | a >>> 32 - f) + b | |
} | |
function c(a, b, c, d, e, f, g) { | |
return a = a + (b & d | c & ~d) + e + g, (a << f | a >>> 32 - f) + b | |
} | |
function d(a, b, c, d, e, f, g) { | |
return a = a + (b ^ c ^ d) + e + g, (a << f | a >>> 32 - f) + b | |
} | |
function e(a, b, c, d, e, f, g) { | |
return a = a + (c ^ (b | ~d)) + e + g, (a << f | a >>> 32 - f) + b | |
} | |
for (var f = ADNUtils, g = f.lib, h = g.WordArray, i = g.Hasher, g = f.algo, j = [], k = 0; 64 > k; k++) j[k] = 4294967296 * a.abs(a.sin(k + 1)) | 0; | |
g = g.MD5 = i.extend({ | |
_doReset: function() { | |
this._hash = new h.init([1732584193, 4023233417, 2562383102, 271733878]) | |
}, | |
_doProcessBlock: function(a, f) { | |
for (var g = 0; 16 > g; g++) { | |
var h = f + g, | |
i = a[h]; | |
a[h] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8) | |
} | |
var g = this._hash.words, | |
h = a[f + 0], | |
i = a[f + 1], | |
k = a[f + 2], | |
l = a[f + 3], | |
m = a[f + 4], | |
n = a[f + 5], | |
o = a[f + 6], | |
p = a[f + 7], | |
q = a[f + 8], | |
r = a[f + 9], | |
s = a[f + 10], | |
t = a[f + 11], | |
u = a[f + 12], | |
v = a[f + 13], | |
w = a[f + 14], | |
x = a[f + 15], | |
y = g[0], | |
z = g[1], | |
A = g[2], | |
B = g[3], | |
y = b(y, z, A, B, h, 7, j[0]), | |
B = b(B, y, z, A, i, 12, j[1]), | |
A = b(A, B, y, z, k, 17, j[2]), | |
z = b(z, A, B, y, l, 22, j[3]), | |
y = b(y, z, A, B, m, 7, j[4]), | |
B = b(B, y, z, A, n, 12, j[5]), | |
A = b(A, B, y, z, o, 17, j[6]), | |
z = b(z, A, B, y, p, 22, j[7]), | |
y = b(y, z, A, B, q, 7, j[8]), | |
B = b(B, y, z, A, r, 12, j[9]), | |
A = b(A, B, y, z, s, 17, j[10]), | |
z = b(z, A, B, y, t, 22, j[11]), | |
y = b(y, z, A, B, u, 7, j[12]), | |
B = b(B, y, z, A, v, 12, j[13]), | |
A = b(A, B, y, z, w, 17, j[14]), | |
z = b(z, A, B, y, x, 22, j[15]), | |
y = c(y, z, A, B, i, 5, j[16]), | |
B = c(B, y, z, A, o, 9, j[17]), | |
A = c(A, B, y, z, t, 14, j[18]), | |
z = c(z, A, B, y, h, 20, j[19]), | |
y = c(y, z, A, B, n, 5, j[20]), | |
B = c(B, y, z, A, s, 9, j[21]), | |
A = c(A, B, y, z, x, 14, j[22]), | |
z = c(z, A, B, y, m, 20, j[23]), | |
y = c(y, z, A, B, r, 5, j[24]), | |
B = c(B, y, z, A, w, 9, j[25]), | |
A = c(A, B, y, z, l, 14, j[26]), | |
z = c(z, A, B, y, q, 20, j[27]), | |
y = c(y, z, A, B, v, 5, j[28]), | |
B = c(B, y, z, A, k, 9, j[29]), | |
A = c(A, B, y, z, p, 14, j[30]), | |
z = c(z, A, B, y, u, 20, j[31]), | |
y = d(y, z, A, B, n, 4, j[32]), | |
B = d(B, y, z, A, q, 11, j[33]), | |
A = d(A, B, y, z, t, 16, j[34]), | |
z = d(z, A, B, y, w, 23, j[35]), | |
y = d(y, z, A, B, i, 4, j[36]), | |
B = d(B, y, z, A, m, 11, j[37]), | |
A = d(A, B, y, z, p, 16, j[38]), | |
z = d(z, A, B, y, s, 23, j[39]), | |
y = d(y, z, A, B, v, 4, j[40]), | |
B = d(B, y, z, A, h, 11, j[41]), | |
A = d(A, B, y, z, l, 16, j[42]), | |
z = d(z, A, B, y, o, 23, j[43]), | |
y = d(y, z, A, B, r, 4, j[44]), | |
B = d(B, y, z, A, u, 11, j[45]), | |
A = d(A, B, y, z, x, 16, j[46]), | |
z = d(z, A, B, y, k, 23, j[47]), | |
y = e(y, z, A, B, h, 6, j[48]), | |
B = e(B, y, z, A, p, 10, j[49]), | |
A = e(A, B, y, z, w, 15, j[50]), | |
z = e(z, A, B, y, n, 21, j[51]), | |
y = e(y, z, A, B, u, 6, j[52]), | |
B = e(B, y, z, A, l, 10, j[53]), | |
A = e(A, B, y, z, s, 15, j[54]), | |
z = e(z, A, B, y, i, 21, j[55]), | |
y = e(y, z, A, B, q, 6, j[56]), | |
B = e(B, y, z, A, x, 10, j[57]), | |
A = e(A, B, y, z, o, 15, j[58]), | |
z = e(z, A, B, y, v, 21, j[59]), | |
y = e(y, z, A, B, m, 6, j[60]), | |
B = e(B, y, z, A, t, 10, j[61]), | |
A = e(A, B, y, z, k, 15, j[62]), | |
z = e(z, A, B, y, r, 21, j[63]); | |
g[0] = g[0] + y | 0, g[1] = g[1] + z | 0, g[2] = g[2] + A | 0, g[3] = g[3] + B | 0 | |
}, | |
_doFinalize: function() { | |
var b = this._data, | |
c = b.words, | |
d = 8 * this._nDataBytes, | |
e = 8 * b.sigBytes; | |
c[e >>> 5] |= 128 << 24 - e % 32; | |
var f = a.floor(d / 4294967296); | |
for (c[(e + 64 >>> 9 << 4) + 15] = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8), c[(e + 64 >>> 9 << 4) + 14] = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), b.sigBytes = 4 * (c.length + 1), this._process(), b = this._hash, c = b.words, d = 0; 4 > d; d++) e = c[d], c[d] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8); | |
return b | |
}, | |
clone: function() { | |
var a = i.clone.call(this); | |
return a._hash = this._hash.clone(), a | |
} | |
}), f.MD5 = i._createHelper(g), f.HmacMD5 = i._createHmacHelper(g) | |
}(Math), | |
function() { | |
var a = ADNUtils, | |
b = a.lib, | |
c = b.Base, | |
d = b.WordArray, | |
b = a.algo, | |
e = b.EvpKDF = c.extend({ | |
cfg: c.extend({ | |
keySize: 4, | |
hasher: b.MD5, | |
iterations: 1 | |
}), | |
init: function(a) { | |
this.cfg = this.cfg.extend(a) | |
}, | |
compute: function(a, b) { | |
for (var c = this.cfg, e = c.hasher.create(), f = d.create(), g = f.words, h = c.keySize, c = c.iterations; g.length < h;) { | |
i && e.update(i); | |
var i = e.update(a).finalize(b); | |
e.reset(); | |
for (var j = 1; c > j; j++) i = e.finalize(i), e.reset(); | |
f.concat(i) | |
} | |
return f.sigBytes = 4 * h, f | |
} | |
}); | |
a.EvpKDF = function(a, b, c) { | |
return e.create(c).compute(a, b) | |
} | |
}(), ADNUtils.lib.Cipher || function(a) { | |
var b = ADNUtils, | |
c = b.lib, | |
d = c.Base, | |
e = c.WordArray, | |
f = c.BufferedBlockAlgorithm, | |
g = b.enc.Base64, | |
h = b.algo.EvpKDF, | |
i = c.Cipher = f.extend({ | |
cfg: d.extend(), | |
createEncryptor: function(a, b) { | |
return this.create(this._ENC_XFORM_MODE, a, b) | |
}, | |
createDecryptor: function(a, b) { | |
return this.create(this._DEC_XFORM_MODE, a, b) | |
}, | |
init: function(a, b, c) { | |
this.cfg = this.cfg.extend(c), this._xformMode = a, this._key = b, this.reset() | |
}, | |
reset: function() { | |
f.reset.call(this), this._doReset() | |
}, | |
process: function(a) { | |
return this._append(a), this._process() | |
}, | |
finalize: function(a) { | |
return a && this._append(a), this._doFinalize() | |
}, | |
keySize: 4, | |
ivSize: 4, | |
_ENC_XFORM_MODE: 1, | |
_DEC_XFORM_MODE: 2, | |
_createHelper: function(a) { | |
return { | |
encrypt: function(b, c, d) { | |
return ("string" == typeof c ? o : n).encrypt(a, b, c, d) | |
}, | |
decrypt: function(b, c, d) { | |
return ("string" == typeof c ? o : n).decrypt(a, b, c, d) | |
} | |
} | |
} | |
}); | |
c.StreamCipher = i.extend({ | |
_doFinalize: function() { | |
return this._process(!0) | |
}, | |
blockSize: 1 | |
}); | |
var j = b.mode = {}, | |
k = function(b, c, d) { | |
var e = this._iv; | |
e ? this._iv = a : e = this._prevBlock; | |
for (var f = 0; d > f; f++) b[c + f] ^= e[f] | |
}, | |
l = (c.BlockCipherMode = d.extend({ | |
createEncryptor: function(a, b) { | |
return this.Encryptor.create(a, b) | |
}, | |
createDecryptor: function(a, b) { | |
return this.Decryptor.create(a, b) | |
}, | |
init: function(a, b) { | |
this._cipher = a, this._iv = b | |
} | |
})).extend(); | |
l.Encryptor = l.extend({ | |
processBlock: function(a, b) { | |
var c = this._cipher, | |
d = c.blockSize; | |
k.call(this, a, b, d), c.encryptBlock(a, b), this._prevBlock = a.slice(b, b + d) | |
} | |
}), l.Decryptor = l.extend({ | |
processBlock: function(a, b) { | |
var c = this._cipher, | |
d = c.blockSize, | |
e = a.slice(b, b + d); | |
c.decryptBlock(a, b), k.call(this, a, b, d), this._prevBlock = e | |
} | |
}), j = j.CBC = l, l = (b.pad = {}).Pkcs7 = { | |
pad: function(a, b) { | |
for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, f = [], g = 0; c > g; g += 4) f.push(d); | |
c = e.create(f, c), a.concat(c) | |
}, | |
unpad: function(a) { | |
a.sigBytes -= 255 & a.words[a.sigBytes - 1 >>> 2] | |
} | |
}, c.BlockCipher = i.extend({ | |
cfg: i.cfg.extend({ | |
mode: j, | |
padding: l | |
}), | |
reset: function() { | |
i.reset.call(this); | |
var a = this.cfg, | |
b = a.iv, | |
a = a.mode; | |
if (this._xformMode == this._ENC_XFORM_MODE) var c = a.createEncryptor; | |
else c = a.createDecryptor, this._minBufferSize = 1; | |
this._mode = c.call(a, this, b && b.words) | |
}, | |
_doProcessBlock: function(a, b) { | |
this._mode.processBlock(a, b) | |
}, | |
_doFinalize: function() { | |
var a = this.cfg.padding; | |
if (this._xformMode == this._ENC_XFORM_MODE) { | |
a.pad(this._data, this.blockSize); | |
var b = this._process(!0) | |
} else b = this._process(!0), a.unpad(b); | |
return b | |
}, | |
blockSize: 4 | |
}); | |
var m = c.CipherParams = d.extend({ | |
init: function(a) { | |
this.mixIn(a) | |
}, | |
toString: function(a) { | |
return (a || this.formatter).stringify(this) | |
} | |
}), | |
j = (b.format = {}).OpenSSL = { | |
stringify: function(a) { | |
var b = a.ciphertext; | |
return a = a.salt, (a ? e.create([1398893684, 1701076831]).concat(a).concat(b) : b).toString(g) | |
}, | |
parse: function(a) { | |
a = g.parse(a); | |
var b = a.words; | |
if (1398893684 == b[0] && 1701076831 == b[1]) { | |
var c = e.create(b.slice(2, 4)); | |
b.splice(0, 4), a.sigBytes -= 16 | |
} | |
return m.create({ | |
ciphertext: a, | |
salt: c | |
}) | |
} | |
}, | |
n = c.SerializableCipher = d.extend({ | |
cfg: d.extend({ | |
format: j | |
}), | |
encrypt: function(a, b, c, d) { | |
d = this.cfg.extend(d); | |
var e = a.createEncryptor(c, d); | |
return b = e.finalize(b), e = e.cfg, m.create({ | |
ciphertext: b, | |
key: c, | |
iv: e.iv, | |
algorithm: a, | |
mode: e.mode, | |
padding: e.padding, | |
blockSize: a.blockSize, | |
formatter: d.format | |
}) | |
}, | |
decrypt: function(a, b, c, d) { | |
return d = this.cfg.extend(d), b = this._parse(b, d.format), a.createDecryptor(c, d).finalize(b.ciphertext) | |
}, | |
_parse: function(a, b) { | |
return "string" == typeof a ? b.parse(a, this) : a | |
} | |
}), | |
b = (b.kdf = {}).OpenSSL = { | |
execute: function(a, b, c, d) { | |
return d || (d = e.random(8)), a = h.create({ | |
keySize: b + c | |
}).compute(a, d), c = e.create(a.words.slice(b), 4 * c), a.sigBytes = 4 * b, m.create({ | |
key: a, | |
iv: c, | |
salt: d | |
}) | |
} | |
}, | |
o = c.PasswordBasedCipher = n.extend({ | |
cfg: n.cfg.extend({ | |
kdf: b | |
}), | |
encrypt: function(a, b, c, d) { | |
return d = this.cfg.extend(d), c = d.kdf.execute(c, a.keySize, a.ivSize), d.iv = c.iv, a = n.encrypt.call(this, a, b, c.key, d), a.mixIn(c), a | |
}, | |
decrypt: function(a, b, c, d) { | |
return d = this.cfg.extend(d), b = this._parse(b, d.format), c = d.kdf.execute(c, a.keySize, a.ivSize, b.salt), d.iv = c.iv, n.decrypt.call(this, a, b, c.key, d) | |
} | |
}) | |
}(), | |
function() { | |
for (var a = ADNUtils, b = a.lib.BlockCipher, c = a.algo, d = [], e = [], f = [], g = [], h = [], i = [], j = [], k = [], l = [], m = [], n = [], o = 0; 256 > o; o++) n[o] = 128 > o ? o << 1 : o << 1 ^ 283; | |
for (var p = 0, q = 0, o = 0; 256 > o; o++) { | |
var r = q ^ q << 1 ^ q << 2 ^ q << 3 ^ q << 4, | |
r = r >>> 8 ^ 255 & r ^ 99; | |
d[p] = r, e[r] = p; | |
var s = n[p], | |
t = n[s], | |
u = n[t], | |
v = 257 * n[r] ^ 16843008 * r; | |
f[p] = v << 24 | v >>> 8, g[p] = v << 16 | v >>> 16, h[p] = v << 8 | v >>> 24, i[p] = v, v = 16843009 * u ^ 65537 * t ^ 257 * s ^ 16843008 * p, j[r] = v << 24 | v >>> 8, k[r] = v << 16 | v >>> 16, l[r] = v << 8 | v >>> 24, m[r] = v, p ? (p = s ^ n[n[n[u ^ s]]], q ^= n[n[q]]) : p = q = 1 | |
} | |
var w = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], | |
c = c.AES = b.extend({ | |
_doReset: function() { | |
for (var a = this._key, b = a.words, c = a.sigBytes / 4, a = 4 * ((this._nRounds = c + 6) + 1), e = this._keySchedule = [], f = 0; a > f; f++) | |
if (c > f) e[f] = b[f]; | |
else { | |
var g = e[f - 1]; | |
f % c ? c > 6 && 4 == f % c && (g = d[g >>> 24] << 24 | d[g >>> 16 & 255] << 16 | d[g >>> 8 & 255] << 8 | d[255 & g]) : (g = g << 8 | g >>> 24, g = d[g >>> 24] << 24 | d[g >>> 16 & 255] << 16 | d[g >>> 8 & 255] << 8 | d[255 & g], g ^= w[f / c | 0] << 24), e[f] = e[f - c] ^ g | |
} | |
for (b = this._invKeySchedule = [], c = 0; a > c; c++) f = a - c, g = c % 4 ? e[f] : e[f - 4], b[c] = 4 > c || 4 >= f ? g : j[d[g >>> 24]] ^ k[d[g >>> 16 & 255]] ^ l[d[g >>> 8 & 255]] ^ m[d[255 & g]] | |
}, | |
encryptBlock: function(a, b) { | |
this._doCryptBlock(a, b, this._keySchedule, f, g, h, i, d) | |
}, | |
decryptBlock: function(a, b) { | |
var c = a[b + 1]; | |
a[b + 1] = a[b + 3], a[b + 3] = c, this._doCryptBlock(a, b, this._invKeySchedule, j, k, l, m, e), c = a[b + 1], a[b + 1] = a[b + 3], a[b + 3] = c | |
}, | |
_doCryptBlock: function(a, b, c, d, e, f, g, h) { | |
for (var i = this._nRounds, j = a[b] ^ c[0], k = a[b + 1] ^ c[1], l = a[b + 2] ^ c[2], m = a[b + 3] ^ c[3], n = 4, o = 1; i > o; o++) var p = d[j >>> 24] ^ e[k >>> 16 & 255] ^ f[l >>> 8 & 255] ^ g[255 & m] ^ c[n++], | |
q = d[k >>> 24] ^ e[l >>> 16 & 255] ^ f[m >>> 8 & 255] ^ g[255 & j] ^ c[n++], | |
r = d[l >>> 24] ^ e[m >>> 16 & 255] ^ f[j >>> 8 & 255] ^ g[255 & k] ^ c[n++], | |
m = d[m >>> 24] ^ e[j >>> 16 & 255] ^ f[k >>> 8 & 255] ^ g[255 & l] ^ c[n++], | |
j = p, | |
k = q, | |
l = r; | |
p = (h[j >>> 24] << 24 | h[k >>> 16 & 255] << 16 | h[l >>> 8 & 255] << 8 | h[255 & m]) ^ c[n++], q = (h[k >>> 24] << 24 | h[l >>> 16 & 255] << 16 | h[m >>> 8 & 255] << 8 | h[255 & j]) ^ c[n++], r = (h[l >>> 24] << 24 | h[m >>> 16 & 255] << 16 | h[j >>> 8 & 255] << 8 | h[255 & k]) ^ c[n++], m = (h[m >>> 24] << 24 | h[j >>> 16 & 255] << 16 | h[k >>> 8 & 255] << 8 | h[255 & l]) ^ c[n++], a[b] = p, a[b + 1] = q, a[b + 2] = r, a[b + 3] = m | |
}, | |
keySize: 8 | |
}); | |
a.AES = b._createHelper(c) | |
}(), videojs.addLanguage("fr", { | |
Play: "Lecture", | |
Pause: "Pause", | |
"Current Time": "Temps actuel", | |
"Duration Time": "Durée", | |
"Remaining Time": "Temps restant", | |
"Stream Type": "Type de flux", | |
LIVE: "EN DIRECT", | |
Loaded: "Chargé", | |
Progress: "Progression", | |
Fullscreen: "Plein écran", | |
"Non-Fullscreen": "Fenêtré", | |
Mute: "Sourdine", | |
Unmuted: "Son activé", | |
"Playback Rate": "Vitesse de lecture", | |
Subtitles: "Sous-titres", | |
"subtitles off": "Sous-titres désactivés", | |
Captions: "Sous-titres", | |
"captions off": "Sous-titres désactivés", | |
Chapters: "Chapitres", | |
"You aborted the media playback": "Vous avez interrompu la lecture de la vidéo.", | |
"A network error caused the media download to fail part-way.": "Une erreur de réseau a interrompu le téléchargement de la vidéo.", | |
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "Erreur A001. Seul les navigateurs suivants sont supportés : Chrome 23+, Firefox 42+, Edge, Internet Explorer 11 (Windows 8+), Safari, Chrome mobile et Safari mobile.", | |
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Erreur A003. La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.", | |
"No compatible source was found for this media.": "Erreur A002. Seul les navigateurs suivants sont supportés : Chrome 23+, Firefox 42+, Edge, Internet Explorer 11 (Windows 8+), Safari, Chrome mobile et Safari mobile.", | |
mobile: "SD 360p", | |
sd: "SD 480p", | |
hd: "HD 720p", | |
fhd: "HD 1080p", | |
vf: "VF", | |
vostf: "VOSTFR", | |
"An error occurred. Please empty your cache and reload the page.": "Une erreur a eu lieu. Videz le cache de votre navigateur et rechargez la page. Si le problème persite, contactez le SAV.", | |
"Casting to": "En cours de diffusion sur" | |
}), | |
function a(b, c, d) { | |
function e(g, h) { | |
if (!c[g]) { | |
if (!b[g]) { | |
var i = "function" == typeof require && require; | |
if (!h && i) return i(g, !0); | |
if (f) return f(g, !0); | |
var j = new Error("Cannot find module '" + g + "'"); | |
throw j.code = "MODULE_NOT_FOUND", j | |
} | |
var k = c[g] = { | |
exports: {} | |
}; | |
b[g][0].call(k.exports, function(a) { | |
var c = b[g][1][a]; | |
return e(c ? c : a) | |
}, k, k.exports, a, b, c, d) | |
} | |
return c[g].exports | |
} | |
for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]); | |
return e | |
}({ | |
1: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
f = c.IVPAIDAdUnit = function() { | |
function a() { | |
d(this, a) | |
} | |
return e(a, [{ | |
key: "handshakeVersion", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? "2.0" : arguments[0], arguments.length <= 1 || void 0 === arguments[1] ? void 0 : arguments[1] | |
} | |
}, { | |
key: "initAd", | |
value: function(a, b, c, d) { | |
arguments.length <= 4 || void 0 === arguments[4] ? { | |
AdParameters: "" | |
} : arguments[4], arguments.length <= 5 || void 0 === arguments[5] ? { | |
flashVars: "" | |
} : arguments[5], arguments.length <= 6 || void 0 === arguments[6] ? void 0 : arguments[6] | |
} | |
}, { | |
key: "resizeAd", | |
value: function(a, b, c) { | |
arguments.length <= 3 || void 0 === arguments[3] ? void 0 : arguments[3] | |
} | |
}, { | |
key: "startAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "stopAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "pauseAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "resumeAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "expandAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "collapseAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "skipAd", | |
value: function() { | |
arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0] | |
} | |
}, { | |
key: "getAdLinear", | |
value: function(a) {} | |
}, { | |
key: "getAdWidth", | |
value: function(a) {} | |
}, { | |
key: "getAdHeight", | |
value: function(a) {} | |
}, { | |
key: "getAdExpanded", | |
value: function(a) {} | |
}, { | |
key: "getAdSkippableState", | |
value: function(a) {} | |
}, { | |
key: "getAdRemainingTime", | |
value: function(a) {} | |
}, { | |
key: "getAdDuration", | |
value: function(a) {} | |
}, { | |
key: "setAdVolume", | |
value: function(a) { | |
arguments.length <= 1 || void 0 === arguments[1] ? void 0 : arguments[1] | |
} | |
}, { | |
key: "getAdVolume", | |
value: function(a) {} | |
}, { | |
key: "getAdCompanions", | |
value: function(a) {} | |
}, { | |
key: "getAdIcons", | |
value: function(a) {} | |
}]), a | |
}(); | |
Object.defineProperty(f, "EVENTS", { | |
writable: !1, | |
configurable: !1, | |
value: ["AdLoaded", "AdStarted", "AdStopped", "AdSkipped", "AdSkippableStateChange", "AdSizeChange", "AdLinearChange", "AdDurationChange", "AdExpandedChange", "AdRemainingTimeChange", "AdVolumeChange", "AdImpression", "AdVideoStart", "AdVideoFirstQuartile", "AdVideoMidpoint", "AdVideoThirdQuartile", "AdVideoComplete", "AdClickThru", "AdInteraction", "AdUserAcceptInvitation", "AdUserMinimize", "AdUserClose", "AdPaused", "AdPlaying", "AdLog", "AdError"] | |
}) | |
}, {}], | |
2: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function e(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" !== ("undefined" == typeof b ? "undefined" : g(b)) && "function" != typeof b ? a : b | |
} | |
function f(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + ("undefined" == typeof b ? "undefined" : g(b))); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
var g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) { | |
return typeof a | |
} : function(a) { | |
return a && "function" == typeof Symbol && a.constructor === Symbol ? "symbol" : typeof a | |
}; | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a("./IVPAIDAdUnit").IVPAIDAdUnit, | |
j = Object.getOwnPropertyNames(i.prototype).filter(function(a) { | |
return -1 === ["constructor"].indexOf(a) | |
}); | |
c.VPAIDAdUnit = function(a) { | |
function b(a) { | |
d(this, b); | |
var c = e(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this)); | |
return c._destroyed = !1, c._flash = a, c | |
} | |
return f(b, a), h(b, [{ | |
key: "_destroy", | |
value: function() { | |
var a = this; | |
this._destroyed = !0, j.forEach(function(b) { | |
a._flash.removeCallbackByMethodName(b) | |
}), i.EVENTS.forEach(function(b) { | |
a._flash.offEvent(b) | |
}), this._flash = null | |
} | |
}, { | |
key: "isDestroyed", | |
value: function() { | |
return this._destroyed | |
} | |
}, { | |
key: "on", | |
value: function(a, b) { | |
this._flash.on(a, b) | |
} | |
}, { | |
key: "off", | |
value: function(a, b) { | |
this._flash.off(a, b) | |
} | |
}, { | |
key: "handshakeVersion", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? "2.0" : arguments[0], | |
b = arguments.length <= 1 || void 0 === arguments[1] ? void 0 : arguments[1]; | |
this._flash.callFlashMethod("handshakeVersion", [a], b) | |
} | |
}, { | |
key: "initAd", | |
value: function(a, b, c, d) { | |
var e = arguments.length <= 4 || void 0 === arguments[4] ? { | |
AdParameters: "" | |
} : arguments[4], | |
f = arguments.length <= 5 || void 0 === arguments[5] ? { | |
flashVars: "" | |
} : arguments[5], | |
g = arguments.length <= 6 || void 0 === arguments[6] ? void 0 : arguments[6]; | |
this._flash.setSize(a, b), e = e || { | |
AdParameters: "" | |
}, f = f || { | |
flashVars: "" | |
}, this._flash.callFlashMethod("initAd", [this._flash.getWidth(), this._flash.getHeight(), c, d, e.AdParameters || "", f.flashVars || ""], g) | |
} | |
}, { | |
key: "resizeAd", | |
value: function(a, b, c) { | |
var d = arguments.length <= 3 || void 0 === arguments[3] ? void 0 : arguments[3]; | |
this._flash.setSize(a, b), this._flash.callFlashMethod("resizeAd", [this._flash.getWidth(), this._flash.getHeight(), c], d) | |
} | |
}, { | |
key: "startAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("startAd", [], a) | |
} | |
}, { | |
key: "stopAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("stopAd", [], a) | |
} | |
}, { | |
key: "pauseAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("pauseAd", [], a) | |
} | |
}, { | |
key: "resumeAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("resumeAd", [], a) | |
} | |
}, { | |
key: "expandAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("expandAd", [], a) | |
} | |
}, { | |
key: "collapseAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("collapseAd", [], a) | |
} | |
}, { | |
key: "skipAd", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
this._flash.callFlashMethod("skipAd", [], a) | |
} | |
}, { | |
key: "getAdLinear", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdLinear", [], a) | |
} | |
}, { | |
key: "getAdWidth", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdWidth", [], a) | |
} | |
}, { | |
key: "getAdHeight", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdHeight", [], a) | |
} | |
}, { | |
key: "getAdExpanded", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdExpanded", [], a) | |
} | |
}, { | |
key: "getAdSkippableState", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdSkippableState", [], a) | |
} | |
}, { | |
key: "getAdRemainingTime", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdRemainingTime", [], a) | |
} | |
}, { | |
key: "getAdDuration", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdDuration", [], a) | |
} | |
}, { | |
key: "setAdVolume", | |
value: function(a) { | |
var b = arguments.length <= 1 || void 0 === arguments[1] ? void 0 : arguments[1]; | |
this._flash.callFlashMethod("setAdVolume", [a], b) | |
} | |
}, { | |
key: "getAdVolume", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdVolume", [], a) | |
} | |
}, { | |
key: "getAdCompanions", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdCompanions", [], a) | |
} | |
}, { | |
key: "getAdIcons", | |
value: function(a) { | |
this._flash.callFlashMethod("getAdIcons", [], a) | |
} | |
}]), b | |
}(i) | |
}, { | |
"./IVPAIDAdUnit": 1 | |
}], | |
3: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function e() { | |
if (this._destroyed) throw new Error("VPAIDFlashToJS is destroyed!") | |
} | |
function f() { | |
this._loadLater && (this.loadAdUnit(this._loadLater.url, this._loadLater.callback), delete this._loadLater) | |
} | |
function g(a, b) { | |
var c = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2]; | |
Object.defineProperty(t, a, { | |
writable: c, | |
configurable: !1, | |
value: b | |
}) | |
} | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a("swfobject"), | |
j = a("./jsFlashBridge").JSFlashBridge, | |
k = a("./VPAIDAdUnit").VPAIDAdUnit, | |
l = a("./utils").noop, | |
m = a("./utils").callbackTimeout, | |
n = a("./utils").isPositiveInt, | |
o = a("./utils").createElementWithID, | |
p = a("./utils").unique("vpaid"), | |
q = a("./flashTester.js").createFlashTester, | |
r = "10.1.0", | |
s = { | |
isSupported: function() { | |
return !0 | |
} | |
}, | |
t = function() { | |
function a(b, c) { | |
function e(a) { | |
return setTimeout(function() { | |
c(new Error(a)) | |
}, 0), s | |
} | |
var g = arguments.length <= 2 || void 0 === arguments[2] ? { | |
data: "VPAIDFlash.swf", | |
width: 800, | |
height: 400 | |
} : arguments[2], | |
h = this, | |
k = arguments.length <= 3 || void 0 === arguments[3] ? { | |
wmode: "transparent", | |
salign: "tl", | |
align: "left", | |
allowScriptAccess: "always", | |
scale: "noScale", | |
allowFullScreen: "true", | |
quality: "high" | |
} : arguments[3], | |
q = arguments.length <= 4 || void 0 === arguments[4] ? { | |
debug: !1, | |
timeout: 1e4 | |
} : arguments[4]; | |
d(this, a); | |
var s = this; | |
if (this._vpaidParentEl = b, this._flashID = p(), this._destroyed = !1, c = c || l, g.width = n(g.width, 800), g.height = n(g.height, 400), o(b, this._flashID, !0), k.movie = g.data, k.FlashVars = "flashid=" + this._flashID + "&handler=" + j.VPAID_FLASH_HANDLER + "&debug=" + q.debug + "&salign=" + k.salign, !a.isSupported()) return e("user don't support flash or doesn't have the minimum required version of flash " + r); | |
if (this.el = i.createSWF(g, k, this._flashID), !this.el) return e("swfobject failed to create object in element"); | |
var t = m(q.timeout, function(a, b) { | |
f.call(h), c(a, b) | |
}, function() { | |
c("vpaid flash load timeout " + q.timeout) | |
}); | |
this._flash = new j(this.el, g.data, this._flashID, g.width, g.height, t) | |
} | |
return h(a, [{ | |
key: "destroy", | |
value: function() { | |
this._destroyAdUnit(), this._flash && (this._flash.destroy(), this._flash = null), this.el = null, this._destroyed = !0 | |
} | |
}, { | |
key: "isDestroyed", | |
value: function() { | |
return this._destroyed | |
} | |
}, { | |
key: "_destroyAdUnit", | |
value: function() { | |
delete this._loadLater, this._adUnitLoad && (this._adUnitLoad = null, this._flash.removeCallback(this._adUnitLoad)), this._adUnit && (this._adUnit._destroy(), this._adUnit = null) | |
} | |
}, { | |
key: "loadAdUnit", | |
value: function(a, b) { | |
var c = this; | |
e.call(this), this._adUnit && this._destroyAdUnit(), this._flash.isReady() ? (this._adUnitLoad = function(a, d) { | |
a || (c._adUnit = new k(c._flash)), c._adUnitLoad = null, b(a, c._adUnit) | |
}, this._flash.callFlashMethod("loadAdUnit", [a], this._adUnitLoad)) : this._loadLater = { | |
url: a, | |
callback: b | |
} | |
} | |
}, { | |
key: "unloadAdUnit", | |
value: function() { | |
var a = arguments.length <= 0 || void 0 === arguments[0] ? void 0 : arguments[0]; | |
e.call(this), this._destroyAdUnit(), this._flash.callFlashMethod("unloadAdUnit", [], a) | |
} | |
}, { | |
key: "getFlashID", | |
value: function() { | |
return e.call(this), this._flash.getFlashID() | |
} | |
}, { | |
key: "getFlashURL", | |
value: function() { | |
return e.call(this), this._flash.getFlashURL() | |
} | |
}]), a | |
}(); | |
g("isSupported", function() { | |
return i.hasFlashPlayerVersion(r) && s.isSupported() | |
}, !0), g("runFlashTest", function(a) { | |
s = q(document.body, a) | |
}), t.swfobject = i, b.exports = t | |
}, { | |
"./VPAIDAdUnit": 2, | |
"./flashTester.js": 4, | |
"./jsFlashBridge": 5, | |
"./utils": 8, | |
swfobject: 14 | |
}], | |
4: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
f = a("swfobject"), | |
g = "vpaid_video_flash_tester", | |
h = "vpaid_video_flash_tester_el", | |
i = a("./jsFlashBridge").JSFlashBridge, | |
j = a("./utils"), | |
k = a("./registry").MultipleValuesRegistry, | |
l = function() { | |
function a(b) { | |
var c = this, | |
e = arguments.length <= 1 || void 0 === arguments[1] ? { | |
data: "VPAIDFlash.swf", | |
width: 800, | |
height: 400 | |
} : arguments[1]; | |
d(this, a), this.parentEl = j.createElementWithID(b, h), j.hideFlashEl(this.parentEl); | |
var g = {}; | |
g.movie = e.data, g.FlashVars = "flashid=" + h + "&handler=" + i.VPAID_FLASH_HANDLER, g.allowScriptAccess = "always", this.el = f.createSWF(e, g, h), this._handlers = new k, this._isSupported = !1, this.el && (j.hideFlashEl(this.el), this._flash = new i(this.el, e.data, h, e.width, e.height, function() { | |
var a = !0; | |
c._isSupported = a, c._handlers.get("change").forEach(function(b) { | |
setTimeout(function() { | |
b("change", a) | |
}, 0) | |
}) | |
})) | |
} | |
return e(a, [{ | |
key: "isSupported", | |
value: function() { | |
return this._isSupported | |
} | |
}, { | |
key: "on", | |
value: function(a, b) { | |
this._handlers.add(a, b) | |
} | |
}]), a | |
}(); | |
c.createFlashTester = function(a, b) { | |
return window[g] || (window[g] = new l(a, b)), window[g] | |
} | |
}, { | |
"./jsFlashBridge": 5, | |
"./registry": 7, | |
"./utils": 8, | |
swfobject: 14 | |
}], | |
5: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function e(a, b, c) { | |
var d = this; | |
setTimeout(function() { | |
var e = d._callbacks.get(a); | |
e && (d._callbacks.remove(a), e(b, c)) | |
}, 0) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var f = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
g = a("./utils").unique, | |
h = a("./utils").isPositiveInt, | |
i = a("./utils").stringEndsWith, | |
j = a("./registry").SingleValueRegistry, | |
k = a("./registry").MultipleValuesRegistry, | |
l = a("./jsFlashBridgeRegistry"), | |
m = "vpaid_video_flash_handler", | |
n = "AdError", | |
o = c.JSFlashBridge = function() { | |
function a(b, c, e, f, h, i) { | |
d(this, a), this._el = b, this._flashID = e, this._flashURL = c, this._width = f, this._height = h, this._handlers = new k, this._callbacks = new j, this._uniqueMethodIdentifier = g(this._flashID), this._ready = !1, this._handShakeHandler = i, l.addInstance(this._flashID, this) | |
} | |
return f(a, [{ | |
key: "on", | |
value: function(a, b) { | |
this._handlers.add(a, b) | |
} | |
}, { | |
key: "off", | |
value: function(a, b) { | |
return this._handlers.remove(a, b) | |
} | |
}, { | |
key: "offEvent", | |
value: function(a) { | |
return this._handlers.removeByKey(a) | |
} | |
}, { | |
key: "offAll", | |
value: function() { | |
return this._handlers.removeAll() | |
} | |
}, { | |
key: "callFlashMethod", | |
value: function(a) { | |
var b = arguments.length <= 1 || void 0 === arguments[1] ? [] : arguments[1], | |
c = arguments.length <= 2 || void 0 === arguments[2] ? void 0 : arguments[2], | |
d = ""; | |
c && (d = this._uniqueMethodIdentifier() + "_" + a, this._callbacks.add(d, c)); | |
try { | |
this._el[a]([d].concat(b)) | |
} catch (f) { | |
c ? e.call(this, d, f) : this._trigger(n, f) | |
} | |
} | |
}, { | |
key: "removeCallback", | |
value: function(a) { | |
return this._callbacks.removeByValue(a) | |
} | |
}, { | |
key: "removeCallbackByMethodName", | |
value: function(a) { | |
var b = this; | |
this._callbacks.filterKeys(function(b) { | |
return i(b, a) | |
}).forEach(function(a) { | |
b._callbacks.remove(a) | |
}) | |
} | |
}, { | |
key: "removeAllCallbacks", | |
value: function() { | |
return this._callbacks.removeAll() | |
} | |
}, { | |
key: "_trigger", | |
value: function(a, b) { | |
var c = this; | |
this._handlers.get(a).forEach(function(d) { | |
"AdClickThru" === a ? d(b) : setTimeout(function() { | |
c._handlers.get(a).length > 0 && d(b) | |
}, 0) | |
}) | |
} | |
}, { | |
key: "_callCallback", | |
value: function(a, b, c, d) { | |
var f = this._callbacks.get(b); | |
return f ? void e.call(this, b, c, d) : void(c && "" === b && this.trigger(n, c)) | |
} | |
}, { | |
key: "_handShake", | |
value: function(a, b) { | |
this._ready = !0, this._handShakeHandler && (this._handShakeHandler(a, b), delete this._handShakeHandler) | |
} | |
}, { | |
key: "getSize", | |
value: function() { | |
return { | |
width: this._width, | |
height: this._height | |
} | |
} | |
}, { | |
key: "setSize", | |
value: function(a, b) { | |
this._width = h(a, this._width), this._height = h(b, this._height), this._el.setAttribute("width", this._width), this._el.setAttribute("height", this._height) | |
} | |
}, { | |
key: "getWidth", | |
value: function() { | |
return this._width | |
} | |
}, { | |
key: "setWidth", | |
value: function(a) { | |
this.setSize(a, this._height) | |
} | |
}, { | |
key: "getHeight", | |
value: function() { | |
return this._height | |
} | |
}, { | |
key: "setHeight", | |
value: function(a) { | |
this.setSize(this._width, a) | |
} | |
}, { | |
key: "getFlashID", | |
value: function() { | |
return this._flashID | |
} | |
}, { | |
key: "getFlashURL", | |
value: function() { | |
return this._flashURL | |
} | |
}, { | |
key: "isReady", | |
value: function() { | |
return this._ready | |
} | |
}, { | |
key: "destroy", | |
value: function() { | |
this.offAll(), this.removeAllCallbacks(), l.removeInstanceByID(this._flashID), this._el.parentElement && this._el.parentElement.removeChild(this._el) | |
} | |
}]), a | |
}(); | |
Object.defineProperty(o, "VPAID_FLASH_HANDLER", { | |
writable: !1, | |
configurable: !1, | |
value: m | |
}), window[m] = function(a, b, c, d, e, f) { | |
var g = l.getInstanceByID(a); | |
g && ("handShake" === c ? g._handShake(e, f) : "event" !== b ? g._callCallback(c, d, e, f) : g._trigger(c, f)) | |
} | |
}, { | |
"./jsFlashBridgeRegistry": 6, | |
"./registry": 7, | |
"./utils": 8 | |
}], | |
6: [function(a, b, c) { | |
"use strict"; | |
var d = a("./registry").SingleValueRegistry, | |
e = new d, | |
f = {}; | |
Object.defineProperty(f, "addInstance", { | |
writable: !1, | |
configurable: !1, | |
value: function(a, b) { | |
e.add(a, b) | |
} | |
}), Object.defineProperty(f, "getInstanceByID", { | |
writable: !1, | |
configurable: !1, | |
value: function(a) { | |
return e.get(a) | |
} | |
}), Object.defineProperty(f, "removeInstanceByID", { | |
writable: !1, | |
configurable: !1, | |
value: function(a) { | |
return e.remove(a) | |
} | |
}), b.exports = f | |
}, { | |
"./registry": 7 | |
}], | |
7: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(); | |
c.MultipleValuesRegistry = function() { | |
function a() { | |
d(this, a), this._registries = {} | |
} | |
return e(a, [{ | |
key: "add", | |
value: function(a, b) { | |
this._registries[a] || (this._registries[a] = []), -1 === this._registries[a].indexOf(b) && this._registries[a].push(b) | |
} | |
}, { | |
key: "get", | |
value: function(a) { | |
return this._registries[a] || [] | |
} | |
}, { | |
key: "filterKeys", | |
value: function(a) { | |
return Object.keys(this._registries).filter(a) | |
} | |
}, { | |
key: "findByValue", | |
value: function(a) { | |
var b = this, | |
c = Object.keys(this._registries).filter(function(c) { | |
return -1 !== b._registries[c].indexOf(a) | |
}); | |
return c | |
} | |
}, { | |
key: "remove", | |
value: function(a, b) { | |
if (this._registries[a]) { | |
var c = this._registries[a].indexOf(b); | |
if (!(0 > c)) return this._registries[a].splice(c, 1) | |
} | |
} | |
}, { | |
key: "removeByKey", | |
value: function(a) { | |
var b = this._registries[a]; | |
return delete this._registries[a], b | |
} | |
}, { | |
key: "removeByValue", | |
value: function(a) { | |
var b = this, | |
c = this.findByValue(a); | |
return c.map(function(c) { | |
return b.remove(c, a) | |
}) | |
} | |
}, { | |
key: "removeAll", | |
value: function() { | |
var a = this._registries; | |
return this._registries = {}, a | |
} | |
}, { | |
key: "size", | |
value: function() { | |
return Object.keys(this._registries).length | |
} | |
}]), a | |
}(), c.SingleValueRegistry = function() { | |
function a() { | |
d(this, a), this._registries = {} | |
} | |
return e(a, [{ | |
key: "add", | |
value: function(a, b) { | |
this._registries[a] = b | |
} | |
}, { | |
key: "get", | |
value: function(a) { | |
return this._registries[a] | |
} | |
}, { | |
key: "filterKeys", | |
value: function(a) { | |
return Object.keys(this._registries).filter(a) | |
} | |
}, { | |
key: "findByValue", | |
value: function(a) { | |
var b = this, | |
c = Object.keys(this._registries).filter(function(c) { | |
return b._registries[c] === a | |
}); | |
return c | |
} | |
}, { | |
key: "remove", | |
value: function(a) { | |
var b = this._registries[a]; | |
return delete this._registries[a], b | |
} | |
}, { | |
key: "removeByValue", | |
value: function(a) { | |
var b = this, | |
c = this.findByValue(a); | |
return c.map(function(a) { | |
return b.remove(a) | |
}) | |
} | |
}, { | |
key: "removeAll", | |
value: function() { | |
var a = this._registries; | |
return this._registries = {}, a | |
} | |
}, { | |
key: "size", | |
value: function() { | |
return Object.keys(this._registries).length | |
} | |
}]), a | |
}() | |
}, {}], | |
8: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
var b = -1; | |
return function(c) { | |
return a + "_" + ++b | |
} | |
} | |
function e() {} | |
function f(a, b, c) { | |
var d = setTimeout(function() { | |
b = e, c() | |
}, a); | |
return function() { | |
clearTimeout(d), b.apply(this, arguments) | |
} | |
} | |
function g(a, b) { | |
var c = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2], | |
d = document.createElement("div"); | |
return d.id = b, c && (a.innerHTML = ""), a.appendChild(d), d | |
} | |
function h(a, b) { | |
return !isNaN(parseFloat(a)) && isFinite(a) && a > 0 ? a : b | |
} | |
function i(a, b) { | |
return k.call(a, b) | |
} | |
function j(a) { | |
a.style.position = "absolute", a.style.left = "-1px", a.style.top = "-1px", a.style.width = "1px", a.style.height = "1px" | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}), c.unique = d, c.noop = e, c.callbackTimeout = f, c.createElementWithID = g, c.isPositiveInt = h, c.stringEndsWith = i, c.hideFlashEl = j; | |
var k = function() { | |
return String.prototype.endsWith ? String.prototype.endsWith : function(a, b) { | |
var c = this.toString(); | |
(void 0 === b || b > c.length) && (b = c.length), b -= a.length; | |
var d = c.indexOf(a, b); | |
return -1 !== d && d === b | |
} | |
}() | |
}, {}], | |
9: [function(a, b, c) { | |
"use strict"; | |
function d(a, b, c) {} | |
function e(a, b, c) { | |
Object.defineProperty(a, b, { | |
writable: !1, | |
configurable: !1, | |
value: c | |
}) | |
} | |
var f = ["handshakeVersion", "initAd", "startAd", "stopAd", "skipAd", "resizeAd", "pauseAd", "resumeAd", "expandAd", "collapseAd", "subscribe", "unsubscribe"], | |
g = ["AdLoaded", "AdStarted", "AdStopped", "AdSkipped", "AdSkippableStateChange", "AdSizeChange", "AdLinearChange", "AdDurationChange", "AdExpandedChange", "AdRemainingTimeChange", "AdVolumeChange", "AdImpression", "AdVideoStart", "AdVideoFirstQuartile", "AdVideoMidpoint", "AdVideoThirdQuartile", "AdVideoComplete", "AdClickThru", "AdInteraction", "AdUserAcceptInvitation", "AdUserMinimize", "AdUserClose", "AdPaused", "AdPlaying", "AdLog", "AdError"], | |
h = ["getAdLinear", "getAdWidth", "getAdHeight", "getAdExpanded", "getAdSkippableState", "getAdRemainingTime", "getAdDuration", "getAdVolume", "getAdCompanions", "getAdIcons"], | |
i = ["setAdVolume"]; | |
d.prototype.handshakeVersion = function(a, b) {}, d.prototype.initAd = function(a, b, c, d, e, f, g) {}, d.prototype.startAd = function(a) {}, d.prototype.stopAd = function(a) {}, d.prototype.skipAd = function(a) {}, d.prototype.resizeAd = function(a, b, c, d) {}, d.prototype.pauseAd = function(a) {}, d.prototype.resumeAd = function(a) {}, d.prototype.expandAd = function(a) {}, d.prototype.collapseAd = function(a) {}, d.prototype.subscribe = function(a, b, c) {}, d.prototype.unsubscribe = function(a, b) {}, d.prototype.getAdLinear = function(a) {}, d.prototype.getAdWidth = function(a) {}, d.prototype.getAdHeight = function(a) {}, d.prototype.getAdExpanded = function(a) {}, d.prototype.getAdSkippableState = function(a) {}, d.prototype.getAdRemainingTime = function(a) {}, d.prototype.getAdDuration = function(a) {}, d.prototype.getAdVolume = function(a) {}, d.prototype.getAdCompanions = function(a) {}, d.prototype.getAdIcons = function(a) {}, d.prototype.setAdVolume = function(a, b) {}, e(d, "METHODS", f), e(d, "GETTERS", h), e(d, "SETTERS", i), e(d, "EVENTS", g); | |
var j = f.filter(function(a) { | |
return -1 === ["skipAd"].indexOf(a) | |
}); | |
e(d, "checkVPAIDInterface", function(a) { | |
var b = j.every(function(b) { | |
return "function" == typeof a[b] | |
}); | |
return b | |
}), b.exports = d | |
}, {}], | |
10: [function(a, b, c) { | |
"use strict"; | |
function d(a, b, c, d) { | |
this._isValid = k(a), this._isValid && (this._creative = a, this._el = b, this._videoEl = c, this._iframe = d, this._subscribers = new j, l.setFullSizeStyle(b), e.call(this)) | |
} | |
function e() { | |
if (o.forEach(function(a) { | |
this._creative.subscribe(g.bind(this, a), a) | |
}.bind(this)), this._creative.subscribe(f.bind(this), n), this._videoEl) { | |
var a = this._iframe.contentDocument.documentElement, | |
b = this._videoEl; | |
a.addEventListener("click", function(c) { | |
c.target === a && b.click() | |
}) | |
} | |
} | |
function f(a, b, c) { | |
this._subscribers.triggerSync(n, { | |
url: a, | |
id: b, | |
playerHandles: c | |
}) | |
} | |
function g(a) { | |
this._subscribers.trigger(a, Array.prototype.slice(arguments, 1)) | |
} | |
function h(a, b, c, d) { | |
a ? a(c, d) : c && b.trigger(m, c) | |
} | |
var i = a("./IVPAIDAdUnit"), | |
j = a("./subscriber"), | |
k = i.checkVPAIDInterface, | |
l = a("./utils"), | |
m = (i.METHODS, "AdError"), | |
n = "AdClickThru", | |
o = i.EVENTS.filter(function(a) { | |
return a != n | |
}); | |
d.prototype = Object.create(i.prototype), d.prototype.isValidVPAIDAd = function() { | |
return this._isValid | |
}, i.METHODS.forEach(function(a) { | |
var b = ["subscribe", "unsubscribe", "initAd"]; - 1 === b.indexOf(a) && (d.prototype[a] = function() { | |
var b = i.prototype[a].length, | |
c = Array.prototype.slice.call(arguments), | |
d = b === c.length ? c.pop() : void 0; | |
setTimeout(function() { | |
var b, e = null; | |
try { | |
b = this._creative[a].apply(this._creative, c) | |
} catch (f) { | |
e = f | |
} | |
h(d, this._subscribers, e, b) | |
}.bind(this), 0) | |
}) | |
}), d.prototype.initAd = function(a, b, c, d, e, f, g) { | |
e = e || {}, f = l.extend({ | |
slot: this._el, | |
videoSlot: this._videoEl | |
}, f || {}), setTimeout(function() { | |
var i; | |
try { | |
this._creative.initAd(a, b, c, d, e, f) | |
} catch (j) { | |
i = j | |
} | |
h(g, this._subscribers, i) | |
}.bind(this), 0) | |
}, d.prototype.subscribe = function(a, b, c) { | |
this._subscribers.subscribe(b, a, c) | |
}, d.prototype.unsubscribe = function(a, b) { | |
this._subscribers.unsubscribe(b, a) | |
}, d.prototype.on = d.prototype.subscribe, d.prototype.off = d.prototype.unsubscribe, i.GETTERS.forEach(function(a) { | |
d.prototype[a] = function(b) { | |
setTimeout(function() { | |
var c, d = null; | |
try { | |
c = this._creative[a]() | |
} catch (e) { | |
d = e | |
} | |
h(b, this._subscribers, d, c) | |
}.bind(this), 0) | |
} | |
}), d.prototype.setAdVolume = function(a, b) { | |
setTimeout(function() { | |
var c, d = null; | |
try { | |
this._creative.setAdVolume(a), c = this._creative.getAdVolume() | |
} catch (e) { | |
d = e | |
} | |
d || (d = l.validate(c === a, "failed to apply volume: " + a)), h(b, this._subscribers, d, c) | |
}.bind(this), 0) | |
}, d.prototype._destroy = function() { | |
this.stopAd(), this._subscribers.unsubscribeAll() | |
}, b.exports = d | |
}, { | |
"./IVPAIDAdUnit": 9, | |
"./subscriber": 12, | |
"./utils": 13 | |
}], | |
11: [function(a, b, c) { | |
"use strict"; | |
function d(a, b, c, d) { | |
c = c || {}, this._id = n(), this._destroyed = !1, this._frameContainer = m.createElementInEl(a, "div"), this._videoEl = b, this._vpaidOptions = d || { | |
timeout: 1e4 | |
}, this._templateConfig = { | |
template: c.template || p, | |
extraOptions: c.extraOptions || {} | |
} | |
} | |
function e(a) { | |
var b = this[a]; | |
b && (b.remove(), delete this[a]) | |
} | |
function f() { | |
h.call(this), delete this._adUnit | |
} | |
function g() { | |
h.call(this), j.call(this) | |
} | |
function h() { | |
e.call(this, "_frame"), i.call(this) | |
} | |
function i() { | |
this._onLoad && (window.removeEventListener("message", this._onLoad), m.clearCallbackTimeout(this._onLoad), delete this._onLoad) | |
} | |
function j() { | |
this._adUnit && (this._adUnit.stopAd(), delete this._adUnit) | |
} | |
function k() { | |
if (this._destroyed) throw new Error("VPAIDHTML5Client already destroyed!") | |
} | |
function l() { | |
return window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "") | |
} | |
var m = a("./utils"), | |
n = m.unique("vpaidIframe"), | |
o = a("./VPAIDAdUnit"), | |
p = '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"></head><body style="margin:0;padding:0"><div class="ad-element"></div><script type="text/javascript" src="{{iframeURL_JS}}"></script><script type="text/javascript">window.parent.postMessage(\'{"event": "ready", "id": "{{iframeID}}"}\', \'{{origin}}\');</script></body></html>', | |
q = "AdStopped"; | |
d.prototype.destroy = function() { | |
this._destroyed || (this._destroyed = !0, g.call(this)) | |
}, d.prototype.isDestroyed = function() { | |
return this._destroyed | |
}, d.prototype.loadAdUnit = function(a, b) { | |
function c(a) { | |
if (a.origin === l()) { | |
var c = JSON.parse(a.data); | |
if (c.id === e.getID()) { | |
var d, g, h; | |
if (e._frame.contentWindow ? (h = e._frame.contentWindow.getVPAIDAd, g = m.validate("function" == typeof h, "the ad didn't return a function to create an ad")) : g = "the iframe is not anymore in the DOM tree", !g) { | |
var j = e._frame.contentWindow.document.querySelector(".ad-element"); | |
d = new o(h(), j, e._videoEl, e._frame), d.subscribe(q, f.bind(e)), g = m.validate(d.isValidVPAIDAd(), "the add is not fully complaint with VPAID specification") | |
} | |
return e._adUnit = d, i.call(e), b(g, g ? null : d), !0 | |
} | |
} | |
} | |
function d() { | |
b("timeout", null) | |
} | |
k.call(this), g.call(this); | |
var e = this, | |
h = m.createIframeWithContent(this._frameContainer, this._templateConfig.template, m.extend({ | |
iframeURL_JS: a, | |
iframeID: this.getID(), | |
origin: l() | |
}, this._templateConfig.extraOptions)); | |
this._frame = h, this._onLoad = m.callbackTimeout(this._vpaidOptions.timeout, c.bind(this), d.bind(this)), window.addEventListener("message", this._onLoad) | |
}, d.prototype.unloadAdUnit = function() { | |
g.call(this) | |
}, d.prototype.getID = function() { | |
return this._id | |
}, b.exports = d | |
}, { | |
"./VPAIDAdUnit": 10, | |
"./utils": 13 | |
}], | |
12: [function(a, b, c) { | |
"use strict"; | |
function d() { | |
this._subscribers = {} | |
} | |
d.prototype.subscribe = function(a, b, c) { | |
this.isHandlerAttached(a, b) || this.get(b).push({ | |
handler: a, | |
context: c, | |
eventName: b | |
}) | |
}, d.prototype.unsubscribe = function(a, b) { | |
this._subscribers[b] = this.get(b).filter(function(b) { | |
return a !== b.handler | |
}) | |
}, d.prototype.unsubscribeAll = function() { | |
this._subscribers = {} | |
}, d.prototype.trigger = function(a, b) { | |
var c = this, | |
d = this.get(a).concat(this.get("*")); | |
d.forEach(function(a) { | |
setTimeout(function() { | |
c.isHandlerAttached(a.handler, a.eventName) && a.handler.call(a.context, b) | |
}, 0) | |
}) | |
}, d.prototype.triggerSync = function(a, b) { | |
var c = this.get(a).concat(this.get("*")); | |
c.forEach(function(a) { | |
a.handler.call(a.context, b) | |
}) | |
}, d.prototype.get = function(a) { | |
return this._subscribers[a] || (this._subscribers[a] = []), this._subscribers[a] | |
}, d.prototype.isHandlerAttached = function(a, b) { | |
return this.get(b).some(function(b) { | |
return a === b.handler | |
}) | |
}, b.exports = d | |
}, {}], | |
13: [function(a, b, c) { | |
"use strict"; | |
function d() {} | |
function e(a, b) { | |
return a ? null : new Error(b) | |
} | |
function f(a) { | |
var b = p[a]; | |
b && (clearTimeout(b), | |
delete p[a]) | |
} | |
function g(a, b, c) { | |
var e, g; | |
return g = setTimeout(function() { | |
b = d, delete g[e], c() | |
}, a), e = function() { | |
b.apply(this, arguments) && f(e) | |
}, p[e] = g, e | |
} | |
function h(a, b, c) { | |
var d = document.createElement(b); | |
return c && (d.id = c), a.appendChild(d), d | |
} | |
function i(a, b, c) { | |
var d = j(a, null, c.zIndex); | |
if (m(d, l(b, c))) return d | |
} | |
function j(a, b, c) { | |
var d = document.createElement("iframe"); | |
return d.src = b || "about:blank", d.marginWidth = "0", d.marginHeight = "0", d.frameBorder = "0", d.width = "100%", d.height = "100%", k(d), c && (d.style.zIndex = c), d.setAttribute("SCROLLING", "NO"), a.innerHTML = "", a.appendChild(d), d | |
} | |
function k(a) { | |
a.style.position = "absolute", a.style.left = "0", a.style.top = "0", a.style.margin = "0px", a.style.padding = "0px", a.style.border = "none", a.style.width = "100%", a.style.height = "100%" | |
} | |
function l(a, b) { | |
return Object.keys(b).forEach(function(c) { | |
var d = "object" == typeof d ? JSON.stringify(b[c]) : b[c]; | |
a = a.replace(new RegExp("{{" + c + "}}", "g"), d) | |
}), a | |
} | |
function m(a, b) { | |
var c = a.contentWindow && a.contentWindow.document; | |
return c ? (c.write(b), !0) : !1 | |
} | |
function n(a, b) { | |
return Object.keys(b).forEach(function(c) { | |
a[c] = b[c] | |
}), a | |
} | |
function o(a) { | |
var b = -1; | |
return function() { | |
return a + "_" + ++b | |
} | |
} | |
var p = {}; | |
b.exports = { | |
noop: d, | |
validate: e, | |
clearCallbackTimeout: f, | |
callbackTimeout: g, | |
createElementInEl: h, | |
createIframeWithContent: i, | |
createIframe: j, | |
setFullSizeStyle: k, | |
simpleTemplate: l, | |
setIframeContent: m, | |
extend: n, | |
unique: o | |
} | |
}, {}], | |
14: [function(a, b, c) { | |
! function(a, c) { | |
"function" == typeof define && define.amd ? define(c) : "object" == typeof b && b.exports ? b.exports = c() : a.swfobject = c() | |
}(this, function() { | |
function a() { | |
if (!T && document.getElementsByTagName("body")[0]) { | |
try { | |
var a, b = r("span"); | |
b.style.display = "none", a = M.getElementsByTagName("body")[0].appendChild(b), a.parentNode.removeChild(a), a = null, b = null | |
} catch (c) { | |
return | |
} | |
T = !0; | |
for (var d = P.length, e = 0; d > e; e++) P[e]() | |
} | |
} | |
function b(a) { | |
T ? a() : P[P.length] = a | |
} | |
function c(a) { | |
if (typeof L.addEventListener !== E) L.addEventListener("load", a, !1); | |
else if (typeof M.addEventListener !== E) M.addEventListener("load", a, !1); | |
else if (typeof L.attachEvent !== E) t(L, "onload", a); | |
else if ("function" == typeof L.onload) { | |
var b = L.onload; | |
L.onload = function() { | |
b(), a() | |
} | |
} else L.onload = a | |
} | |
function d() { | |
var a = M.getElementsByTagName("body")[0], | |
b = r(F); | |
b.setAttribute("style", "visibility: hidden;"), b.setAttribute("type", I); | |
var c = a.appendChild(b); | |
if (c) { | |
var d = 0; | |
! function f() { | |
if (typeof c.GetVariable !== E) try { | |
var g = c.GetVariable("$version"); | |
g && (g = g.split(" ")[1].split(","), X.pv = [s(g[0]), s(g[1]), s(g[2])]) | |
} catch (h) { | |
X.pv = [8, 0, 0] | |
} else if (10 > d) return d++, void setTimeout(f, 10); | |
a.removeChild(b), c = null, e() | |
}() | |
} else e() | |
} | |
function e() { | |
var a = Q.length; | |
if (a > 0) | |
for (var b = 0; a > b; b++) { | |
var c = Q[b].id, | |
d = Q[b].callbackFn, | |
e = { | |
success: !1, | |
id: c | |
}; | |
if (X.pv[0] > 0) { | |
var j = q(c); | |
if (j) | |
if (!u(Q[b].swfVersion) || X.wk && X.wk < 312) | |
if (Q[b].expressInstall && g()) { | |
var k = {}; | |
k.data = Q[b].expressInstall, k.width = j.getAttribute("width") || "0", k.height = j.getAttribute("height") || "0", j.getAttribute("class") && (k.styleclass = j.getAttribute("class")), j.getAttribute("align") && (k.align = j.getAttribute("align")); | |
for (var l = {}, m = j.getElementsByTagName("param"), n = m.length, o = 0; n > o; o++) "movie" !== m[o].getAttribute("name").toLowerCase() && (l[m[o].getAttribute("name")] = m[o].getAttribute("value")); | |
h(k, l, c, d) | |
} else i(j), d && d(e); | |
else w(c, !0), d && (e.success = !0, e.ref = f(c), e.id = c, d(e)) | |
} else if (w(c, !0), d) { | |
var p = f(c); | |
p && typeof p.SetVariable !== E && (e.success = !0, e.ref = p, e.id = p.id), d(e) | |
} | |
} | |
} | |
function f(a) { | |
var b = null, | |
c = q(a); | |
return c && "OBJECT" === c.nodeName.toUpperCase() && (b = typeof c.SetVariable !== E ? c : c.getElementsByTagName(F)[0] || c), b | |
} | |
function g() { | |
return !U && u("6.0.65") && (X.win || X.mac) && !(X.wk && X.wk < 312) | |
} | |
function h(a, b, c, d) { | |
var e = q(c); | |
if (c = p(c), U = !0, A = d || null, B = { | |
success: !1, | |
id: c | |
}, e) { | |
"OBJECT" === e.nodeName.toUpperCase() ? (y = j(e), z = null) : (y = e, z = c), a.id = J, (typeof a.width === E || !/%$/.test(a.width) && s(a.width) < 310) && (a.width = "310"), (typeof a.height === E || !/%$/.test(a.height) && s(a.height) < 137) && (a.height = "137"); | |
var f = X.ie ? "ActiveX" : "PlugIn", | |
g = "MMredirectURL=" + encodeURIComponent(L.location.toString().replace(/&/g, "%26")) + "&MMplayerType=" + f + "&MMdoctitle=" + encodeURIComponent(M.title.slice(0, 47) + " - Flash Player Installation"); | |
if (typeof b.flashvars !== E ? b.flashvars += "&" + g : b.flashvars = g, X.ie && 4 != e.readyState) { | |
var h = r("div"); | |
c += "SWFObjectNew", h.setAttribute("id", c), e.parentNode.insertBefore(h, e), e.style.display = "none", n(e) | |
} | |
l(a, b, c) | |
} | |
} | |
function i(a) { | |
if (X.ie && 4 != a.readyState) { | |
a.style.display = "none"; | |
var b = r("div"); | |
a.parentNode.insertBefore(b, a), b.parentNode.replaceChild(j(a), b), n(a) | |
} else a.parentNode.replaceChild(j(a), a) | |
} | |
function j(a) { | |
var b = r("div"); | |
if (X.win && X.ie) b.innerHTML = a.innerHTML; | |
else { | |
var c = a.getElementsByTagName(F)[0]; | |
if (c) { | |
var d = c.childNodes; | |
if (d) | |
for (var e = d.length, f = 0; e > f; f++) 1 == d[f].nodeType && "PARAM" === d[f].nodeName || 8 == d[f].nodeType || b.appendChild(d[f].cloneNode(!0)) | |
} | |
} | |
return b | |
} | |
function k(a, b) { | |
var c = r("div"); | |
return c.innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='" + a + "'>" + b + "</object>", c.firstChild | |
} | |
function l(a, b, c) { | |
var d, e = q(c); | |
if (c = p(c), X.wk && X.wk < 312) return d; | |
if (e) { | |
var f, g, h, i = r(X.ie ? "div" : F); | |
typeof a.id === E && (a.id = c); | |
for (h in b) b.hasOwnProperty(h) && "movie" !== h.toLowerCase() && m(i, h, b[h]); | |
X.ie && (i = k(a.data, i.innerHTML)); | |
for (f in a) a.hasOwnProperty(f) && (g = f.toLowerCase(), "styleclass" === g ? i.setAttribute("class", a[f]) : "classid" !== g && "data" !== g && i.setAttribute(f, a[f])); | |
X.ie ? R[R.length] = a.id : (i.setAttribute("type", I), i.setAttribute("data", a.data)), e.parentNode.replaceChild(i, e), d = i | |
} | |
return d | |
} | |
function m(a, b, c) { | |
var d = r("param"); | |
d.setAttribute("name", b), d.setAttribute("value", c), a.appendChild(d) | |
} | |
function n(a) { | |
var b = q(a); | |
b && "OBJECT" === b.nodeName.toUpperCase() && (X.ie ? (b.style.display = "none", function c() { | |
if (4 == b.readyState) { | |
for (var a in b) "function" == typeof b[a] && (b[a] = null); | |
b.parentNode.removeChild(b) | |
} else setTimeout(c, 10) | |
}()) : b.parentNode.removeChild(b)) | |
} | |
function o(a) { | |
return a && a.nodeType && 1 === a.nodeType | |
} | |
function p(a) { | |
return o(a) ? a.id : a | |
} | |
function q(a) { | |
if (o(a)) return a; | |
var b = null; | |
try { | |
b = M.getElementById(a) | |
} catch (c) {} | |
return b | |
} | |
function r(a) { | |
return M.createElement(a) | |
} | |
function s(a) { | |
return parseInt(a, 10) | |
} | |
function t(a, b, c) { | |
a.attachEvent(b, c), S[S.length] = [a, b, c] | |
} | |
function u(a) { | |
a += ""; | |
var b = X.pv, | |
c = a.split("."); | |
return c[0] = s(c[0]), c[1] = s(c[1]) || 0, c[2] = s(c[2]) || 0, b[0] > c[0] || b[0] == c[0] && b[1] > c[1] || b[0] == c[0] && b[1] == c[1] && b[2] >= c[2] ? !0 : !1 | |
} | |
function v(a, b, c, d) { | |
var e = M.getElementsByTagName("head")[0]; | |
if (e) { | |
var f = "string" == typeof c ? c : "screen"; | |
if (d && (C = null, D = null), !C || D != f) { | |
var g = r("style"); | |
g.setAttribute("type", "text/css"), g.setAttribute("media", f), C = e.appendChild(g), X.ie && typeof M.styleSheets !== E && M.styleSheets.length > 0 && (C = M.styleSheets[M.styleSheets.length - 1]), D = f | |
} | |
C && (typeof C.addRule !== E ? C.addRule(a, b) : typeof M.createTextNode !== E && C.appendChild(M.createTextNode(a + " {" + b + "}"))) | |
} | |
} | |
function w(a, b) { | |
if (V) { | |
var c = b ? "visible" : "hidden", | |
d = q(a); | |
T && d ? d.style.visibility = c : "string" == typeof a && v("#" + a, "visibility:" + c) | |
} | |
} | |
function x(a) { | |
var b = /[\\\"<>\.;]/, | |
c = null !== b.exec(a); | |
return c && typeof encodeURIComponent !== E ? encodeURIComponent(a) : a | |
} | |
var y, z, A, B, C, D, E = "undefined", | |
F = "object", | |
G = "Shockwave Flash", | |
H = "ShockwaveFlash.ShockwaveFlash", | |
I = "application/x-shockwave-flash", | |
J = "SWFObjectExprInst", | |
K = "onreadystatechange", | |
L = window, | |
M = document, | |
N = navigator, | |
O = !1, | |
P = [], | |
Q = [], | |
R = [], | |
S = [], | |
T = !1, | |
U = !1, | |
V = !0, | |
W = !1, | |
X = function() { | |
var a = typeof M.getElementById !== E && typeof M.getElementsByTagName !== E && typeof M.createElement !== E, | |
b = N.userAgent.toLowerCase(), | |
c = N.platform.toLowerCase(), | |
d = c ? /win/.test(c) : /win/.test(b), | |
e = c ? /mac/.test(c) : /mac/.test(b), | |
f = /webkit/.test(b) ? parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : !1, | |
g = "Microsoft Internet Explorer" === N.appName, | |
h = [0, 0, 0], | |
i = null; | |
if (typeof N.plugins !== E && typeof N.plugins[G] === F) i = N.plugins[G].description, i && typeof N.mimeTypes !== E && N.mimeTypes[I] && N.mimeTypes[I].enabledPlugin && (O = !0, g = !1, i = i.replace(/^.*\s+(\S+\s+\S+$)/, "$1"), h[0] = s(i.replace(/^(.*)\..*$/, "$1")), h[1] = s(i.replace(/^.*\.(.*)\s.*$/, "$1")), h[2] = /[a-zA-Z]/.test(i) ? s(i.replace(/^.*[a-zA-Z]+(.*)$/, "$1")) : 0); | |
else if (typeof L.ActiveXObject !== E) try { | |
var j = new ActiveXObject(H); | |
j && (i = j.GetVariable("$version"), i && (g = !0, i = i.split(" ")[1].split(","), h = [s(i[0]), s(i[1]), s(i[2])])) | |
} catch (k) {} | |
return { | |
w3: a, | |
pv: h, | |
wk: f, | |
ie: g, | |
win: d, | |
mac: e | |
} | |
}(); | |
(function() { | |
X.w3 && ((typeof M.readyState !== E && ("complete" === M.readyState || "interactive" === M.readyState) || typeof M.readyState === E && (M.getElementsByTagName("body")[0] || M.body)) && a(), T || (typeof M.addEventListener !== E && M.addEventListener("DOMContentLoaded", a, !1), X.ie && (M.attachEvent(K, function b() { | |
"complete" === M.readyState && (M.detachEvent(K, b), a()) | |
}), L == top && ! function c() { | |
if (!T) { | |
try { | |
M.documentElement.doScroll("left") | |
} catch (b) { | |
return void setTimeout(c, 0) | |
} | |
a() | |
} | |
}()), X.wk && ! function d() { | |
return T ? void 0 : /loaded|complete/.test(M.readyState) ? void a() : void setTimeout(d, 0) | |
}())) | |
})(); | |
P[0] = function() { | |
O ? d() : e() | |
}; | |
(function() { | |
X.ie && window.attachEvent("onunload", function() { | |
for (var a = S.length, b = 0; a > b; b++) S[b][0].detachEvent(S[b][1], S[b][2]); | |
for (var c = R.length, d = 0; c > d; d++) n(R[d]); | |
for (var e in X) X[e] = null; | |
X = null; | |
for (var f in swfobject) swfobject[f] = null; | |
swfobject = null | |
}) | |
})(); | |
return { | |
registerObject: function(a, b, c, d) { | |
if (X.w3 && a && b) { | |
var e = {}; | |
e.id = a, e.swfVersion = b, e.expressInstall = c, e.callbackFn = d, Q[Q.length] = e, w(a, !1) | |
} else d && d({ | |
success: !1, | |
id: a | |
}) | |
}, | |
getObjectById: function(a) { | |
return X.w3 ? f(a) : void 0 | |
}, | |
embedSWF: function(a, c, d, e, f, i, j, k, m, n) { | |
var o = p(c), | |
q = { | |
success: !1, | |
id: o | |
}; | |
X.w3 && !(X.wk && X.wk < 312) && a && c && d && e && f ? (w(o, !1), b(function() { | |
d += "", e += ""; | |
var b = {}; | |
if (m && typeof m === F) | |
for (var p in m) b[p] = m[p]; | |
b.data = a, b.width = d, b.height = e; | |
var r = {}; | |
if (k && typeof k === F) | |
for (var s in k) r[s] = k[s]; | |
if (j && typeof j === F) | |
for (var t in j) | |
if (j.hasOwnProperty(t)) { | |
var v = W ? encodeURIComponent(t) : t, | |
x = W ? encodeURIComponent(j[t]) : j[t]; | |
typeof r.flashvars !== E ? r.flashvars += "&" + v + "=" + x : r.flashvars = v + "=" + x | |
} | |
if (u(f)) { | |
var y = l(b, r, c); | |
b.id == o && w(o, !0), q.success = !0, q.ref = y, q.id = y.id | |
} else { | |
if (i && g()) return b.data = i, void h(b, r, c, n); | |
w(o, !0) | |
} | |
n && n(q) | |
})) : n && n(q) | |
}, | |
switchOffAutoHideShow: function() { | |
V = !1 | |
}, | |
enableUriEncoding: function(a) { | |
W = typeof a === E ? !0 : a | |
}, | |
ua: X, | |
getFlashPlayerVersion: function() { | |
return { | |
major: X.pv[0], | |
minor: X.pv[1], | |
release: X.pv[2] | |
} | |
}, | |
hasFlashPlayerVersion: u, | |
createSWF: function(a, b, c) { | |
return X.w3 ? l(a, b, c) : void 0 | |
}, | |
showExpressInstall: function(a, b, c, d) { | |
X.w3 && g() && h(a, b, c, d) | |
}, | |
removeSWF: function(a) { | |
X.w3 && n(a) | |
}, | |
createCSS: function(a, b, c, d) { | |
X.w3 && v(a, b, c, d) | |
}, | |
addDomLoadEvent: b, | |
addLoadEvent: c, | |
getQueryParamValue: function(a) { | |
var b = M.location.search || M.location.hash; | |
if (b) { | |
if (/\?/.test(b) && (b = b.split("?")[1]), !a) return x(b); | |
for (var c = b.split("&"), d = 0; d < c.length; d++) | |
if (c[d].substring(0, c[d].indexOf("=")) == a) return x(c[d].substring(c[d].indexOf("=") + 1)) | |
} | |
return "" | |
}, | |
expressInstallCallback: function() { | |
if (U) { | |
var a = q(J); | |
a && y && (a.parentNode.replaceChild(y, a), z && (w(z, !0), X.ie && (y.style.display = "block")), A && A(B)), U = !1 | |
} | |
}, | |
version: "2.3" | |
} | |
}) | |
}, {}], | |
15: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return this instanceof d ? void this.initialize(a) : new d(a) | |
} | |
var e = a("./InLine"), | |
f = a("./Wrapper"); | |
d.prototype.initialize = function(a) { | |
this.id = a.attr("id"), this.sequence = a.attr("sequence"), a.inLine && (this.inLine = new e(a.inLine)), a.wrapper && (this.wrapper = new f(a.wrapper)) | |
}, b.exports = d | |
}, { | |
"./InLine": 18, | |
"./Wrapper": 28 | |
}], | |
16: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
function b(a) { | |
var b = []; | |
return f.isDefined(a) && (a = f.isArray(a) ? a : [a], a.forEach(function(a) { | |
b.push(new e(a)) | |
})), b | |
} | |
if (!(this instanceof d)) return new d(a); | |
h.info("<Companion> found companion ad"), h.debug("<Companion> companionJTree:", a), this.creativeType = g.attr(a.staticResource, "creativeType"), this.staticResource = g.keyValue(a.staticResource), h.info("<Companion> creativeType: " + this.creativeType), h.info("<Companion> staticResource: " + this.staticResource); | |
var c = null; | |
g.keyValue(a.HTMLResource) ? c = g.keyValue(a.HTMLResource) : g.keyValue(a.hTMLResource) && (c = g.keyValue(a.hTMLResource)), null !== c && h.info("<Companion> found html resource", c), this.htmlResource = c; | |
var i = null; | |
g.keyValue(a.IFrameResource) ? i = g.keyValue(a.IFrameResource) : g.keyValue(a.iFrameresource) && (i = g.keyValue(a.iFrameresource)), null !== i && h.info("<Companion> found iframe resource", i), this.iframeResource = i, this.id = g.attr(a, "id"), this.width = g.attr(a, "width"), this.height = g.attr(a, "height"), this.expandedWidth = g.attr(a, "expandedWidth"), this.expandedHeight = g.attr(a, "expandedHeight"), this.scalable = g.attr(a, "scalable"), this.maintainAspectRatio = g.attr(a, "maintainAspectRatio"), this.minSuggestedDuration = g.attr(a, "minSuggestedDuration"), this.apiFramework = g.attr(a, "apiFramework"), this.companionClickThrough = g.keyValue(a.companionClickThrough), this.trackingEvents = b(a.trackingEvents && a.trackingEvents.tracking), h.info("<Companion> companionClickThrough: " + this.companionClickThrough) | |
} | |
var e = a("./TrackingEvent"), | |
f = a("../../utils/utilityFunctions"), | |
g = a("../../utils/xml"), | |
h = a("../../utils/consoleLogger"); | |
b.exports = d | |
}, { | |
"../../utils/consoleLogger": 41, | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48, | |
"./TrackingEvent": 21 | |
}], | |
17: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (!(this instanceof d)) return new d(a); | |
if (this.id = a.attr("id"), this.sequence = a.attr("sequence"), this.adId = a.attr("adId"), this.apiFramework = a.attr("apiFramework"), a.linear && (this.linear = new e(a.linear)), a.companionAds) { | |
var b = [], | |
c = a.companionAds && a.companionAds.companion; | |
g.isDefined(c) && (c = g.isArray(c) ? c : [c], c.forEach(function(a) { | |
b.push(new f(a)) | |
})), this.companionAds = b | |
} | |
} | |
var e = a("./Linear"), | |
f = a("./Companion"), | |
g = a("../../utils/utilityFunctions"); | |
d.prototype.isSupported = function() { | |
return this.linear ? this.linear.isSupported() : !0 | |
}, d.parseCreatives = function(a) { | |
var b, c = []; | |
return g.isDefined(a) && g.isDefined(a.creative) && (b = g.isArray(a.creative) ? a.creative : [a.creative], b.forEach(function(a) { | |
c.push(new d(a)) | |
})), c | |
}, b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"./Companion": 16, | |
"./Linear": 19 | |
}], | |
18: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
function b(a) { | |
return a ? g.transformArray(g.isArray(a) ? a : [a], function(a) { | |
return g.isNotEmptyString(a.keyValue) ? { | |
uri: a.keyValue, | |
type: a.attr("type") | |
} : void 0 | |
}) : [] | |
} | |
return this instanceof d ? (this.adTitle = h.keyValue(a.adTitle), this.adSystem = h.keyValue(a.adSystem), this.impressions = e.parseImpressions(a.impression), this.creatives = f.parseCreatives(a.creatives), this.description = h.keyValue(a.description), this.advertiser = h.keyValue(a.advertiser), this.surveys = b(a.survey), this.error = h.keyValue(a.error), this.pricing = h.keyValue(a.pricing), void(this.extensions = a.extensions)) : new d(a) | |
} | |
var e = a("./vastUtil"), | |
f = a("./Creative"), | |
g = a("../../utils/utilityFunctions"), | |
h = a("../../utils/xml"); | |
d.prototype.isSupported = function() { | |
var a, b; | |
if (0 === this.creatives.length) return !1; | |
for (a = 0, b = this.creatives.length; b > a; a += 1) | |
if (!this.creatives[a].isSupported()) return !1; | |
return !0 | |
}, b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48, | |
"./Creative": 17, | |
"./vastUtil": 30 | |
}], | |
19: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
function b(a, b) { | |
var c = []; | |
return h.isDefined(a) && (a = h.isArray(a) ? a : [a], a.forEach(function(a) { | |
c.push(new e(a, b)) | |
})), c | |
} | |
function c(a) { | |
var b = []; | |
return h.isDefined(a) && (a = h.isArray(a) ? a : [a], a.forEach(function(a) { | |
b.push(new f(a)) | |
})), b | |
} | |
return this instanceof d ? (this.duration = i.duration(j.keyValue(a.duration)), this.mediaFiles = c(a.mediaFiles && a.mediaFiles.mediaFile), this.trackingEvents = b(a.trackingEvents && a.trackingEvents.tracking, this.duration), this.skipoffset = i.offset(j.attr(a, "skipoffset"), this.duration), a.videoClicks && (this.videoClicks = new g(a.videoClicks)), void(a.adParameters && (this.adParameters = j.keyValue(a.adParameters), j.attr(a.adParameters, "xmlEncoded") && (this.adParameters = j.decode(this.adParameters))))) : new d(a) | |
} | |
var e = a("./TrackingEvent"), | |
f = a("./MediaFile"), | |
g = a("./VideoClicks"), | |
h = a("../../utils/utilityFunctions"), | |
i = a("./parsers"), | |
j = a("../../utils/xml"); | |
d.prototype.isSupported = function() { | |
var a, b; | |
for (a = 0, b = this.mediaFiles.length; b > a; a += 1) | |
if (this.mediaFiles[a].isSupported()) return !0; | |
return !1 | |
}, b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48, | |
"./MediaFile": 20, | |
"./TrackingEvent": 21, | |
"./VideoClicks": 27, | |
"./parsers": 29 | |
}], | |
20: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (!(this instanceof d)) return new d(a); | |
this.src = e.keyValue(a); | |
for (var b = 0; b < g.length; b++) { | |
var c = g[b]; | |
this[c] = a.attr(c) | |
} | |
} | |
var e = a("../../utils/xml"), | |
f = a("./vastUtil"), | |
g = ["delivery", "type", "width", "height", "codec", "id", "bitrate", "minBitrate", "maxBitrate", "scalable", "maintainAspectRatio", "apiFramework"]; | |
d.prototype.isSupported = function() { | |
return f.isVPAID(this) ? !!f.findSupportedVPAIDTech(this.type) : "video/x-flv" === this.type ? f.isFlashSupported() : !0 | |
}, b.exports = d | |
}, { | |
"../../utils/xml": 48, | |
"./vastUtil": 30 | |
}], | |
21: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
return this instanceof d ? (this.name = a.attr("event"), this.uri = f.keyValue(a), void("progress" === this.name && (this.offset = e.offset(a.attr("offset"), b)))) : new d(a, b) | |
} | |
var e = a("./parsers"), | |
f = a("../../utils/xml"); | |
b.exports = d | |
}, { | |
"../../utils/xml": 48, | |
"./parsers": 29 | |
}], | |
22: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
if (!(this instanceof d)) return new d(a); | |
var b = { | |
WRAPPER_LIMIT: 5 | |
}; | |
a = a || {}, this.settings = k.extend({}, a, b), this.errorURLMacros = [] | |
} | |
var e = a("./Ad"), | |
f = a("./VASTError"), | |
g = a("./VASTResponse"), | |
h = a("./vastUtil"), | |
i = a("../../utils/async"), | |
j = a("../../utils/http").http, | |
k = a("../../utils/utilityFunctions"), | |
l = a("../../utils/xml"), | |
m = a("../../utils/consoleLogger"); | |
d.prototype.getVASTResponse = function(a, b) { | |
function c(a, b) { | |
try { | |
var c = e._buildVASTResponse(a); | |
b(null, c) | |
} catch (d) { | |
b(d) | |
} | |
} | |
function d(a, b) { | |
return a ? k.isFunction(b) ? void 0 : new f("on VASTClient.getVASTResponse, missing callback function") : new f("on VASTClient.getVASTResponse, missing ad tag URL") | |
} | |
var e = this, | |
g = d(a, b); | |
if (g) { | |
if (k.isFunction(b)) return b(g); | |
throw g | |
} | |
i.waterfall([this._getVASTAd.bind(this, a), c], b) | |
}, d.prototype._getVASTAd = function(a, b) { | |
function c(a, b) { | |
var c = p._requestVASTXml.bind(p, a); | |
i.waterfall([c, d], b) | |
} | |
function d(a, b) { | |
var c; | |
try { | |
c = l.toJXONTree(a), m.debug("built JXONTree from VAST response:", c), k.isArray(c.ad) ? c.ads = c.ad : c.ad ? c.ads = [c.ad] : c.ads = [], b(g(c), c) | |
} catch (d) { | |
b(new f("on VASTClient.getVASTAd.buildVastWaterfall, error parsing xml", 100), null) | |
} | |
} | |
function g(a) { | |
var b = l.attr(a, "version"); | |
return a.ad ? b && 3 != b && 2 != b ? new f('on VASTClient.getVASTAd.validateVASTTree, not supported VAST version "' + b + '"', 102) : null : new f("on VASTClient.getVASTAd.validateVASTTree, no Ad in VAST tree", 303) | |
} | |
function h(a, b, c) { | |
return b.length >= p.WRAPPER_LIMIT ? c(new f("on VASTClient.getVASTAd.getAd, players wrapper limit reached (the limit is " + p.WRAPPER_LIMIT + ")", 302), b) : void i.waterfall([function(b) { | |
k.isString(a) ? o(a, b) : b(null, a) | |
}, j], function(a, d) { | |
return d && b.push(d), a ? c(a, b) : d.wrapper ? h(d.wrapper.VASTAdTagURI, b, c) : c(null, b) | |
}) | |
} | |
function j(a, b) { | |
try { | |
var c = new e(a); | |
b(n(c), c) | |
} catch (d) { | |
b(new f("on VASTClient.getVASTAd.buildAd, error parsing xml", 100), null) | |
} | |
} | |
function n(a) { | |
var b = a.wrapper, | |
c = a.inLine, | |
d = "on VASTClient.getVASTAd.validateAd, "; | |
return c && b ? new f(d + "InLine and Wrapper both found on the same Ad", 101) : c || b ? c && !c.isSupported() ? new f(d + "could not find MediaFile that is supported by this video player", 403) : b && !b.VASTAdTagURI ? new f(d + "missing 'VASTAdTagURI' in wrapper", 101) : null : new f(d + "nor wrapper nor inline elements found on the Ad", 101) | |
} | |
function o(a, b) { | |
p._requestVASTXml(a, function(a, c) { | |
if (a) return b(a); | |
try { | |
var d = l.toJXONTree(c); | |
b(g(d), d.ad) | |
} catch (e) { | |
b(new f("on VASTClient.getVASTAd.requestVASTAd, error parsing xml", 100)) | |
} | |
}) | |
} | |
var p = this; | |
c(a, function(a, c) { | |
function d(a, c) { | |
a ? (p._trackError(a, c), e.length > 0 ? h(e.shift(), [], d) : b(a, c)) : b(null, c) | |
} | |
var e = c && k.isArray(c.ads) ? c.ads : null; | |
return a ? (p._trackError(a, e), b(a, e)) : void h(e.shift(), [], d) | |
}) | |
}, d.prototype._requestVASTXml = function(a, b) { | |
function c(a, c, d) { | |
if (a) { | |
var e = k.isDefined(d) ? "on VASTClient.requestVastXML, HTTP request error with status '" + d + "'" : "on VASTClient.requestVastXML, Error getting the the VAST XML with he passed adTagXML fn"; | |
return b(new f(e, 301), null) | |
} | |
b(null, c) | |
} | |
try { | |
k.isFunction(a) ? a(c) : (m.info("requesting adTagUrl: " + a), j.get(a, c, { | |
withCredentials: !0 | |
})) | |
} catch (d) { | |
b(d) | |
} | |
}, d.prototype._buildVASTResponse = function(a) { | |
function b(a, b) { | |
b.forEach(function(b) { | |
a.addAd(b) | |
}) | |
} | |
function c(a) { | |
var b = a.trackingEvents.progress; | |
if (!a.hasLinear()) throw new f("on VASTClient._buildVASTResponse, Received an Ad type that is not supported", 200); | |
if (void 0 === a.duration) throw new f("on VASTClient._buildVASTResponse, Missing duration field in VAST response", 101); | |
b && b.forEach(function(a) { | |
if (!k.isNumber(a.offset)) throw new f("on VASTClient._buildVASTResponse, missing or wrong offset attribute on progress tracking event", 101) | |
}) | |
} | |
var d = new g; | |
return b(d, a), c(d), d | |
}, d.prototype._trackError = function(a, b) { | |
function c(a) { | |
a.wrapper && a.wrapper.error && d.push(a.wrapper.error), a.inLine && a.inLine.error && d.push(a.inLine.error) | |
} | |
if (k.isArray(b) && 0 !== b.length) { | |
var d = []; | |
b.forEach(c), h.track(d, { | |
ERRORCODE: a.code || 900 | |
}) | |
} | |
}, b.exports = d | |
}, { | |
"../../utils/async": 40, | |
"../../utils/consoleLogger": 41, | |
"../../utils/http": 43, | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48, | |
"./Ad": 15, | |
"./VASTError": 23, | |
"./VASTResponse": 25, | |
"./vastUtil": 30 | |
}], | |
23: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
this.message = "VAST Error: " + (a || ""), b && (this.code = b) | |
} | |
d.prototype = new Error, d.prototype.name = "VAST Error", b.exports = d | |
}, {}], | |
24: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return this instanceof d ? void(this.player = a) : new d(a) | |
} | |
var e = a("./VASTResponse"), | |
f = a("./VASTError"), | |
g = a("./VASTTracker"), | |
h = a("./vastUtil"), | |
i = a("../../utils/async"), | |
j = a("../../utils/dom"), | |
k = a("../../utils/playerUtils"), | |
l = a("../../utils/utilityFunctions"), | |
m = a("../../utils/consoleLogger"); | |
d.prototype.playAd = function(a, b) { | |
var c = this; | |
return b = b || l.noop, a instanceof e ? (i.waterfall([function(b) { | |
b(null, a) | |
}, this._selectAdSource.bind(this), this._createVASTTracker.bind(this), this._addClickThrough.bind(this), this._addSkipButton.bind(this), this._setupEvents.bind(this), this._playSelectedAd.bind(this)], function(a, d) { | |
a && d && c._trackError(a, d), b(a, d) | |
}), this._adUnit = { | |
_src: null, | |
type: "VAST", | |
pauseAd: function() { | |
c.player.pause(!0) | |
}, | |
resumeAd: function() { | |
c.player.play(!0) | |
}, | |
isPaused: function() { | |
return c.player.paused(!0) | |
}, | |
getSrc: function() { | |
return this._src | |
} | |
}, this._adUnit) : b(new f("On VASTIntegrator, missing required VASTResponse")) | |
}, d.prototype._selectAdSource = function(a, b) { | |
var c, d = j.getDimension(this.player.el()).width; | |
return a.mediaFiles.sort(function(a, b) { | |
var c = Math.abs(d - a.width), | |
e = Math.abs(d - b.width); | |
return c - e | |
}), (c = this.player.selectSource(a.mediaFiles).source) ? (m.info("selected source: ", c), this._adUnit && (this._adUnit._src = c), b(null, c, a)) : void b(new f("Could not find Ad mediafile supported by this player", 403), a) | |
}, d.prototype._createVASTTracker = function(a, b, c) { | |
try { | |
c(null, a, new g(a.src, b), b) | |
} catch (d) { | |
c(d, b) | |
} | |
}, d.prototype._setupEvents = function(a, b, c, d) { | |
function e() { | |
m.off("fullscreenchange", f), m.off("vast.adStart", i), m.off("pause", g), m.off("timeupdate", h), m.off("volumechange", j) | |
} | |
function f() { | |
m.isFullscreen() ? b.trackFullscreen() : b.trackExitFullscreen() | |
} | |
function g() { | |
Math.abs(m.duration() - m.currentTime()) < 2 || (b.trackPause(), k.once(m, ["play", "vast.adEnd", "vast.adsCancel"], function(a) { | |
"play" === a.type && b.trackResume() | |
})) | |
} | |
function h() { | |
var a = 1e3 * m.currentTime(); | |
b.trackProgress(a) | |
} | |
function i() { | |
b.trackImpressions(), b.trackCreativeView() | |
} | |
function j() { | |
var a = m.muted(); | |
a ? b.trackMute() : l && b.trackUnmute(), l = a | |
} | |
var l, m = this.player; | |
return m.on("fullscreenchange", f), m.on("vast.adStart", i), m.on("pause", g), m.on("timeupdate", h), m.on("volumechange", j), k.once(m, ["vast.adEnd", "vast.adsCancel"], e), k.once(m, ["vast.adEnd", "vast.adsCancel", "vast.adSkip"], function(a) { | |
"vast.adEnd" === a.type && b.trackComplete() | |
}), d(null, a, c) | |
}, d.prototype._addSkipButton = function(a, b, c, d) { | |
function e(a, b) { | |
function c() { | |
a.off("timeupdate", e), j.remove(d) | |
} | |
var d = f(a), | |
e = g.bind(i, d, b, a); | |
a.el().appendChild(d), a.on("timeupdate", e), k.once(a, ["vast.adEnd", "vast.adsCancel"], c) | |
} | |
function f(a) { | |
var c = window.document.createElement("div"); | |
return j.addClass(c, "vast-skip-button"), c.onclick = function(d) { | |
return j.hasClass(c, "enabled") && (b.trackSkip(), a.trigger("vast.adSkip")), void 0 === window.Event.prototype.stopPropagation ? !1 : void d.stopPropagation() | |
}, c | |
} | |
function g(a, b, c) { | |
var d = Math.ceil(b - c.currentTime()); | |
d > 0 ? a.innerHTML = "Skip in " + l.toFixedDigits(d, 2) + "..." : j.hasClass(a, "enabled") || (j.addClass(a, "enabled"), a.innerHTML = "Skip ad") | |
} | |
var h, i = this; | |
l.isNumber(c.skipoffset) && (h = c.skipoffset / 1e3, e(this.player, h)), d(null, a, b, c) | |
}, d.prototype._addClickThrough = function(a, b, c, d) { | |
function e(a, b, c) { | |
var d = window.document.createElement("a"), | |
e = c.clickThrough; | |
return j.addClass(d, "vast-blocker"), d.href = g(e, a), l.isString(e) && (d.target = "_blank"), d.onclick = function(c) { | |
return a.paused() ? (a.play(), void 0 !== window.Event.prototype.stopPropagation && c.stopPropagation(), !1) : (a.pause(), void b.trackClick()) | |
}, d | |
} | |
function f(a, b, c) { | |
a.href = g(b.clickThrough, c) | |
} | |
function g(b, c) { | |
var d = { | |
ASSETURI: a.src, | |
CONTENTPLAYHEAD: h.formatProgress(1e3 * c.currentTime()) | |
}; | |
return b ? h.parseURLMacro(b, d) : "#" | |
} | |
function i() { | |
m.off("timeupdate", o), j.remove(n) | |
} | |
var m = this.player, | |
n = e(m, b, c), | |
o = f.bind(this, n, c, m); | |
return m.el().insertBefore(n, m.controlBar.el()), m.on("timeupdate", o), k.once(m, ["vast.adEnd", "vast.adsCancel"], i), d(null, a, b, c) | |
}, d.prototype._playSelectedAd = function(a, b, c) { | |
function d() { | |
k.once(e, ["playing", "vast.adsCancel"], function(a) { | |
function d(a) { | |
"ended" === a.type && e.duration() - e.currentTime() > 3 || (e.off("ended", d), e.off("vast.adsCancel", d), e.off("vast.adSkip", d), ("ended" === a.type || "vast.adSkip" === a.type) && c(null, b)) | |
} | |
"vast.adsCancel" !== a.type && (m.debug("<VASTIntegrator._playSelectedAd/playAd> got playing event; triggering vast.adStart..."), e.trigger("vast.adStart"), e.on("ended", d), e.on("vast.adsCancel", d), e.on("vast.adSkip", d)) | |
}), m.debug("<VASTIntegrator._playSelectedAd/playAd> calling player.play()..."), e.play() | |
} | |
var e = this.player; | |
e.preload("auto"), e.src(a), m.debug("<VASTIntegrator._playSelectedAd> waiting for durationchange to play the ad..."), k.once(e, ["durationchange", "error", "vast.adsCancel"], function(a) { | |
"durationchange" === a.type ? (m.debug("<VASTIntegrator._playSelectedAd> got durationchange; calling playAd()"), d()) : "error" === a.type && c(new f("on VASTIntegrator, Player is unable to play the Ad", 400), b) | |
}) | |
}, d.prototype._trackError = function(a, b) { | |
h.track(b.errorURLMacros, { | |
ERRORCODE: a.code || 900 | |
}) | |
}, b.exports = d | |
}, { | |
"../../utils/async": 40, | |
"../../utils/consoleLogger": 41, | |
"../../utils/dom": 42, | |
"../../utils/playerUtils": 45, | |
"../../utils/utilityFunctions": 47, | |
"./VASTError": 23, | |
"./VASTResponse": 25, | |
"./VASTTracker": 26, | |
"./vastUtil": 30 | |
}], | |
25: [function(a, b, c) { | |
"use strict"; | |
function d() { | |
return this instanceof d ? (this._linearAdded = !1, this.ads = [], this.errorURLMacros = [], this.impressions = [], this.clickTrackings = [], this.customClicks = [], this.trackingEvents = {}, this.mediaFiles = [], this.clickThrough = void 0, this.adTitle = "", this.duration = void 0, void(this.skipoffset = void 0)) : new d | |
} | |
function e(a, b) { | |
b.forEach(function(b) { | |
a.push(b) | |
}) | |
} | |
var f = a("./Ad"), | |
g = a("./VideoClicks"), | |
h = a("./Linear"), | |
i = a("./InLine"), | |
j = a("./Wrapper"), | |
k = a("../../utils/utilityFunctions"), | |
l = a("../../utils/xml"); | |
window.InLine__A = i, d.prototype.addAd = function(a) { | |
var b, c; | |
a instanceof f && (b = a.inLine, c = a.wrapper, this.ads.push(a), b && this._addInLine(b), c && this._addWrapper(c)) | |
}, d.prototype._addErrorTrackUrl = function(a) { | |
var b = a instanceof l.JXONTree ? l.keyValue(a) : a; | |
b && this.errorURLMacros.push(b) | |
}, d.prototype._addImpressions = function(a) { | |
k.isArray(a) && e(this.impressions, a) | |
}, d.prototype._addClickThrough = function(a) { | |
k.isNotEmptyString(a) && (this.clickThrough = a) | |
}, d.prototype._addClickTrackings = function(a) { | |
k.isArray(a) && e(this.clickTrackings, a) | |
}, d.prototype._addCustomClicks = function(a) { | |
k.isArray(a) && e(this.customClicks, a) | |
}, d.prototype._addTrackingEvents = function(a) { | |
var b = this.trackingEvents; | |
a && (a = k.isArray(a) ? a : [a], a.forEach(function(a) { | |
b[a.name] || (b[a.name] = []), b[a.name].push(a) | |
})) | |
}, d.prototype._addTitle = function(a) { | |
k.isNotEmptyString(a) && (this.adTitle = a) | |
}, d.prototype._addDuration = function(a) { | |
k.isNumber(a) && (this.duration = a) | |
}, d.prototype._addVideoClicks = function(a) { | |
a instanceof g && (this._addClickThrough(a.clickThrough), this._addClickTrackings(a.clickTrackings), this._addCustomClicks(a.customClicks)) | |
}, d.prototype._addMediaFiles = function(a) { | |
k.isArray(a) && e(this.mediaFiles, a) | |
}, d.prototype._addSkipoffset = function(a) { | |
a && (this.skipoffset = a) | |
}, d.prototype._addAdParameters = function(a) { | |
a && (this.adParameters = a) | |
}, d.prototype._addLinear = function(a) { | |
a instanceof h && (this._addDuration(a.duration), this._addTrackingEvents(a.trackingEvents), this._addVideoClicks(a.videoClicks), this._addMediaFiles(a.mediaFiles), this._addSkipoffset(a.skipoffset), this._addAdParameters(a.adParameters), this._linearAdded = !0) | |
}, d.prototype._addInLine = function(a) { | |
var b = this; | |
a instanceof i && (this._addTitle(a.adTitle), this._addErrorTrackUrl(a.error), this._addImpressions(a.impressions), a.creatives.forEach(function(a) { | |
a.linear && b._addLinear(a.linear) | |
})) | |
}, d.prototype._addWrapper = function(a) { | |
var b = this; | |
a instanceof j && (this._addErrorTrackUrl(a.error), this._addImpressions(a.impressions), a.creatives.forEach(function(a) { | |
var c = a.linear; | |
c && (b._addVideoClicks(c.videoClicks), b.clickThrough = void 0, b._addTrackingEvents(c.trackingEvents)) | |
})) | |
}, d.prototype.hasLinear = function() { | |
return this._linearAdded | |
}, b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48, | |
"./Ad": 15, | |
"./InLine": 18, | |
"./Linear": 19, | |
"./VideoClicks": 27, | |
"./Wrapper": 28 | |
}], | |
26: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
return this instanceof d ? (this.sanityCheck(a, b), void this.initialize(a, b)) : new d(a, b) | |
} | |
var e = a("./VASTError"), | |
f = a("./VASTResponse"), | |
g = a("./vastUtil"), | |
h = a("../../utils/utilityFunctions"); | |
d.prototype.initialize = function(a, b) { | |
this.response = b, this.assetURI = a, this.progress = 0, this.quartiles = { | |
firstQuartile: { | |
tracked: !1, | |
time: Math.round(25 * b.duration) / 100 | |
}, | |
midpoint: { | |
tracked: !1, | |
time: Math.round(50 * b.duration) / 100 | |
}, | |
thirdQuartile: { | |
tracked: !1, | |
time: Math.round(75 * b.duration) / 100 | |
} | |
} | |
}, d.prototype.sanityCheck = function(a, b) { | |
if (!h.isString(a) || h.isEmptyString(a)) throw new e("on VASTTracker constructor, missing required the URI of the ad asset being played"); | |
if (!(b instanceof f)) throw new e("on VASTTracker constructor, missing required VAST response") | |
}, d.prototype.trackURLs = function(a, b) { | |
h.isArray(a) && a.length > 0 && (b = h.extend({ | |
ASSETURI: this.assetURI, | |
CONTENTPLAYHEAD: g.formatProgress(this.progress) | |
}, b || {}), g.track(a, b)) | |
}, d.prototype.trackEvent = function(a, b) { | |
function c(a) { | |
var b; | |
return a && (b = [], a.forEach(function(a) { | |
a.uri && b.push(a.uri) | |
})), b | |
} | |
this.trackURLs(c(this.response.trackingEvents[a])), b && (this.response.trackingEvents[a] = void 0) | |
}, d.prototype.trackProgress = function(a) { | |
function b(b, c) { | |
var d = 3e3; | |
return b > a && Math.abs(c - b) > d | |
} | |
function c(a, b, c) { | |
m[a] && c && j.push({ | |
name: a, | |
trackOnce: !!b | |
}) | |
} | |
function d(a) { | |
function b(a, b) { | |
var f = d[a]; | |
e(f, b) && (f.tracked = !0, c(a, k, !0)) | |
} | |
var d = i.quartiles, | |
f = i.quartiles.firstQuartile, | |
g = i.quartiles.midpoint, | |
h = i.quartiles.thirdQuartile; | |
f.tracked ? g.tracked ? h.tracked || b("thirdQuartile", a) : b("midpoint", a) : b("firstQuartile", a) | |
} | |
function e(a, b) { | |
var c = a.time; | |
return b >= c && c + 5e3 >= b | |
} | |
function f(a) { | |
if (h.isArray(m.progress)) { | |
var b = []; | |
m.progress.forEach(function(c) { | |
c.offset <= a ? i.trackURLs([c.uri]) : b.push(c) | |
}), m.progress = b | |
} | |
} | |
function g() { | |
j.forEach(function(a) { | |
i.trackEvent(a.name, a.trackOnce) | |
}) | |
} | |
var i = this, | |
j = [], | |
k = !0, | |
l = !1, | |
m = this.response.trackingEvents; | |
h.isNumber(a) && (c("start", k, a > 0), c("rewind", l, b(this.progress, a)), d(a), f(a), g(), this.progress = a) | |
}, ["rewind", "fullscreen", "exitFullscreen", "pause", "resume", "mute", "unmute", "acceptInvitation", "acceptInvitationLinear", "collapse", "expand"].forEach(function(a) { | |
d.prototype["track" + h.capitalize(a)] = function() { | |
this.trackEvent(a) | |
} | |
}), ["start", "skip", "close", "closeLinear"].forEach(function(a) { | |
d.prototype["track" + h.capitalize(a)] = function() { | |
this.trackEvent(a, !0) | |
} | |
}), ["firstQuartile", "midpoint", "thirdQuartile"].forEach(function(a) { | |
d.prototype["track" + h.capitalize(a)] = function() { | |
this.quartiles[a].tracked = !0, this.trackEvent(a, !0) | |
} | |
}), d.prototype.trackComplete = function() { | |
this.quartiles.thirdQuartile.tracked && this.trackEvent("complete", !0) | |
}, d.prototype.trackErrorWithCode = function(a) { | |
h.isNumber(a) && this.trackURLs(this.response.errorURLMacros, { | |
ERRORCODE: a | |
}) | |
}, d.prototype.trackImpressions = function() { | |
this.trackURLs(this.response.impressions) | |
}, d.prototype.trackCreativeView = function() { | |
this.trackEvent("creativeView") | |
}, d.prototype.trackClick = function() { | |
this.trackURLs(this.response.clickTrackings) | |
}, b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"./VASTError": 23, | |
"./VASTResponse": 25, | |
"./vastUtil": 30 | |
}], | |
27: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
function b(a) { | |
var b = []; | |
return a && (a = e.isArray(a) ? a : [a], a.forEach(function(a) { | |
b.push(f.keyValue(a)) | |
})), b | |
} | |
return this instanceof d ? (this.clickThrough = f.keyValue(a.clickThrough), this.clickTrackings = b(a.clickTracking), void(this.customClicks = b(a.customClick))) : new d(a) | |
} | |
var e = a("../../utils/utilityFunctions"), | |
f = a("../../utils/xml"); | |
b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48 | |
}], | |
28: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return this instanceof d ? (this.adSystem = h.keyValue(a.adSystem), this.impressions = e.parseImpressions(a.impression), this.VASTAdTagURI = h.keyValue(a.vASTAdTagURI), this.creatives = f.parseCreatives(a.creatives), this.error = h.keyValue(a.error), this.extensions = a.extensions, this.followAdditionalWrappers = g.isDefined(h.attr(a, "followAdditionalWrappers")) ? h.attr(a, "followAdditionalWrappers") : !0, this.allowMultipleAds = h.attr(a, "allowMultipleAds"), void(this.fallbackOnNoAd = h.attr(a, "fallbackOnNoAd"))) : new d(a) | |
} | |
var e = a("./vastUtil"), | |
f = a("./Creative"), | |
g = a("../../utils/utilityFunctions"), | |
h = a("../../utils/xml"); | |
b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../../utils/xml": 48, | |
"./Creative": 17, | |
"./vastUtil": 30 | |
}], | |
29: [function(a, b, c) { | |
"use strict"; | |
var d = a("../../utils/utilityFunctions"), | |
e = /(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/, | |
f = { | |
duration: function(a) { | |
function b(a) { | |
return 60 * parseInt(a, 10) * 60 * 1e3 | |
} | |
function c(a) { | |
return 60 * parseInt(a, 10) * 1e3 | |
} | |
function f(a) { | |
return 1e3 * parseInt(a, 10) | |
} | |
var g, h; | |
return d.isString(a) && (g = a.match(e), g && (h = b(g[1]) + c(g[2]) + f(g[3]) + parseInt(g[5] || 0))), isNaN(h) ? null : h | |
}, | |
offset: function(a, b) { | |
function c(a) { | |
var b = /^\d+(\.\d+)?%$/g; | |
return b.test(a) | |
} | |
function d(a, b) { | |
return b ? e(b, parseFloat(a.replace("%", ""))) : null | |
} | |
function e(a, b) { | |
return a * b / 100 | |
} | |
return c(a) ? d(a, b) : f.duration(a) | |
} | |
}; | |
b.exports = f | |
}, { | |
"../../utils/utilityFunctions": 47 | |
}], | |
30: [function(a, b, c) { | |
"use strict"; | |
var d = a("../../utils/utilityFunctions"), | |
e = a("../vpaid/VPAIDHTML5Tech"), | |
f = a("../vpaid/VPAIDFlashTech"), | |
g = a("VPAIDFLASHClient/js/VPAIDFLASHClient"), | |
h = { | |
track: function(a, b) { | |
var c = h.parseURLMacros(a, b), | |
d = []; | |
return c.forEach(function(a) { | |
var b = new Image; | |
b.src = a, d.push(b) | |
}), d | |
}, | |
parseURLMacros: function(a, b) { | |
var c = []; | |
return b = b || {}, b.CACHEBUSTING || (b.CACHEBUSTING = Math.round(1e10 * Math.random())), a.forEach(function(a) { | |
c.push(h._parseURLMacro(a, b)) | |
}), c | |
}, | |
parseURLMacro: function(a, b) { | |
return b = b || {}, b.CACHEBUSTING || (b.CACHEBUSTING = Math.round(1e10 * Math.random())), h._parseURLMacro(a, b) | |
}, | |
_parseURLMacro: function(a, b) { | |
return b = b || {}, d.forEach(b, function(b, c) { | |
a = a.replace(new RegExp("\\[" + c + "\\]", "gm"), b) | |
}), a | |
}, | |
parseDuration: function(a) { | |
function b(a) { | |
return 60 * parseInt(a, 10) * 60 * 1e3 | |
} | |
function c(a) { | |
return 60 * parseInt(a, 10) * 1e3 | |
} | |
function e(a) { | |
return 1e3 * parseInt(a, 10) | |
} | |
var f, g, h = /(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/; | |
return d.isString(a) && (f = a.match(h), f && (g = b(f[1]) + c(f[2]) + e(f[3]) + parseInt(f[5] || 0))), isNaN(g) ? null : g | |
}, | |
parseImpressions: function(a) { | |
return a ? (a = d.isArray(a) ? a : [a], d.transformArray(a, function(a) { | |
return d.isNotEmptyString(a.keyValue) ? a.keyValue : void 0 | |
})) : [] | |
}, | |
formatProgress: function(a) { | |
var b, c, e, f; | |
return b = a / 36e5, b = Math.floor(b), c = a / 6e4 % 60, c = Math.floor(c), e = a / 1e3 % 60, e = Math.floor(e), f = a % 1e3, d.toFixedDigits(b, 2) + ":" + d.toFixedDigits(c, 2) + ":" + d.toFixedDigits(e, 2) + "." + d.toFixedDigits(f, 3) | |
}, | |
parseOffset: function(a, b) { | |
function c(a) { | |
var b = /^\d+(\.\d+)?%$/g; | |
return b.test(a) | |
} | |
function d(a, b) { | |
return b ? e(b, parseFloat(a.replace("%", ""))) : null | |
} | |
function e(a, b) { | |
return a * b / 100 | |
} | |
return c(a) ? d(a, b) : h.parseDuration(a) | |
}, | |
VPAID_techs: [f, e], | |
isVPAID: function(a) { | |
return !!a && "VPAID" === a.apiFramework | |
}, | |
findSupportedVPAIDTech: function(a) { | |
var b, c, d; | |
for (b = 0, c = this.VPAID_techs.length; c > b; b += 1) | |
if (d = this.VPAID_techs[b], d.supports(a)) return d; | |
return null | |
}, | |
isFlashSupported: function() { | |
return g.isSupported() | |
}, | |
runFlashSupportCheck: function(a) { | |
g.runFlashTest({ | |
data: a | |
}) | |
} | |
}; | |
b.exports = h | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../vpaid/VPAIDFlashTech": 32, | |
"../vpaid/VPAIDHTML5Tech": 33, | |
"VPAIDFLASHClient/js/VPAIDFLASHClient": 3 | |
}], | |
31: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
function c(a, b) { | |
if (!a || !d.checkVPAIDInterface(a)) throw new e("on VPAIDAdUnitWrapper, the passed VPAID adUnit does not fully implement the VPAID interface"); | |
if (!f.isObject(b)) throw new e("on VPAIDAdUnitWrapper, expected options hash but got '" + b + "'"); | |
if (!("responseTimeout" in b && f.isNumber(b.responseTimeout))) throw new e("on VPAIDAdUnitWrapper, expected responseTimeout in options") | |
} | |
return this instanceof d ? (c(a, b), this.options = f.extend({}, b), void(this._adUnit = a)) : new d(a, b) | |
} | |
var e = a("../vast/VASTError"), | |
f = a("../../utils/utilityFunctions"); | |
d.checkVPAIDInterface = function(a) { | |
function b(a) { | |
return f.isFunction(a.subscribe) || f.isFunction(a.addEventListener) || f.isFunction(a.on) | |
} | |
function c(a) { | |
return f.isFunction(a.unsubscribe) || f.isFunction(a.removeEventListener) || f.isFunction(a.off) | |
} | |
for (var d = ["handshakeVersion", "initAd", "startAd", "stopAd", "resizeAd", "pauseAd", "expandAd", "collapseAd"], e = 0, g = d.length; g > e; e++) | |
if (!a || !f.isFunction(a[d[e]])) return !1; | |
return b(a) && c(a) | |
}, d.prototype.adUnitAsyncCall = function() { | |
function a(a, b, c) { | |
if (!f.isString(a) || !f.isFunction(c[a])) throw new e("on VPAIDAdUnitWrapper.adUnitAsyncCall, invalid method name"); | |
if (!f.isFunction(b)) throw new e("on VPAIDAdUnitWrapper.adUnitAsyncCall, missing callback") | |
} | |
function b() { | |
return function() { | |
c && clearTimeout(c), h.apply(this, arguments) | |
} | |
} | |
var c, d = f.arrayLikeObjToArray(arguments), | |
g = d.shift(), | |
h = d.pop(); | |
a(g, h, this._adUnit), d.push(b()), this._adUnit[g].apply(this._adUnit, d), c = setTimeout(function() { | |
c = null, h(new e("on VPAIDAdUnitWrapper, timeout while waiting for a response on call '" + g + "'")), h = f.noop | |
}, this.options.responseTimeout) | |
}, d.prototype.on = function(a, b) { | |
var c = this._adUnit.addEventListener || this._adUnit.subscribe || this._adUnit.on; | |
c.call(this._adUnit, a, b) | |
}, d.prototype.off = function(a, b) { | |
var c = this._adUnit.removeEventListener || this._adUnit.unsubscribe || this._adUnit.off; | |
c.call(this._adUnit, a, b) | |
}, d.prototype.waitForEvent = function(a, b, c) { | |
function d(a, b) { | |
if (!f.isString(a)) throw new e("on VPAIDAdUnitWrapper.waitForEvent, missing evt name"); | |
if (!f.isFunction(b)) throw new e("on VPAIDAdUnitWrapper.waitForEvent, missing callback") | |
} | |
function g() { | |
var a = f.arrayLikeObjToArray(arguments); | |
h && (clearTimeout(h), h = null), a.unshift(null), b.apply(c, a) | |
} | |
var h; | |
d(a, b), c = c || null, this.on(a, g), h = setTimeout(function() { | |
b(new e("on VPAIDAdUnitWrapper.waitForEvent, timeout while waiting for event '" + a + "'")), h = null, b = f.noop | |
}, this.options.responseTimeout) | |
}, d.prototype.handshakeVersion = function(a, b) { | |
this.adUnitAsyncCall("handshakeVersion", a, b) | |
}, d.prototype.initAd = function(a, b, c, d, e, f) { | |
this.waitForEvent("AdLoaded", f), this._adUnit.initAd(a, b, c, d, e) | |
}, d.prototype.resizeAd = function(a, b, c, d) { | |
this.adUnitAsyncCall("resizeAd", a, b, c, d) | |
}, d.prototype.startAd = function(a) { | |
this.waitForEvent("AdStarted", a), this._adUnit.startAd() | |
}, d.prototype.stopAd = function(a) { | |
this.waitForEvent("AdStopped", a), this._adUnit.stopAd() | |
}, d.prototype.pauseAd = function(a) { | |
this.waitForEvent("AdPaused", a), this._adUnit.pauseAd() | |
}, d.prototype.resumeAd = function(a) { | |
this.waitForEvent("AdPlaying", a), this._adUnit.resumeAd() | |
}, d.prototype.expandAd = function(a) { | |
this.waitForEvent("AdExpandedChange", a), this._adUnit.expandAd() | |
}, d.prototype.collapseAd = function(a) { | |
this.waitForEvent("AdExpandedChange", a), this._adUnit.collapseAd() | |
}, d.prototype.skipAd = function(a) { | |
this.waitForEvent("AdSkipped", a), this._adUnit.skipAd() | |
}, ["adLinear", "adWidth", "adHeight", "adExpanded", "adSkippableState", "adRemainingTime", "adDuration", "adVolume", "adCompanions", "adIcons"].forEach(function(a) { | |
var b = "get" + f.capitalize(a); | |
d.prototype[b] = function(a) { | |
this.adUnitAsyncCall(b, a) | |
} | |
}), d.prototype.setAdVolume = function(a, b) { | |
this.adUnitAsyncCall("setAdVolume", a, b) | |
}, b.exports = d | |
}, { | |
"../../utils/utilityFunctions": 47, | |
"../vast/VASTError": 23 | |
}], | |
32: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
function c(a) { | |
if (!a || !h.isString(a.src)) throw new f("on VPAIDFlashTech, invalid MediaFile") | |
} | |
return this instanceof d ? (c(a), this.name = "vpaid-flash", this.mediaFile = a, this.containerEl = null, this.vpaidFlashClient = null, void(this.settings = b)) : new d(a) | |
} | |
var e = a("../../utils/mimetypes"), | |
f = a("../vast/VASTError"), | |
g = a("VPAIDFLASHClient/js/VPAIDFLASHClient"), | |
h = a("../../utils/utilityFunctions"), | |
i = a("../../utils/dom"), | |
j = a("../../utils/consoleLogger"); | |
d.VPAIDFLASHClient = g, d.supports = function(a) { | |
return e.flash.indexOf(a) > -1 && d.VPAIDFLASHClient.isSupported() | |
}, d.prototype.loadAdUnit = function(a, b, c) { | |
function e(a, b) { | |
if (!i.isDomElement(a)) throw new f("on VPAIDFlashTech.loadAdUnit, invalid dom container element"); | |
if (!h.isFunction(b)) throw new f("on VPAIDFlashTech.loadAdUnit, missing valid callback") | |
} | |
var g = this, | |
k = this.settings && this.settings.vpaidFlashLoaderPath ? { | |
data: this.settings.vpaidFlashLoaderPath | |
} : void 0; | |
e(a, c), this.containerEl = a, j.debug("<VPAIDFlashTech.loadAdUnit> loading VPAIDFLASHClient with opts:", k), this.vpaidFlashClient = new d.VPAIDFLASHClient(a, function(a) { | |
return a ? c(a) : (j.info("<VPAIDFlashTech.loadAdUnit> calling VPAIDFLASHClient.loadAdUnit(); that.mediaFile:", g.mediaFile), void g.vpaidFlashClient.loadAdUnit(g.mediaFile.src, c)) | |
}, k) | |
}, d.prototype.unloadAdUnit = function() { | |
if (this.vpaidFlashClient) { | |
try { | |
this.vpaidFlashClient.destroy() | |
} catch (a) { | |
j.error("VAST ERROR: trying to unload the VPAID adunit") | |
} | |
this.vpaidFlashClient = null | |
} | |
this.containerEl && (i.remove(this.containerEl), this.containerEl = null) | |
}, b.exports = d | |
}, { | |
"../../utils/consoleLogger": 41, | |
"../../utils/dom": 42, | |
"../../utils/mimetypes": 44, | |
"../../utils/utilityFunctions": 47, | |
"../vast/VASTError": 23, | |
"VPAIDFLASHClient/js/VPAIDFLASHClient": 3 | |
}], | |
33: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
function b(a) { | |
if (!a || !h.isString(a.src)) throw new f(d.INVALID_MEDIA_FILE) | |
} | |
return this instanceof d ? (b(a), this.name = "vpaid-html5", this.containerEl = null, this.videoEl = null, this.vpaidHTMLClient = null, void(this.mediaFile = a)) : new d(a) | |
} | |
var e = a("../../utils/mimetypes"), | |
f = a("../vast/VASTError"), | |
g = a("VPAIDHTML5Client/js/VPAIDHTML5Client"), | |
h = a("../../utils/utilityFunctions"), | |
i = a("../../utils/dom"), | |
j = a("../../utils/consoleLogger"); | |
d.VPAIDHTML5Client = g, d.supports = function(a) { | |
return !h.isOldIE() && e.html5.indexOf(a) > -1 | |
}, d.prototype.loadAdUnit = function(a, b, c) { | |
function e(a, b, c) { | |
if (!i.isDomElement(a)) throw new f(d.INVALID_DOM_CONTAINER_EL); | |
if (!i.isDomElement(b) || "video" !== b.tagName.toLowerCase()) throw new f(d.INVALID_DOM_CONTAINER_EL); | |
if (!h.isFunction(c)) throw new f(d.MISSING_CALLBACK) | |
} | |
e(a, b, c), this.containerEl = a, this.videoEl = b, this.vpaidHTMLClient = new d.VPAIDHTML5Client(a, b, {}), this.vpaidHTMLClient.loadAdUnit(this.mediaFile.src, c) | |
}, d.prototype.unloadAdUnit = function() { | |
if (this.vpaidHTMLClient) { | |
try { | |
this.vpaidHTMLClient.destroy() | |
} catch (a) { | |
j.error("VAST ERROR: trying to unload the VPAID adunit") | |
} | |
this.vpaidHTMLClient = null | |
} | |
this.containerEl && (i.remove(this.containerEl), this.containerEl = null) | |
}; | |
var k = "on VPAIDHTML5Tech"; | |
d.INVALID_MEDIA_FILE = k + ", invalid MediaFile", d.INVALID_DOM_CONTAINER_EL = k + ", invalid container HtmlElement", d.INVALID_DOM_VIDEO_EL = k + ", invalid HTMLVideoElement", d.MISSING_CALLBACK = k + ", missing valid callback", b.exports = d | |
}, { | |
"../../utils/consoleLogger": 41, | |
"../../utils/dom": 42, | |
"../../utils/mimetypes": 44, | |
"../../utils/utilityFunctions": 47, | |
"../vast/VASTError": 23, | |
"VPAIDHTML5Client/js/VPAIDHTML5Client": 11 | |
}], | |
34: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
function c() { | |
var b = document.createElement("div"); | |
return n.addClass(b, "VPAID-container"), a.el().insertBefore(b, a.controlBar.el()), b | |
} | |
return this instanceof d ? (this.VIEW_MODE = { | |
NORMAL: "normal", | |
FULLSCREEN: "fullscreen", | |
THUMBNAIL: "thumbnail" | |
}, this.player = a, this.containerEl = c(a), this.options = { | |
responseTimeout: 5e3, | |
VPAID_VERSION: "2.0" | |
}, void(this.settings = b)) : new d(a) | |
} | |
function e(a, b, c) { | |
var d = a.el().querySelector(".vjs-tech"), | |
e = n.getDimension(d), | |
g = a.isFullscreen() ? c.FULLSCREEN : c.NORMAL; | |
b.resizeAd(e.width, e.height, g, f) | |
} | |
function f(a) { | |
a && q.error("ERROR: " + a.message, a) | |
} | |
var g = a("../../utils/mimetypes"), | |
h = a("../vast/VASTError"), | |
i = a("../vast/VASTResponse"), | |
j = a("../vast/VASTTracker"), | |
k = a("../vast/vastUtil"), | |
l = a("./VPAIDAdUnitWrapper"), | |
m = a("../../utils/async"), | |
n = a("../../utils/dom"), | |
o = a("../../utils/playerUtils"), | |
p = a("../../utils/utilityFunctions"), | |
q = a("../../utils/consoleLogger"); | |
d.prototype.playAd = function(a, b) { | |
function c(a, c, d) { | |
a && d && f._trackError(d, a.code), g.trigger("vpaid.adEnd"), b(a, d) | |
} | |
function d() { | |
g.trigger("vpaid.adEnd") | |
} | |
function e() { | |
j && j.unloadAdUnit(), n.removeClass(g.el(), "vjs-vpaid-ad") | |
} | |
if (!(a instanceof i)) return b(new h("on VASTIntegrator.playAd, missing required VASTResponse")); | |
var f = this, | |
g = this.player; | |
q.debug("<VPAIDIntegrator.playAd> looking for supported tech..."); | |
var j = this._findSupportedTech(a, this.settings); | |
if (b = b || p.noop, this._adUnit = null, n.addClass(g.el(), "vjs-vpaid-ad"), g.on("vast.adsCancel", d), g.one("vpaid.adEnd", function() { | |
g.off("vast.adsCancel", d), e() | |
}), j) q.info("<VPAIDIntegrator.playAd> found tech: ", j), m.waterfall([function(b) { | |
b(null, j, a) | |
}, this._loadAdUnit.bind(this), this._playAdUnit.bind(this), this._finishPlaying.bind(this)], c), this._adUnit = { | |
_paused: !0, | |
type: "VPAID", | |
pauseAd: function() { | |
g.trigger("vpaid.pauseAd"), g.pause(!0) | |
}, | |
resumeAd: function() { | |
g.trigger("vpaid.resumeAd") | |
}, | |
isPaused: function() { | |
return this._paused | |
}, | |
getSrc: function() { | |
return j.mediaFile | |
} | |
}; | |
else { | |
q.debug("<VPAIDIntegrator.playAd> could not find suitable tech"); | |
var k = new h("on VPAIDIntegrator.playAd, could not find a supported mediaFile", 403); | |
c(k, this._adUnit, a) | |
} | |
return this._adUnit | |
}, d.prototype._findSupportedTech = function(a, b) { | |
if (!(a instanceof i)) return null; | |
var c, d, e, f, h, j = a.mediaFiles.filter(k.isVPAID), | |
l = b && b.preferredTech, | |
m = []; | |
for (c = 0, d = j.length; d > c; c += 1) | |
if (e = j[c], f = k.findSupportedVPAIDTech(e.type)) { | |
if (h = l ? e.type === l || g[l] && g[l].indexOf(e.type) > -1 : !1) return new f(e, b); | |
m.push({ | |
mediaFile: e, | |
tech: f | |
}) | |
} | |
if (m.length) { | |
var n = m[0]; | |
return new n.tech(n.mediaFile, b) | |
} | |
return null | |
}, d.prototype._createVPAIDAdUnitWrapper = function(a, b, c) { | |
return new l(a, { | |
src: b, | |
responseTimeout: c | |
}) | |
}, d.prototype._loadAdUnit = function(a, b, c) { | |
var d = this, | |
e = this.player, | |
f = e.el().querySelector(".vjs-tech"), | |
g = this.settings.responseTimeout || this.options.responseTimeout; | |
a.loadAdUnit(this.containerEl, f, function(f, h) { | |
if (f) return c(f, h, b); | |
try { | |
var i = d._createVPAIDAdUnitWrapper(h, a.mediaFile.src, g), | |
j = "vjs-" + a.name + "-ad"; | |
n.addClass(e.el(), j), e.one("vpaid.adEnd", function() { | |
n.removeClass(e.el(), j) | |
}), c(null, i, b) | |
} catch (k) { | |
c(k, h, b) | |
} | |
}) | |
}, d.prototype._playAdUnit = function(a, b, c) { | |
m.waterfall([function(c) { | |
c(null, a, b) | |
}, this._handshake.bind(this), this._initAd.bind(this), this._setupEvents.bind(this), this._addSkipButton.bind(this), this._linkPlayerControls.bind(this), this._startAd.bind(this)], c) | |
}, d.prototype._handshake = function(a, b, c) { | |
function d(a) { | |
var b = e(a); | |
return b >= 1 && 2 >= b | |
} | |
function e(a) { | |
var b = a.split("."); | |
return parseInt(b[0], 10) | |
} | |
a.handshakeVersion(this.options.VPAID_VERSION, function(e, f) { | |
return e ? c(e, a, b) : f && d(f) ? c(null, a, b) : c(new h('on VPAIDIntegrator._handshake, unsupported version "' + f + '"'), a, b) | |
}) | |
}, d.prototype._initAd = function(a, b, c) { | |
var d = this.player.el().querySelector(".vjs-tech"), | |
e = n.getDimension(d); | |
a.initAd(e.width, e.height, this.VIEW_MODE.NORMAL, -1, { | |
AdParameters: b.adParameters || "" | |
}, function(d) { | |
c(d, a, b) | |
}) | |
}, d.prototype._createVASTTracker = function(a, b) { | |
return new j(a, b) | |
}, d.prototype._setupEvents = function(a, b, c) { | |
function d() { | |
m._adUnit && m._adUnit.isPaused() && (m._adUnit._paused = !1), l.trigger("play") | |
} | |
function f() { | |
m._adUnit && (m._adUnit._paused = !0), l.trigger("pause") | |
} | |
function g() { | |
a.pauseAd(p.noop) | |
} | |
function h() { | |
a.resumeAd(p.noop) | |
} | |
var i = a.options.src, | |
j = this._createVASTTracker(i, b), | |
l = this.player, | |
m = this; | |
a.on("AdSkipped", function() { | |
l.trigger("vpaid.AdSkipped"), j.trackSkip() | |
}), a.on("AdImpression", function() { | |
l.trigger("vpaid.AdImpression"), j.trackImpressions() | |
}), a.on("AdStarted", function() { | |
l.trigger("vpaid.AdStarted"), j.trackCreativeView(), d() | |
}), a.on("AdVideoStart", function() { | |
l.trigger("vpaid.AdVideoStart"), j.trackStart(), d() | |
}), a.on("AdPlaying", function() { | |
l.trigger("vpaid.AdPlaying"), j.trackResume(), d() | |
}), a.on("AdPaused", function() { | |
l.trigger("vpaid.AdPaused"), j.trackPause(), f() | |
}), a.on("AdVideoFirstQuartile", function() { | |
l.trigger("vpaid.AdVideoFirstQuartile"), j.trackFirstQuartile() | |
}), a.on("AdVideoMidpoint", function() { | |
l.trigger("vpaid.AdVideoMidpoint"), j.trackMidpoint() | |
}), a.on("AdVideoThirdQuartile", function() { | |
l.trigger("vpaid.AdVideoThirdQuartile"), j.trackThirdQuartile() | |
}), a.on("AdVideoComplete", function() { | |
l.trigger("vpaid.AdVideoComplete"), j.trackComplete() | |
}), a.on("AdClickThru", function(c) { | |
function d(b) { | |
var c = { | |
ASSETURI: a.options.src, | |
CONTENTPLAYHEAD: 0 | |
}; | |
return b ? k.parseURLMacro(b, c) : null | |
} | |
l.trigger("vpaid.AdClickThru"); | |
var e = c.url, | |
f = c.playerHandles, | |
g = p.isNotEmptyString(e) ? e : d(b.clickThrough); | |
j.trackClick(), f && g && window.open(g, "_blank") | |
}), a.on("AdUserAcceptInvitation", function() { | |
l.trigger("vpaid.AdUserAcceptInvitation"), j.trackAcceptInvitation(), j.trackAcceptInvitationLinear() | |
}), a.on("AdUserClose", function() { | |
l.trigger("vpaid.AdUserClose"), j.trackClose(), j.trackCloseLinear() | |
}), a.on("AdUserMinimize", function() { | |
l.trigger("vpaid.AdUserMinimize"), j.trackCollapse() | |
}), a.on("AdError", function() { | |
l.trigger("vpaid.AdError"), j.trackErrorWithCode(901) | |
}), a.on("AdVolumeChange", function() { | |
l.trigger("vpaid.AdVolumeChange"); | |
var b = l.volume(); | |
a.getAdVolume(function(a, c) { | |
b !== c && (0 === c && b > 0 && j.trackMute(), c > 0 && 0 === b && j.trackUnmute(), l.volume(c)) | |
}) | |
}); | |
var o = e.bind(this, l, a, this.VIEW_MODE), | |
q = p.throttle(o, 100), | |
r = this.settings.autoResize; | |
r && (n.addEventListener(window, "resize", q), n.addEventListener(window, "orientationchange", q)), l.on("vast.resize", o), l.on("vpaid.pauseAd", g), l.on("vpaid.resumeAd", h), l.one("vpaid.adEnd", function() { | |
l.off("vast.resize", o), l.off("vpaid.pauseAd", g), l.off("vpaid.resumeAd", h), r && (n.removeEventListener(window, "resize", q), n.removeEventListener(window, "orientationchange", q)) | |
}), c(null, a, b) | |
}, d.prototype._addSkipButton = function(a, b, c) { | |
function d() { | |
i.trigger("vpaid.AdSkippableStateChange"), a.getAdSkippableState(function(a, b) { | |
b ? h || e(i) : f(i) | |
}) | |
} | |
function e(a) { | |
h = g(a), a.el().appendChild(h) | |
} | |
function f() { | |
n.remove(h), h = null | |
} | |
function g() { | |
var b = window.document.createElement("div"); | |
return n.addClass(b, "vast-skip-button"), n.addClass(b, "enabled"), b.innerHTML = "Skip ad", b.onclick = function(b) { | |
return a.skipAd(p.noop), void 0 === window.Event.prototype.stopPropagation ? !1 : void b.stopPropagation() | |
}, b | |
} | |
var h, i = this.player; | |
a.on("AdSkippableStateChange", d), o.once(i, ["vast.adEnd", "vast.adsCancel"], f), c(null, a, b) | |
}, d.prototype._linkPlayerControls = function(a, b, c) { | |
function d(a, b) { | |
function c() { | |
var c = a.muted() ? 0 : a.volume(); | |
b.setAdVolume(c, f) | |
} | |
function d() { | |
a.trigger("vpaid.AdVolumeChange"); | |
var c = a.volume(); | |
b.getAdVolume(function(b, d) { | |
b ? f(b) : c !== d && a.volume(d) | |
}) | |
} | |
a.on("volumechange", c), b.on("AdVolumeChange", d), a.one("vpaid.adEnd", function() { | |
a.off("volumechange", c) | |
}) | |
} | |
function g(a, b, c) { | |
var d = e.bind(h, a, b, c); | |
a.on("fullscreenchange", d), a.one("vpaid.adEnd", function() { | |
a.off("fullscreenchange", d) | |
}) | |
} | |
var h = this; | |
d(this.player, a), g(this.player, a, this.VIEW_MODE), c(null, a, b) | |
}, d.prototype._startAd = function(a, b, c) { | |
var d = this.player; | |
a.startAd(function(e) { | |
e || d.trigger("vast.adStart"), c(e, a, b) | |
}) | |
}, d.prototype._finishPlaying = function(a, b, c) { | |
function d(d) { | |
c(d, a, b) | |
} | |
var e = this.player; | |
a.on("AdStopped", function() { | |
e.trigger("vpaid.AdStopped"), d(null) | |
}), a.on("AdError", function(a) { | |
var b = a ? a.message : "on VPAIDIntegrator, error while waiting for the adUnit to finish playing"; | |
d(new h(b)) | |
}) | |
}, d.prototype._trackError = function(a, b) { | |
k.track(a.errorURLMacros, { | |
ERRORCODE: b || 901 | |
}) | |
}, b.exports = d | |
}, { | |
"../../utils/async": 40, | |
"../../utils/consoleLogger": 41, | |
"../../utils/dom": 42, | |
"../../utils/mimetypes": 44, | |
"../../utils/playerUtils": 45, | |
"../../utils/utilityFunctions": 47, | |
"../vast/VASTError": 23, | |
"../vast/VASTResponse": 25, | |
"../vast/VASTTracker": 26, | |
"../vast/vastUtil": 30, | |
"./VPAIDAdUnitWrapper": 31 | |
}], | |
35: [function(a, b, c) { | |
"use strict"; | |
var d = a("../../utils/dom"), | |
e = document.createElement("div"); | |
e.className = "vjs-ads-label vjs-control vjs-label-hidden", e.innerHTML = "Advertisement"; | |
var f = function(a) { | |
return { | |
init: function(b, c) { | |
c.el = e, a.call(this, b, c), setTimeout(function() { | |
var a = b.controlBar && (b.controlBar.getChild("timerControls") || b.controlBar.getChild("currentTimeDisplay")); | |
a && b.controlBar.el().insertBefore(e, a.el()), d.removeClass(e, "vjs-label-hidden") | |
}, 0) | |
}, | |
el: function() { | |
return e | |
} | |
} | |
}; | |
b.exports = f | |
}, { | |
"../../utils/dom": 42 | |
}], | |
36: [function(a, b, c) { | |
"use strict"; | |
var d = videojs.getComponent("Component"), | |
e = a("./ads-label")(d); | |
videojs.registerComponent("AdsLabel", videojs.extend(d, e)) | |
}, { | |
"./ads-label": 35 | |
}], | |
37: [function(a, b, c) { | |
"use strict"; | |
var d = document.createElement("div"), | |
e = function(a) { | |
return { | |
init: function(b, c) { | |
c.el = d, d.className = "vjs-black-poster", a.call(this, b, c); | |
var e = b.getChild("posterImage"); | |
setTimeout(function() { | |
e && b && b.el() && b.el().insertBefore(d, e.el()) | |
}, 0) | |
}, | |
el: function() { | |
return d | |
} | |
} | |
}; | |
b.exports = e | |
}, {}], | |
38: [function(a, b, c) { | |
"use strict"; | |
var d = videojs.getComponent("Component"), | |
e = a("./black-poster")(d); | |
videojs.registerComponent("BlackPoster", videojs.extend(d, e)) | |
}, { | |
"./black-poster": 37 | |
}], | |
39: [function(a, b, c) { | |
"use strict"; | |
var d = a("../ads/vast/VASTClient"), | |
e = a("../ads/vast/VASTError"), | |
f = a("../ads/vast/vastUtil"), | |
g = a("../ads/vast/VASTIntegrator"), | |
h = a("../ads/vpaid/VPAIDIntegrator"), | |
i = a("../utils/async"), | |
j = a("../utils/dom"), | |
k = a("../utils/playerUtils"), | |
l = a("../utils/utilityFunctions"), | |
m = a("../utils/consoleLogger"); | |
b.exports = function(a) { | |
function b() { | |
function a() { | |
t.vast && t.vast.adUnit && (t.vast.adUnit = null) | |
} | |
function b() { | |
c(), s && (k.restorePlayerSnapshot(t, s), s = null) | |
} | |
function c() { | |
k.once(t, ["playing", "vast.reset", "vast.firstPlay"], function(a) { | |
"playing" === a.type && (t.trigger("vast.contentStart"), k.once(t, ["ended", "vast.reset", "vast.firstPlay"], function(a) { | |
"ended" === a.type && t.trigger("vast.contentEnd") | |
})) | |
}) | |
} | |
function d(a) { | |
return x.adsEnabled ? a(null) : void a(new e("Ads are not enabled")) | |
} | |
function f(a) { | |
g() ? (s = k.getPlayerSnapshot(t), t.pause(), m(), t.paused() ? a(null) : k.once(t, ["playing"], function() { | |
t.pause(), a(null) | |
})) : a(new e("video content has been playing before preroll ad")) | |
} | |
function g() { | |
return !l.isIPhone() || t.currentTime() <= x.iosPrerollCancelTimeout | |
} | |
function h(a) { | |
function b() { | |
c && (clearTimeout(c), c = null) | |
} | |
var c; | |
v = !1, c = setTimeout(function() { | |
q(new e("timeout while waiting for the video to start playing", 402)) | |
}, x.adCancelTimeout), k.once(t, ["vast.adStart", "vast.adsCancel"], b), a(null) | |
} | |
function m() { | |
j.addClass(t.el(), "vjs-vast-ad-loading"), k.once(t, ["vast.adStart", "vast.adsCancel"], o) | |
} | |
function o() { | |
setTimeout(function() { | |
j.removeClass(t.el(), "vjs-vast-ad-loading") | |
}, 100) | |
} | |
k.removeNativePoster(t), k.once(t, ["vast.adsCancel", "vast.adEnd"], function() { | |
a(), b() | |
}), i.waterfall([d, f, h, n], function(a, b) { | |
a ? q(a, b) : t.trigger("vast.adEnd") | |
}) | |
} | |
function c() { | |
t.trigger("vast.adsCancel"), v = !0 | |
} | |
function n(a) { | |
i.waterfall([o, p], a) | |
} | |
function o(a) { | |
u.getVASTResponse(x.adTagUrl ? x.adTagUrl() : x.adTagXML, a) | |
} | |
function p(a, b) { | |
function c() { | |
i || t.controlBar.getChild("AdsLabel") || t.controlBar.addChild("AdsLabel") | |
} | |
function d() { | |
t.controlBar.removeChild("AdsLabel"), i = !0 | |
} | |
function e() { | |
function a() { | |
t.duration() - e > d && (t.pause(!0), t.play(!0), t.currentTime(e)) | |
} | |
function b() { | |
var a = t.currentTime(), | |
b = Math.abs(a - e); | |
b > d ? (f += 1, f >= 2 && t.pause(!0), t.currentTime(e)) : e = a | |
} | |
function c() { | |
t.off("timeupdate", b), t.off("ended", a) | |
} | |
var d = 3, | |
e = 0, | |
f = 0; | |
t.on("timeupdate", b), t.on("ended", a), k.once(t, ["vast.adEnd", "vast.adsCancel", "vast.adError"], c) | |
} | |
if (!v) { | |
var f = r(a) ? new h(t, x) : new g(t), | |
i = !1; | |
k.once(t, ["vast.adStart", "vast.adsCancel"], function(a) { | |
"vast.adStart" === a.type && c() | |
}), k.once(t, ["vast.adEnd", "vast.adsCancel"], d), l.isIDevice() && e(), t.vast.vastResponse = a, m.debug("calling adIntegrator.playAd() with vastResponse:", a), t.vast.adUnit = f.playAd(a, b) | |
} | |
} | |
function q(a, b) { | |
t.trigger({ | |
type: "vast.adError", | |
error: a | |
}), c(), m.error("AD ERROR:", a.message, a, b) | |
} | |
function r(a) { | |
var b, c, d = a.mediaFiles; | |
for (b = 0, c = d.length; c > b; b++) | |
if (f.isVPAID(d[b])) return !0; | |
return !1 | |
} | |
var s, t = this, | |
u = new d, | |
v = !1, | |
w = { | |
timeout: 500, | |
iosPrerollCancelTimeout: 2e3, | |
adCancelTimeout: 3e3, | |
playAdAlways: !1, | |
adsEnabled: !0, | |
autoResize: !0, | |
vpaidFlashLoaderPath: "/VPAIDFlash.swf", | |
verbosity: 0 | |
}, | |
x = l.extend({}, w, a || {}); | |
return l.isUndefined(x.adTagUrl) && l.isDefined(x.url) && (x.adTagUrl = x.url), l.isString(x.adTagUrl) && (x.adTagUrl = l.echoFn(x.adTagUrl)), l.isDefined(x.adTagXML) && !l.isFunction(x.adTagXML) ? q(new e("on VideoJS VAST plugin, the passed adTagXML option does not contain a function")) : l.isDefined(x.adTagUrl) || l.isFunction(x.adTagXML) ? (m.setVerbosity(x.verbosity), f.runFlashSupportCheck(x.vpaidFlashLoaderPath), k.prepareForAds(t), x.playAdAlways && t.on("vast.contentEnd", function() { | |
setTimeout(function() { | |
t.trigger("vast.reset") | |
}, 0) | |
}), t.on("vast.firstPlay", b), t.on("vast.reset", function() { | |
s = null, c() | |
}), t.vast = { | |
isEnabled: function() { | |
return x.adsEnabled | |
}, | |
enable: function() { | |
x.adsEnabled = !0 | |
}, | |
disable: function() { | |
x.adsEnabled = !1 | |
} | |
}, t.vast) : q(new e("on VideoJS VAST plugin, missing adTagUrl on options object")) | |
} | |
}, { | |
"../ads/vast/VASTClient": 22, | |
"../ads/vast/VASTError": 23, | |
"../ads/vast/VASTIntegrator": 24, | |
"../ads/vast/vastUtil": 30, | |
"../ads/vpaid/VPAIDIntegrator": 34, | |
"../utils/async": 40, | |
"../utils/consoleLogger": 41, | |
"../utils/dom": 42, | |
"../utils/playerUtils": 45, | |
"../utils/utilityFunctions": 47 | |
}], | |
40: [function(a, b, c) { | |
var d = a("./utilityFunctions"), | |
e = {}; | |
e.setImmediate = function(a) { | |
setTimeout(a, 0) | |
}, e.iterator = function(a) { | |
var b = function(c) { | |
var d = function() { | |
return a.length && a[c].apply(null, arguments), d.next() | |
}; | |
return d.next = function() { | |
return c < a.length - 1 ? b(c + 1) : null | |
}, d | |
}; | |
return b(0) | |
}, e.waterfall = function(a, b) { | |
if (b = b || function() {}, !d.isArray(a)) { | |
var c = new Error("First argument to waterfall must be an array of functions"); | |
return b(c) | |
} | |
if (!a.length) return b(); | |
var f = function(a) { | |
return function(c) { | |
if (c) b.apply(null, arguments), b = function() {}; | |
else { | |
var d = Array.prototype.slice.call(arguments, 1), | |
g = a.next(); | |
g ? d.push(f(g)) : d.push(b), e.setImmediate(function() { | |
a.apply(null, d) | |
}) | |
} | |
} | |
}; | |
f(e.iterator(a))() | |
}, e.when = function(a, b) { | |
if (!d.isFunction(b)) throw new Error("async.when error: missing callback argument"); | |
var c = d.isFunction(a) ? a : function() { | |
return !!a | |
}; | |
return function() { | |
var a = d.arrayLikeObjToArray(arguments), | |
e = a.pop(); | |
return c.apply(null, a) ? b.apply(this, arguments) : (a.unshift(null), e.apply(null, a)) | |
} | |
}, b.exports = e | |
}, { | |
"./utilityFunctions": 47 | |
}], | |
41: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
k = a | |
} | |
function e(a, b) { | |
b.length > 0 && "string" == typeof b[0] && (b[0] = l + b[0]), a.apply ? a.apply(console, Array.prototype.slice.call(b)) : a(Array.prototype.slice.call(b)) | |
} | |
function f() { | |
4 > k || ("undefined" == typeof console.debug ? e(console.log, arguments) : e(console.debug, arguments)) | |
} | |
function g() { | |
3 > k || e(console.log, arguments) | |
} | |
function h() { | |
2 > k || e(console.info, arguments) | |
} | |
function i() { | |
1 > k || e(console.warn, arguments) | |
} | |
function j() { | |
e(console.error, arguments) | |
} | |
var k = 0, | |
l = "[videojs-vast-vpaid] ", | |
m = { | |
setVerbosity: d, | |
debug: f, | |
log: g, | |
info: h, | |
warn: i, | |
error: j | |
}; | |
"undefined" != typeof console && console.log || (m.debug = function() {}, m.log = function() {}, m.info = function() {}, m.warn = function() {}, m.error = function() {}), b.exports = m | |
}, {}], | |
42: [function(a, b, c) { | |
"use strict"; | |
var d = a("./utilityFunctions"), | |
e = {}; | |
e.isVisible = function(a) { | |
var b = window.getComputedStyle(a); | |
return "hidden" !== b.visibility | |
}, e.isHidden = function(a) { | |
var b = window.getComputedStyle(a); | |
return "none" === b.display | |
}, e.isShown = function(a) { | |
return !e.isHidden(a) | |
}, e.hide = function(a) { | |
a.__prev_style_display_ = a.style.display, a.style.display = "none" | |
}, e.show = function(a) { | |
e.isHidden(a) && (a.style.display = a.__prev_style_display_), a.__prev_style_display_ = void 0 | |
}, e.hasClass = function(a, b) { | |
var c, e, f; | |
if (d.isNotEmptyString(b)) { | |
if (a.classList) return a.classList.contains(b); | |
for (c = d.isString(a.getAttribute("class")) ? a.getAttribute("class").split(/\s+/) : [], b = b || "", e = 0, f = c.length; f > e; e += 1) | |
if (c[e] === b) return !0 | |
} | |
return !1 | |
}, e.addClass = function(a, b) { | |
var c; | |
if (d.isNotEmptyString(b)) { | |
if (a.classList) return a.classList.add(b); | |
c = d.isString(a.getAttribute("class")) ? a.getAttribute("class").split(/\s+/) : [], d.isString(b) && d.isNotEmptyString(b.replace(/\s+/, "")) && (c.push(b), a.setAttribute("class", c.join(" "))) | |
} | |
}, e.removeClass = function(a, b) { | |
var c; | |
if (d.isNotEmptyString(b)) { | |
if (a.classList) return a.classList.remove(b); | |
c = d.isString(a.getAttribute("class")) ? a.getAttribute("class").split(/\s+/) : []; | |
var e, f, g = []; | |
if (d.isString(b) && d.isNotEmptyString(b.replace(/\s+/, ""))) { | |
for (e = 0, f = c.length; f > e; e += 1) b !== c[e] && g.push(c[e]); | |
a.setAttribute("class", g.join(" ")) | |
} | |
} | |
}, e.addEventListener = function(a, b, c) { | |
return d.isArray(a) ? void d.forEach(a, function(a) { | |
e.addEventListener(a, b, c) | |
}) : d.isArray(b) ? void d.forEach(b, function(b) { | |
e.addEventListener(a, b, c) | |
}) : void(a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent && a.attachEvent("on" + b, c)) | |
}, e.removeEventListener = function(a, b, c) { | |
return d.isArray(a) ? void d.forEach(a, function(a) { | |
e.removeEventListener(a, b, c) | |
}) : d.isArray(b) ? void d.forEach(b, function(b) { | |
e.removeEventListener(a, b, c) | |
}) : void(a.removeEventListener ? a.removeEventListener(b, c, !1) : a.detachEvent ? a.detachEvent("on" + b, c) : a["on" + b] = null) | |
}, e.dispatchEvent = function(a, b) { | |
a.dispatchEvent ? a.dispatchEvent(b) : a.fireEvent("on" + b.eventType, b) | |
}, e.isDescendant = function(a, b) { | |
for (var c = b.parentNode; null !== c;) { | |
if (c === a) return !0; | |
c = c.parentNode | |
} | |
return !1 | |
}, e.getTextContent = function(a) { | |
return a.textContent || a.text | |
}, e.prependChild = function(a, b) { | |
return b.parentNode && b.parentNode.removeChild(b), a.insertBefore(b, a.firstChild) | |
}, e.remove = function(a) { | |
a && a.parentNode && a.parentNode.removeChild(a) | |
}, e.isDomElement = function(a) { | |
return a instanceof Element | |
}, e.click = function(a, b) { | |
e.addEventListener(a, "click", b) | |
}, e.once = function(a, b, c) { | |
function d() { | |
c.apply(null, arguments), e.removeEventListener(a, b, d) | |
} | |
e.addEventListener(a, b, d) | |
}, e.getDimension = function(a) { | |
var b; | |
return !d.isOldIE() && a.getBoundingClientRect ? (b = a.getBoundingClientRect(), { | |
width: b.width, | |
height: b.height | |
}) : { | |
width: a.offsetWidth, | |
height: a.offsetHeight | |
} | |
}, b.exports = e | |
}, { | |
"./utilityFunctions": 47 | |
}], | |
43: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
this.message = "HttpRequest Error: " + (a || "") | |
} | |
function e(a) { | |
if (!h.isFunction(a)) throw new d("Missing XMLHttpRequest factory method"); | |
this.createXhr = a | |
} | |
function f() { | |
var a = new XMLHttpRequest; | |
return "withCredentials" in a || (a = new XDomainRequest), a | |
} | |
var g = a("./urlUtils"), | |
h = a("./utilityFunctions"); | |
d.prototype = new Error, d.prototype.name = "HttpRequest Error", e.prototype.run = function(a, b, c, e) { | |
function f(a, b, c) { | |
if (!h.isString(a) || h.isEmptyString(a)) throw new d("Invalid url '" + a + "'"); | |
if (!h.isFunction(b)) throw new d("Invalid handler '" + b + "' for the http request"); | |
if (h.isDefined(c) && !h.isObject(c)) throw new d("Invalid options map '" + c + "'") | |
} | |
function i(a, b) { | |
h.forEach(b, function(b, c) { | |
h.isDefined(b) && a.setRequestHeader(c, b) | |
}) | |
} | |
function j() { | |
c(-1, null, null, "") | |
} | |
f(b, c, e); | |
var k, l, m = this.createXhr(); | |
e = e || {}, k = h.isNumber(e.timeout) ? e.timeout : 0, m.open(a, g.urlParts(b).href, !0), e.headers && i(m, e.headers), e.withCredentials && (m.withCredentials = !0), m.onload = function() { | |
var a, b, d; | |
m.getAllResponseHeaders || (m.getAllResponseHeaders = function() { | |
return null | |
}), m.status || (m.status = 200), h.isDefined(l) && (clearTimeout(l), l = void 0), a = m.statusText || "", b = "response" in m ? m.response : m.responseText, d = 1223 === m.status ? 204 : m.status, c(d, b, m.getAllResponseHeaders(), a) | |
}, m.onerror = j, m.onabort = j, m.send(), k > 0 && (l = setTimeout(function() { | |
m && m.abort() | |
}, k)) | |
}, e.prototype.get = function(a, b, c) { | |
function e(a, c, e, g) { | |
f(a) ? b(null, c, a, e, g) : b(new d(g), c, a, e, g) | |
} | |
function f(a) { | |
return a >= 200 && 300 > a | |
} | |
this.run("GET", a, e, c) | |
}; | |
var i = new e(f); | |
b.exports = { | |
http: i, | |
HttpRequest: e, | |
HttpRequestError: d, | |
createXhr: f | |
} | |
}, { | |
"./urlUtils": 46, | |
"./utilityFunctions": 47 | |
}], | |
44: [function(a, b, c) { | |
"use strict"; | |
b.exports = { | |
html5: ["text/javascript", "text/javascript1.0", "text/javascript1.2", "text/javascript1.4", "text/jscript", "application/javascript", "application/x-javascript", "text/ecmascript", "text/ecmascript1.0", "text/ecmascript1.2", "text/ecmascript1.4", "text/livescript", "application/ecmascript", "application/x-ecmascript"], | |
flash: ["application/x-shockwave-flash"] | |
} | |
}, {}], | |
45: [function(a, b, c) { | |
"use strict"; | |
var d = a("./dom"), | |
e = a("./utilityFunctions"), | |
f = {}; | |
f.getPlayerSnapshot = function(a) { | |
function b(a) { | |
var b = a.remoteTextTracks ? a.remoteTextTracks() : []; | |
b && e.isArray(b.tracks_) && (b = b.tracks_), e.isArray(b) || (b = []); | |
var c = []; | |
return b.forEach(function(a) { | |
c.push({ | |
track: a, | |
mode: a.mode | |
}), a.mode = "disabled" | |
}), c | |
} | |
var c = a.el().querySelector(".vjs-tech"), | |
d = { | |
ended: a.ended(), | |
src: a.currentSrc(), | |
currentTime: a.currentTime(), | |
type: a.currentType(), | |
playing: !a.paused(), | |
suppressedTracks: b(a) | |
}; | |
return c && (d.nativePoster = c.poster, d.style = c.getAttribute("style")), d | |
}, f.restorePlayerSnapshot = function(a, b) { | |
function c() { | |
var b = setTimeout(function() { | |
a.trigger("canplay") | |
}, 1e3); | |
a.one("canplay", function() { | |
clearTimeout(b) | |
}) | |
} | |
function d(a, b) { | |
return a.src() ? a.src() !== b.src : a.currentSrc() !== b.src | |
} | |
function e() { | |
var a = b.suppressedTracks; | |
a.forEach(function(a) { | |
a.track.mode = a.mode | |
}) | |
} | |
function g() { | |
if (!f.isReadyToResume(a) && i--) setTimeout(g, 50); | |
else try { | |
a.currentTime() !== b.currentTime ? (b.playing && a.one("seeked", function() { | |
a.play() | |
}), a.currentTime(b.currentTime)) : b.playing && a.play() | |
} catch (c) { | |
videojs.log.warn("Failed to resume the content after an advertisement", c) | |
} | |
} | |
var h = a.el().querySelector(".vjs-tech"), | |
i = 20; | |
b.nativePoster && (h.poster = b.nativePoster), "style" in b && h.setAttribute("style", b.style || ""), d(a, b) ? (a.one("contentloadedmetadata", e), a.one("canplay", g), c(), a.src({ | |
src: b.src, | |
type: b.type | |
}), a.load()) : (e(), b.playing && a.play()) | |
}, f.isReadyToResume = function(a) { | |
return a.readyState() > 1 ? !0 : void 0 === a.seekable() ? !0 : a.seekable().length > 0 ? !0 : !1 | |
}, f.prepareForAds = function(a) { | |
function b() { | |
var b = a.play; | |
a.play = function(d) { | |
function f() { | |
e.isIPhone() || (o = i(), a.muted(!0)), b.apply(j, arguments) | |
} | |
function g(d) { | |
c() && !d ? a.vast.adUnit.resumeAd() : b.apply(j, arguments) | |
} | |
var j = this; | |
return h() ? f() : g(d), this | |
}; | |
var d = a.pause; | |
a.pause = function(b) { | |
return c() && !b ? a.vast.adUnit.pauseAd() : d.apply(this, arguments), this | |
}; | |
var f = a.paused; | |
a.paused = function(b) { | |
return c() && !b ? a.vast.adUnit.isPaused() : f.apply(this, arguments) | |
} | |
} | |
function c() { | |
return a.vast && a.vast.adUnit | |
} | |
function f() { | |
h() && (q = !1, a.trigger("vast.firstPlay")) | |
} | |
function g() { | |
q = !0, p.show(), j() | |
} | |
function h() { | |
return q | |
} | |
function i() { | |
return { | |
muted: a.muted(), | |
volume: a.volume() | |
} | |
} | |
function j() { | |
o && (a.currentTime(0), k(o), o = null) | |
} | |
function k(b) { | |
e.isObject(b) && (a.volume(b.volume), a.muted(b.muted)) | |
} | |
function l() { | |
d.hasClass(p.el(), "vjs-hidden") || p.hide() | |
} | |
function m() { | |
d.addClass(a.el(), "vjs-ad-playing") | |
} | |
function n() { | |
d.removeClass(a.el(), "vjs-ad-playing") | |
} | |
var o, p = a.addChild("blackPoster"), | |
q = !0; | |
b(), a.on("play", f), a.on("vast.reset", g), a.on("vast.firstPlay", j), a.on("error", l), a.on("vast.adStart", l), a.on("vast.adsCancel", l), a.on("vast.adError", l), a.on("vast.adStart", m), a.on("vast.adEnd", n), a.on("vast.adsCancel", n) | |
}, f.removeNativePoster = function(a) { | |
var b = a.el().querySelector(".vjs-tech"); | |
b && b.removeAttribute("poster") | |
}, f.once = function(a, b, c) { | |
function d() { | |
c.apply(null, arguments), b.forEach(function(b) { | |
a.off(b, d) | |
}) | |
} | |
b.forEach(function(b) { | |
a.on(b, d) | |
}) | |
}, b.exports = f | |
}, { | |
"./dom": 42, | |
"./utilityFunctions": 47 | |
}], | |
46: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
var b = a; | |
return i && (h.setAttribute("href", b), b = h.href), h.setAttribute("href", b), { | |
href: h.href, | |
protocol: h.protocol ? h.protocol.replace(/:$/, "") : "", | |
host: h.host, | |
search: h.search ? h.search.replace(/^\?/, "") : "", | |
hash: h.hash ? h.hash.replace(/^#/, "") : "", | |
hostname: h.hostname, | |
port: g.isNotEmptyString(h.port) ? h.port : 80, | |
pathname: "/" === h.pathname.charAt(0) ? h.pathname : "/" + h.pathname | |
} | |
} | |
function e(a, b) { | |
var c, d; | |
return b = g.isFunction(b) ? b : function() { | |
return !0 | |
}, a = a.trim().replace(/^\?/, ""), c = a.split("&"), d = {}, g.forEach(c, function(a) { | |
var c, e, f; | |
"" !== a && (c = a.split("="), e = c[0], f = c[1], b(e, f) && (d[e] = f)) | |
}), d | |
} | |
function f(a) { | |
var b = []; | |
return g.forEach(a, function(a, c) { | |
b.push(c + "=" + a) | |
}), b.join("&") | |
} | |
var g = a("./utilityFunctions"), | |
h = document.createElement("a"), | |
i = document.documentMode; | |
b.exports = { | |
urlParts: d, | |
queryStringToObj: e, | |
objToQueryString: f | |
} | |
}, { | |
"./utilityFunctions": 47 | |
}], | |
47: [function(a, b, c) { | |
"use strict"; | |
function d() {} | |
function e(a) { | |
return null === a | |
} | |
function f(a) { | |
return void 0 !== a | |
} | |
function g(a) { | |
return void 0 === a | |
} | |
function h(a) { | |
return "object" == typeof a | |
} | |
function i(a) { | |
return "function" == typeof a | |
} | |
function j(a) { | |
return "number" == typeof a | |
} | |
function k(a) { | |
return O.isObject(a) && a.window === a | |
} | |
function l(a) { | |
return "[object Array]" === Object.prototype.toString.call(a) | |
} | |
function m(a) { | |
if (null === a || O.isWindow(a) || O.isFunction(a) || O.isUndefined(a)) return !1; | |
var b = a.length; | |
return a.nodeType === K && b ? !0 : O.isString(a) || O.isArray(a) || 0 === b || "number" == typeof b && b > 0 && b - 1 in a | |
} | |
function n(a) { | |
return "string" == typeof a | |
} | |
function o(a) { | |
return O.isString(a) && 0 === a.length | |
} | |
function p(a) { | |
return O.isString(a) && 0 !== a.length | |
} | |
function q(a) { | |
return Array.prototype.slice.call(a) | |
} | |
function r(a, b, c) { | |
var d, e; | |
if (a) | |
if (i(a)) | |
for (d in a) "prototype" === d || "length" === d || "name" === d || a.hasOwnProperty && !a.hasOwnProperty(d) || b.call(c, a[d], d, a); | |
else if (l(a)) { | |
var f = "object" != typeof a; | |
for (d = 0, e = a.length; e > d; d++)(f || d in a) && b.call(c, a[d], d, a) | |
} else if (a.forEach && a.forEach !== r) a.forEach(b, c, a); | |
else | |
for (d in a) a.hasOwnProperty(d) && b.call(c, a[d], d, a); | |
return a | |
} | |
function s(a, b) { | |
return b = b || "_", a.replace(L, function(a, c) { | |
return (c ? b : "") + a.toLowerCase() | |
}) | |
} | |
function t(a) { | |
return O.isString(a) ? M.test(a.trim()) : !1 | |
} | |
function u(a) { | |
var b, c, d; | |
for (c = 1; c < arguments.length; c++) { | |
b = arguments[c]; | |
for (d in b) b.hasOwnProperty(d) && (h(a[d]) && !e(a[d]) && h(b[d]) ? a[d] = u({}, a[d], b[d]) : a[d] = b[d]) | |
} | |
return a | |
} | |
function v(a) { | |
return a.charAt(0).toUpperCase() + a.slice(1) | |
} | |
function w(a) { | |
return a.charAt(0).toLowerCase() + a.slice(1) | |
} | |
function x(a, b) { | |
var c = []; | |
return a.forEach(function(a, d) { | |
var e = b(a, d); | |
O.isDefined(e) && c.push(e) | |
}), c | |
} | |
function y(a, b) { | |
var c = a + ""; | |
if (b = O.isNumber(b) ? b : 0, a = O.isNumber(a) ? a : parseInt(a, 10), O.isNumber(a) && !isNaN(a)) { | |
for (c = a + ""; c.length < b;) c = "0" + c; | |
return c | |
} | |
return "NaN" | |
} | |
function z(a, b) { | |
var c = (new Date).getTime() - (b + 1); | |
return function() { | |
var d = (new Date).getTime(); | |
d - c >= b && (c = d, a.apply(this, arguments)) | |
} | |
} | |
function A(a, b) { | |
var c; | |
return function() { | |
c && clearTimeout(c), c = setTimeout(function() { | |
a.apply(this, arguments), c = void 0 | |
}, b) | |
} | |
} | |
function B(a, b, c) { | |
for (var d = b(a), e = 0; e < d.length; e++) { | |
if (c(d[e])) return d[e]; | |
var f = B(d[e], b, c); | |
if (f) return f | |
} | |
} | |
function C(a) { | |
return function() { | |
return a | |
} | |
} | |
function D(a) { | |
return O.isNumber(a) && (a += ""), O.isString(a) ? N.test(a.trim()) : !1 | |
} | |
function E() { | |
var a = O.getInternetExplorerVersion(navigator); | |
return -1 === a ? !1 : 10 > a | |
} | |
function F(a) { | |
var b = -1; | |
if ("Microsoft Internet Explorer" == a.appName) { | |
var c = a.userAgent, | |
d = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"), | |
e = d.exec(c); | |
null !== e && (b = parseFloat(e[1])) | |
} | |
return b | |
} | |
function G() { | |
return /iP(hone|ad)/.test(O._UA) | |
} | |
function H() { | |
return /iP(hone|ad|od)|Android|Windows Phone/.test(O._UA) | |
} | |
function I() { | |
return /iP(hone|od)/.test(O._UA) | |
} | |
function J() { | |
return /Android/.test(O._UA) | |
} | |
var K = 1, | |
L = /[A-Z]/g, | |
M = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i, | |
N = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, | |
O = { | |
_UA: navigator.userAgent, | |
noop: d, | |
isNull: e, | |
isDefined: f, | |
isUndefined: g, | |
isObject: h, | |
isFunction: i, | |
isNumber: j, | |
isWindow: k, | |
isArray: l, | |
isArrayLike: m, | |
isString: n, | |
isEmptyString: o, | |
isNotEmptyString: p, | |
arrayLikeObjToArray: q, | |
forEach: r, | |
snake_case: s, | |
isValidEmail: t, | |
extend: u, | |
capitalize: v, | |
decapitalize: w, | |
transformArray: x, | |
toFixedDigits: y, | |
throttle: z, | |
debounce: A, | |
treeSearch: B, | |
echoFn: C, | |
isISO8601: D, | |
isOldIE: E, | |
getInternetExplorerVersion: F, | |
isIDevice: G, | |
isMobile: H, | |
isIPhone: I, | |
isAndroid: J | |
}; | |
b.exports = O | |
}, {}], | |
48: [function(a, b, c) { | |
"use strict"; | |
var d = a("./utilityFunctions"), | |
e = {}; | |
e.strToXMLDoc = function(a) { | |
function b(a) { | |
var b, e = new DOMParser; | |
try { | |
if (b = e.parseFromString(a, "application/xml"), c(b) || d.isEmptyString(a)) throw new Error | |
} catch (f) { | |
throw new Error("xml.strToXMLDOC: Error parsing the string: '" + a + "'") | |
} | |
return b | |
} | |
function c(a) { | |
try { | |
var b = new DOMParser, | |
c = b.parseFromString("INVALID", "text/xml"), | |
d = c.getElementsByTagName("parsererror")[0].namespaceURI; | |
return "http://www.w3.org/1999/xhtml" === d ? a.getElementsByTagName("parsererror").length > 0 : a.getElementsByTagNameNS(d, "parsererror").length > 0 | |
} catch (e) {} | |
} | |
if ("undefined" == typeof window.DOMParser) { | |
var e = new ActiveXObject("Microsoft.XMLDOM"); | |
return e.async = !1, e.loadXML(a), e | |
} | |
return b(a) | |
}, e.parseText = function(a) { | |
return /^\s*$/.test(a) ? null : /^(?:true|false)$/i.test(a) ? "true" === a.toLowerCase() : isFinite(a) ? parseFloat(a) : d.isISO8601(a) ? new Date(a) : a.trim() | |
}, e.JXONTree = function(a) { | |
var b = e.parseText; | |
if (a.documentElement) return new e.JXONTree(a.documentElement); | |
if (a.hasChildNodes()) { | |
for (var c, f, g, h = "", i = 0; i < a.childNodes.length; i++) c = a.childNodes.item(i), 3 === (c.nodeType - 1 | 1) ? h += 3 === c.nodeType ? c.nodeValue.trim() : c.nodeValue : 1 !== c.nodeType || c.prefix || (f = d.decapitalize(c.nodeName), g = new e.JXONTree(c), this.hasOwnProperty(f) ? (this[f].constructor !== Array && (this[f] = [this[f]]), this[f].push(g)) : this[f] = g); | |
h && (this.keyValue = b(h)) | |
} | |
var j = "undefined" == typeof a.hasAttributes ? a.attributes.length > 0 : a.hasAttributes(); | |
if (j) | |
for (var k, l = 0; l < a.attributes.length; l++) k = a.attributes.item(l), this["@" + d.decapitalize(k.name)] = b(k.value.trim()) | |
}, e.JXONTree.prototype.attr = function(a) { | |
return this["@" + d.decapitalize(a)] | |
}, e.toJXONTree = function(a) { | |
var b = e.strToXMLDoc(a); | |
return new e.JXONTree(b) | |
}, e.keyValue = function(a) { | |
return a ? a.keyValue : void 0 | |
}, e.attr = function(a, b) { | |
return a ? a["@" + d.decapitalize(b)] : void 0 | |
}, e.encode = function(a) { | |
return d.isString(a) ? a.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : void 0 | |
}, e.decode = function(a) { | |
return d.isString(a) ? a.replace(/'/g, "'").replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&") : void 0 | |
}, b.exports = e | |
}, { | |
"./utilityFunctions": 47 | |
}], | |
49: [function(a, b, c) { | |
"use strict"; | |
a("./plugin/components/ads-label_5"), a("./plugin/components/black-poster_5"); | |
var d = a("./plugin/videojs.vast.vpaid"); | |
videojs.plugin("vastClient", d) | |
}, { | |
"./plugin/components/ads-label_5": 36, | |
"./plugin/components/black-poster_5": 38, | |
"./plugin/videojs.vast.vpaid": 39 | |
}] | |
}, {}, [49]), | |
function(a, b) { | |
"function" == typeof define && define.amd ? define([], b.bind(this, a, a.videojs)) : "undefined" != typeof module && module.exports ? module.exports = b(a, a.videojs) : b(a, a.videojs) | |
}(window, function(a, b) { | |
"use strict"; | |
a.videojs_hotkeys = { | |
version: "0.2.17" | |
}; | |
var c = function(c) { | |
function d(a) { | |
return 32 === a.which || 179 === a.which | |
} | |
function e(a) { | |
return 37 === a.which || 177 === a.which | |
} | |
function f(a) { | |
return 39 === a.which || 176 === a.which | |
} | |
function g(a) { | |
return 38 === a.which | |
} | |
function h(a) { | |
return 40 === a.which | |
} | |
function i(a) { | |
return 77 === a.which | |
} | |
function j(a) { | |
return 70 === a.which | |
} | |
var k = this, | |
l = k.el(), | |
m = document, | |
n = { | |
volumeStep: .1, | |
seekStep: 5, | |
enableMute: !0, | |
enableVolumeScroll: !0, | |
enableFullscreen: !0, | |
enableNumbers: !0, | |
enableJogStyle: !1, | |
alwaysCaptureHotkeys: !1, | |
enableModifiersForNumbers: !0, | |
playPauseKey: d, | |
rewindKey: e, | |
forwardKey: f, | |
volumeUpKey: g, | |
volumeDownKey: h, | |
muteKey: i, | |
fullscreenKey: j, | |
customKeys: {} | |
}, | |
o = 1, | |
p = 2, | |
q = 3, | |
r = 4, | |
s = 5, | |
t = 6, | |
u = 7, | |
v = b.mergeOptions || b.util.mergeOptions; | |
c = v(n, c || {}); | |
var w = c.volumeStep, | |
x = c.seekStep, | |
y = c.enableMute, | |
z = c.enableVolumeScroll, | |
A = c.enableFullscreen, | |
B = c.enableNumbers, | |
C = c.enableJogStyle, | |
D = c.alwaysCaptureHotkeys, | |
E = c.enableModifiersForNumbers; | |
l.hasAttribute("tabIndex") || l.setAttribute("tabIndex", "-1"), l.style.outline = "none", (D || !k.autoplay()) && k.one("play", function() { | |
l.focus() | |
}), k.on("userinactive", function() { | |
var a = function() { | |
clearTimeout(b) | |
}, | |
b = setTimeout(function() { | |
k.off("useractive", a), m.activeElement.parentElement == l.querySelector(".vjs-control-bar") && l.focus() | |
}, 10); | |
k.one("useractive", a) | |
}), k.on("play", function() { | |
var a = l.querySelector(".iframeblocker"); | |
a && "" === a.style.display && (a.style.display = "block", a.style.bottom = "39px") | |
}); | |
var F = function(a) { | |
var b, d = a.which, | |
e = a.preventDefault; | |
if (k.controls()) { | |
var f = m.activeElement; | |
if (D || f == l || f == l.querySelector(".vjs-tech") || f == l.querySelector(".vjs-control-bar") || f == l.querySelector(".iframeblocker")) switch (I(a, k)) { | |
case o: | |
e(), D && a.stopPropagation(), k.paused() ? k.play() : k.pause(); | |
break; | |
case p: | |
e(), b = k.currentTime() - x, k.currentTime() <= x && (b = 0), k.currentTime(b); | |
break; | |
case q: | |
e(), k.currentTime(k.currentTime() + x); | |
break; | |
case s: | |
e(), C ? (b = k.currentTime() - 1, k.currentTime() <= 1 && (b = 0), k.currentTime(b)) : k.volume(k.volume() - w); | |
break; | |
case r: | |
e(), C ? k.currentTime(k.currentTime() + 1) : k.volume(k.volume() + w); | |
break; | |
case t: | |
y && k.muted(!k.muted()); | |
break; | |
case u: | |
A && (k.isFullscreen() ? k.exitFullscreen() : k.requestFullscreen()); | |
break; | |
default: | |
if ((d > 47 && 59 > d || d > 95 && 106 > d) && (E || !(a.metaKey || a.ctrlKey || a.altKey)) && B) { | |
var g = 48; | |
d > 95 && (g = 96); | |
var h = d - g; | |
e(), k.currentTime(k.duration() * h * .1) | |
} | |
for (var i in c.customKeys) { | |
var j = c.customKeys[i]; | |
j && j.key && j.handler && j.key(a) && (e(), j.handler(k, c, a)) | |
} | |
} | |
} | |
}, | |
G = function(a) { | |
if (k.controls()) { | |
var b = a.relatedTarget || a.toElement || m.activeElement; | |
(b == l || b == l.querySelector(".vjs-tech") || b == l.querySelector(".iframeblocker")) && A && (k.isFullscreen() ? k.exitFullscreen() : k.requestFullscreen()) | |
} | |
}, | |
H = function(b) { | |
if (k.controls()) { | |
var c = b.relatedTarget || b.toElement || m.activeElement; | |
if ((D || c == l || c == l.querySelector(".vjs-tech") || c == l.querySelector(".iframeblocker") || c == l.querySelector(".vjs-control-bar")) && z) { | |
b = a.event || b; | |
var d = Math.max(-1, Math.min(1, b.wheelDelta || -b.detail)); | |
b.preventDefault(), 1 == d ? k.volume(k.volume() + w) : -1 == d && k.volume(k.volume() - w) | |
} | |
} | |
}, | |
I = function(a, b) { | |
return c.playPauseKey(a, b) ? o : c.rewindKey(a, b) ? p : c.forwardKey(a, b) ? q : c.volumeUpKey(a, b) ? r : c.volumeDownKey(a, b) ? s : c.muteKey(a, b) ? t : c.fullscreenKey(a, b) ? u : void 0 | |
}; | |
return k.on("keydown", F), k.on("dblclick", G), k.on("mousewheel", H), k.on("DOMMouseScroll", H), this | |
}; | |
b.plugin("hotkeys", c) | |
}), | |
function(a) { | |
var b = { | |
image: "", | |
destination: "#" | |
}, | |
c = function(c) { | |
var d = a.mergeOptions(b, c), | |
e = this, | |
f = document.createElement("a"); | |
f.className = "vjs-logobrand-image-destination", f.href = d.destination, f.target = "_blank"; | |
var g = document.createElement("img"); | |
return g.className = "vjs-logobrand-image", g.src = d.image, f.appendChild(g), e.el().appendChild(f), f.addEventListener("click", function() { | |
e.pause() | |
}), this.loadImage = function(a) { | |
document.querySelector(".vjs-logobrand-image").src = a | |
}, this.setDestination = function(a) { | |
document.querySelector(".vjs-logobrand-image-destination").href = a | |
}, this | |
}; | |
a.plugin("logobrand", c) | |
}(window.videojs), | |
function b(a, c, d) { | |
function e(g, h) { | |
if (!c[g]) { | |
if (!a[g]) { | |
var i = "function" == typeof require && require; | |
if (!h && i) return i(g, !0); | |
if (f) return f(g, !0); | |
var j = new Error("Cannot find module '" + g + "'"); | |
throw j.code = "MODULE_NOT_FOUND", j | |
} | |
var k = c[g] = { | |
exports: {} | |
}; | |
a[g][0].call(k.exports, function(b) { | |
var c = a[g][1][b]; | |
return e(c ? c : b) | |
}, k, k.exports, b, a, c, d) | |
} | |
return c[g].exports | |
} | |
for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]); | |
return e | |
}({ | |
1: [function(a, b, c) { | |
var d = a("hls.js"), | |
e = a("./videojs5-hlsjs-source-handler.js"); | |
e(window, window.videojs, d) | |
}, { | |
"./videojs5-hlsjs-source-handler.js": 2, | |
"hls.js": 3 | |
}], | |
2: [function(a, b, c) { | |
a("videojs-quality-picker"); | |
var d = function(a, b, c) { | |
function d(a, b) { | |
function d() { | |
var a = b.options_.hlsjsConfig || {}; | |
j = new c(a), j.on(c.Events.ERROR, function(a, c) { | |
h(a, c, b, l) | |
}), j.on(c.Events.MANIFEST_PARSED, i), j.on(c.Events.LEVEL_LOADED, function(a, b) { | |
m = b.details.live ? 1 / 0 : b.details.totalduration | |
}), j.attachMedia(k) | |
} | |
function e(a) { | |
j.loadSource(a.src) | |
} | |
function f(a, b) { | |
j.nextLevel = a | |
} | |
function g() { | |
1 === l[c.ErrorTypes.MEDIA_ERROR] ? (console.info("trying to recover media error"), j.recoverMediaError()) : 2 === l[c.ErrorTypes.MEDIA_ERROR] ? (console.info("2nd try to recover media error (by swapping audio codec"), j.swapAudioCodec(), j.recoverMediaError()) : l[c.ErrorTypes.MEDIA_ERROR] > 2 && (console.info("bubbling media error up to VIDEOJS"), error.code = 3, b.error = function() { | |
return error | |
}, b.trigger("error")) | |
} | |
function h(a, d) { | |
var e = { | |
message: "HLS.js error: " + d.type + " - fatal: " + d.fatal + " - " + d.details | |
}; | |
if (console.error(e.message), l[d.type] ? l[d.type] += 1 : l[d.type] = 1, d.fatal) switch (d.type) { | |
case c.ErrorTypes.NETWORK_ERROR: | |
console.info("bubbling network error up to VIDEOJS"), e.code = 2, b.error = function() { | |
return e | |
}, b.trigger("error"); | |
break; | |
case c.ErrorTypes.MEDIA_ERROR: | |
g(); | |
break; | |
default: | |
j.destroy(), console.info("bubbling error up to VIDEOJS"), b.error = function() { | |
return e | |
}, b.trigger("error") | |
} | |
} | |
function i(a, c) { | |
function d(a) { | |
return a.height ? a.height + "p" : a.width ? Math.round(9 * a.width / 16) + "p" : a.bitrate ? a.bitrate / 1e3 + "kbps" : 0 | |
} | |
var e = []; | |
if (c.levels.length > 1) { | |
var g = { | |
id: -1, | |
label: "auto", | |
selected: -1 === j.manualLevel | |
}; | |
e.push(g) | |
} | |
c.levels.forEach(function(a, b) { | |
var c = {}; | |
c.id = b, c.selected = b === j.manualLevel, c.label = d(a), e.push(c) | |
}); | |
var h = { | |
qualityData: { | |
video: e | |
}, | |
qualitySwitchCallback: f | |
}; | |
b.trigger("loadedqualitydata", h) | |
} | |
b.name_ = "streamrootHLS"; | |
var j, k = b.el(), | |
l = {}, | |
m = null; | |
k.addEventListener("error", function(a) { | |
var b, c = a.currentTarget.error; | |
switch (c.code) { | |
case c.MEDIA_ERR_ABORTED: | |
b = "You aborted the video playback"; | |
break; | |
case c.MEDIA_ERR_DECODE: | |
b = "The video playback was aborted due to a corruption problem or because the video used features your browser did not support", g(); | |
break; | |
case c.MEDIA_ERR_NETWORK: | |
b = "A network error caused the video download to fail part-way"; | |
break; | |
case c.MEDIA_ERR_SRC_NOT_SUPPORTED: | |
b = "The video could not be loaded, either because the server or network failed or because the format is not supported" | |
} | |
console.error("MEDIA_ERROR: ", b) | |
}), this.duration = function() { | |
return m || k.duration || 0 | |
}, this.dispose = function() { | |
j.destroy() | |
}, d(), e(a) | |
} | |
function e() { | |
var a = document.createElement("video"), | |
c = ["application/vnd.apple.mpegurl"]; | |
return c.some(function(c) { | |
var d = /maybe|probably/i.test(a.canPlayType(c)); | |
return d && b.browser.IS_EDGE ? !1 : d | |
}) | |
} | |
c.isSupported() ? b.getComponent("Html5").registerSourceHandler({ | |
canHandleSource: function(a) { | |
if (e()) return ""; | |
var b, c = /^application\/x-mpegURL$/i, | |
d = /\.m3u8/i; | |
return b = c.test(a.type) ? "probably" : d.test(a.src) ? "maybe" : "" | |
}, | |
handleSource: function(a, b) { | |
return b.hlsProvider && b.hlsProvider.dispose(), b.hlsProvider = new d(a, b), b.hlsProvider | |
} | |
}, 0) : console.error("Hls.js is not supported in this browser!"), b.StreamrootProviderHLS = d | |
}; | |
b.exports = d | |
}, { | |
"videojs-quality-picker": 7 | |
}], | |
3: [function(a, b, c) { | |
(function(d) { | |
! function(a) { | |
if ("object" == typeof c && "undefined" != typeof b) b.exports = a(); | |
else if ("function" == typeof define && define.amd) define([], a); | |
else { | |
var e; | |
e = "undefined" != typeof window ? window : "undefined" != typeof d ? d : "undefined" != typeof self ? self : this, e.Hls = a() | |
} | |
}(function() { | |
var b; | |
return function c(b, d, e) { | |
function f(h, i) { | |
if (!d[h]) { | |
if (!b[h]) { | |
var j = "function" == typeof a && a; | |
if (!i && j) return j(h, !0); | |
if (g) return g(h, !0); | |
var k = new Error("Cannot find module '" + h + "'"); | |
throw k.code = "MODULE_NOT_FOUND", k | |
} | |
var l = d[h] = { | |
exports: {} | |
}; | |
b[h][0].call(l.exports, function(a) { | |
var c = b[h][1][a]; | |
return f(c ? c : a) | |
}, l, l.exports, c, b, d, e) | |
} | |
return d[h].exports | |
} | |
for (var g = "function" == typeof a && a, h = 0; h < e.length; h++) f(e[h]); | |
return f | |
}({ | |
1: [function(a, b, c) { | |
function d() { | |
this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0 | |
} | |
function e(a) { | |
return "function" == typeof a | |
} | |
function f(a) { | |
return "number" == typeof a | |
} | |
function g(a) { | |
return "object" == typeof a && null !== a | |
} | |
function h(a) { | |
return void 0 === a | |
} | |
b.exports = d, d.EventEmitter = d, d.prototype._events = void 0, d.prototype._maxListeners = void 0, d.defaultMaxListeners = 10, d.prototype.setMaxListeners = function(a) { | |
if (!f(a) || 0 > a || isNaN(a)) throw TypeError("n must be a positive number"); | |
return this._maxListeners = a, this | |
}, d.prototype.emit = function(a) { | |
var b, c, d, f, i, j; | |
if (this._events || (this._events = {}), "error" === a && (!this._events.error || g(this._events.error) && !this._events.error.length)) { | |
if (b = arguments[1], b instanceof Error) throw b; | |
var k = new Error('Uncaught, unspecified "error" event. (' + b + ")"); | |
throw k.context = b, k | |
} | |
if (c = this._events[a], h(c)) return !1; | |
if (e(c)) switch (arguments.length) { | |
case 1: | |
c.call(this); | |
break; | |
case 2: | |
c.call(this, arguments[1]); | |
break; | |
case 3: | |
c.call(this, arguments[1], arguments[2]); | |
break; | |
default: | |
f = Array.prototype.slice.call(arguments, 1), c.apply(this, f) | |
} else if (g(c)) | |
for (f = Array.prototype.slice.call(arguments, 1), j = c.slice(), d = j.length, i = 0; d > i; i++) j[i].apply(this, f); | |
return !0 | |
}, d.prototype.addListener = function(a, b) { | |
var c; | |
if (!e(b)) throw TypeError("listener must be a function"); | |
return this._events || (this._events = {}), this._events.newListener && this.emit("newListener", a, e(b.listener) ? b.listener : b), this._events[a] ? g(this._events[a]) ? this._events[a].push(b) : this._events[a] = [this._events[a], b] : this._events[a] = b, g(this._events[a]) && !this._events[a].warned && (c = h(this._maxListeners) ? d.defaultMaxListeners : this._maxListeners, c && c > 0 && this._events[a].length > c && (this._events[a].warned = !0, console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[a].length), "function" == typeof console.trace && console.trace())), this | |
}, d.prototype.on = d.prototype.addListener, d.prototype.once = function(a, b) { | |
function c() { | |
this.removeListener(a, c), d || (d = !0, b.apply(this, arguments)) | |
} | |
if (!e(b)) throw TypeError("listener must be a function"); | |
var d = !1; | |
return c.listener = b, this.on(a, c), this | |
}, d.prototype.removeListener = function(a, b) { | |
var c, d, f, h; | |
if (!e(b)) throw TypeError("listener must be a function"); | |
if (!this._events || !this._events[a]) return this; | |
if (c = this._events[a], f = c.length, d = -1, c === b || e(c.listener) && c.listener === b) delete this._events[a], this._events.removeListener && this.emit("removeListener", a, b); | |
else if (g(c)) { | |
for (h = f; h-- > 0;) | |
if (c[h] === b || c[h].listener && c[h].listener === b) { | |
d = h; | |
break | |
} | |
if (0 > d) return this; | |
1 === c.length ? (c.length = 0, delete this._events[a]) : c.splice(d, 1), this._events.removeListener && this.emit("removeListener", a, b) | |
} | |
return this | |
}, d.prototype.removeAllListeners = function(a) { | |
var b, c; | |
if (!this._events) return this; | |
if (!this._events.removeListener) return 0 === arguments.length ? this._events = {} : this._events[a] && delete this._events[a], this; | |
if (0 === arguments.length) { | |
for (b in this._events) "removeListener" !== b && this.removeAllListeners(b); | |
return this.removeAllListeners("removeListener"), this._events = {}, this | |
} | |
if (c = this._events[a], e(c)) this.removeListener(a, c); | |
else if (c) | |
for (; c.length;) this.removeListener(a, c[c.length - 1]); | |
return delete this._events[a], this | |
}, d.prototype.listeners = function(a) { | |
var b; | |
return b = this._events && this._events[a] ? e(this._events[a]) ? [this._events[a]] : this._events[a].slice() : [] | |
}, d.prototype.listenerCount = function(a) { | |
if (this._events) { | |
var b = this._events[a]; | |
if (e(b)) return 1; | |
if (b) return b.length | |
} | |
return 0 | |
}, d.listenerCount = function(a, b) { | |
return a.listenerCount(b) | |
} | |
}, {}], | |
2: [function(a, c, d) { | |
! function(a) { | |
var e = { | |
buildAbsoluteURL: function(a, b) { | |
if (b = b.trim(), /^[a-z]+:/i.test(b)) return b; | |
var c = null, | |
d = null, | |
f = /^([^#]*)(.*)$/.exec(b); | |
f && (d = f[2], b = f[1]); | |
var g = /^([^\?]*)(.*)$/.exec(b); | |
g && (c = g[2], b = g[1]); | |
var h = /^([^#]*)(.*)$/.exec(a); | |
h && (a = h[1]); | |
var i = /^([^\?]*)(.*)$/.exec(a); | |
i && (a = i[1]); | |
var j = /^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(a); | |
if (!j) throw new Error("Error trying to parse base URL."); | |
var k = j[2] || "", | |
l = j[1] || "", | |
m = j[4], | |
n = null; | |
return n = /^\/\//.test(b) ? k + "//" + e.buildAbsolutePath("", b.substring(2)) : /^\//.test(b) ? l + "/" + e.buildAbsolutePath("", b.substring(1)) : e.buildAbsolutePath(l + m, b), c && (n += c), d && (n += d), n | |
}, | |
buildAbsolutePath: function(a, b) { | |
for (var c, d, e = b, f = "", g = a.replace(/[^\/]*$/, e.replace(/(\/|^)(?:\.?\/+)+/g, "$1")), h = 0; d = g.indexOf("/../", h), d > -1; h = d + c) c = /^\/(?:\.\.\/)*/.exec(g.slice(d))[0].length, f = (f + g.substring(h, d)).replace(new RegExp("(?:\\/+[^\\/]*){0," + (c - 1) / 3 + "}$"), "/"); | |
return f + g.substr(h) | |
} | |
}; | |
"object" == typeof d && "object" == typeof c ? c.exports = e : "function" == typeof b && b.amd ? b([], function() { | |
return e | |
}) : "object" == typeof d ? d.URLToolkit = e : a.URLToolkit = e | |
}(this) | |
}, {}], | |
3: [function(a, b, c) { | |
var d = arguments[3], | |
e = arguments[4], | |
f = arguments[5], | |
g = JSON.stringify; | |
b.exports = function(a, b) { | |
function c(a) { | |
q[a] = !0; | |
for (var b in e[a][1]) { | |
var d = e[a][1][b]; | |
q[d] || c(d) | |
} | |
} | |
for (var h, i = Object.keys(f), j = 0, k = i.length; k > j; j++) { | |
var l = i[j], | |
m = f[l].exports; | |
if (m === a || m && m["default"] === a) { | |
h = l; | |
break | |
} | |
} | |
if (!h) { | |
h = Math.floor(Math.pow(16, 8) * Math.random()).toString(16); | |
for (var n = {}, j = 0, k = i.length; k > j; j++) { | |
var l = i[j]; | |
n[l] = l | |
} | |
e[h] = [Function(["require", "module", "exports"], "(" + a + ")(self)"), n] | |
} | |
var o = Math.floor(Math.pow(16, 8) * Math.random()).toString(16), | |
p = {}; | |
p[h] = h, e[o] = [Function(["require"], "var f = require(" + g(h) + ");(f.default ? f.default : f)(self);"), p]; | |
var q = {}; | |
c(o); | |
var r = "(" + d + ")({" + Object.keys(q).map(function(a) { | |
return g(a) + ":[" + e[a][0] + "," + g(e[a][1]) + "]" | |
}).join(",") + "},{},[" + g(o) + "])", | |
s = window.URL || window.webkitURL || window.mozURL || window.msURL, | |
t = new Blob([r], { | |
type: "text/javascript" | |
}); | |
if (b && b.bare) return t; | |
var u = s.createObjectURL(t), | |
v = new Worker(u); | |
return v.objectURL = u, v | |
} | |
}, {}], | |
4: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = a(30), | |
n = d(m), | |
o = a(26), | |
p = a(45), | |
q = a(9), | |
r = d(q), | |
s = function(a) { | |
function b(a) { | |
e(this, b); | |
var c = f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].FRAG_LOADING, j["default"].FRAG_LOADED, j["default"].FRAG_BUFFERED, j["default"].ERROR)); | |
return c.lastLoadedFragLevel = 0, c._autoLevelCapping = -1, c._nextAutoLevel = -1, c.hls = a, c.onCheck = c.abandonRulesCheck.bind(c), c | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
this.clearTimer(), l["default"].prototype.destroy.call(this) | |
} | |
}, { | |
key: "onFragLoading", | |
value: function(a) { | |
var b = a.frag; | |
if ("main" === b.type) { | |
if (this.timer || (this.timer = setInterval(this.onCheck, 100)), !this.bwEstimator) { | |
var c = this.hls, | |
d = a.frag.level, | |
e = c.levels[d].details.live, | |
f = c.config, | |
g = void 0, | |
h = void 0; | |
e ? (g = f.abrEwmaFastLive, h = f.abrEwmaSlowLive) : (g = f.abrEwmaFastVoD, h = f.abrEwmaSlowVoD), this.bwEstimator = new r["default"](c, h, g, f.abrEwmaDefaultEstimate) | |
} | |
this.fragCurrent = b | |
} | |
} | |
}, { | |
key: "abandonRulesCheck", | |
value: function() { | |
var a = this.hls, | |
b = a.media, | |
c = this.fragCurrent, | |
d = c.loader; | |
if (!d || d.stats && d.stats.aborted) return p.logger.warn("frag loader destroy or aborted, disarm abandonRules"), void this.clearTimer(); | |
var e = d.stats; | |
if (b && (!b.paused && 0 !== b.playbackRate || !b.readyState) && c.autoLevel && c.level) { | |
var f = performance.now() - e.trequest, | |
g = Math.abs(b.playbackRate); | |
if (f > 500 * c.duration / g) { | |
var h = a.levels, | |
i = Math.max(1, e.bw ? e.bw / 8 : 1e3 * e.loaded / f), | |
k = e.total ? e.total : Math.max(e.loaded, Math.round(c.duration * h[c.level].bitrate / 8)), | |
l = b.currentTime, | |
m = (k - e.loaded) / i, | |
o = (n["default"].bufferInfo(b, l, a.config.maxBufferHole).end - l) / g; | |
if (o < 2 * c.duration / g && m > o) { | |
var q = void 0, | |
r = void 0; | |
for (r = c.level - 1; r >= 0 && (q = c.duration * h[r].bitrate / (6.4 * i), !(o > q)); r--); | |
m > q && (r = Math.max(0, r), p.logger.warn("loading too slow, abort fragment loading and switch to level " + r + ":fragLoadedDelay[" + r + "]<fragLoadedDelay[" + (c.level - 1) + "];bufferStarvationDelay:" + q.toFixed(1) + "<" + m.toFixed(1) + ":" + o.toFixed(1)), a.nextLoadLevel = r, this.bwEstimator.sample(f, e.loaded), d.abort(), this.clearTimer(), a.trigger(j["default"].FRAG_LOAD_EMERGENCY_ABORTED, { | |
frag: c, | |
stats: e | |
})) | |
} | |
} | |
} | |
} | |
}, { | |
key: "onFragLoaded", | |
value: function(a) { | |
var b = a.frag; | |
if ("main" === b.type && (this.clearTimer(), this.lastLoadedFragLevel = b.level, this._nextAutoLevel = -1, a.frag.bitrateTest)) { | |
var c = a.stats; | |
c.tparsed = c.tbuffered = c.tload, this.onFragBuffered(a) | |
} | |
} | |
}, { | |
key: "onFragBuffered", | |
value: function(a) { | |
var b = a.stats, | |
c = a.frag; | |
if (b.aborted !== !0 && 1 === c.loadCounter && "main" === c.type && (!c.bitrateTest || b.tload === b.tbuffered)) { | |
var d = b.tbuffered - b.trequest; | |
p.logger.log("latency/loading/parsing/append/kbps:" + Math.round(b.tfirst - b.trequest) + "/" + Math.round(b.tload - b.tfirst) + "/" + Math.round(b.tparsed - b.tload) + "/" + Math.round(b.tbuffered - b.tparsed) + "/" + Math.round(8 * b.loaded / (b.tbuffered - b.trequest))), this.bwEstimator.sample(d, b.loaded), c.bitrateTest ? this.bitrateTestDelay = d / 1e3 : this.bitrateTestDelay = 0 | |
} | |
} | |
}, { | |
key: "onError", | |
value: function(a) { | |
switch (a.details) { | |
case o.ErrorDetails.FRAG_LOAD_ERROR: | |
case o.ErrorDetails.FRAG_LOAD_TIMEOUT: | |
this.clearTimer() | |
} | |
} | |
}, { | |
key: "clearTimer", | |
value: function() { | |
this.timer && (clearInterval(this.timer), this.timer = null) | |
} | |
}, { | |
key: "findBestLevel", | |
value: function(a, b, c, d, e, f, g, h, i) { | |
for (var j = e; j >= d; j--) { | |
var k = i[j], | |
l = k.details, | |
m = l ? l.totalduration / l.fragments.length : b, | |
n = l ? l.live : !1, | |
o = void 0; | |
o = a >= j ? g * c : h * c; | |
var q = i[j].bitrate, | |
r = q * m / o; | |
if (p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: " + j + "/" + Math.round(o) + "/" + q + "/" + m + "/" + f + "/" + r), o > q && (!r || n || f > r)) return j | |
} | |
return -1 | |
} | |
}, { | |
key: "autoLevelCapping", | |
get: function() { | |
return this._autoLevelCapping | |
}, | |
set: function(a) { | |
this._autoLevelCapping = a | |
} | |
}, { | |
key: "nextAutoLevel", | |
get: function() { | |
var a = this._nextAutoLevel, | |
b = this.bwEstimator, | |
c = this.hls, | |
d = c.levels, | |
e = c.config.minAutoBitrate; | |
if (!(-1 === a || b && b.canEstimate())) return Math.min(a, this.maxAutoLevel); | |
var f = this.nextABRAutoLevel; | |
if (-1 !== a && (f = Math.min(a, f)), void 0 !== e) | |
for (; d[f].bitrate < e;) f++; | |
return f | |
}, | |
set: function(a) { | |
this._nextAutoLevel = a | |
} | |
}, { | |
key: "minAutoLevel", | |
get: function() { | |
for (var a = this.hls, b = a.levels, c = a.config.minAutoBitrate, d = 0; d < b.length; d++) | |
if (b[d].bitrate > c) return d; | |
return 0 | |
} | |
}, { | |
key: "maxAutoLevel", | |
get: function() { | |
var a, b = this.hls.levels, | |
c = this._autoLevelCapping; | |
return a = -1 === c && b && b.length ? b.length - 1 : c | |
} | |
}, { | |
key: "nextABRAutoLevel", | |
get: function() { | |
var a = this.hls, | |
b = this.maxAutoLevel, | |
c = a.levels, | |
d = a.config, | |
e = this.minAutoLevel, | |
f = a.media, | |
g = this.lastLoadedFragLevel, | |
h = this.fragCurrent ? this.fragCurrent.duration : 0, | |
i = f ? f.currentTime : 0, | |
j = f && 0 !== f.playbackRate ? Math.abs(f.playbackRate) : 1, | |
k = this.bwEstimator ? this.bwEstimator.getEstimate() : d.abrEwmaDefaultEstimate, | |
l = (n["default"].bufferInfo(f, i, d.maxBufferHole).end - i) / j, | |
m = this.findBestLevel(g, h, k, e, b, l, d.abrBandWidthFactor, d.abrBandWidthUpFactor, c); | |
if (m >= 0) return m; | |
p.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering"); | |
var o = d.maxStarvationDelay, | |
q = d.abrBandWidthFactor, | |
r = d.abrBandWidthUpFactor; | |
if (0 === l) { | |
var s = this.bitrateTestDelay; | |
s && (o = d.maxLoadingDelay - s, p.logger.trace("bitrate test took " + Math.round(1e3 * s) + "ms, set first fragment max fetchDuration to " + Math.round(1e3 * o) + " ms"), q = r = 1) | |
} | |
return m = this.findBestLevel(g, h, k, e, b, l + o, q, r, c), Math.max(m, 0) | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = s | |
}, { | |
26: 26, | |
27: 27, | |
28: 28, | |
30: 30, | |
45: 45, | |
9: 9 | |
}], | |
5: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(41), | |
j = d(i), | |
k = a(30), | |
l = d(k), | |
m = a(22), | |
n = d(m), | |
o = a(28), | |
p = d(o), | |
q = a(27), | |
r = d(q), | |
s = a(31), | |
t = d(s), | |
u = a(47), | |
v = d(u), | |
w = a(26), | |
x = a(45), | |
y = { | |
STOPPED: "STOPPED", | |
STARTING: "STARTING", | |
IDLE: "IDLE", | |
PAUSED: "PAUSED", | |
KEY_LOADING: "KEY_LOADING", | |
FRAG_LOADING: "FRAG_LOADING", | |
FRAG_LOADING_WAITING_RETRY: "FRAG_LOADING_WAITING_RETRY", | |
WAITING_TRACK: "WAITING_TRACK", | |
PARSING: "PARSING", | |
PARSED: "PARSED", | |
ENDED: "ENDED", | |
ERROR: "ERROR" | |
}, | |
z = function(a) { | |
function b(a) { | |
e(this, b); | |
var c = f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, p["default"].MEDIA_ATTACHED, p["default"].MEDIA_DETACHING, p["default"].AUDIO_TRACKS_UPDATED, p["default"].AUDIO_TRACK_SWITCH, p["default"].AUDIO_TRACK_LOADED, p["default"].KEY_LOADED, p["default"].FRAG_LOADED, p["default"].FRAG_PARSING_INIT_SEGMENT, p["default"].FRAG_PARSING_DATA, p["default"].FRAG_PARSED, p["default"].ERROR, p["default"].BUFFER_CREATED, p["default"].BUFFER_APPENDED, p["default"].BUFFER_FLUSHED)); | |
return c.config = a.config, c.audioCodecSwap = !1, c.ticks = 0, c.ontick = c.tick.bind(c), c | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
this.stopLoad(), this.timer && (clearInterval(this.timer), this.timer = null), r["default"].prototype.destroy.call(this), this.state = y.STOPPED | |
} | |
}, { | |
key: "startLoad", | |
value: function(a) { | |
if (this.tracks) { | |
var b = this.media, | |
c = this.lastCurrentTime; | |
this.stopLoad(), this.timer || (this.timer = setInterval(this.ontick, 100)), | |
this.fragLoadError = 0, b && c ? (x.logger.log("configure startPosition @" + c), this.state = y.IDLE) : (this.lastCurrentTime = this.startPosition ? this.startPosition : a, this.state = y.STARTING), this.nextLoadPosition = this.startPosition = this.lastCurrentTime, this.tick() | |
} else this.startPosition = a, this.state = y.STOPPED | |
} | |
}, { | |
key: "stopLoad", | |
value: function() { | |
var a = this.fragCurrent; | |
a && (a.loader && a.loader.abort(), this.fragCurrent = null), this.fragPrevious = null, this.demuxer && (this.demuxer.destroy(), this.demuxer = null), this.state = y.STOPPED | |
} | |
}, { | |
key: "tick", | |
value: function() { | |
this.ticks++, 1 === this.ticks && (this.doTick(), this.ticks > 1 && setTimeout(this.tick, 1), this.ticks = 0) | |
} | |
}, { | |
key: "doTick", | |
value: function() { | |
var a, b, c, d = this.hls, | |
e = d.config; | |
switch (this.state) { | |
case y.ERROR: | |
case y.PAUSED: | |
break; | |
case y.STARTING: | |
this.state = y.WAITING_TRACK, this.loadedmetadata = !1; | |
break; | |
case y.IDLE: | |
if (!this.media && (this.startFragRequested || !e.startFragPrefetch)) break; | |
a = this.loadedmetadata ? this.media.currentTime : this.nextLoadPosition; | |
var f = this.mediaBuffer ? this.mediaBuffer : this.media, | |
g = l["default"].bufferInfo(f, a, e.maxBufferHole), | |
h = g.len, | |
i = g.end, | |
k = this.fragPrevious, | |
m = e.maxMaxBufferLength; | |
if (m > h && this.trackId < this.tracks.length) { | |
if (c = this.tracks[this.trackId].details, "undefined" == typeof c) { | |
this.state = y.WAITING_TRACK; | |
break | |
} | |
if (!c.live && k && k.sn === c.endSN && (!this.media.seeking || this.media.duration - i < k.duration / 2)) { | |
this.hls.trigger(p["default"].BUFFER_EOS, { | |
type: "audio" | |
}), this.state = y.ENDED; | |
break | |
} | |
var n = c.fragments, | |
o = n.length, | |
q = n[0].start, | |
r = n[o - 1].start + n[o - 1].duration, | |
s = void 0; | |
if (q > i ? s = n[0] : ! function() { | |
var a = void 0, | |
b = e.maxFragLookUpTolerance; | |
r > i ? (i > r - b && (b = 0), a = j["default"].search(n, function(a) { | |
return a.start + a.duration - b <= i ? 1 : a.start - b > i ? -1 : 0 | |
})) : a = n[o - 1], a && (s = a, q = a.start, k && s.level === k.level && s.sn === k.sn && (s.sn < c.endSN ? (s = n[s.sn + 1 - c.startSN], x.logger.log("SN just loaded, load next one: " + s.sn)) : s = null)) | |
}(), s) | |
if (null != s.decryptdata.uri && null == s.decryptdata.key) x.logger.log("Loading key for " + s.sn + " of [" + c.startSN + " ," + c.endSN + "],track " + this.trackId), this.state = y.KEY_LOADING, d.trigger(p["default"].KEY_LOADING, { | |
frag: s | |
}); | |
else { | |
if (x.logger.log("Loading " + s.sn + " of [" + c.startSN + " ," + c.endSN + "],track " + this.trackId + ", currentTime:" + a + ",bufferEnd:" + i.toFixed(3)), void 0 !== this.fragLoadIdx ? this.fragLoadIdx++ : this.fragLoadIdx = 0, s.loadCounter) { | |
s.loadCounter++; | |
var t = e.fragLoadingLoopThreshold; | |
if (s.loadCounter > t && Math.abs(this.fragLoadIdx - s.loadIdx) < t) return void d.trigger(p["default"].ERROR, { | |
type: w.ErrorTypes.MEDIA_ERROR, | |
details: w.ErrorDetails.FRAG_LOOP_LOADING_ERROR, | |
fatal: !1, | |
frag: s | |
}) | |
} else s.loadCounter = 1; | |
s.loadIdx = this.fragLoadIdx, this.fragCurrent = s, this.startFragRequested = !0, d.trigger(p["default"].FRAG_LOADING, { | |
frag: s | |
}), this.state = y.FRAG_LOADING | |
} | |
} | |
break; | |
case y.WAITING_TRACK: | |
b = this.tracks[this.trackId], b && b.details && (this.state = y.IDLE); | |
break; | |
case y.FRAG_LOADING_WAITING_RETRY: | |
var u = performance.now(), | |
v = this.retryDate; | |
f = this.media; | |
var z = f && f.seeking; | |
(!v || u >= v || z) && (x.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"), this.state = y.IDLE); | |
break; | |
case y.STOPPED: | |
case y.FRAG_LOADING: | |
case y.PARSING: | |
case y.PARSED: | |
case y.ENDED: | |
} | |
} | |
}, { | |
key: "onMediaAttached", | |
value: function(a) { | |
var b = this.media = this.mediaBuffer = a.media; | |
this.onvseeking = this.onMediaSeeking.bind(this), this.onvended = this.onMediaEnded.bind(this), b.addEventListener("seeking", this.onvseeking), b.addEventListener("ended", this.onvended); | |
var c = this.config; | |
this.tracks && c.autoStartLoad && this.startLoad(c.startPosition) | |
} | |
}, { | |
key: "onMediaDetaching", | |
value: function() { | |
var a = this.media; | |
a && a.ended && (x.logger.log("MSE detaching and video ended, reset startPosition"), this.startPosition = this.lastCurrentTime = 0); | |
var b = this.tracks; | |
b && b.forEach(function(a) { | |
a.details && a.details.fragments.forEach(function(a) { | |
a.loadCounter = void 0 | |
}) | |
}), a && (a.removeEventListener("seeking", this.onvseeking), a.removeEventListener("ended", this.onvended), this.onvseeking = this.onvseeked = this.onvended = null), this.media = null, this.loadedmetadata = !1, this.stopLoad() | |
} | |
}, { | |
key: "onMediaSeeking", | |
value: function() { | |
this.state === y.ENDED && (this.state = y.IDLE), this.media && (this.lastCurrentTime = this.media.currentTime), void 0 !== this.fragLoadIdx && (this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold), this.tick() | |
} | |
}, { | |
key: "onMediaEnded", | |
value: function() { | |
this.startPosition = this.lastCurrentTime = 0 | |
} | |
}, { | |
key: "onAudioTracksUpdated", | |
value: function(a) { | |
x.logger.log("audio tracks updated"), this.tracks = a.audioTracks | |
} | |
}, { | |
key: "onAudioTrackSwitch", | |
value: function(a) { | |
var b = !!a.url; | |
this.trackId = a.id, this.state = y.IDLE, this.fragCurrent = null, this.state = y.PAUSED, b ? this.timer || (this.timer = setInterval(this.ontick, 100)) : this.demuxer && (this.demuxer.destroy(), this.demuxer = null), this.hls.trigger(p["default"].BUFFER_FLUSHING, { | |
startOffset: 0, | |
endOffset: Number.POSITIVE_INFINITY, | |
type: "audio" | |
}), this.tick() | |
} | |
}, { | |
key: "onAudioTrackLoaded", | |
value: function(a) { | |
var b = a.details, | |
c = a.id, | |
d = this.tracks[c], | |
e = b.totalduration; | |
if (x.logger.log("track " + c + " loaded [" + b.startSN + "," + b.endSN + "],duration:" + e), b.PTSKnown = !1, d.details = b, !this.startFragRequested) { | |
if (-1 === this.startPosition) { | |
var f = b.startTimeOffset; | |
isNaN(f) ? this.startPosition = 0 : (x.logger.log("start time offset found in playlist, adjust startPosition to " + f), this.startPosition = f) | |
} | |
this.nextLoadPosition = this.startPosition | |
} | |
this.state === y.WAITING_TRACK && (this.state = y.IDLE), this.tick() | |
} | |
}, { | |
key: "onKeyLoaded", | |
value: function() { | |
this.state === y.KEY_LOADING && (this.state = y.IDLE, this.tick()) | |
} | |
}, { | |
key: "onFragLoaded", | |
value: function(a) { | |
var b = this.fragCurrent; | |
if (this.state === y.FRAG_LOADING && b && "audio" === a.frag.type && a.frag.level === b.level && a.frag.sn === b.sn) { | |
this.state = y.PARSING, this.stats = a.stats; | |
var c = this.tracks[this.trackId], | |
d = c.details, | |
e = d.totalduration, | |
f = b.start, | |
g = b.level, | |
h = b.sn, | |
i = this.config.defaultAudioCodec || c.audioCodec; | |
this.pendingAppending = 0, this.demuxer || (this.demuxer = new n["default"](this.hls, "audio")), x.logger.log("Demuxing " + h + " of [" + d.startSN + " ," + d.endSN + "],track " + g); | |
var j = d.PTSKnown || !d.live; | |
this.demuxer.push(a.payload, i, null, f, b.cc, g, h, e, b.decryptdata, j) | |
} | |
this.fragLoadError = 0 | |
} | |
}, { | |
key: "onFragParsingInitSegment", | |
value: function(a) { | |
var b = this.fragCurrent; | |
if (b && "audio" === a.id && a.sn === b.sn && a.level === b.level && this.state === y.PARSING) { | |
var c = a.tracks, | |
d = void 0; | |
if (d = c.audio) { | |
d.levelCodec = "mp4a.40.2", d.id = a.id, this.hls.trigger(p["default"].BUFFER_CODECS, c), x.logger.log("audio track:audio,container:" + d.container + ",codecs[level/parsed]=[" + d.levelCodec + "/" + d.codec + "]"); | |
var e = d.initSegment; | |
e && (this.pendingAppending++, this.hls.trigger(p["default"].BUFFER_APPENDING, { | |
type: "audio", | |
data: e, | |
parent: "audio", | |
content: "initSegment" | |
})), this.tick() | |
} | |
} | |
} | |
}, { | |
key: "onFragParsingData", | |
value: function(a) { | |
var b = this, | |
c = this.fragCurrent; | |
if (c && "audio" === a.id && a.sn === c.sn && a.level === c.level && this.state === y.PARSING) { | |
var d = this.tracks[this.trackId], | |
e = this.fragCurrent; | |
x.logger.log("parsed " + a.type + ",PTS:[" + a.startPTS.toFixed(3) + "," + a.endPTS.toFixed(3) + "],DTS:[" + a.startDTS.toFixed(3) + "/" + a.endDTS.toFixed(3) + "],nb:" + a.nb), t["default"].updateFragPTSDTS(d.details, e.sn, a.startPTS, a.endPTS), [a.data1, a.data2].forEach(function(c) { | |
c && (b.pendingAppending++, b.hls.trigger(p["default"].BUFFER_APPENDING, { | |
type: a.type, | |
data: c, | |
parent: "audio", | |
content: "data" | |
})) | |
}), this.nextLoadPosition = a.endPTS, this.tick() | |
} | |
} | |
}, { | |
key: "onFragParsed", | |
value: function(a) { | |
var b = this.fragCurrent; | |
b && "audio" === a.id && a.sn === b.sn && a.level === b.level && this.state === y.PARSING && (this.stats.tparsed = performance.now(), this.state = y.PARSED, this._checkAppendedParsed()) | |
} | |
}, { | |
key: "onBufferCreated", | |
value: function(a) { | |
var b = a.tracks.audio; | |
b && (this.mediaBuffer = b.buffer, this.loadedmetadata = !0) | |
} | |
}, { | |
key: "onBufferAppended", | |
value: function(a) { | |
if ("audio" === a.parent) switch (this.state) { | |
case y.PARSING: | |
case y.PARSED: | |
this.pendingAppending--, this._checkAppendedParsed() | |
} | |
} | |
}, { | |
key: "_checkAppendedParsed", | |
value: function() { | |
if (this.state === y.PARSED && 0 === this.pendingAppending) { | |
var a = this.fragCurrent, | |
b = this.stats; | |
if (a) { | |
this.fragPrevious = a, b.tbuffered = performance.now(), this.hls.trigger(p["default"].FRAG_BUFFERED, { | |
stats: b, | |
frag: a, | |
id: "audio" | |
}); | |
var c = this.mediaBuffer ? this.mediaBuffer : this.media; | |
x.logger.log("audio buffered : " + v["default"].toString(c.buffered)), this.state = y.IDLE | |
} | |
this.tick() | |
} | |
} | |
}, { | |
key: "onError", | |
value: function(a) { | |
var b = a.frag; | |
if (!b || "audio" === b.type) switch (a.details) { | |
case w.ErrorDetails.FRAG_LOAD_ERROR: | |
case w.ErrorDetails.FRAG_LOAD_TIMEOUT: | |
if (!a.fatal) { | |
var c = this.fragLoadError; | |
c ? c++ : c = 1; | |
var d = this.config; | |
if (c <= d.fragLoadingMaxRetry) { | |
this.fragLoadError = c, b.loadCounter = 0; | |
var e = Math.min(Math.pow(2, c - 1) * d.fragLoadingRetryDelay, d.fragLoadingMaxRetryTimeout); | |
x.logger.warn("audioStreamController: frag loading failed, retry in " + e + " ms"), this.retryDate = performance.now() + e, this.state = y.FRAG_LOADING_WAITING_RETRY | |
} else x.logger.error("audioStreamController: " + a.details + " reaches max retry, redispatch as fatal ..."), a.fatal = !0, this.hls.trigger(p["default"].ERROR, a), this.state = y.ERROR | |
} | |
break; | |
case w.ErrorDetails.FRAG_LOOP_LOADING_ERROR: | |
case w.ErrorDetails.AUDIO_TRACK_LOAD_ERROR: | |
case w.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT: | |
case w.ErrorDetails.KEY_LOAD_ERROR: | |
case w.ErrorDetails.KEY_LOAD_TIMEOUT: | |
this.state !== y.ERROR && (this.state = a.fatal ? y.ERROR : y.IDLE, x.logger.warn("audioStreamController: " + a.details + " while loading frag,switch to " + this.state + " state ...")) | |
} | |
} | |
}, { | |
key: "onBufferFlushed", | |
value: function() { | |
this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold, this.state = y.IDLE, this.fragPrevious = null, this.tick() | |
} | |
}]), b | |
}(r["default"]); | |
c["default"] = z | |
}, { | |
22: 22, | |
26: 26, | |
27: 27, | |
28: 28, | |
30: 30, | |
31: 31, | |
41: 41, | |
45: 45, | |
47: 47 | |
}], | |
6: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = a(45), | |
n = function(a) { | |
function b(a) { | |
return e(this, b), f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].MANIFEST_LOADING, j["default"].MANIFEST_LOADED, j["default"].AUDIO_TRACK_LOADED)) | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
l["default"].prototype.destroy.call(this) | |
} | |
}, { | |
key: "onManifestLoading", | |
value: function() { | |
this.tracks = [], this.trackId = -1 | |
} | |
}, { | |
key: "onManifestLoaded", | |
value: function(a) { | |
var b = this, | |
c = a.audioTracks || [], | |
d = !1; | |
this.tracks = c, this.hls.trigger(j["default"].AUDIO_TRACKS_UPDATED, { | |
audioTracks: c | |
}); | |
var e = 0; | |
c.forEach(function(a) { | |
return a["default"] ? (b.audioTrack = e, void(d = !0)) : void e++ | |
}), d === !1 && c.length && (m.logger.log("no default audio track defined, use first audio track as default"), this.audioTrack = 0) | |
} | |
}, { | |
key: "onAudioTrackLoaded", | |
value: function(a) { | |
a.id < this.tracks.length && (m.logger.log("audioTrack " + a.id + " loaded"), this.tracks[a.id].details = a.details, a.details.live && !this.timer && (this.timer = setInterval(this.ontick, 1e3 * a.details.targetduration)), !a.details.live && this.timer && (clearInterval(this.timer), this.timer = null)) | |
} | |
}, { | |
key: "setAudioTrackInternal", | |
value: function(a) { | |
if (a >= 0 && a < this.tracks.length) { | |
this.timer && (clearInterval(this.timer), this.timer = null), this.trackId = a, m.logger.log("switching to audioTrack " + a); | |
var b = this.tracks[a], | |
c = b.type, | |
d = b.url; | |
this.hls.trigger(j["default"].AUDIO_TRACK_SWITCH, { | |
id: a, | |
type: c, | |
url: d | |
}); | |
var e = b.details; | |
!d || void 0 !== e && e.live !== !0 || (m.logger.log("(re)loading playlist for audioTrack " + a), this.hls.trigger(j["default"].AUDIO_TRACK_LOADING, { | |
url: d, | |
id: a | |
})) | |
} | |
} | |
}, { | |
key: "audioTracks", | |
get: function() { | |
return this.tracks | |
} | |
}, { | |
key: "audioTrack", | |
get: function() { | |
return this.trackId | |
}, | |
set: function(a) { | |
(this.trackId !== a || void 0 === this.tracks[a].details) && this.setAudioTrackInternal(a) | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = n | |
}, { | |
27: 27, | |
28: 28, | |
45: 45 | |
}], | |
7: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = a(45), | |
n = a(26), | |
o = function(a) { | |
function b(a) { | |
e(this, b); | |
var c = f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].MEDIA_ATTACHING, j["default"].MEDIA_DETACHING, j["default"].MANIFEST_PARSED, j["default"].BUFFER_RESET, j["default"].BUFFER_APPENDING, j["default"].BUFFER_CODECS, j["default"].BUFFER_EOS, j["default"].BUFFER_FLUSHING, j["default"].LEVEL_UPDATED)); | |
return c._msDuration = null, c._levelDuration = null, c.onsbue = c.onSBUpdateEnd.bind(c), c.onsbe = c.onSBUpdateError.bind(c), c.pendingTracks = {}, c | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
l["default"].prototype.destroy.call(this) | |
} | |
}, { | |
key: "onManifestParsed", | |
value: function(a) { | |
var b = a.audio, | |
c = a.video, | |
d = 0; | |
a.altAudio && (b || c) && (d = (b ? 1 : 0) + (c ? 1 : 0), m.logger.log(d + " sourceBuffer(s) expected")), this.sourceBufferNb = d | |
} | |
}, { | |
key: "onMediaAttaching", | |
value: function(a) { | |
var b = this.media = a.media; | |
if (b) { | |
var c = this.mediaSource = new MediaSource; | |
this.onmso = this.onMediaSourceOpen.bind(this), this.onmse = this.onMediaSourceEnded.bind(this), this.onmsc = this.onMediaSourceClose.bind(this), c.addEventListener("sourceopen", this.onmso), c.addEventListener("sourceended", this.onmse), c.addEventListener("sourceclose", this.onmsc), b.src = URL.createObjectURL(c) | |
} | |
} | |
}, { | |
key: "onMediaDetaching", | |
value: function() { | |
m.logger.log("media source detaching"); | |
var a = this.mediaSource; | |
if (a) { | |
if ("open" === a.readyState) try { | |
a.endOfStream() | |
} catch (b) { | |
m.logger.warn("onMediaDetaching:" + b.message + " while calling endOfStream") | |
} | |
a.removeEventListener("sourceopen", this.onmso), a.removeEventListener("sourceended", this.onmse), a.removeEventListener("sourceclose", this.onmsc), this.media && (this.media.removeAttribute("src"), this.media.load()), this.mediaSource = null, this.media = null, this.pendingTracks = {}, this.sourceBuffer = {}, this.flushRange = [], this.segments = [], this.appended = 0 | |
} | |
this.onmso = this.onmse = this.onmsc = null, this.hls.trigger(j["default"].MEDIA_DETACHED) | |
} | |
}, { | |
key: "onMediaSourceOpen", | |
value: function() { | |
m.logger.log("media source opened"), this.hls.trigger(j["default"].MEDIA_ATTACHED, { | |
media: this.media | |
}); | |
var a = this.mediaSource; | |
a && a.removeEventListener("sourceopen", this.onmso), this.checkPendingTracks() | |
} | |
}, { | |
key: "checkPendingTracks", | |
value: function() { | |
var a = this.pendingTracks, | |
b = Object.keys(a).length; | |
b && (this.sourceBufferNb <= b || 0 === this.sourceBufferNb) && (this.createSourceBuffers(a), this.pendingTracks = {}, this.doAppending()) | |
} | |
}, { | |
key: "onMediaSourceClose", | |
value: function() { | |
m.logger.log("media source closed") | |
} | |
}, { | |
key: "onMediaSourceEnded", | |
value: function() { | |
m.logger.log("media source ended") | |
} | |
}, { | |
key: "onSBUpdateEnd", | |
value: function() { | |
this._needsFlush && this.doFlush(), this._needsEos && this.checkEos(), this.appending = !1, this.hls.trigger(j["default"].BUFFER_APPENDED, { | |
parent: this.parent | |
}), this._needsFlush || this.doAppending(), this.updateMediaElementDuration() | |
} | |
}, { | |
key: "onSBUpdateError", | |
value: function(a) { | |
m.logger.error("sourceBuffer error:" + a), this.hls.trigger(j["default"].ERROR, { | |
type: n.ErrorTypes.MEDIA_ERROR, | |
details: n.ErrorDetails.BUFFER_APPENDING_ERROR, | |
fatal: !1 | |
}) | |
} | |
}, { | |
key: "onBufferReset", | |
value: function() { | |
var a = this.sourceBuffer; | |
for (var b in a) { | |
var c = a[b]; | |
try { | |
this.mediaSource.removeSourceBuffer(c), c.removeEventListener("updateend", this.onsbue), c.removeEventListener("error", this.onsbe) | |
} catch (d) {} | |
} | |
this.sourceBuffer = {}, this.flushRange = [], this.segments = [], this.appended = 0 | |
} | |
}, { | |
key: "onBufferCodecs", | |
value: function(a) { | |
if (0 === Object.keys(this.sourceBuffer).length) { | |
for (var b in a) this.pendingTracks[b] = a[b]; | |
var c = this.mediaSource; | |
c && "open" === c.readyState && this.checkPendingTracks() | |
} | |
} | |
}, { | |
key: "createSourceBuffers", | |
value: function(a) { | |
var b = this.sourceBuffer, | |
c = this.mediaSource; | |
for (var d in a) | |
if (!b[d]) { | |
var e = a[d], | |
f = e.levelCodec || e.codec, | |
g = e.container + ";codecs=" + f; | |
m.logger.log("creating sourceBuffer(" + g + ")"); | |
try { | |
var h = b[d] = c.addSourceBuffer(g); | |
h.addEventListener("updateend", this.onsbue), h.addEventListener("error", this.onsbe), e.buffer = h | |
} catch (i) { | |
m.logger.error("error while trying to add sourceBuffer:" + i.message), this.hls.trigger(j["default"].ERROR, { | |
type: n.ErrorTypes.MEDIA_ERROR, | |
details: n.ErrorDetails.BUFFER_ADD_CODEC_ERROR, | |
fatal: !1, | |
err: i, | |
mimeType: g | |
}) | |
} | |
} | |
this.hls.trigger(j["default"].BUFFER_CREATED, { | |
tracks: a | |
}) | |
} | |
}, { | |
key: "onBufferAppending", | |
value: function(a) { | |
this._needsFlush || (this.segments ? this.segments.push(a) : this.segments = [a], this.doAppending()) | |
} | |
}, { | |
key: "onBufferAppendFail", | |
value: function(a) { | |
m.logger.error("sourceBuffer error:" + a.event), this.hls.trigger(j["default"].ERROR, { | |
type: n.ErrorTypes.MEDIA_ERROR, | |
details: n.ErrorDetails.BUFFER_APPENDING_ERROR, | |
fatal: !1, | |
frag: this.fragCurrent | |
}) | |
} | |
}, { | |
key: "onBufferEos", | |
value: function(a) { | |
var b = this.sourceBuffer, | |
c = a.type; | |
for (var d in b) c && d !== c || b[d].ended || (b[d].ended = !0, m.logger.log(d + " sourceBuffer now EOS")); | |
this.checkEos() | |
} | |
}, { | |
key: "checkEos", | |
value: function() { | |
var a = this.sourceBuffer, | |
b = this.mediaSource; | |
if (!b || "open" !== b.readyState) return void(this._needsEos = !1); | |
for (var c in a) { | |
if (!a[c].ended) return; | |
if (a[c].updating) return void(this._needsEos = !0) | |
} | |
m.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment"), b.endOfStream(), this._needsEos = !1 | |
} | |
}, { | |
key: "onBufferFlushing", | |
value: function(a) { | |
this.flushRange.push({ | |
start: a.startOffset, | |
end: a.endOffset, | |
type: a.type | |
}), this.flushBufferCounter = 0, this.doFlush() | |
} | |
}, { | |
key: "onLevelUpdated", | |
value: function(a) { | |
var b = a.details; | |
0 !== b.fragments.length && (this._levelDuration = b.totalduration + b.fragments[0].start, this.updateMediaElementDuration()) | |
} | |
}, { | |
key: "updateMediaElementDuration", | |
value: function() { | |
var a = this.media, | |
b = this.mediaSource, | |
c = this.sourceBuffer, | |
d = this._levelDuration; | |
if (null !== d && a && b && c && 0 !== a.readyState && "open" === b.readyState) { | |
for (var e in c) | |
if (c[e].updating) return; | |
null === this._msDuration && (this._msDuration = b.duration), d > this._msDuration && d > a.duration && (m.logger.log("Updating mediasource duration to " + d.toFixed(3)), this._msDuration = b.duration = d) | |
} | |
} | |
}, { | |
key: "doFlush", | |
value: function() { | |
for (; this.flushRange.length;) { | |
var a = this.flushRange[0]; | |
if (!this.flushBuffer(a.start, a.end, a.type)) return void(this._needsFlush = !0); | |
this.flushRange.shift(), this.flushBufferCounter = 0 | |
} | |
if (0 === this.flushRange.length) { | |
this._needsFlush = !1; | |
var b = 0, | |
c = this.sourceBuffer; | |
for (var d in c) b += c[d].buffered.length; | |
this.appended = b, this.hls.trigger(j["default"].BUFFER_FLUSHED) | |
} | |
} | |
}, { | |
key: "doAppending", | |
value: function() { | |
var a = this.hls, | |
b = this.sourceBuffer, | |
c = this.segments; | |
if (Object.keys(b).length) { | |
if (this.media.error) return this.segments = [], void m.logger.error("trying to append although a media error occured, flush segment and abort"); | |
if (this.appending) return; | |
if (c && c.length) { | |
var d = c.shift(); | |
try { | |
var e = d.type; | |
b[e] ? (b[e].ended = !1, this.parent = d.parent, b[e].appendBuffer(d.data), this.appendError = 0, this.appended++, this.appending = !0) : this.onSBUpdateEnd() | |
} catch (f) { | |
m.logger.error("error while trying to append buffer:" + f.message), c.unshift(d); | |
var g = { | |
type: n.ErrorTypes.MEDIA_ERROR | |
}; | |
if (22 === f.code) return this.segments = [], g.details = n.ErrorDetails.BUFFER_FULL_ERROR, void a.trigger(j["default"].ERROR, g); | |
if (this.appendError ? this.appendError++ : this.appendError = 1, g.details = n.ErrorDetails.BUFFER_APPEND_ERROR, g.frag = this.fragCurrent, this.appendError > a.config.appendErrorMaxRetry) return m.logger.log("fail " + a.config.appendErrorMaxRetry + " times to append segment in sourceBuffer"), c = [], g.fatal = !0, void a.trigger(j["default"].ERROR, g); | |
g.fatal = !1, a.trigger(j["default"].ERROR, g) | |
} | |
} | |
} | |
} | |
}, { | |
key: "flushBuffer", | |
value: function(a, b, c) { | |
var d, e, f, g, h, i, j = this.sourceBuffer; | |
if (Object.keys(j).length) { | |
if (m.logger.log("flushBuffer,pos/start/end: " + this.media.currentTime + "/" + a + "/" + b), this.flushBufferCounter < this.appended) { | |
for (var k in j) | |
if (!c || k === c) { | |
if (d = j[k], d.ended = !1, d.updating) return m.logger.warn("cannot flush, sb updating in progress"), !1; | |
for (e = 0; e < d.buffered.length; e++) | |
if (f = d.buffered.start(e), g = d.buffered.end(e), -1 !== navigator.userAgent.toLowerCase().indexOf("firefox") && b === Number.POSITIVE_INFINITY ? (h = a, i = b) : (h = Math.max(f, a), i = Math.min(g, b)), Math.min(i, g) - h > .5) return this.flushBufferCounter++, m.logger.log("flush " + k + " [" + h + "," + i + "], of [" + f + "," + g + "], pos:" + this.media.currentTime), d.remove(h, i), !1 | |
} | |
} else m.logger.warn("abort flushing too many retries"); | |
m.logger.log("buffer flushed") | |
} | |
return !0 | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = o | |
}, { | |
26: 26, | |
27: 27, | |
28: 28, | |
45: 45 | |
}], | |
8: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = function(a) { | |
function b(a) { | |
return e(this, b), f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].FPS_DROP_LEVEL_CAPPING, j["default"].MEDIA_ATTACHING, j["default"].MANIFEST_PARSED)) | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
this.hls.config.capLevelToPlayerSize && (this.media = this.restrictedLevels = null, this.autoLevelCapping = Number.POSITIVE_INFINITY, this.timer && (this.timer = clearInterval(this.timer))) | |
} | |
}, { | |
key: "onFpsDropLevelCapping", | |
value: function(a) { | |
this.restrictedLevels || (this.restrictedLevels = []), this.isLevelRestricted(a.droppedLevel) || this.restrictedLevels.push(a.droppedLevel) | |
} | |
}, { | |
key: "onMediaAttaching", | |
value: function(a) { | |
this.media = a.media instanceof HTMLVideoElement ? a.media : null | |
} | |
}, { | |
key: "onManifestParsed", | |
value: function(a) { | |
this.hls.config.capLevelToPlayerSize && (this.autoLevelCapping = Number.POSITIVE_INFINITY, this.levels = a.levels, this.hls.firstLevel = this.getMaxLevel(a.firstLevel), clearInterval(this.timer), this.timer = setInterval(this.detectPlayerSize.bind(this), 1e3), this.detectPlayerSize()) | |
} | |
}, { | |
key: "detectPlayerSize", | |
value: function() { | |
if (this.media) { | |
var a = this.levels ? this.levels.length : 0; | |
a && (this.hls.autoLevelCapping = this.getMaxLevel(a - 1), this.hls.autoLevelCapping > this.autoLevelCapping && this.hls.streamController.nextLevelSwitch(), this.autoLevelCapping = this.hls.autoLevelCapping) | |
} | |
} | |
}, { | |
key: "getMaxLevel", | |
value: function(a) { | |
var b = 0, | |
c = void 0, | |
d = void 0, | |
e = this.mediaWidth, | |
f = this.mediaHeight, | |
g = 0, | |
h = 0; | |
for (c = 0; a >= c && (d = this.levels[c], !this.isLevelRestricted(c)) && (b = c, g = d.width, h = d.height, !(g >= e || h >= f)); c++); | |
return b | |
} | |
}, { | |
key: "isLevelRestricted", | |
value: function(a) { | |
return this.restrictedLevels && -1 !== this.restrictedLevels.indexOf(a) ? !0 : !1 | |
} | |
}, { | |
key: "contentScaleFactor", | |
get: function() { | |
var a = 1; | |
try { | |
a = window.devicePixelRatio | |
} catch (b) {} | |
return a | |
} | |
}, { | |
key: "mediaWidth", | |
get: function() { | |
var a = void 0; | |
return this.media && (a = this.media.width || this.media.clientWidth || this.media.offsetWidth, a *= this.contentScaleFactor), a | |
} | |
}, { | |
key: "mediaHeight", | |
get: function() { | |
var a = void 0; | |
return this.media && (a = this.media.height || this.media.clientHeight || this.media.offsetHeight, a *= this.contentScaleFactor), a | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = m | |
}, { | |
27: 27, | |
28: 28 | |
}], | |
9: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var f = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
g = a(44), | |
h = d(g), | |
i = function() { | |
function a(b, c, d, f) { | |
e(this, a), this.hls = b, this.defaultEstimate_ = f, this.minWeight_ = .001, this.minDelayMs_ = 50, this.slow_ = new h["default"](c), this.fast_ = new h["default"](d) | |
} | |
return f(a, [{ | |
key: "sample", | |
value: function(a, b) { | |
a = Math.max(a, this.minDelayMs_); | |
var c = 8e3 * b / a, | |
d = a / 1e3; | |
this.fast_.sample(d, c), this.slow_.sample(d, c) | |
} | |
}, { | |
key: "canEstimate", | |
value: function() { | |
var a = this.fast_; | |
return a && a.getTotalWeight() >= this.minWeight_ | |
} | |
}, { | |
key: "getEstimate", | |
value: function() { | |
return this.canEstimate() ? Math.min(this.fast_.getEstimate(), this.slow_.getEstimate()) : this.defaultEstimate_ | |
} | |
}, { | |
key: "destroy", | |
value: function() {} | |
}]), a | |
}(); | |
c["default"] = i | |
}, { | |
44: 44 | |
}], | |
10: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = a(45), | |
n = function(a) { | |
function b(a) { | |
return e(this, b), f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].MEDIA_ATTACHING)) | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
this.timer && clearInterval(this.timer), this.isVideoPlaybackQualityAvailable = !1 | |
} | |
}, { | |
key: "onMediaAttaching", | |
value: function(a) { | |
this.hls.config.capLevelOnFPSDrop && (this.video = a.media instanceof HTMLVideoElement ? a.media : null, "function" == typeof this.video.getVideoPlaybackQuality && (this.isVideoPlaybackQualityAvailable = !0), clearInterval(this.timer), this.timer = setInterval(this.checkFPSInterval.bind(this), this.hls.config.fpsDroppedMonitoringPeriod)) | |
} | |
}, { | |
key: "checkFPS", | |
value: function(a, b, c) { | |
var d = performance.now(); | |
if (b) { | |
if (this.lastTime) { | |
var e = d - this.lastTime, | |
f = c - this.lastDroppedFrames, | |
g = b - this.lastDecodedFrames, | |
h = 1e3 * f / e; | |
if (this.hls.trigger(j["default"].FPS_DROP, { | |
currentDropped: f, | |
currentDecoded: g, | |
totalDroppedFrames: c | |
}), h > 0 && f > this.hls.config.fpsDroppedMonitoringThreshold * g) { | |
var i = this.hls.currentLevel; | |
m.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: " + i), i > 0 && (-1 === this.hls.autoLevelCapping || this.hls.autoLevelCapping >= i) && (i -= 1, this.hls.trigger(j["default"].FPS_DROP_LEVEL_CAPPING, { | |
level: i, | |
droppedLevel: this.hls.currentLevel | |
}), this.hls.autoLevelCapping = i, this.hls.streamController.nextLevelSwitch()) | |
} | |
} | |
this.lastTime = d, this.lastDroppedFrames = c, this.lastDecodedFrames = b | |
} | |
} | |
}, { | |
key: "checkFPSInterval", | |
value: function() { | |
if (this.video) | |
if (this.isVideoPlaybackQualityAvailable) { | |
var a = this.video.getVideoPlaybackQuality(); | |
this.checkFPS(this.video, a.totalVideoFrames, a.droppedVideoFrames) | |
} else this.checkFPS(this.video, this.video.webkitDecodedFrameCount, this.video.webkitDroppedFrameCount) | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = n | |
}, { | |
27: 27, | |
28: 28, | |
45: 45 | |
}], | |
11: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = a(45), | |
n = a(26), | |
o = a(30), | |
p = d(o), | |
q = function(a) { | |
function b(a) { | |
e(this, b); | |
var c = f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].MANIFEST_LOADED, j["default"].LEVEL_LOADED, j["default"].ERROR)); | |
return c.ontick = c.tick.bind(c), c._manualLevel = c._autoLevelCapping = -1, c | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
this.timer && (clearTimeout(this.timer), this.timer = null), this._manualLevel = -1 | |
} | |
}, { | |
key: "startLoad", | |
value: function() { | |
this.canload = !0, this.timer && this.tick() | |
} | |
}, { | |
key: "stopLoad", | |
value: function() { | |
this.canload = !1 | |
} | |
}, { | |
key: "onManifestLoaded", | |
value: function(a) { | |
var b, c, d = [], | |
e = [], | |
f = {}, | |
g = !1, | |
h = !1, | |
i = this.hls; | |
if (a.levels.forEach(function(a) { | |
a.videoCodec && (g = !0), (a.audioCodec || a.attrs && a.attrs.AUDIO) && (h = !0); | |
var b = f[a.bitrate]; | |
void 0 === b ? (f[a.bitrate] = d.length, a.url = [a.url], a.urlId = 0, d.push(a)) : d[b].url.push(a.url) | |
}), g && h ? d.forEach(function(a) { | |
a.videoCodec && e.push(a) | |
}) : e = d, e = e.filter(function(a) { | |
var b = function(a) { | |
return MediaSource.isTypeSupported("audio/mp4;codecs=" + a) | |
}, | |
c = function(a) { | |
return MediaSource.isTypeSupported("video/mp4;codecs=" + a) | |
}, | |
d = a.audioCodec, | |
e = a.videoCodec; | |
return (!d || b(d)) && (!e || c(e)) | |
}), e.length) { | |
for (b = e[0].bitrate, e.sort(function(a, b) { | |
return a.bitrate - b.bitrate | |
}), this._levels = e, c = 0; c < e.length; c++) | |
if (e[c].bitrate === b) { | |
this._firstLevel = c, m.logger.log("manifest loaded," + e.length + " level(s) found, first bitrate:" + b); | |
break | |
} | |
i.trigger(j["default"].MANIFEST_PARSED, { | |
levels: this._levels, | |
firstLevel: this._firstLevel, | |
stats: a.stats, | |
audio: h, | |
video: g, | |
altAudio: a.audioTracks.length > 0 | |
}) | |
} else i.trigger(j["default"].ERROR, { | |
type: n.ErrorTypes.MEDIA_ERROR, | |
details: n.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR, | |
fatal: !0, | |
url: i.url, | |
reason: "no level with compatible codecs found in manifest" | |
}) | |
} | |
}, { | |
key: "setLevelInternal", | |
value: function(a) { | |
var b = this._levels; | |
if (a >= 0 && a < b.length) { | |
this.timer && (clearTimeout(this.timer), this.timer = null), this._level !== a && (m.logger.log("switching to level " + a), this._level = a), this.hls.trigger(j["default"].LEVEL_SWITCH, { | |
level: a | |
}); | |
var c = b[a], | |
d = c.details; | |
if (!d || d.live === !0) { | |
var e = c.urlId; | |
this.hls.trigger(j["default"].LEVEL_LOADING, { | |
url: c.url[e], | |
level: a, | |
id: e | |
}) | |
} | |
} else this.hls.trigger(j["default"].ERROR, { | |
type: n.ErrorTypes.OTHER_ERROR, | |
details: n.ErrorDetails.LEVEL_SWITCH_ERROR, | |
level: a, | |
fatal: !1, | |
reason: "invalid level idx" | |
}) | |
} | |
}, { | |
key: "onError", | |
value: function(a) { | |
if (!a.fatal) { | |
var b = a.details, | |
c = this.hls, | |
d = void 0, | |
e = void 0, | |
f = !1; | |
switch (b) { | |
case n.ErrorDetails.FRAG_LOAD_ERROR: | |
case n.ErrorDetails.FRAG_LOAD_TIMEOUT: | |
case n.ErrorDetails.FRAG_LOOP_LOADING_ERROR: | |
case n.ErrorDetails.KEY_LOAD_ERROR: | |
case n.ErrorDetails.KEY_LOAD_TIMEOUT: | |
d = a.frag.level; | |
break; | |
case n.ErrorDetails.LEVEL_LOAD_ERROR: | |
case n.ErrorDetails.LEVEL_LOAD_TIMEOUT: | |
d = a.context.level, | |
f = !0 | |
} | |
if (void 0 !== d) | |
if (e = this._levels[d], e.urlId < e.url.length - 1) e.urlId++, e.details = void 0, m.logger.warn("level controller," + b + " for level " + d + ": switching to redundant stream id " + e.urlId); | |
else { | |
var g = -1 === this._manualLevel && d; | |
if (g) m.logger.warn("level controller," + b + ": emergency switch-down for next fragment"), c.abrController.nextAutoLevel = 0; | |
else if (e && e.details && e.details.live) m.logger.warn("level controller," + b + " on live stream, discard"), f && (this._level = void 0); | |
else if (b === n.ErrorDetails.LEVEL_LOAD_ERROR || b === n.ErrorDetails.LEVEL_LOAD_TIMEOUT) { | |
var h = this.hls, | |
i = h.media, | |
k = i && p["default"].isBuffered(i, i.currentTime) && p["default"].isBuffered(i, i.currentTime + .5); | |
if (k) { | |
var l = h.config.levelLoadingRetryDelay; | |
m.logger.warn("level controller," + b + ", but media buffered, retry in " + l + "ms"), this.timer = setTimeout(this.ontick, l) | |
} else m.logger.error("cannot recover " + b + " error"), this._level = void 0, this.timer && (clearTimeout(this.timer), this.timer = null), a.fatal = !0, h.trigger(j["default"].ERROR, a) | |
} | |
} | |
} | |
} | |
}, { | |
key: "onLevelLoaded", | |
value: function(a) { | |
if (a.level === this._level) { | |
var b = a.details; | |
if (b.live) { | |
var c = 1e3 * (b.averagetargetduration ? b.averagetargetduration : b.targetduration), | |
d = this._levels[a.level], | |
e = d.details; | |
e && b.endSN === e.endSN && (c /= 2, m.logger.log("same live playlist, reload twice faster")), c -= performance.now() - a.stats.trequest, c = Math.max(1e3, Math.round(c)), m.logger.log("live playlist, reload in " + c + " ms"), this.timer = setTimeout(this.ontick, c) | |
} else this.timer = null | |
} | |
} | |
}, { | |
key: "tick", | |
value: function() { | |
var a = this._level; | |
if (void 0 !== a && this.canload) { | |
var b = this._levels[a], | |
c = b.urlId; | |
this.hls.trigger(j["default"].LEVEL_LOADING, { | |
url: b.url[c], | |
level: a, | |
id: c | |
}) | |
} | |
} | |
}, { | |
key: "levels", | |
get: function() { | |
return this._levels | |
} | |
}, { | |
key: "level", | |
get: function() { | |
return this._level | |
}, | |
set: function(a) { | |
var b = this._levels; | |
b && b.length > a && (this._level !== a || void 0 === b[a].details) && this.setLevelInternal(a) | |
} | |
}, { | |
key: "manualLevel", | |
get: function() { | |
return this._manualLevel | |
}, | |
set: function(a) { | |
this._manualLevel = a, void 0 === this._startLevel && (this._startLevel = a), -1 !== a && (this.level = a) | |
} | |
}, { | |
key: "firstLevel", | |
get: function() { | |
return this._firstLevel | |
}, | |
set: function(a) { | |
this._firstLevel = a | |
} | |
}, { | |
key: "startLevel", | |
get: function() { | |
if (void 0 === this._startLevel) { | |
var a = this.hls.config.startLevel; | |
return void 0 !== a ? a : this._firstLevel | |
} | |
return this._startLevel | |
}, | |
set: function(a) { | |
this._startLevel = a | |
} | |
}, { | |
key: "nextLoadLevel", | |
get: function() { | |
return -1 !== this._manualLevel ? this._manualLevel : this.hls.abrController.nextAutoLevel | |
}, | |
set: function(a) { | |
this.level = a, -1 === this._manualLevel && (this.hls.abrController.nextAutoLevel = a) | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = q | |
}, { | |
26: 26, | |
27: 27, | |
28: 28, | |
30: 30, | |
45: 45 | |
}], | |
12: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(41), | |
j = d(i), | |
k = a(30), | |
l = d(k), | |
m = a(22), | |
n = d(m), | |
o = a(28), | |
p = d(o), | |
q = a(27), | |
r = d(q), | |
s = a(31), | |
t = d(s), | |
u = a(47), | |
v = d(u), | |
w = a(26), | |
x = a(45), | |
y = { | |
STOPPED: "STOPPED", | |
IDLE: "IDLE", | |
KEY_LOADING: "KEY_LOADING", | |
FRAG_LOADING: "FRAG_LOADING", | |
FRAG_LOADING_WAITING_RETRY: "FRAG_LOADING_WAITING_RETRY", | |
WAITING_LEVEL: "WAITING_LEVEL", | |
PARSING: "PARSING", | |
PARSED: "PARSED", | |
BUFFER_FLUSHING: "BUFFER_FLUSHING", | |
ENDED: "ENDED", | |
ERROR: "ERROR" | |
}, | |
z = function(a) { | |
function b(a) { | |
e(this, b); | |
var c = f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, p["default"].MEDIA_ATTACHED, p["default"].MEDIA_DETACHING, p["default"].MANIFEST_LOADING, p["default"].MANIFEST_PARSED, p["default"].LEVEL_LOADED, p["default"].KEY_LOADED, p["default"].FRAG_LOADED, p["default"].FRAG_LOAD_EMERGENCY_ABORTED, p["default"].FRAG_PARSING_INIT_SEGMENT, p["default"].FRAG_PARSING_DATA, p["default"].FRAG_PARSED, p["default"].ERROR, p["default"].AUDIO_TRACK_SWITCH, p["default"].BUFFER_CREATED, p["default"].BUFFER_APPENDED, p["default"].BUFFER_FLUSHED)); | |
return c.config = a.config, c.audioCodecSwap = !1, c.ticks = 0, c.ontick = c.tick.bind(c), c | |
} | |
return g(b, a), h(b, [{ | |
key: "destroy", | |
value: function() { | |
this.stopLoad(), this.timer && (clearInterval(this.timer), this.timer = null), r["default"].prototype.destroy.call(this), this.state = y.STOPPED | |
} | |
}, { | |
key: "startLoad", | |
value: function(a) { | |
if (this.levels) { | |
var b = this.media, | |
c = this.lastCurrentTime, | |
d = this.hls; | |
if (this.stopLoad(), this.timer || (this.timer = setInterval(this.ontick, 100)), this.level = -1, this.fragLoadError = 0, b && c > 0 ? (x.logger.log("configure startPosition @" + c.toFixed(3)), this.lastPaused || (x.logger.log("resuming video"), b.play())) : this.lastCurrentTime = this.startPosition ? this.startPosition : a, !this.startFragRequested) { | |
var e = d.startLevel; - 1 === e && (e = 0, this.bitrateTest = !0), this.level = d.nextLoadLevel = e, this.loadedmetadata = !1 | |
} | |
this.state = y.IDLE, this.nextLoadPosition = this.startPosition = this.lastCurrentTime, this.tick() | |
} else x.logger.warn("cannot start loading as manifest not parsed yet"), this.state = y.STOPPED | |
} | |
}, { | |
key: "stopLoad", | |
value: function() { | |
var a = this.fragCurrent; | |
a && (a.loader && a.loader.abort(), this.fragCurrent = null), this.fragPrevious = null, this.demuxer && (this.demuxer.destroy(), this.demuxer = null), this.state = y.STOPPED | |
} | |
}, { | |
key: "tick", | |
value: function() { | |
this.ticks++, 1 === this.ticks && (this.doTick(), this.ticks > 1 && setTimeout(this.tick, 1), this.ticks = 0) | |
} | |
}, { | |
key: "doTick", | |
value: function() { | |
switch (this.state) { | |
case y.ERROR: | |
break; | |
case y.BUFFER_FLUSHING: | |
this.fragLoadError = 0; | |
break; | |
case y.IDLE: | |
if (!this._doTickIdle()) return; | |
break; | |
case y.WAITING_LEVEL: | |
var a = this.levels[this.level]; | |
a && a.details && (this.state = y.IDLE); | |
break; | |
case y.FRAG_LOADING_WAITING_RETRY: | |
var b = performance.now(), | |
c = this.retryDate; | |
(!c || b >= c || this.media && this.media.seeking) && (x.logger.log("mediaController: retryDate reached, switch back to IDLE state"), this.state = y.IDLE); | |
break; | |
case y.ERROR: | |
case y.PAUSED: | |
case y.STOPPED: | |
case y.FRAG_LOADING: | |
case y.PARSING: | |
case y.PARSED: | |
case y.ENDED: | |
} | |
this._checkBuffer(), this._checkFragmentChanged() | |
} | |
}, { | |
key: "_doTickIdle", | |
value: function() { | |
var a = this.hls, | |
b = a.config, | |
c = this.media; | |
if (void 0 !== this.levelLastLoaded && !c && (this.startFragRequested || !b.startFragPrefetch)) return !0; | |
var d = void 0; | |
d = this.loadedmetadata ? c.currentTime : this.nextLoadPosition; | |
var e = a.nextLoadLevel, | |
f = this.levels[e], | |
g = f.bitrate, | |
h = void 0; | |
h = g ? Math.max(8 * b.maxBufferSize / g, b.maxBufferLength) : b.maxBufferLength, h = Math.min(h, b.maxMaxBufferLength); | |
var i = l["default"].bufferInfo(this.mediaBuffer ? this.mediaBuffer : c, d, b.maxBufferHole), | |
j = i.len; | |
if (j >= h) return !0; | |
x.logger.trace("buffer length of " + j.toFixed(3) + " is below max of " + h.toFixed(3) + ". checking for more payload ..."), this.level = a.nextLoadLevel = e; | |
var k = f.details; | |
if ("undefined" == typeof k || k.live && this.levelLastLoaded !== e) return this.state = y.WAITING_LEVEL, !0; | |
var m = this.fragPrevious; | |
if (!k.live && m && m.sn === k.endSN && (!c.seeking && i.len || c.duration - i.end <= m.duration / 2)) { | |
var n = {}; | |
return this.altAudio && (n.type = "video"), this.hls.trigger(p["default"].BUFFER_EOS, n), this.state = y.ENDED, !0 | |
} | |
return this._fetchPayloadOrEos({ | |
pos: d, | |
bufferInfo: i, | |
levelDetails: k | |
}) | |
} | |
}, { | |
key: "_fetchPayloadOrEos", | |
value: function(a) { | |
var b = a.pos, | |
c = a.bufferInfo, | |
d = a.levelDetails, | |
e = this.fragPrevious, | |
f = this.level, | |
g = d.fragments, | |
h = g.length; | |
if (0 === h) return !1; | |
var i = g[0].start, | |
j = g[h - 1].start + g[h - 1].duration, | |
k = c.end, | |
l = void 0; | |
if (d.live) { | |
var m = this.config.initialLiveManifestSize; | |
if (m > h) return x.logger.warn("Can not start playback of a level, reason: not enough fragments " + h + " < " + m), !1; | |
if (l = this._ensureFragmentAtLivePoint({ | |
levelDetails: d, | |
bufferEnd: k, | |
start: i, | |
end: j, | |
fragPrevious: e, | |
fragments: g, | |
fragLen: h | |
}), null === l) return !1 | |
} else i > k && (l = g[0]); | |
return l || (l = this._findFragment({ | |
start: i, | |
fragPrevious: e, | |
fragLen: h, | |
fragments: g, | |
bufferEnd: k, | |
end: j, | |
levelDetails: d | |
})), l ? this._loadFragmentOrKey({ | |
frag: l, | |
level: f, | |
levelDetails: d, | |
pos: b, | |
bufferEnd: k | |
}) : !0 | |
} | |
}, { | |
key: "_ensureFragmentAtLivePoint", | |
value: function(a) { | |
var b = a.levelDetails, | |
c = a.bufferEnd, | |
d = a.start, | |
e = a.end, | |
f = a.fragPrevious, | |
g = a.fragments, | |
h = a.fragLen, | |
i = this.hls.config, | |
j = this.media, | |
k = void 0, | |
l = void 0 !== i.liveMaxLatencyDuration ? i.liveMaxLatencyDuration : i.liveMaxLatencyDurationCount * b.targetduration; | |
if (c < Math.max(d, e - l)) { | |
var m = this.liveSyncPosition = this.computeLivePosition(d, b); | |
x.logger.log("buffer end: " + c.toFixed(3) + " is located too far from the end of live sliding playlist, reset currentTime to : " + m.toFixed(3)), c = m, j && j.readyState && j.duration > m && (j.currentTime = m) | |
} | |
if (b.PTSKnown && c > e && j && j.readyState) return null; | |
if (this.startFragRequested && !b.PTSKnown) { | |
if (f) { | |
var n = f.sn + 1; | |
n >= b.startSN && n <= b.endSN && (k = g[n - b.startSN], x.logger.log("live playlist, switching playlist, load frag with next SN: " + k.sn)) | |
} | |
k || (k = g[Math.min(h - 1, Math.round(h / 2))], x.logger.log("live playlist, switching playlist, unknown, load middle frag : " + k.sn)) | |
} | |
return k | |
} | |
}, { | |
key: "_findFragment", | |
value: function(a) { | |
var b = a.start, | |
c = a.fragPrevious, | |
d = a.fragLen, | |
e = a.fragments, | |
f = a.bufferEnd, | |
g = a.end, | |
h = a.levelDetails, | |
i = this.hls.config, | |
k = void 0, | |
l = void 0, | |
m = i.maxFragLookUpTolerance; | |
if (g > f ? (f > g - m && (m = 0), l = j["default"].search(e, function(a) { | |
return a.start + a.duration - m <= f ? 1 : a.start - m > f && a.start ? -1 : 0 | |
})) : l = e[d - 1], l && (k = l, b = l.start, c && k.level === c.level && k.sn === c.sn)) | |
if (k.sn < h.endSN) { | |
var n = c.deltaPTS, | |
o = k.sn - h.startSN; | |
n && n > i.maxBufferHole && c.dropped && o ? (k = e[o - 1], x.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"), c.loadCounter--) : (k = e[o + 1], x.logger.log("SN just loaded, load next one: " + k.sn)) | |
} else k = null; | |
return k | |
} | |
}, { | |
key: "_loadFragmentOrKey", | |
value: function(a) { | |
var b = a.frag, | |
c = a.level, | |
d = a.levelDetails, | |
e = a.pos, | |
f = a.bufferEnd, | |
g = this.hls, | |
h = g.config; | |
if (null == b.decryptdata.uri || null != b.decryptdata.key) { | |
if (x.logger.log("Loading " + b.sn + " of [" + d.startSN + " ," + d.endSN + "],level " + c + ", currentTime:" + e.toFixed(3) + ",bufferEnd:" + f.toFixed(3)), void 0 !== this.fragLoadIdx ? this.fragLoadIdx++ : this.fragLoadIdx = 0, b.loadCounter) { | |
b.loadCounter++; | |
var i = h.fragLoadingLoopThreshold; | |
if (b.loadCounter > i && Math.abs(this.fragLoadIdx - b.loadIdx) < i) return g.trigger(p["default"].ERROR, { | |
type: w.ErrorTypes.MEDIA_ERROR, | |
details: w.ErrorDetails.FRAG_LOOP_LOADING_ERROR, | |
fatal: !1, | |
frag: b | |
}), !1 | |
} else b.loadCounter = 1; | |
return b.loadIdx = this.fragLoadIdx, this.fragCurrent = b, this.startFragRequested = !0, b.autoLevel = g.autoLevelEnabled, b.bitrateTest = this.bitrateTest, g.trigger(p["default"].FRAG_LOADING, { | |
frag: b | |
}), this.state = y.FRAG_LOADING, !0 | |
} | |
x.logger.log("Loading key for " + b.sn + " of [" + d.startSN + " ," + d.endSN + "],level " + c), this.state = y.KEY_LOADING, g.trigger(p["default"].KEY_LOADING, { | |
frag: b | |
}) | |
} | |
}, { | |
key: "getBufferRange", | |
value: function(a) { | |
var b, c, d = this.bufferRange; | |
if (d) | |
for (b = d.length - 1; b >= 0; b--) | |
if (c = d[b], a >= c.start && a <= c.end) return c; | |
return null | |
} | |
}, { | |
key: "followingBufferRange", | |
value: function(a) { | |
return a ? this.getBufferRange(a.end + .5) : null | |
} | |
}, { | |
key: "_checkFragmentChanged", | |
value: function() { | |
var a, b, c = this.media; | |
if (c && c.readyState && c.seeking === !1 && (b = c.currentTime, b > c.playbackRate * this.lastCurrentTime && (this.lastCurrentTime = b), l["default"].isBuffered(c, b) ? a = this.getBufferRange(b) : l["default"].isBuffered(c, b + .1) && (a = this.getBufferRange(b + .1)), a)) { | |
var d = a.frag; | |
d !== this.fragPlaying && (this.fragPlaying = d, this.hls.trigger(p["default"].FRAG_CHANGED, { | |
frag: d | |
})) | |
} | |
} | |
}, { | |
key: "immediateLevelSwitch", | |
value: function() { | |
if (x.logger.log("immediateLevelSwitch"), !this.immediateSwitch) { | |
this.immediateSwitch = !0; | |
var a = this.media, | |
b = void 0; | |
a ? (b = a.paused, a.pause()) : b = !0, this.previouslyPaused = b | |
} | |
var c = this.fragCurrent; | |
c && c.loader && c.loader.abort(), this.fragCurrent = null, this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold, this.state = y.BUFFER_FLUSHING, this.hls.trigger(p["default"].BUFFER_FLUSHING, { | |
startOffset: 0, | |
endOffset: Number.POSITIVE_INFINITY | |
}) | |
} | |
}, { | |
key: "immediateLevelSwitchEnd", | |
value: function() { | |
var a = this.media; | |
a && a.buffered.length && (this.immediateSwitch = !1, l["default"].isBuffered(a, a.currentTime) && (a.currentTime -= 1e-4), this.previouslyPaused || a.play()) | |
} | |
}, { | |
key: "nextLevelSwitch", | |
value: function() { | |
var a = this.media; | |
if (a && a.readyState) { | |
var b = void 0, | |
c = void 0, | |
d = void 0; | |
if (this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold, c = this.getBufferRange(a.currentTime), c && c.start > 1 && (this.state = y.BUFFER_FLUSHING, this.hls.trigger(p["default"].BUFFER_FLUSHING, { | |
startOffset: 0, | |
endOffset: c.start - 1 | |
})), a.paused) b = 0; | |
else { | |
var e = this.hls.nextLoadLevel, | |
f = this.levels[e], | |
g = this.fragLastKbps; | |
b = g && this.fragCurrent ? this.fragCurrent.duration * f.bitrate / (1e3 * g) + 1 : 0 | |
} | |
if (d = this.getBufferRange(a.currentTime + b), d && (d = this.followingBufferRange(d))) { | |
var h = this.fragCurrent; | |
h && h.loader && h.loader.abort(), this.fragCurrent = null, this.state = y.BUFFER_FLUSHING, this.hls.trigger(p["default"].BUFFER_FLUSHING, { | |
startOffset: d.start, | |
endOffset: Number.POSITIVE_INFINITY | |
}) | |
} | |
} | |
} | |
}, { | |
key: "onMediaAttached", | |
value: function(a) { | |
var b = this.media = this.mediaBuffer = a.media; | |
this.onvseeking = this.onMediaSeeking.bind(this), this.onvseeked = this.onMediaSeeked.bind(this), this.onvended = this.onMediaEnded.bind(this), b.addEventListener("seeking", this.onvseeking), b.addEventListener("seeked", this.onvseeked), b.addEventListener("ended", this.onvended); | |
var c = this.config; | |
this.levels && c.autoStartLoad && this.hls.startLoad(c.startPosition) | |
} | |
}, { | |
key: "onMediaDetaching", | |
value: function() { | |
var a = this.media; | |
a && a.ended && (x.logger.log("MSE detaching and video ended, reset startPosition"), this.startPosition = this.lastCurrentTime = 0); | |
var b = this.levels; | |
b && b.forEach(function(a) { | |
a.details && a.details.fragments.forEach(function(a) { | |
a.loadCounter = void 0 | |
}) | |
}), a && (a.removeEventListener("seeking", this.onvseeking), a.removeEventListener("seeked", this.onvseeked), a.removeEventListener("ended", this.onvended), this.onvseeking = this.onvseeked = this.onvended = null), this.media = null, this.loadedmetadata = !1, this.stopLoad() | |
} | |
}, { | |
key: "onMediaSeeking", | |
value: function() { | |
var a = this.media, | |
b = a ? a.currentTime : void 0, | |
c = this.config; | |
if (x.logger.log("media seeking to " + b.toFixed(3)), this.state === y.FRAG_LOADING) { | |
var d = l["default"].bufferInfo(a, b, this.config.maxBufferHole), | |
e = this.fragCurrent; | |
if (0 === d.len && e) { | |
var f = c.maxFragLookUpTolerance, | |
g = e.start - f, | |
h = e.start + e.duration + f; | |
g > b || b > h ? (e.loader && (x.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"), e.loader.abort()), this.fragCurrent = null, this.fragPrevious = null, this.state = y.IDLE) : x.logger.log("seeking outside of buffer but within currently loaded fragment range") | |
} | |
} else this.state === y.ENDED && (this.state = y.IDLE); | |
a && (this.lastCurrentTime = b), this.state !== y.FRAG_LOADING && void 0 !== this.fragLoadIdx && (this.fragLoadIdx += 2 * c.fragLoadingLoopThreshold), this.tick() | |
} | |
}, { | |
key: "onMediaSeeked", | |
value: function() { | |
x.logger.log("media seeked to " + this.media.currentTime.toFixed(3)), this.tick() | |
} | |
}, { | |
key: "onMediaEnded", | |
value: function() { | |
x.logger.log("media ended"), this.startPosition = this.lastCurrentTime = 0 | |
} | |
}, { | |
key: "onManifestLoading", | |
value: function() { | |
x.logger.log("trigger BUFFER_RESET"), this.hls.trigger(p["default"].BUFFER_RESET), this.bufferRange = [], this.stalled = !1, this.startPosition = this.lastCurrentTime = 0 | |
} | |
}, { | |
key: "onManifestParsed", | |
value: function(a) { | |
var b, c = !1, | |
d = !1; | |
a.levels.forEach(function(a) { | |
b = a.audioCodec, b && (-1 !== b.indexOf("mp4a.40.2") && (c = !0), -1 !== b.indexOf("mp4a.40.5") && (d = !0)) | |
}), this.audioCodecSwitch = c && d, this.audioCodecSwitch && x.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"), this.levels = a.levels, this.startLevelLoaded = !1, this.startFragRequested = !1; | |
var e = this.config; | |
e.autoStartLoad && this.hls.startLoad(e.startPosition) | |
} | |
}, { | |
key: "onLevelLoaded", | |
value: function(a) { | |
var b = a.details, | |
c = a.level, | |
d = this.levels[c], | |
e = b.totalduration, | |
f = 0; | |
if (x.logger.log("level " + c + " loaded [" + b.startSN + "," + b.endSN + "],duration:" + e), this.levelLastLoaded = c, b.live) { | |
var g = d.details; | |
g && b.fragments.length > 0 ? (t["default"].mergeDetails(g, b), f = b.fragments[0].start, this.liveSyncPosition = this.computeLivePosition(f, g), b.PTSKnown ? x.logger.log("live playlist sliding:" + f.toFixed(3)) : x.logger.log("live playlist - outdated PTS, unknown sliding")) : (b.PTSKnown = !1, x.logger.log("live playlist - first load, unknown sliding")) | |
} else b.PTSKnown = !1; | |
if (d.details = b, this.hls.trigger(p["default"].LEVEL_UPDATED, { | |
details: b, | |
level: c | |
}), this.startFragRequested === !1) { | |
if (-1 === this.startPosition || -1 === this.lastCurrentTime) { | |
var h = b.startTimeOffset; | |
isNaN(h) ? b.live ? (this.startPosition = this.computeLivePosition(f, b), x.logger.log("configure startPosition to " + this.startPosition)) : this.startPosition = 0 : (0 > h && (x.logger.log("negative start time offset " + h + ", count from end of last fragment"), h = f + e + h), x.logger.log("start time offset found in playlist, adjust startPosition to " + h), this.startPosition = h) | |
} | |
this.nextLoadPosition = this.startPosition | |
} | |
this.state === y.WAITING_LEVEL && (this.state = y.IDLE), this.tick() | |
} | |
}, { | |
key: "onKeyLoaded", | |
value: function() { | |
this.state === y.KEY_LOADING && (this.state = y.IDLE, this.tick()) | |
} | |
}, { | |
key: "onFragLoaded", | |
value: function(a) { | |
var b = this.fragCurrent, | |
c = a.frag; | |
if (this.state === y.FRAG_LOADING && b && "main" === c.type && c.level === b.level && c.sn === b.sn) { | |
var d = a.stats, | |
e = this.levels[b.level], | |
f = e.details; | |
if (x.logger.log("Loaded " + b.sn + " of [" + f.startSN + " ," + f.endSN + "],level " + b.level), this.bitrateTest = !1, c.bitrateTest === !0 && this.hls.nextLoadLevel) this.state = y.IDLE, this.startFragRequested = !1, d.tparsed = d.tbuffered = performance.now(), this.hls.trigger(p["default"].FRAG_BUFFERED, { | |
stats: d, | |
frag: b, | |
id: "main" | |
}), this.tick(); | |
else { | |
this.state = y.PARSING, this.stats = d; | |
var g = f.totalduration, | |
h = isNaN(b.startDTS) ? b.start : b.startDTS, | |
i = b.level, | |
j = b.sn, | |
k = this.config.defaultAudioCodec || e.audioCodec; | |
this.audioCodecSwap && (x.logger.log("swapping playlist audio codec"), void 0 === k && (k = this.lastAudioCodec), k && (k = -1 !== k.indexOf("mp4a.40.5") ? "mp4a.40.2" : "mp4a.40.5")), this.pendingAppending = 0, x.logger.log("Parsing " + j + " of [" + f.startSN + " ," + f.endSN + "],level " + i + ", cc " + b.cc); | |
var l = this.demuxer; | |
l || (l = this.demuxer = new n["default"](this.hls, "main")); | |
var m = f.PTSKnown || !f.live; | |
l.push(a.payload, k, e.videoCodec, h, b.cc, i, j, g, b.decryptdata, m) | |
} | |
} | |
this.fragLoadError = 0 | |
} | |
}, { | |
key: "onFragParsingInitSegment", | |
value: function(a) { | |
var b = this.fragCurrent; | |
if (b && "main" === a.id && a.sn === b.sn && a.level === b.level && this.state === y.PARSING) { | |
var c, d, e = a.tracks; | |
if (e.audio && this.altAudio && delete e.audio, d = e.audio) { | |
var f = this.levels[this.level].audioCodec, | |
g = navigator.userAgent.toLowerCase(); | |
f && this.audioCodecSwap && (x.logger.log("swapping playlist audio codec"), f = -1 !== f.indexOf("mp4a.40.5") ? "mp4a.40.2" : "mp4a.40.5"), this.audioCodecSwitch && 1 !== d.metadata.channelCount && -1 === g.indexOf("firefox") && (f = "mp4a.40.5"), -1 !== g.indexOf("android") && (f = "mp4a.40.2", x.logger.log("Android: force audio codec to" + f)), d.levelCodec = f, d.id = a.id | |
} | |
if (d = e.video, d && (d.levelCodec = this.levels[this.level].videoCodec, d.id = a.id), a.unique) { | |
var h = { | |
codec: "", | |
levelCodec: "" | |
}; | |
for (c in a.tracks) d = e[c], h.container = d.container, h.codec && (h.codec += ",", h.levelCodec += ","), d.codec && (h.codec += d.codec), d.levelCodec && (h.levelCodec += d.levelCodec); | |
e = { | |
audiovideo: h | |
} | |
} | |
this.hls.trigger(p["default"].BUFFER_CODECS, e); | |
for (c in e) { | |
d = e[c], x.logger.log("main track:" + c + ",container:" + d.container + ",codecs[level/parsed]=[" + d.levelCodec + "/" + d.codec + "]"); | |
var i = d.initSegment; | |
i && (this.pendingAppending++, this.hls.trigger(p["default"].BUFFER_APPENDING, { | |
type: c, | |
data: i, | |
parent: "main", | |
content: "initSegment" | |
})) | |
} | |
this.tick() | |
} | |
} | |
}, { | |
key: "onFragParsingData", | |
value: function(a) { | |
var b = this, | |
c = this.fragCurrent; | |
if (c && "main" === a.id && a.sn === c.sn && a.level === c.level && ("audio" !== a.type || !this.altAudio) && this.state === y.PARSING) { | |
var d = this.levels[this.level], | |
e = this.fragCurrent; | |
x.logger.log("Parsed " + a.type + ",PTS:[" + a.startPTS.toFixed(3) + "," + a.endPTS.toFixed(3) + "],DTS:[" + a.startDTS.toFixed(3) + "/" + a.endDTS.toFixed(3) + "],nb:" + a.nb + ",dropped:" + (a.dropped || 0)); | |
var f = t["default"].updateFragPTSDTS(d.details, e.sn, a.startPTS, a.endPTS, a.startDTS, a.endDTS), | |
g = this.hls; | |
g.trigger(p["default"].LEVEL_PTS_UPDATED, { | |
details: d.details, | |
level: this.level, | |
drift: f | |
}), "video" === a.type && (e.dropped = a.dropped), [a.data1, a.data2].forEach(function(c) { | |
c && (b.pendingAppending++, g.trigger(p["default"].BUFFER_APPENDING, { | |
type: a.type, | |
data: c, | |
parent: "main", | |
content: "data" | |
})) | |
}), this.nextLoadPosition = a.endPTS, this.bufferRange.push({ | |
type: a.type, | |
start: a.startPTS, | |
end: a.endPTS, | |
frag: e | |
}), this.tick() | |
} | |
} | |
}, { | |
key: "onFragParsed", | |
value: function(a) { | |
var b = this.fragCurrent; | |
b && "main" === a.id && a.sn === b.sn && a.level === b.level && this.state === y.PARSING && (this.stats.tparsed = performance.now(), this.state = y.PARSED, this._checkAppendedParsed()) | |
} | |
}, { | |
key: "onAudioTrackSwitch", | |
value: function(a) { | |
var b = !!a.url; | |
if (b) this.videoBuffer && this.mediaBuffer !== this.videoBuffer && (x.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"), this.mediaBuffer = this.videoBuffer); | |
else if (this.mediaBuffer !== this.media) { | |
x.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"), this.mediaBuffer = this.media; | |
var c = this.fragCurrent; | |
c.loader && (x.logger.log("switching to main audio track, cancel main fragment load"), c.loader.abort()), this.fragCurrent = null, this.fragPrevious = null, this.demuxer && (this.demuxer.destroy(), this.demuxer = null), this.state = y.IDLE | |
} | |
this.altAudio = b | |
} | |
}, { | |
key: "onBufferCreated", | |
value: function(a) { | |
var b = a.tracks, | |
c = void 0, | |
d = void 0, | |
e = !1; | |
for (var f in b) { | |
var g = b[f]; | |
"main" === g.id ? (d = f, c = g, "video" === f && (this.videoBuffer = b[f].buffer)) : e = !0 | |
} | |
e && c ? (x.logger.log("alternate track found, use " + d + ".buffered to schedule main fragment loading"), this.mediaBuffer = c.buffer) : this.mediaBuffer = this.media | |
} | |
}, { | |
key: "onBufferAppended", | |
value: function(a) { | |
if ("main" === a.parent) switch (this.state) { | |
case y.PARSING: | |
case y.PARSED: | |
this.pendingAppending--, this._checkAppendedParsed() | |
} | |
} | |
}, { | |
key: "_checkAppendedParsed", | |
value: function() { | |
if (this.state === y.PARSED && 0 === this.pendingAppending) { | |
var a = this.fragCurrent, | |
b = this.stats; | |
if (a) { | |
this.fragPrevious = a, b.tbuffered = performance.now(), this.fragLastKbps = Math.round(8 * b.total / (b.tbuffered - b.tfirst)), this.hls.trigger(p["default"].FRAG_BUFFERED, { | |
stats: b, | |
frag: a, | |
id: "main" | |
}); | |
var c = this.mediaBuffer ? this.mediaBuffer : this.media; | |
x.logger.log("main buffered : " + v["default"].toString(c.buffered)), this.state = y.IDLE | |
} | |
this.tick() | |
} | |
} | |
}, { | |
key: "onError", | |
value: function(a) { | |
var b = a.frag || this.fragCurrent; | |
if (!b || "main" === b.type) { | |
var c = this.media, | |
d = c && l["default"].isBuffered(c, c.currentTime) && l["default"].isBuffered(c, c.currentTime + .5); | |
switch (a.details) { | |
case w.ErrorDetails.FRAG_LOAD_ERROR: | |
case w.ErrorDetails.FRAG_LOAD_TIMEOUT: | |
case w.ErrorDetails.KEY_LOAD_ERROR: | |
case w.ErrorDetails.KEY_LOAD_TIMEOUT: | |
if (!a.fatal) { | |
var e = this.fragLoadError; | |
e ? e++ : e = 1; | |
var f = this.config; | |
if (e <= f.fragLoadingMaxRetry || d || b.autoLevel && b.level) { | |
this.fragLoadError = e, b.loadCounter = 0; | |
var g = Math.min(Math.pow(2, e - 1) * f.fragLoadingRetryDelay, f.fragLoadingMaxRetryTimeout); | |
x.logger.warn("mediaController: frag loading failed, retry in " + g + " ms"), this.retryDate = performance.now() + g, this.state = y.FRAG_LOADING_WAITING_RETRY | |
} else x.logger.error("mediaController: " + a.details + " reaches max retry, redispatch as fatal ..."), a.fatal = !0, this.hls.trigger(p["default"].ERROR, a), this.state = y.ERROR | |
} | |
break; | |
case w.ErrorDetails.FRAG_LOOP_LOADING_ERROR: | |
a.fatal || (d ? (this._reduceMaxBufferLength(b.duration), this.state = y.IDLE) : b.autoLevel && 0 !== b.level || (a.fatal = !0, this.hls.trigger(p["default"].ERROR, a), this.state = y.ERROR)); | |
break; | |
case w.ErrorDetails.LEVEL_LOAD_ERROR: | |
case w.ErrorDetails.LEVEL_LOAD_TIMEOUT: | |
this.state !== y.ERROR && (a.fatal ? (this.state = y.ERROR, x.logger.warn("streamController: " + a.details + ",switch to " + this.state + " state ...")) : this.state === y.WAITING_LEVEL && (this.state = y.IDLE)); | |
break; | |
case w.ErrorDetails.BUFFER_FULL_ERROR: | |
(this.state === y.PARSING || this.state === y.PARSED) && (d ? (this._reduceMaxBufferLength(b.duration), this.state = y.IDLE) : (x.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"), this.fragCurrent = null, this.state = y.PAUSED, this.hls.trigger(p["default"].BUFFER_FLUSHING, { | |
startOffset: 0, | |
endOffset: Number.POSITIVE_INFINITY | |
}))) | |
} | |
} | |
} | |
}, { | |
key: "_reduceMaxBufferLength", | |
value: function(a) { | |
var b = this.config; | |
b.maxMaxBufferLength >= a && (b.maxMaxBufferLength /= 2, x.logger.warn("reduce max buffer length to " + b.maxMaxBufferLength + "s and switch to IDLE state"), this.fragLoadIdx += 2 * b.fragLoadingLoopThreshold) | |
} | |
}, { | |
key: "_checkBuffer", | |
value: function() { | |
var a = this.media; | |
if (a && a.readyState) { | |
var b = a.currentTime, | |
c = a.buffered; | |
if (!this.loadedmetadata && c.length) { | |
this.loadedmetadata = !0; | |
var d = this.startPosition, | |
e = l["default"].isBuffered(a, d); | |
b === d && e || (x.logger.log("target start position:" + d), e || (d = c.start(0), x.logger.log("target start position not buffered, seek to buffered.start(0) " + d)), x.logger.log("adjust currentTime from " + b + " to " + d), a.currentTime = d) | |
} else if (this.immediateSwitch) this.immediateLevelSwitchEnd(); | |
else { | |
var f = l["default"].bufferInfo(a, b, 0), | |
g = !(a.paused || a.ended || 0 === a.buffered.length), | |
h = .5, | |
i = b > a.playbackRate * this.lastCurrentTime, | |
j = this.config; | |
if (this.stalled && i && (this.stalled = !1, x.logger.log("playback not stuck anymore @" + b)), g && f.len <= h && (i ? (h = 0, this.seekHoleNudgeDuration = 0) : this.stalled ? this.seekHoleNudgeDuration += j.seekHoleNudgeDuration : (this.seekHoleNudgeDuration = 0, x.logger.log("playback seems stuck @" + b), this.hls.trigger(p["default"].ERROR, { | |
type: w.ErrorTypes.MEDIA_ERROR, | |
details: w.ErrorDetails.BUFFER_STALLED_ERROR, | |
fatal: !1 | |
}), this.stalled = !0), f.len <= h)) { | |
var k = f.nextStart, | |
m = k - b; | |
if (k && m < j.maxSeekHole && m > 0) { | |
x.logger.log("adjust currentTime from " + a.currentTime + " to next buffered @ " + k + " + nudge " + this.seekHoleNudgeDuration); | |
var n = k + this.seekHoleNudgeDuration - a.currentTime; | |
a.currentTime = k + this.seekHoleNudgeDuration, this.hls.trigger(p["default"].ERROR, { | |
type: w.ErrorTypes.MEDIA_ERROR, | |
details: w.ErrorDetails.BUFFER_SEEK_OVER_HOLE, | |
fatal: !1, | |
hole: n | |
}) | |
} | |
} | |
} | |
} | |
} | |
}, { | |
key: "onFragLoadEmergencyAborted", | |
value: function() { | |
this.state = y.IDLE, this.loadedmetadata || (this.startFragRequested = !1), this.tick() | |
} | |
}, { | |
key: "onBufferFlushed", | |
value: function() { | |
var a = this.mediaBuffer ? this.mediaBuffer : this.media, | |
b = this.bufferRange, | |
c = [], | |
d = void 0, | |
e = void 0; | |
for (e = 0; e < b.length; e++) d = b[e], l["default"].isBuffered(a, (d.start + d.end) / 2) && c.push(d); | |
this.bufferRange = c, this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold, this.state = y.IDLE, this.fragPrevious = null | |
} | |
}, { | |
key: "swapAudioCodec", | |
value: function() { | |
this.audioCodecSwap = !this.audioCodecSwap | |
} | |
}, { | |
key: "computeLivePosition", | |
value: function(a, b) { | |
var c = void 0 !== this.config.liveSyncDuration ? this.config.liveSyncDuration : this.config.liveSyncDurationCount * b.targetduration; | |
return a + Math.max(0, b.totalduration - c) | |
} | |
}, { | |
key: "state", | |
set: function(a) { | |
if (this.state !== a) { | |
var b = this.state; | |
this._state = a, x.logger.log("engine state transition from " + b + " to " + a), this.hls.trigger(p["default"].STREAM_STATE_TRANSITION, { | |
previousState: b, | |
nextState: a | |
}) | |
} | |
}, | |
get: function() { | |
return this._state | |
} | |
}, { | |
key: "currentLevel", | |
get: function() { | |
var a = this.media; | |
if (a) { | |
var b = this.getBufferRange(a.currentTime); | |
if (b) return b.frag.level | |
} | |
return -1 | |
} | |
}, { | |
key: "nextBufferRange", | |
get: function() { | |
var a = this.media; | |
return a ? this.followingBufferRange(this.getBufferRange(a.currentTime)) : null | |
} | |
}, { | |
key: "nextLevel", | |
get: function() { | |
var a = this.nextBufferRange; | |
return a ? a.frag.level : -1 | |
} | |
}, { | |
key: "liveSyncPosition", | |
get: function() { | |
return this._liveSyncPosition | |
}, | |
set: function(a) { | |
this._liveSyncPosition = a | |
} | |
}]), b | |
}(r["default"]); | |
c["default"] = z | |
}, { | |
22: 22, | |
26: 26, | |
27: 27, | |
28: 28, | |
30: 30, | |
31: 31, | |
41: 41, | |
45: 45, | |
47: 47 | |
}], | |
13: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
function f(a, b) { | |
if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return !b || "object" != typeof b && "function" != typeof b ? a : b | |
} | |
function g(a, b) { | |
if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); | |
a.prototype = Object.create(b && b.prototype, { | |
constructor: { | |
value: a, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0 | |
} | |
}), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var h = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
i = a(28), | |
j = d(i), | |
k = a(27), | |
l = d(k), | |
m = a(42), | |
n = d(m), | |
o = function(a) { | |
function b(a) { | |
e(this, b); | |
var c = f(this, (b.__proto__ || Object.getPrototypeOf(b)).call(this, a, j["default"].MEDIA_ATTACHING, j["default"].MEDIA_DETACHING, j["default"].FRAG_PARSING_USERDATA, j["default"].MANIFEST_LOADING, j["default"].FRAG_LOADED, j["default"].LEVEL_SWITCH)); | |
if (c.hls = a, c.config = a.config, c.enabled = !0, c.Cues = a.config.cueHandler, c.config.enableCEA708Captions) { | |
var d = c, | |
g = { | |
newCue: function(a, b, c) { | |
if (!d.textTrack1) { | |
var e = d.getExistingTrack("1"); | |
if (e) { | |
d.textTrack1 = e, d.clearCurrentCues(d.textTrack1); | |
var f = new window.Event("addtrack"); | |
f.track = d.textTrack1, d.media.dispatchEvent(f) | |
} else d.textTrack1 = d.createTextTrack("captions", "English", "en"), d.textTrack1.textTrack1 = !0 | |
} | |
d.Cues.newCue(d.textTrack1, a, b, c) | |
} | |
}, | |
h = { | |
newCue: function(a, b, c) { | |
if (!d.textTrack2) { | |
var e = d.getExistingTrack("2"); | |
if (e) { | |
d.textTrack2 = e, d.clearCurrentCues(d.textTrack2); | |
var f = new window.Event("addtrack"); | |
f.track = d.textTrack2, d.media.dispatchEvent(f) | |
} else d.textTrack2 = d.createTextTrack("captions", "Spanish", "es"), d.textTrack2.textTrack2 = !0 | |
} | |
d.Cues.newCue(d.textTrack2, a, b, c) | |
} | |
}; | |
c.cea608Parser = new n["default"](0, g, h) | |
} | |
return c | |
} | |
return g(b, a), h(b, [{ | |
key: "clearCurrentCues", | |
value: function(a) { | |
if (a && a.cues) | |
for (; a.cues.length > 0;) a.removeCue(a.cues[0]) | |
} | |
}, { | |
key: "getExistingTrack", | |
value: function(a) { | |
var b = this.media; | |
if (b) | |
for (var c = 0; c < b.textTracks.length; c++) { | |
var d = b.textTracks[c], | |
e = "textTrack" + a; | |
if (d[e] === !0) return d | |
} | |
return null | |
} | |
}, { | |
key: "createTextTrack", | |
value: function(a, b, c) { | |
return this.media ? this.media.addTextTrack(a, b, c) : void 0 | |
} | |
}, { | |
key: "destroy", | |
value: function() { | |
l["default"].prototype.destroy.call(this) | |
} | |
}, { | |
key: "onMediaAttaching", | |
value: function(a) { | |
this.media = a.media | |
} | |
}, { | |
key: "onMediaDetaching", | |
value: function() {} | |
}, { | |
key: "onManifestLoading", | |
value: function() { | |
this.lastPts = Number.NEGATIVE_INFINITY | |
} | |
}, { | |
key: "onLevelSwitch", | |
value: function() { | |
"NONE" === this.hls.currentLevel.closedCaptions ? this.enabled = !1 : this.enabled = !0 | |
} | |
}, { | |
key: "onFragLoaded", | |
value: function(a) { | |
if ("main" === a.frag.type) { | |
var b = a.frag.start; | |
b <= this.lastPts && (this.clearCurrentCues(this.textTrack1), this.clearCurrentCues(this.textTrack2)), this.lastPts = b | |
} | |
} | |
}, { | |
key: "onFragParsingUserdata", | |
value: function(a) { | |
if (this.enabled && this.config.enableCEA708Captions) | |
for (var b = 0; b < a.samples.length; b++) { | |
var c = this.extractCea608Data(a.samples[b].bytes); | |
this.cea608Parser.addData(a.samples[b].pts, c) | |
} | |
} | |
}, { | |
key: "extractCea608Data", | |
value: function(a) { | |
for (var b, c, d, e, f, g = 31 & a[0], h = 2, i = [], j = 0; g > j; j++) b = a[h++], c = 127 & a[h++], d = 127 & a[h++], e = 0 === (4 & b) ? !1 : !0, f = 3 & b, (0 !== c || 0 !== d) && e && 0 === f && (i.push(c), i.push(d)); | |
return i | |
} | |
}]), b | |
}(l["default"]); | |
c["default"] = o | |
}, { | |
27: 27, | |
28: 28, | |
42: 42 | |
}], | |
14: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
f = function() { | |
function a(b) { | |
d(this, a), this.aesIV = b | |
} | |
return e(a, [{ | |
key: "decrypt", | |
value: function(a, b) { | |
return window.crypto.subtle.decrypt({ | |
name: "AES-CBC", | |
iv: this.aesIV | |
}, b, a) | |
} | |
}]), a | |
}(); | |
c["default"] = f | |
}, {}], | |
15: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), | |
Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
f = function() { | |
function a() { | |
d(this, a), this.rcon = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], this.subMix = [], this.subMix[0] = new Uint32Array(256), this.subMix[1] = new Uint32Array(256), this.subMix[2] = new Uint32Array(256), this.subMix[3] = new Uint32Array(256), this.invSubMix = [], this.invSubMix[0] = new Uint32Array(256), this.invSubMix[1] = new Uint32Array(256), this.invSubMix[2] = new Uint32Array(256), this.invSubMix[3] = new Uint32Array(256), this.sBox = new Uint32Array(256), this.invSBox = new Uint32Array(256), this.key = new Uint32Array(0), this.initTable() | |
} | |
return e(a, [{ | |
key: "uint8ArrayToUint32Array_", | |
value: function(a) { | |
for (var b = new DataView(a), c = new Uint32Array(4), d = 0; d < c.length; d++) c[d] = b.getUint32(4 * d); | |
return c | |
} | |
}, { | |
key: "initTable", | |
value: function() { | |
var a = this.sBox, | |
b = this.invSBox, | |
c = this.subMix[0], | |
d = this.subMix[1], | |
e = this.subMix[2], | |
f = this.subMix[3], | |
g = this.invSubMix[0], | |
h = this.invSubMix[1], | |
i = this.invSubMix[2], | |
j = this.invSubMix[3], | |
k = new Uint32Array(256), | |
l = 0, | |
m = 0, | |
n = 0; | |
for (n = 0; 256 > n; n++) 128 > n ? k[n] = n << 1 : k[n] = n << 1 ^ 283; | |
for (n = 0; 256 > n; n++) { | |
var o = m ^ m << 1 ^ m << 2 ^ m << 3 ^ m << 4; | |
o = o >>> 8 ^ 255 & o ^ 99, a[l] = o, b[o] = l; | |
var p = k[l], | |
q = k[p], | |
r = k[q], | |
s = 257 * k[o] ^ 16843008 * o; | |
c[l] = s << 24 | s >>> 8, d[l] = s << 16 | s >>> 16, e[l] = s << 8 | s >>> 24, f[l] = s, s = 16843009 * r ^ 65537 * q ^ 257 * p ^ 16843008 * l, g[o] = s << 24 | s >>> 8, h[o] = s << 16 | s >>> 16, i[o] = s << 8 | s >>> 24, j[o] = s, l ? (l = p ^ k[k[k[r ^ p]]], m ^= k[k[m]]) : l = m = 1 | |
} | |
} | |
}, { | |
key: "expandKey", | |
value: function(a) { | |
for (var b = this.uint8ArrayToUint32Array_(a), c = !0, d = 0; d < b.length && c;) c = b[d] === this.key[d], d++; | |
if (!c) { | |
this.key = b; | |
var e = this.keySize = b.length; | |
if (4 !== e && 6 !== e && 8 !== e) throw new Error("Invalid aes key size=" + e); | |
var f = this.ksRows = 4 * (e + 6 + 1), | |
g = void 0, | |
h = void 0, | |
i = this.keySchedule = new Uint32Array(this.ksRows).fill(0), | |
j = this.invKeySchedule = new Uint32Array(this.ksRows).fill(0), | |
k = this.sBox, | |
l = this.rcon, | |
m = this.invSubMix[0], | |
n = this.invSubMix[1], | |
o = this.invSubMix[2], | |
p = this.invSubMix[3], | |
q = void 0, | |
r = void 0; | |
for (g = 0; f > g; g++) e > g ? q = i[g] = b[g] : (r = q, g % e === 0 ? (r = r << 8 | r >>> 24, r = k[r >>> 24] << 24 | k[r >>> 16 & 255] << 16 | k[r >>> 8 & 255] << 8 | k[255 & r], r ^= l[g / e | 0] << 24) : e > 6 && g % e === 4 && (r = k[r >>> 24] << 24 | k[r >>> 16 & 255] << 16 | k[r >>> 8 & 255] << 8 | k[255 & r]), i[g] = q = (i[g - e] ^ r) >>> 0); | |
for (h = 0; f > h; h++) g = f - h, r = 3 & h ? i[g] : i[g - 4], 4 > h || 4 >= g ? j[h] = r : j[h] = m[k[r >>> 24]] ^ n[k[r >>> 16 & 255]] ^ o[k[r >>> 8 & 255]] ^ p[k[255 & r]], j[h] = j[h] >>> 0 | |
} | |
} | |
}, { | |
key: "networkToHostOrderSwap", | |
value: function(a) { | |
return a << 24 | (65280 & a) << 8 | (16711680 & a) >> 8 | a >>> 24 | |
} | |
}, { | |
key: "decrypt", | |
value: function(a, b, c) { | |
for (var d, e, f = this.keySize + 6, g = this.invKeySchedule, h = this.invSBox, i = this.invSubMix[0], j = this.invSubMix[1], k = this.invSubMix[2], l = this.invSubMix[3], m = this.uint8ArrayToUint32Array_(c), n = m[0], o = m[1], p = m[2], q = m[3], r = new Int32Array(a), s = new Int32Array(r.length), t = void 0, u = void 0, v = void 0, w = void 0, x = void 0, y = void 0, z = void 0, A = void 0, B = void 0, C = void 0, D = void 0, E = void 0; b < r.length;) { | |
for (B = this.networkToHostOrderSwap(r[b]), C = this.networkToHostOrderSwap(r[b + 1]), D = this.networkToHostOrderSwap(r[b + 2]), E = this.networkToHostOrderSwap(r[b + 3]), x = B ^ g[0], y = E ^ g[1], z = D ^ g[2], A = C ^ g[3], d = 4, e = 1; f > e; e++) t = i[x >>> 24] ^ j[y >> 16 & 255] ^ k[z >> 8 & 255] ^ l[255 & A] ^ g[d], u = i[y >>> 24] ^ j[z >> 16 & 255] ^ k[A >> 8 & 255] ^ l[255 & x] ^ g[d + 1], v = i[z >>> 24] ^ j[A >> 16 & 255] ^ k[x >> 8 & 255] ^ l[255 & y] ^ g[d + 2], w = i[A >>> 24] ^ j[x >> 16 & 255] ^ k[y >> 8 & 255] ^ l[255 & z] ^ g[d + 3], x = t, y = u, z = v, A = w, d += 4; | |
t = h[x >>> 24] << 24 ^ h[y >> 16 & 255] << 16 ^ h[z >> 8 & 255] << 8 ^ h[255 & A] ^ g[d], u = h[y >>> 24] << 24 ^ h[z >> 16 & 255] << 16 ^ h[A >> 8 & 255] << 8 ^ h[255 & x] ^ g[d + 1], v = h[z >>> 24] << 24 ^ h[A >> 16 & 255] << 16 ^ h[x >> 8 & 255] << 8 ^ h[255 & y] ^ g[d + 2], w = h[A >>> 24] << 24 ^ h[x >> 16 & 255] << 16 ^ h[y >> 8 & 255] << 8 ^ h[255 & z] ^ g[d + 3], d += 3, s[b] = this.networkToHostOrderSwap(t ^ n), s[b + 1] = this.networkToHostOrderSwap(w ^ o), s[b + 2] = this.networkToHostOrderSwap(v ^ p), s[b + 3] = this.networkToHostOrderSwap(u ^ q), n = B, o = C, p = D, q = E, b += 4 | |
} | |
return s.buffer | |
} | |
}, { | |
key: "destroy", | |
value: function() { | |
this.key = void 0, this.keySize = void 0, this.ksRows = void 0, this.sBox = void 0, this.invSBox = void 0, this.subMix = void 0, this.invSubMix = void 0, this.keySchedule = void 0, this.invKeySchedule = void 0, this.rcon = void 0 | |
} | |
}]), a | |
}(); | |
c["default"] = f | |
}, {}], | |
16: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var f = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
g = a(14), | |
h = d(g), | |
i = a(17), | |
j = d(i), | |
k = a(15), | |
l = d(k), | |
m = a(26), | |
n = a(45), | |
o = function() { | |
function a(b) { | |
e(this, a), this.hls = b; | |
try { | |
var c = window ? window.crypto : crypto; | |
this.subtle = c.subtle || c.webkitSubtle | |
} catch (d) {} | |
this.disableWebCrypto = !this.supportsWebCrypto() | |
} | |
return f(a, [{ | |
key: "supportsWebCrypto", | |
value: function() { | |
return this.subtle && "https:" === window.location.protocol | |
} | |
}, { | |
key: "decrypt", | |
value: function(a, b, c, d) { | |
var e = this; | |
this.disableWebCrypto && this.hls.config.enableSoftwareAES ? (n.logger.log("decrypting by JavaScript Implementation"), this.decryptor || (this.decryptor = new l["default"]), this.decryptor.expandKey(b), d(this.decryptor.decrypt(a, 0, c))) : (n.logger.log("decrypting by WebCrypto API"), this.key !== b && (this.key = b, this.fastAesKey = new j["default"](b)), this.fastAesKey.expandKey().then(function(b) { | |
var e = new h["default"](c); | |
e.decrypt(a, b).then(function(a) { | |
d(a) | |
}) | |
})["catch"](function(f) { | |
e.onWebCryptoError(f, a, b, c, d) | |
})) | |
} | |
}, { | |
key: "onWebCryptoError", | |
value: function(a, b, c, d, e) { | |
this.hls.config.enableSoftwareAES ? (n.logger.log("disabling to use WebCrypto API"), this.disableWebCrypto = !0, this.decrypt(b, c, d, e)) : (n.logger.error("decrypting error : " + a.message), this.hls.trigger(Event.ERROR, { | |
type: m.ErrorTypes.MEDIA_ERROR, | |
details: m.ErrorDetails.FRAG_DECRYPT_ERROR, | |
fatal: !0, | |
reason: a.message | |
})) | |
} | |
}, { | |
key: "destroy", | |
value: function() { | |
this.decryptor && (this.decryptor.destroy(), this.decryptor = void 0) | |
} | |
}]), a | |
}(); | |
c["default"] = o | |
}, { | |
14: 14, | |
15: 15, | |
17: 17, | |
26: 26, | |
45: 45 | |
}], | |
17: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
f = function() { | |
function a(b) { | |
d(this, a), this.key = b | |
} | |
return e(a, [{ | |
key: "expandKey", | |
value: function() { | |
return window.crypto.subtle.importKey("raw", this.key, { | |
name: "AES-CBC" | |
}, !1, ["encrypt", "decrypt"]) | |
} | |
}]), a | |
}(); | |
c["default"] = f | |
}, {}], | |
18: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var f = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
g = a(19), | |
h = d(g), | |
i = a(45), | |
j = a(24), | |
k = d(j), | |
l = function() { | |
function a(b, c, d, f) { | |
e(this, a), this.observer = b, this.id = c, this.remuxerClass = d, this.config = f, this.remuxer = new this.remuxerClass(b, c, f), this.insertDiscontinuity() | |
} | |
return f(a, [{ | |
key: "insertDiscontinuity", | |
value: function() { | |
this._aacTrack = { | |
container: "audio/adts", | |
type: "audio", | |
id: -1, | |
sequenceNumber: 0, | |
samples: [], | |
len: 0 | |
} | |
} | |
}, { | |
key: "push", | |
value: function(a, b, c, d, e, f, g, j, l) { | |
var m, n, o, p, q, r, s, t, u, v, w = new k["default"](a), | |
x = 90 * w.timeStamp, | |
y = !1; | |
for (e !== this.lastCC ? (i.logger.log(this.id + " discontinuity detected"), this.lastCC = e, this.insertDiscontinuity(), this.remuxer.switchLevel(), this.remuxer.insertDiscontinuity()) : f !== this.lastLevel ? (i.logger.log("audio track switch detected"), this.lastLevel = f, this.remuxer.switchLevel(), this.insertDiscontinuity()) : g === this.lastSN + 1 && (y = !0), m = this._aacTrack, this.lastSN = g, this.lastLevel = f, r = w.length, u = a.length; u - 1 > r && (255 !== a[r] || 240 !== (240 & a[r + 1])); r++); | |
for (m.audiosamplerate || (n = h["default"].getAudioConfig(this.observer, a, r, b), m.config = n.config, m.audiosamplerate = n.samplerate, m.channelCount = n.channelCount, m.codec = n.codec, m.duration = j, i.logger.log("parsed codec:" + m.codec + ",rate:" + n.samplerate + ",nb channel:" + n.channelCount)), q = 0, p = 9216e4 / m.audiosamplerate; u > r + 5 && (s = 1 & a[r + 1] ? 7 : 9, o = (3 & a[r + 3]) << 11 | a[r + 4] << 3 | (224 & a[r + 5]) >>> 5, o -= s, o > 0 && u >= r + s + o);) | |
for (t = x + q * p, v = { | |
unit: a.subarray(r + s, r + s + o), | |
pts: t, | |
dts: t | |
}, m.samples.push(v), m.len += o, r += o + s, q++; u - 1 > r && (255 !== a[r] || 240 !== (240 & a[r + 1])); r++); | |
this.remuxer.remux(f, g, this._aacTrack, { | |
samples: [] | |
}, { | |
samples: [{ | |
pts: x, | |
dts: x, | |
unit: w.payload | |
}] | |
}, { | |
samples: [] | |
}, d, y, l) | |
} | |
}, { | |
key: "destroy", | |
value: function() {} | |
}], [{ | |
key: "probe", | |
value: function(a) { | |
var b, c, d = new k["default"](a); | |
if (d.hasTimeStamp) | |
for (b = d.length, c = a.length; c - 1 > b; b++) | |
if (255 === a[b] && 240 === (240 & a[b + 1])) return !0; | |
return !1 | |
} | |
}]), a | |
}(); | |
c["default"] = l | |
}, { | |
19: 19, | |
24: 24, | |
45: 45 | |
}], | |
19: [function(a, b, c) { | |
"use strict"; | |
function d(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
f = a(45), | |
g = a(26), | |
h = function() { | |
function a() { | |
d(this, a) | |
} | |
return e(a, null, [{ | |
key: "getAudioConfig", | |
value: function(a, b, c, d) { | |
var e, h, i, j, k, l = navigator.userAgent.toLowerCase(), | |
m = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350]; | |
return e = ((192 & b[c + 2]) >>> 6) + 1, h = (60 & b[c + 2]) >>> 2, h > m.length - 1 ? void a.trigger(Event.ERROR, { | |
type: g.ErrorTypes.MEDIA_ERROR, | |
details: g.ErrorDetails.FRAG_PARSING_ERROR, | |
fatal: !0, | |
reason: "invalid ADTS sampling index:" + h | |
}) : (j = (1 & b[c + 2]) << 2, j |= (192 & b[c + 3]) >>> 6, f.logger.log("manifest codec:" + d + ",ADTS data:type:" + e + ",sampleingIndex:" + h + "[" + m[h] + "Hz],channelConfig:" + j), /firefox|OPR/i.test(l) ? h >= 6 ? (e = 5, k = new Array(4), i = h - 3) : (e = 2, k = new Array(2), i = h) : -1 !== l.indexOf("android") ? (e = 2, k = new Array(2), i = h) : (e = 5, k = new Array(4), d && (-1 !== d.indexOf("mp4a.40.29") || -1 !== d.indexOf("mp4a.40.5")) || !d && h >= 6 ? i = h - 3 : ((d && -1 !== d.indexOf("mp4a.40.2") && h >= 6 && 1 === j || !d && 1 === j) && (e = 2, k = new Array(2)), i = h)), k[0] = e << 3, k[0] |= (14 & h) >> 1, k[1] |= (1 & h) << 7, k[1] |= j << 3, 5 === e && (k[1] |= (14 & i) >> 1, k[2] = (1 & i) << 7, k[2] |= 8, k[3] = 0), { | |
config: k, | |
samplerate: m[h], | |
channelCount: j, | |
codec: "mp4a.40." + e | |
}) | |
} | |
}]), a | |
}(); | |
c["default"] = h | |
}, { | |
26: 26, | |
45: 45 | |
}], | |
20: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var f = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
g = a(28), | |
h = d(g), | |
i = a(26), | |
j = a(18), | |
k = d(j), | |
l = a(25), | |
m = d(l), | |
n = a(38), | |
o = d(n), | |
p = a(39), | |
q = d(p), | |
r = function() { | |
function a(b, c, d) { | |
var f = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null; | |
e(this, a), this.hls = b, this.id = c, this.config = this.hls.config || f, this.typeSupported = d | |
} | |
return f(a, [{ | |
key: "destroy", | |
value: function() { | |
var a = this.demuxer; | |
a && a.destroy() | |
} | |
}, { | |
key: "push", | |
value: function(a, b, c, d, e, f, g, j, l) { | |
var n = this.demuxer; | |
if (!n) { | |
var p = this.hls, | |
r = this.id; | |
if (m["default"].probe(a)) n = this.typeSupported.mp2t === !0 ? new m["default"](p, r, q["default"], this.config) : new m["default"](p, r, o["default"], this.config); | |
else { | |
if (!k["default"].probe(a)) return void p.trigger(h["default"].ERROR, { | |
type: i.ErrorTypes.MEDIA_ERROR, | |
id: r, | |
details: i.ErrorDetails.FRAG_PARSING_ERROR, | |
fatal: !0, | |
reason: "no demux matching with content found" | |
}); | |
n = new k["default"](p, r, o["default"], this.config) | |
} | |
this.demuxer = n | |
} | |
n.push(a, b, c, d, e, f, g, j, l) | |
} | |
}]), a | |
}(); | |
c["default"] = r | |
}, { | |
18: 18, | |
25: 25, | |
26: 26, | |
28: 28, | |
38: 38, | |
39: 39 | |
}], | |
21: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var e = a(20), | |
f = d(e), | |
g = a(28), | |
h = d(g), | |
i = a(45), | |
j = a(1), | |
k = d(j), | |
l = function(a) { | |
var b = new k["default"]; | |
b.trigger = function(a) { | |
for (var c = arguments.length, d = Array(c > 1 ? c - 1 : 0), e = 1; c > e; e++) d[e - 1] = arguments[e]; | |
b.emit.apply(b, [a, a].concat(d)) | |
}, b.off = function(a) { | |
for (var c = arguments.length, d = Array(c > 1 ? c - 1 : 0), e = 1; c > e; e++) d[e - 1] = arguments[e]; | |
b.removeListener.apply(b, [a].concat(d)) | |
}; | |
var c = function(b, c) { | |
a.postMessage({ | |
event: b, | |
data: c | |
}) | |
}; | |
a.addEventListener("message", function(d) { | |
var e = d.data; | |
switch (e.cmd) { | |
case "init": | |
var g = JSON.parse(e.config); | |
a.demuxer = new f["default"](b, e.id, e.typeSupported, g); | |
try { | |
(0, i.enableLogs)(g.debug) | |
} catch (h) { | |
console.warn("demuxerWorker: unable to enable logs") | |
} | |
c("init", null); | |
break; | |
case "demux": | |
a.demuxer.push(new Uint8Array(e.data), e.audioCodec, e.videoCodec, e.timeOffset, e.cc, e.level, e.sn, e.duration, e.accurateTimeOffset) | |
} | |
}), b.on(h["default"].FRAG_PARSING_INIT_SEGMENT, c), b.on(h["default"].FRAG_PARSED, c), b.on(h["default"].ERROR, c), b.on(h["default"].FRAG_PARSING_METADATA, c), b.on(h["default"].FRAG_PARSING_USERDATA, c), b.on(h["default"].FRAG_PARSING_DATA, function(b, c) { | |
var d = c.data1.buffer, | |
e = c.data2.buffer; | |
delete c.data1, delete c.data2, a.postMessage({ | |
event: b, | |
data: c, | |
data1: d, | |
data2: e | |
}, [d, e]) | |
}) | |
}; | |
c["default"] = l | |
}, { | |
1: 1, | |
20: 20, | |
28: 28, | |
45: 45 | |
}], | |
22: [function(a, b, c) { | |
"use strict"; | |
function d(a) { | |
return a && a.__esModule ? a : { | |
"default": a | |
} | |
} | |
function e(a, b) { | |
if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") | |
} | |
Object.defineProperty(c, "__esModule", { | |
value: !0 | |
}); | |
var f = function() { | |
function a(a, b) { | |
for (var c = 0; c < b.length; c++) { | |
var d = b[c]; | |
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) | |
} | |
} | |
return function(b, c, d) { | |
return c && a(b.prototype, c), d && a(b, d), b | |
} | |
}(), | |
g = a(28), | |
h = d(g), | |
i = a(20), | |
j = d(i), | |
k = a(21), | |
l = d(k), | |
m = a(45), | |
n = a(16), | |
o = d(n), | |
p = a(26), | |
q = function() { | |
function b(c, d) { | |
e(this, b), this.hls = c, this.id = d; | |
var f = { | |
mp4: MediaSource.isTypeSupported("video/mp4"), | |
mp2t: c.config.enableMP2TPassThrough && MediaSource.isTypeSupported("video/mp2t") | |
}; | |
if (c.config.enableWorker && "undefined" != typeof Worker) { | |
m.logger.log("demuxing in webworker"); | |
var g = void 0; | |
try { | |
var i = a(3); | |
g = this.w = i(l["default"]), this.onwmsg = this.onWorkerMessage.bind(this), g.addEventListener("message", this.onwmsg), g.onerror = function(a) { | |
c.trigger(h["default"].ERROR, { | |
type: p.ErrorTypes.OTHER_ERROR, | |
details: p.ErrorDetails.INTERNAL_EXCEPTION, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment