-
-
Save maleadt/86db734cafc0a4e68519865b2983ba4c to your computer and use it in GitHub Desktop.
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(e, t) { | |
for (var n in t) e[n] = t[n] | |
}(this, function(e) { | |
function t(n) { | |
if (r[n]) return r[n].exports; | |
var i = r[n] = { | |
i: n, | |
l: !1, | |
exports: {} | |
}; | |
return e[n].call(i.exports, i, i.exports, t), i.l = !0, i.exports | |
} | |
var n = window.webpackJsonp; | |
window.webpackJsonp = function(t, r, o) { | |
for (var s, a, u = 0, c = []; u < t.length; u++) a = t[u], i[a] && | |
c.push(i[a][0]), i[a] = 0; | |
for (s in r) Object.prototype.hasOwnProperty.call(r, s) && (e[s] = | |
r[s]); | |
for (n && n(t, r, o); c.length;) c.shift()() | |
}; | |
var r = {}, | |
i = { | |
12: 0 | |
}; | |
return t.e = function(e) { | |
function n() { | |
a.onerror = a.onload = null, clearTimeout(u); | |
var t = i[e]; | |
0 !== t && (t && t[1](new Error("Loading chunk " + e + | |
" failed.")), i[e] = void 0) | |
} | |
var r = i[e]; | |
if (0 === r) return new Promise(function(e) { | |
e() | |
}); | |
if (r) return r[2]; | |
var o = new Promise(function(t, n) { | |
r = i[e] = [t, n] | |
}); | |
r[2] = o; | |
var s = document.getElementsByTagName("head")[0], | |
a = document.createElement("script"); | |
a.type = "text/javascript", a.charset = "utf-8", a.async = !0, | |
a.timeout = 12e4, t.nc && a.setAttribute("nonce", t.nc), a.src = | |
t.p + "" + ({ | |
0: "europarl.skin", | |
1: "viasat.skin", | |
2: "vuplay.skin", | |
3: "default.skin", | |
4: "vualto.skin", | |
5: "chromecast.cast", | |
6: "adobe.stats", | |
7: "youbora.stats", | |
8: "vualto.stats", | |
9: "comscore.stats", | |
10: "cim.stats", | |
11: "at-internet.stats" | |
}[e] || e) + ".vuplay-smart.js"; | |
var u = setTimeout(n, 12e4); | |
return a.onerror = a.onload = n, s.appendChild(a), o | |
}, t.m = e, t.c = r, t.d = function(e, n, r) { | |
t.o(e, n) || Object.defineProperty(e, n, { | |
configurable: !1, | |
enumerable: !0, | |
get: r | |
}) | |
}, t.n = function(e) { | |
var n = e && e.__esModule ? function() { | |
return e.default | |
} : function() { | |
return e | |
}; | |
return t.d(n, "a", n), n | |
}, t.o = function(e, t) { | |
return Object.prototype.hasOwnProperty.call(e, t) | |
}, t.p = "https://cdn.vuplay.co.uk/vuplay-smart/1.13.50/", t.oe = | |
function(e) { | |
throw console.error(e), e | |
}, t(t.s = 48) | |
}([function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = function(e) { | |
function t(t, n, r) { | |
var i = e.call(this, t) || this; | |
return i.message = t, i.type = n, i.args = r, i | |
} | |
return r(t, e), t | |
}(Error); | |
t.VuplayError = i; | |
! function(e) { | |
e[e.UNKNOWN = 0] = "UNKNOWN", e[e.REQUEST = 1] = "REQUEST", | |
e[e.SETUP = 2] = "SETUP", e[e.PLAYER = 3] = "PLAYER", e[ | |
e.SKIN = 4] = "SKIN" | |
}(t.VuplayErrorType || (t.VuplayErrorType = {})) | |
}, function(e, t, n) { | |
e.exports = n(97).Promise | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = { | |
IConfig: "Config", | |
ILog: "Log", | |
IPlayerLoader: "PlayerLoader", | |
IHttpRequest: "HttpRequest", | |
IEventBus: "EventBus", | |
IStatsManager: "StatsManager", | |
ISkinManager: "SkinManager", | |
ICastManager: "CastManager", | |
IAdManager: "AdManager", | |
ISocketsManager: "SocketsManager" | |
}; | |
t.default = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.NAMED_TAG = "named", t.NAME_TAG = "name", t.UNMANAGED_TAG = | |
"unmanaged", t.OPTIONAL_TAG = "optional", t.INJECT_TAG = | |
"inject", t.MULTI_INJECT_TAG = "multi_inject", t.TAGGED = | |
"inversify:tagged", t.TAGGED_PROP = | |
"inversify:tagged_props", t.PARAM_TYPES = | |
"inversify:paramtypes", t.DESIGN_PARAM_TYPES = | |
"design:paramtypes", t.POST_CONSTRUCT = "post_construct" | |
}, function(e, t) { | |
var n; | |
n = function() { | |
return this | |
}(); | |
try { | |
n = n || Function("return this")() || (0, eval)("this") | |
} catch (e) { | |
"object" == typeof window && (n = window) | |
} | |
e.exports = n | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(14); | |
t.EventName = r.Helpers.strEnum(["error", "canplay", "loadsrc", | |
"playing", "play", "pause", "seeking", "seeked", | |
"ratechange", "progress", "timeupdate", "ended", | |
"loadedmetadata", "loadeddata", "playerready", | |
"volumechange", "texttrackadded", "bufferstart", | |
"bufferend", "log", "adbreakbegin", "adbreakend", | |
"adbegin", "adskipped", "adend", "aderror", | |
"caststart", "castend", "castloaded", "castready", | |
"fullscreenchanged", "audiotrackchanged", | |
"socketconnect", "socketreconnect", "socketerror", | |
"socketdisconnect", "socketping", "socketpong", | |
"socketmessage", "clipstartset", "clipendset" | |
]) | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(3); | |
t.METADATA_KEY = r; | |
var i = n(70); | |
t.Container = i.Container; | |
var o = n(12); | |
t.BindingScopeEnum = o.BindingScopeEnum, t.BindingTypeEnum = o.BindingTypeEnum, | |
t.TargetTypeEnum = o.TargetTypeEnum; | |
var s = n(86); | |
t.ContainerModule = s.ContainerModule; | |
var a = n(87); | |
t.injectable = a.injectable; | |
var u = n(88); | |
t.tagged = u.tagged; | |
var c = n(89); | |
t.named = c.named; | |
var l = n(90); | |
t.inject = l.inject; | |
var p = n(91); | |
t.optional = p.optional; | |
var h = n(92); | |
t.unmanaged = h.unmanaged; | |
var d = n(93); | |
t.multiInject = d.multiInject; | |
var f = n(94); | |
t.targetName = f.targetName; | |
var y = n(95); | |
t.postConstruct = y.postConstruct; | |
var v = n(49); | |
t.MetadataReader = v.MetadataReader; | |
var _ = n(20); | |
t.guid = _.guid; | |
var g = n(17); | |
t.decorate = g.decorate; | |
var m = n(53); | |
t.traverseAncerstors = m.traverseAncerstors, t.taggedConstraint = | |
m.taggedConstraint, t.namedConstraint = m.namedConstraint, | |
t.typeConstraint = m.typeConstraint; | |
var b = n(28); | |
t.getServiceIdentifierAsString = b.getServiceIdentifierAsString; | |
var E = n(96); | |
t.multiBindToService = E.multiBindToService | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.DUPLICATED_INJECTABLE_DECORATOR = | |
"Cannot apply @injectable decorator multiple times.", t.DUPLICATED_METADATA = | |
"Metadata key was used more than once in a parameter:", t.NULL_ARGUMENT = | |
"NULL argument", t.KEY_NOT_FOUND = "Key Not Found", t.AMBIGUOUS_MATCH = | |
"Ambiguous match found for serviceIdentifier:", t.CANNOT_UNBIND = | |
"Could not unbind serviceIdentifier:", t.NOT_REGISTERED = | |
"No matching bindings found for serviceIdentifier:", t.MISSING_INJECTABLE_ANNOTATION = | |
"Missing required @injectable annotation in:", t.MISSING_INJECT_ANNOTATION = | |
"Missing required @inject or @multiInject annotation in:", | |
t.CIRCULAR_DEPENDENCY = "Circular dependency found:", t.NOT_IMPLEMENTED = | |
"Sorry, this feature is not fully implemented yet.", t.INVALID_BINDING_TYPE = | |
"Invalid binding type:", t.NO_MORE_SNAPSHOTS_AVAILABLE = | |
"No snapshot available to restore.", t.INVALID_MIDDLEWARE_RETURN = | |
"Invalid return type in middleware. Middleware must return!", | |
t.INVALID_FUNCTION_BINDING = | |
"Value provided to function binding must be a function!", t | |
.INVALID_TO_SELF_VALUE = | |
"The toSelf function can only be applied when a constructor is used as service identifier", | |
t.INVALID_DECORATOR_OPERATION = | |
"The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.", | |
t.ARGUMENTS_LENGTH_MISMATCH_1 = | |
"The number of constructor arguments in the derived class ", | |
t.ARGUMENTS_LENGTH_MISMATCH_2 = | |
" must be >= than the number of constructor arguments of its base class.", | |
t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = | |
"Invalid Container constructor argument. Container options must be an object.", | |
t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = | |
"Invalid Container option. Default scope must be a string ('singleton' or 'transient').", | |
t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = | |
"Invalid Container option. Auto bind injectable must be a boolean", | |
t.MULTIPLE_POST_CONSTRUCT_METHODS = | |
"Cannot apply @postConstruct decorator multiple times in the same class", | |
t.POST_CONSTRUCT_ERROR = function() { | |
for (var e = [], t = 0; t < arguments.length; t++) e[t] = | |
arguments[t]; | |
return "@postConstruct error in class " + e[0] + ": " + | |
e[1] | |
}, t.CIRCULAR_DEPENDENCY_IN_FACTORY = function() { | |
for (var e = [], t = 0; t < arguments.length; t++) e[t] = | |
arguments[t]; | |
return "It looks like there is a circular dependency in one of the '" + | |
e[0] + | |
"' bindings. Please investigate bindings withservice identifier '" + | |
e[1] + "'." | |
}, t.STACK_OVERFLOW = "Maximum call stack size exceeded" | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(3), | |
i = function() { | |
function e(e, t) { | |
this.key = e, this.value = t | |
} | |
return e.prototype.toString = function() { | |
return this.key === r.NAMED_TAG ? "named: " + | |
this.value.toString() + " " : | |
"tagged: { key:" + this.key.toString() + | |
", value: " + this.value + " }" | |
}, e | |
}(); | |
t.Metadata = i | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
! function(e) { | |
e[e.VUPLAY = 0] = "VUPLAY", e[e.MEDIA = 1] = "MEDIA", e[e.ERROR = | |
2] = "ERROR", e[e.LOG = 3] = "LOG", e[e.AD = 4] = | |
"AD", e[e.CAST = 5] = "CAST", e[e.SOCKET = 6] = | |
"SOCKET" | |
}(t.EventType || (t.EventType = {})) | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(43), | |
o = n(22), | |
s = function(e) { | |
function t(t, n) { | |
return e.call(this, o.LogLevel.WARN, "log", { | |
message: t, | |
logLevel: o.LogLevel.WARN, | |
args: n | |
}) || this | |
} | |
return r(t, e), t | |
}(i.LogEvent); | |
t.LogWarn = s | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(43), | |
o = n(22), | |
s = function(e) { | |
function t(t, n) { | |
return e.call(this, o.LogLevel.DEBUG, "log", { | |
message: t, | |
logLevel: o.LogLevel.DEBUG, | |
args: n | |
}) || this | |
} | |
return r(t, e), t | |
}(i.LogEvent); | |
t.LogDebug = s | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = { | |
Request: "Request", | |
Singleton: "Singleton", | |
Transient: "Transient" | |
}; | |
t.BindingScopeEnum = r; | |
var i = { | |
ConstantValue: "ConstantValue", | |
Constructor: "Constructor", | |
DynamicValue: "DynamicValue", | |
Factory: "Factory", | |
Function: "Function", | |
Instance: "Instance", | |
Invalid: "Invalid", | |
Provider: "Provider" | |
}; | |
t.BindingTypeEnum = i; | |
var o = { | |
ClassProperty: "ClassProperty", | |
ConstructorArgument: "ConstructorArgument", | |
Variable: "Variable" | |
}; | |
t.TargetTypeEnum = o | |
}, function(e, t, n) { | |
(function(r) { | |
function i() { | |
return !("undefined" == typeof window || !window.process || | |
"renderer" !== window.process.type) || ( | |
"undefined" != typeof document && document.documentElement && | |
document.documentElement.style && document.documentElement | |
.style.WebkitAppearance || "undefined" != | |
typeof window && window.console && (window.console | |
.firebug || window.console.exception && | |
window.console.table) || "undefined" != | |
typeof navigator && navigator.userAgent && | |
navigator.userAgent.toLowerCase().match( | |
/firefox\/(\d+)/) && parseInt(RegExp.$1, | |
10) >= 31 || "undefined" != typeof navigator && | |
navigator.userAgent && navigator.userAgent.toLowerCase() | |
.match(/applewebkit\/(\d+)/)) | |
} | |
function o(e) { | |
var n = this.useColors; | |
if (e[0] = (n ? "%c" : "") + this.namespace + (n ? | |
" %c" : " ") + e[0] + (n ? "%c " : " ") + | |
"+" + t.humanize(this.diff), n) { | |
var r = "color: " + this.color; | |
e.splice(1, 0, r, "color: inherit"); | |
var i = 0, | |
o = 0; | |
e[0].replace(/%[a-zA-Z%]/g, function(e) { | |
"%%" !== e && (i++, "%c" === e && ( | |
o = i)) | |
}), e.splice(o, 0, r) | |
} | |
} | |
function s() { | |
return "object" == typeof console && console.log && | |
Function.prototype.apply.call(console.log, | |
console, arguments) | |
} | |
function a(e) { | |
try { | |
null == e ? t.storage.removeItem("debug") : t.storage | |
.debug = e | |
} catch (e) {} | |
} | |
function u() { | |
var e; | |
try { | |
e = t.storage.debug | |
} catch (e) {} | |
return !e && void 0 !== r && "env" in r && (e = r.env | |
.DEBUG), e | |
} | |
t = e.exports = n(144), t.log = s, t.formatArgs = o, t.save = | |
a, t.load = u, t.useColors = i, t.storage = | |
"undefined" != typeof chrome && void 0 !== chrome.storage ? | |
chrome.storage.local : function() { | |
try { | |
return window.localStorage | |
} catch (e) {} | |
}(), t.colors = ["lightseagreen", "forestgreen", | |
"goldenrod", "dodgerblue", "darkorchid", | |
"crimson" | |
], t.formatters.j = function(e) { | |
try { | |
return JSON.stringify(e) | |
} catch (e) { | |
return "[UnexpectedJSONParseError]: " + e.message | |
} | |
}, t.enable(u()) | |
}).call(t, n(42)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(23); | |
! function(t) { | |
function n(e) { | |
return e.reduce(function(e, t) { | |
return e[t] = t, e | |
}, Object.create(null)) | |
} | |
function i(e, t) { | |
for (var n in t) e.setAttribute(n, t[n]) | |
} | |
function o(e, t, n, r, i) { | |
var o = document.createElement(e); | |
if ("video" === e && void 0 !== i && null !== | |
i && o.setAttribute("poster", i), t) | |
for (var s = 0; s < t.length; s++) o.classList | |
.add(t[s]); | |
return n ? r ? (n.insertBefore(o, r), o) : (n.appendChild( | |
o), o) : o | |
} | |
function s(e) { | |
var t = Math.floor(e); | |
t < 0 && (t *= -1); | |
var n = Math.floor(t / 3600), | |
r = Math.floor((t - 3600 * n) / 60), | |
i = t - 3600 * n - 60 * r, | |
o = n.toString(), | |
s = r.toString(), | |
a = i.toString(); | |
return r < 10 && (s = "0" + r), i < 10 && (a = | |
"0" + i), n < 10 && (o = "0" + n), e < | |
0 ? "-" + o + ":" + s + ":" + a : o + ":" + | |
s + ":" + a | |
} | |
function a(t, n) { | |
return new e(function(e, r) { | |
n() && e(t); | |
var i = document.createElement( | |
"script"); | |
i.type = "text/javascript", i.src = | |
t, document.body.appendChild(i); | |
var o = setInterval(function() { | |
n() && (clearInterval(o), | |
e(t)) | |
}, 50) | |
}) | |
} | |
function u() { | |
return /Chrome/.test(navigator.userAgent) && | |
/Google Inc/.test(navigator.vendor) | |
} | |
function c() { | |
return !!navigator.platform && | |
/iPad|iPhone|iPod/.test(navigator.platform) | |
} | |
function l(e) { | |
return e.getSkin() !== r.SkinType.NO_SKIN || e.isIOS() ? | |
e.getPlayerDiv() : e.getContainerDiv() | |
} | |
t.strEnum = n, t.setAttributes = i, t.createElement = | |
o, t.toHHMMSS = s, t.loadScript = a, t.isChrome = | |
u, t.isIOS = c, t.getAppropriateDiv = l | |
}(t.Helpers || (t.Helpers = {})) | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n, r) { | |
return r || (r = new Date), e.call(this, o.EventType | |
.MEDIA, t, n, r) || this | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.MediaEvent = s | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n) { | |
var r = this; | |
return n || (n = new Date), r = e.call(this, o.EventType | |
.ERROR, "error", { | |
error: t | |
}, n) || this, r.message = t.message, r | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.ErrorEvent = s | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e, t, n, r) { | |
o(l.TAGGED, e, t, r, n) | |
} | |
function i(e, t, n) { | |
o(l.TAGGED_PROP, e.constructor, t, n) | |
} | |
function o(e, t, n, r, i) { | |
var o = {}, | |
s = "number" == typeof i, | |
a = void 0 !== i && s ? i.toString() : n; | |
if (s && void 0 !== n) throw new Error(c.INVALID_DECORATOR_OPERATION); | |
Reflect.hasOwnMetadata(e, t) && (o = Reflect.getMetadata(e, | |
t)); | |
var u = o[a]; | |
if (Array.isArray(u)) | |
for (var l = 0, p = u; l < p.length; l++) { | |
var h = p[l]; | |
if (h.key === r.key) throw new Error(c.DUPLICATED_METADATA + | |
" " + h.key) | |
} else u = []; | |
u.push(r), o[a] = u, Reflect.defineMetadata(e, o, t) | |
} | |
function s(e, t) { | |
Reflect.decorate(e, t) | |
} | |
function a(e, t) { | |
return function(n, r) { | |
t(n, r, e) | |
} | |
} | |
function u(e, t, n) { | |
"number" == typeof n ? s([a(n, e)], t) : "string" == typeof n ? | |
Reflect.decorate([e], t, n) : s([e], t) | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var c = n(7), | |
l = n(3); | |
t.tagParameter = r, t.tagProperty = i, t.decorate = u | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.StatsPluginIds = { | |
YOUBORA: "youbora", | |
VUALTO: "vualto", | |
COMSCORE: "comscore", | |
CIM: "cim", | |
AT_INTERNET: "at_internet", | |
ADOBE: "adobe" | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t, n, r) { | |
this.type = e, this.name = t, this.args = n, this.date = | |
r | |
} | |
return e.prototype.setSmartId = function(e) { | |
this.smartId = e | |
}, e | |
}(); | |
t.EventBase = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r() { | |
function e() { | |
return Math.floor(65536 * (Math.random() + 1)).toString( | |
16).substring(1) | |
} | |
return e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + | |
e() + e() + e() | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.guid = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t, n) { | |
this.playerId = e, this.playerConfig = t, this.drmProviders = | |
n | |
} | |
return e | |
}(); | |
t.VuplayPlayer = r | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.decorate) s = Reflect.decorate(e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = e[a]) && | |
(s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, | |
n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.metadata) return Reflect.metadata(e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(6); | |
n(35); | |
var s, a = n(2), | |
u = n(9), | |
c = n(5); | |
! function(e) { | |
e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.WARN = | |
2] = "WARN", e[e.INFO = 3] = "INFO", e[e.DEBUG = 4] = | |
"DEBUG" | |
}(s = t.LogLevel || (t.LogLevel = {})); | |
var l = function() { | |
function e() { | |
this._logLevel = s.DEBUG | |
} | |
return e.prototype.setDependencies = function(e) { | |
var t = this; | |
this._eventBus = e.getDependency(a.default.IEventBus), | |
this._eventBus.on(u.EventType.LOG, c.EventName | |
.log, | |
function(e) { | |
t._onLogEvent(e) | |
}), this._eventBus.on(u.EventType.ERROR, | |
c.EventName.error, | |
function(e) { | |
t._onErrorEvent(e) | |
}) | |
}, e.prototype.setLogLevel = function(e) { | |
this._logLevel = e | |
}, e.prototype.getLogLevel = function() { | |
return this._logLevel | |
}, e.prototype._onLogEvent = function(e) { | |
if (e.args.logLevel <= this._logLevel) switch ( | |
e.args.logLevel) { | |
case s.DEBUG: | |
window.console && window.console.debug && | |
window.console.debug(s[e.args.logLevel], | |
e.args.message, e.args); | |
break; | |
case s.INFO: | |
window.console && window.console.info && | |
window.console.info(s[e.args.logLevel], | |
e.args.message, e.args); | |
break; | |
case s.WARN: | |
window.console && window.console.warn && | |
window.console.warn(s[e.args.logLevel], | |
e.args.message, e.args) | |
} | |
}, e.prototype._onErrorEvent = function(e) { | |
this._logLevel >= s.ERROR && window.console && | |
window.console.error && window.console.error( | |
e.message, e.args) | |
}, e = r([o.injectable(), i("design:paramtypes", [])], | |
e) | |
}(); | |
t.Log = l | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
! function(e) { | |
e[e.NO_SKIN = 0] = "NO_SKIN", e[e.DEFAULT = 1] = "DEFAULT", | |
e[e.VUPLAY = 2] = "VUPLAY", e[e.EUROPARL = 3] = | |
"EUROPARL", e[e.VIASAT = 4] = "VIASAT", e[e.VUALTO = 5] = | |
"VUALTO" | |
}(t.SkinType || (t.SkinType = {})) | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e) { | |
this.pluginId = e | |
} | |
return e | |
}(); | |
t.StatsPluginLoaderBase = r | |
}, function(e, t, n) { | |
function r(e) { | |
if (e) return i(e) | |
} | |
function i(e) { | |
for (var t in r.prototype) e[t] = r.prototype[t]; | |
return e | |
} | |
e.exports = r, r.prototype.on = r.prototype.addEventListener = | |
function(e, t) { | |
return this._callbacks = this._callbacks || {}, (this._callbacks[ | |
"$" + e] = this._callbacks["$" + e] || []).push( | |
t), this | |
}, r.prototype.once = function(e, t) { | |
function n() { | |
this.off(e, n), t.apply(this, arguments) | |
} | |
return n.fn = t, this.on(e, n), this | |
}, r.prototype.off = r.prototype.removeListener = r.prototype | |
.removeAllListeners = r.prototype.removeEventListener = | |
function(e, t) { | |
if (this._callbacks = this._callbacks || {}, 0 == | |
arguments.length) return this._callbacks = {}, this; | |
var n = this._callbacks["$" + e]; | |
if (!n) return this; | |
if (1 == arguments.length) return delete this._callbacks[ | |
"$" + e], this; | |
for (var r, i = 0; i < n.length; i++) | |
if ((r = n[i]) === t || r.fn === t) { | |
n.splice(i, 1); | |
break | |
} | |
return this | |
}, r.prototype.emit = function(e) { | |
this._callbacks = this._callbacks || {}; | |
var t = [].slice.call(arguments, 1), | |
n = this._callbacks["$" + e]; | |
if (n) { | |
n = n.slice(0); | |
for (var r = 0, i = n.length; r < i; ++r) n[r].apply( | |
this, t) | |
} | |
return this | |
}, r.prototype.listeners = function(e) { | |
return this._callbacks = this._callbacks || {}, this._callbacks[ | |
"$" + e] || [] | |
}, r.prototype.hasListeners = function(e) { | |
return !!this.listeners(e).length | |
} | |
}, function(e, t, n) { | |
(function(e) { | |
function r(e, n) { | |
return n("b" + t.packets[e.type] + e.data.data) | |
} | |
function i(e, n, r) { | |
if (!n) return t.encodeBase64Packet(e, r); | |
var i = e.data, | |
o = new Uint8Array(i), | |
s = new Uint8Array(1 + i.byteLength); | |
s[0] = g[e.type]; | |
for (var a = 0; a < o.length; a++) s[a + 1] = o[a]; | |
return r(s.buffer) | |
} | |
function o(e, n, r) { | |
if (!n) return t.encodeBase64Packet(e, r); | |
var i = new FileReader; | |
return i.onload = function() { | |
e.data = i.result, t.encodePacket(e, n, !0, | |
r) | |
}, i.readAsArrayBuffer(e.data) | |
} | |
function s(e, n, r) { | |
if (!n) return t.encodeBase64Packet(e, r); | |
if (_) return o(e, n, r); | |
var i = new Uint8Array(1); | |
return i[0] = g[e.type], r(new E([i.buffer, e.data])) | |
} | |
function a(e) { | |
try { | |
e = f.decode(e, { | |
strict: !1 | |
}) | |
} catch (e) { | |
return !1 | |
} | |
return e | |
} | |
function u(e, t, n) { | |
for (var r = new Array(e.length), i = d(e.length, n), | |
o = 0; o < e.length; o++) ! function(e, n, | |
i) { | |
t(n, function(t, n) { | |
r[e] = n, i(t, r) | |
}) | |
}(o, e[o], i) | |
} | |
var c, l = n(151), | |
p = n(58), | |
h = n(152), | |
d = n(153), | |
f = n(154); | |
e && e.ArrayBuffer && (c = n(155)); | |
var y = "undefined" != typeof navigator && /Android/i.test( | |
navigator.userAgent), | |
v = "undefined" != typeof navigator && /PhantomJS/i | |
.test(navigator.userAgent), | |
_ = y || v; | |
t.protocol = 3; | |
var g = t.packets = { | |
open: 0, | |
close: 1, | |
ping: 2, | |
pong: 3, | |
message: 4, | |
upgrade: 5, | |
noop: 6 | |
}, | |
m = l(g), | |
b = { | |
type: "error", | |
data: "parser error" | |
}, | |
E = n(156); | |
t.encodePacket = function(t, n, o, a) { | |
"function" == typeof n && (a = n, n = !1), | |
"function" == typeof o && (a = o, o = null); | |
var u = void 0 === t.data ? void 0 : t.data.buffer || | |
t.data; | |
if (e.ArrayBuffer && u instanceof ArrayBuffer) | |
return i(t, n, a); | |
if (E && u instanceof e.Blob) return s(t, n, a); | |
if (u && u.base64) return r(t, a); | |
var c = g[t.type]; | |
return void 0 !== t.data && (c += o ? f.encode( | |
String(t.data), { | |
strict: !1 | |
}) : String(t.data)), a("" + c) | |
}, t.encodeBase64Packet = function(n, r) { | |
var i = "b" + t.packets[n.type]; | |
if (E && n.data instanceof e.Blob) { | |
var o = new FileReader; | |
return o.onload = function() { | |
var e = o.result.split(",")[1]; | |
r(i + e) | |
}, o.readAsDataURL(n.data) | |
} | |
var s; | |
try { | |
s = String.fromCharCode.apply(null, new Uint8Array( | |
n.data)) | |
} catch (e) { | |
for (var a = new Uint8Array(n.data), u = | |
new Array(a.length), c = 0; c < a.length; c++) | |
u[c] = a[c]; | |
s = String.fromCharCode.apply(null, u) | |
} | |
return i += e.btoa(s), r(i) | |
}, t.decodePacket = function(e, n, r) { | |
if (void 0 === e) return b; | |
if ("string" == typeof e) { | |
if ("b" === e.charAt(0)) return t.decodeBase64Packet( | |
e.substr(1), n); | |
if (r && !1 === (e = a(e))) return b; | |
var i = e.charAt(0); | |
return Number(i) == i && m[i] ? e.length > | |
1 ? { | |
type: m[i], | |
data: e.substring(1) | |
} : { | |
type: m[i] | |
} : b | |
} | |
var o = new Uint8Array(e), | |
i = o[0], | |
s = h(e, 1); | |
return E && "blob" === n && (s = new E([s])), { | |
type: m[i], | |
data: s | |
} | |
}, t.decodeBase64Packet = function(e, t) { | |
var n = m[e.charAt(0)]; | |
if (!c) return { | |
type: n, | |
data: { | |
base64: !0, | |
data: e.substr(1) | |
} | |
}; | |
var r = c.decode(e.substr(1)); | |
return "blob" === t && E && (r = new E([r])), { | |
type: n, | |
data: r | |
} | |
}, t.encodePayload = function(e, n, r) { | |
function i(e) { | |
return e.length + ":" + e | |
} | |
function o(e, r) { | |
t.encodePacket(e, !!s && n, !1, function(e) { | |
r(null, i(e)) | |
}) | |
} | |
"function" == typeof n && (r = n, n = null); | |
var s = p(e); | |
return n && s ? E && !_ ? t.encodePayloadAsBlob( | |
e, r) : t.encodePayloadAsArrayBuffer(e, | |
r) : e.length ? void u(e, o, function(e, | |
t) { | |
return r(t.join("")) | |
}) : r("0:") | |
}, t.decodePayload = function(e, n, r) { | |
if ("string" != typeof e) return t.decodePayloadAsBinary( | |
e, n, r); | |
"function" == typeof n && (r = n, n = null); | |
var i; | |
if ("" === e) return r(b, 0, 1); | |
for (var o, s, a = "", u = 0, c = e.length; u < | |
c; u++) { | |
var l = e.charAt(u); | |
if (":" === l) { | |
if ("" === a || a != (o = Number(a))) | |
return r(b, 0, 1); | |
if (s = e.substr(u + 1, o), a != s.length) | |
return r(b, 0, 1); | |
if (s.length) { | |
if (i = t.decodePacket(s, n, !1), b | |
.type === i.type && b.data === | |
i.data) return r(b, 0, 1); | |
if (!1 === r(i, u + o, c)) return | |
} | |
u += o, a = "" | |
} else a += l | |
} | |
return "" !== a ? r(b, 0, 1) : void 0 | |
}, t.encodePayloadAsArrayBuffer = function(e, n) { | |
function r(e, n) { | |
t.encodePacket(e, !0, !0, function(e) { | |
return n(null, e) | |
}) | |
} | |
if (!e.length) return n(new ArrayBuffer(0)); | |
u(e, r, function(e, t) { | |
var r = t.reduce(function(e, t) { | |
var n; | |
return n = "string" == | |
typeof t ? t.length : | |
t.byteLength, e + n | |
.toString().length + | |
n + 2 | |
}, 0), | |
i = new Uint8Array(r), | |
o = 0; | |
return t.forEach(function(e) { | |
var t = "string" == | |
typeof e, | |
n = e; | |
if (t) { | |
for (var r = new Uint8Array( | |
e.length | |
), s = 0; s < e | |
.length; s++) r[ | |
s] = e.charCodeAt( | |
s); | |
n = r.buffer | |
} | |
i[o++] = t ? 0 : 1; | |
for (var a = n.byteLength | |
.toString(), s = | |
0; s < a.length; s++) | |
i[o++] = parseInt(a[ | |
s]); | |
i[o++] = 255; | |
for (var r = new Uint8Array( | |
n), s = 0; s < | |
r.length; s++) i[o++] = | |
r[s] | |
}), n(i.buffer) | |
}) | |
}, t.encodePayloadAsBlob = function(e, n) { | |
function r(e, n) { | |
t.encodePacket(e, !0, !0, function(e) { | |
var t = new Uint8Array(1); | |
if (t[0] = 1, "string" == | |
typeof e) { | |
for (var r = new Uint8Array( | |
e.length), i = | |
0; i < e.length; i++) | |
r[i] = e.charCodeAt(i); | |
e = r.buffer, t[0] = 0 | |
} | |
for (var o = e instanceof ArrayBuffer ? | |
e.byteLength : e.size, | |
s = o.toString(), a = | |
new Uint8Array(s.length + | |
1), i = 0; i < s.length; i++) | |
a[i] = parseInt(s[i]); | |
if (a[s.length] = 255, E) { | |
var u = new E([t.buffer, a.buffer, | |
e | |
]); | |
n(null, u) | |
} | |
}) | |
} | |
u(e, r, function(e, t) { | |
return n(new E(t)) | |
}) | |
}, t.decodePayloadAsBinary = function(e, n, r) { | |
"function" == typeof n && (r = n, n = null); | |
for (var i = e, o = []; i.byteLength > 0;) { | |
for (var s = new Uint8Array(i), a = 0 === | |
s[0], u = "", c = 1; 255 !== s[c]; c++) { | |
if (u.length > 310) return r(b, 0, 1); | |
u += s[c] | |
} | |
i = h(i, 2 + u.length), u = parseInt(u); | |
var l = h(i, 0, u); | |
if (a) try { | |
l = String.fromCharCode.apply(null, | |
new Uint8Array(l)) | |
} catch (e) { | |
var p = new Uint8Array(l); | |
l = ""; | |
for (var c = 0; c < p.length; c++) l += | |
String.fromCharCode(p[c]) | |
} | |
o.push(l), i = h(i, u) | |
} | |
var d = o.length; | |
o.forEach(function(e, i) { | |
r(t.decodePacket(e, n, !0), i, d) | |
}) | |
} | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(43), | |
o = n(22), | |
s = function(e) { | |
function t(t, n) { | |
return e.call(this, o.LogLevel.INFO, "log", { | |
message: t, | |
logLevel: o.LogLevel.INFO, | |
args: n | |
}) || this | |
} | |
return r(t, e), t | |
}(i.LogEvent); | |
t.LogInfo = s | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
if ("function" == typeof e) { | |
var t = e; | |
return t.name | |
} | |
if ("symbol" == typeof e) return e.toString(); | |
var t = e; | |
return t | |
} | |
function i(e, t, n) { | |
var r = "", | |
i = n(e, t); | |
return 0 !== i.length && (r = "\nRegistered bindings:", i.forEach( | |
function(e) { | |
var t = "Object"; | |
null !== e.implementationType && (t = c(e.implementationType)), | |
r = r + "\n " + t, e.constraint.metaData && | |
(r = r + " - " + e.constraint.metaData) | |
})), r | |
} | |
function o(e, t) { | |
return null !== e.parentRequest && (e.parentRequest.serviceIdentifier === | |
t || o(e.parentRequest, t)) | |
} | |
function s(e) { | |
function t(e, n) { | |
void 0 === n && (n = []); | |
var i = r(e.serviceIdentifier); | |
return n.push(i), null !== e.parentRequest ? t(e.parentRequest, | |
n) : n | |
} | |
return t(e).reverse().join(" --\x3e ") | |
} | |
function a(e) { | |
e.childRequests.forEach(function(e) { | |
if (o(e, e.serviceIdentifier)) { | |
var t = s(e); | |
throw new Error(l.CIRCULAR_DEPENDENCY + " " + | |
t) | |
} | |
a(e) | |
}) | |
} | |
function u(e, t) { | |
if (t.isTagged() || t.isNamed()) { | |
var n = "", | |
r = t.getNamedTag(), | |
i = t.getCustomTags(); | |
return null !== r && (n += r.toString() + "\n"), null !== | |
i && i.forEach(function(e) { | |
n += e.toString() + "\n" | |
}), " " + e + "\n " + e + " - " + n | |
} | |
return " " + e | |
} | |
function c(e) { | |
if (e.name) return e.name; | |
var t = e.toString(), | |
n = t.match(/^function\s*([^\s(]+)/); | |
return n ? n[1] : "Anonymous function: " + t | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var l = n(7); | |
t.getServiceIdentifierAsString = r, t.listRegisteredBindingsForServiceIdentifier = | |
i, t.circularDependencyToException = a, t.listMetadataForTarget = | |
u, t.getFunctionName = c | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t, n) { | |
this.id = e, this.lang = t, this.isActive = n | |
} | |
return e | |
}(); | |
t.AudioTrack = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t, n, r, i) { | |
this.id = e, this.lang = t, this.label = n || t, | |
this.kind = r, this.defaultTrack = i | |
} | |
return e | |
}(); | |
t.TextTrack = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e() {} | |
return e | |
}(); | |
t.SkinLoaderBase = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.VuplayApiUrl = "https://api.vuplay.co.uk", t.GetStatsPlugins = | |
"https://api.vuplay.co.uk/stats/plugins?player_key={player_key}", | |
t.SocketsUrl = "https://sockets.vuplay.co.uk", t.SocketsPath = | |
"/connect", t.silverlightMinRuntimeVersion = "5.0.61118.0", | |
t.appName = "vuplay-smart" | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(6), | |
i = n(2), | |
o = n(104), | |
s = n(115), | |
a = n(117), | |
u = n(125), | |
c = n(132), | |
l = new r.Container; | |
l.bind(i.default.IPlayerLoader).to(o.PlayerLoader), l.bind(i.default | |
.IHttpRequest).to(s.HttpRequest), l.bind(i.default.IStatsManager) | |
.to(a.StatsManager), l.bind(i.default.ISkinManager).to(u.SkinManager), | |
l.bind(i.default.ICastManager).to(c.CastManager), t.default = | |
l | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
! function(e) { | |
e[e.CHROMECAST = 0] = "CHROMECAST" | |
}(t.CastType || (t.CastType = {})) | |
}, function(e, t, n) { | |
(function(e, t) { | |
var n; | |
! function(n) { | |
"use strict"; | |
function r(e, t, n, r) { | |
if (P(n)) { | |
if (!N(e)) throw new TypeError; | |
if (!R(t)) throw new TypeError; | |
return d(e, t) | |
} | |
if (!N(e)) throw new TypeError; | |
if (!A(t)) throw new TypeError; | |
if (!A(r) && !P(r) && !S(r)) throw new TypeError; | |
return S(r) && (r = void 0), n = M(n), f(e, t, | |
n, r) | |
} | |
function i(e, t) { | |
function n(n, r) { | |
if (!A(n)) throw new TypeError; | |
if (!P(r) && !I(r)) throw new TypeError; | |
b(e, t, n, r) | |
} | |
return n | |
} | |
function o(e, t, n, r) { | |
if (!A(n)) throw new TypeError; | |
return P(r) || (r = M(r)), b(e, t, n, r) | |
} | |
function s(e, t, n) { | |
if (!A(t)) throw new TypeError; | |
return P(n) || (n = M(n)), v(e, t, n) | |
} | |
function a(e, t, n) { | |
if (!A(t)) throw new TypeError; | |
return P(n) || (n = M(n)), _(e, t, n) | |
} | |
function u(e, t, n) { | |
if (!A(t)) throw new TypeError; | |
return P(n) || (n = M(n)), g(e, t, n) | |
} | |
function c(e, t, n) { | |
if (!A(t)) throw new TypeError; | |
return P(n) || (n = M(n)), m(e, t, n) | |
} | |
function l(e, t) { | |
if (!A(e)) throw new TypeError; | |
return P(t) || (t = M(t)), E(e, t) | |
} | |
function p(e, t) { | |
if (!A(e)) throw new TypeError; | |
return P(t) || (t = M(t)), w(e, t) | |
} | |
function h(e, t, n) { | |
if (!A(t)) throw new TypeError; | |
P(n) || (n = M(n)); | |
var r = y(t, n, !1); | |
if (P(r)) return !1; | |
if (!r.delete(e)) return !1; | |
if (r.size > 0) return !0; | |
var i = ee.get(t); | |
return i.delete(n), i.size > 0 || (ee.delete(t), ! | |
0) | |
} | |
function d(e, t) { | |
for (var n = e.length - 1; n >= 0; --n) { | |
var r = e[n], | |
i = r(t); | |
if (!P(i) && !S(i)) { | |
if (!R(i)) throw new TypeError; | |
t = i | |
} | |
} | |
return t | |
} | |
function f(e, t, n, r) { | |
for (var i = e.length - 1; i >= 0; --i) { | |
var o = e[i], | |
s = o(t, n, r); | |
if (!P(s) && !S(s)) { | |
if (!A(s)) throw new TypeError; | |
r = s | |
} | |
} | |
return r | |
} | |
function y(e, t, n) { | |
var r = ee.get(e); | |
if (P(r)) { | |
if (!n) return; | |
r = new $, ee.set(e, r) | |
} | |
var i = r.get(t); | |
if (P(i)) { | |
if (!n) return; | |
i = new $, r.set(t, i) | |
} | |
return i | |
} | |
function v(e, t, n) { | |
if (_(e, t, n)) return !0; | |
var r = H(t); | |
return !S(r) && v(e, r, n) | |
} | |
function _(e, t, n) { | |
var r = y(t, n, !1); | |
return !P(r) && O(r.has(e)) | |
} | |
function g(e, t, n) { | |
if (_(e, t, n)) return m(e, t, n); | |
var r = H(t); | |
return S(r) ? void 0 : g(e, r, n) | |
} | |
function m(e, t, n) { | |
var r = y(t, n, !1); | |
if (!P(r)) return r.get(e) | |
} | |
function b(e, t, n, r) { | |
y(n, r, !0).set(e, t) | |
} | |
function E(e, t) { | |
var n = w(e, t), | |
r = H(e); | |
if (null === r) return n; | |
var i = E(r, t); | |
if (i.length <= 0) return n; | |
if (n.length <= 0) return i; | |
for (var o = new Q, s = [], a = 0, u = n; a < u | |
.length; a++) { | |
var c = u[a], | |
l = o.has(c); | |
l || (o.add(c), s.push(c)) | |
} | |
for (var p = 0, h = i; p < h.length; p++) { | |
var c = h[p], | |
l = o.has(c); | |
l || (o.add(c), s.push(c)) | |
} | |
return s | |
} | |
function w(e, t) { | |
var n = [], | |
r = y(e, t, !1); | |
if (P(r)) return n; | |
for (var i = r.keys(), o = j(i), s = 0;;) { | |
var a = F(o); | |
if (!a) return n.length = s, n; | |
var u = V(a); | |
try { | |
n[s] = u | |
} catch (e) { | |
try { | |
U(o) | |
} finally { | |
throw e | |
} | |
} | |
s++ | |
} | |
} | |
function T(e) { | |
if (null === e) return 1; | |
switch (typeof e) { | |
case "undefined": | |
return 0; | |
case "boolean": | |
return 2; | |
case "string": | |
return 3; | |
case "symbol": | |
return 4; | |
case "number": | |
return 5; | |
case "object": | |
return null === e ? 1 : 6; | |
default: | |
return 6 | |
} | |
} | |
function P(e) { | |
return void 0 === e | |
} | |
function S(e) { | |
return null === e | |
} | |
function k(e) { | |
return "symbol" == typeof e | |
} | |
function A(e) { | |
return "object" == typeof e ? null !== e : | |
"function" == typeof e | |
} | |
function C(e, t) { | |
switch (T(e)) { | |
case 0: | |
case 1: | |
case 2: | |
case 3: | |
case 4: | |
case 5: | |
return e | |
} | |
var n = 3 === t ? "string" : 5 === t ? "number" : | |
"default", | |
r = x(e, J); | |
if (void 0 !== r) { | |
var i = r.call(e, n); | |
if (A(i)) throw new TypeError; | |
return i | |
} | |
return B(e, "default" === n ? "number" : n) | |
} | |
function B(e, t) { | |
if ("string" === t) { | |
var n = e.toString; | |
if (D(n)) { | |
var r = n.call(e); | |
if (!A(r)) return r | |
} | |
var i = e.valueOf; | |
if (D(i)) { | |
var r = i.call(e); | |
if (!A(r)) return r | |
} | |
} else { | |
var i = e.valueOf; | |
if (D(i)) { | |
var r = i.call(e); | |
if (!A(r)) return r | |
} | |
var o = e.toString; | |
if (D(o)) { | |
var r = o.call(e); | |
if (!A(r)) return r | |
} | |
} | |
throw new TypeError | |
} | |
function O(e) { | |
return !!e | |
} | |
function L(e) { | |
return "" + e | |
} | |
function M(e) { | |
var t = C(e, 3); | |
return k(t) ? t : L(t) | |
} | |
function N(e) { | |
return Array.isArray ? Array.isArray(e) : e instanceof Object ? | |
e instanceof Array : "[object Array]" === | |
Object.prototype.toString.call(e) | |
} | |
function D(e) { | |
return "function" == typeof e | |
} | |
function R(e) { | |
return "function" == typeof e | |
} | |
function I(e) { | |
switch (T(e)) { | |
case 3: | |
case 4: | |
return !0; | |
default: | |
return !1 | |
} | |
} | |
function x(e, t) { | |
var n = e[t]; | |
if (void 0 !== n && null !== n) { | |
if (!D(n)) throw new TypeError; | |
return n | |
} | |
} | |
function j(e) { | |
var t = x(e, z); | |
if (!D(t)) throw new TypeError; | |
var n = t.call(e); | |
if (!A(n)) throw new TypeError; | |
return n | |
} | |
function V(e) { | |
return e.value | |
} | |
function F(e) { | |
var t = e.next(); | |
return !t.done && t | |
} | |
function U(e) { | |
var t = e.return; | |
t && t.call(e) | |
} | |
function H(e) { | |
var t = Object.getPrototypeOf(e); | |
if ("function" != typeof e || e === K) return t; | |
if (t !== K) return t; | |
var n = e.prototype, | |
r = n && Object.getPrototypeOf(n); | |
if (null == r || r === Object.prototype) return t; | |
var i = r.constructor; | |
return "function" != typeof i ? t : i === e ? t : | |
i | |
} | |
function q(e) { | |
return e.__ = void 0, delete e.__, e | |
} | |
var W, G = Object.prototype.hasOwnProperty, | |
Y = "function" == typeof Symbol, | |
J = Y && void 0 !== Symbol.toPrimitive ? Symbol | |
.toPrimitive : "@@toPrimitive", | |
z = Y && void 0 !== Symbol.iterator ? Symbol.iterator : | |
"@@iterator"; | |
! function(e) { | |
var t = "function" == typeof Object.create, | |
n = { | |
__proto__: [] | |
} | |
instanceof Array, r = !t && !n; | |
e.create = t ? function() { | |
return q(Object.create(null)) | |
} : n ? function() { | |
return q({ | |
__proto__: null | |
}) | |
} : function() { | |
return q({}) | |
}, e.has = r ? function(e, t) { | |
return G.call(e, t) | |
} : function(e, t) { | |
return t in e | |
}, e.get = r ? function(e, t) { | |
return G.call(e, t) ? e[t] : void 0 | |
} : function(e, t) { | |
return e[t] | |
} | |
}(W || (W = {})); | |
var K = Object.getPrototypeOf(Function), | |
X = "object" == typeof e && e.env && "true" === | |
e.env.REFLECT_METADATA_USE_MAP_POLYFILL, | |
$ = X || "function" != typeof Map || "function" != | |
typeof Map.prototype.entries ? function() { | |
function e(e, t) { | |
return e | |
} | |
function t(e, t) { | |
return t | |
} | |
function n(e, t) { | |
return [e, t] | |
} | |
var r = {}, | |
i = [], | |
o = function() { | |
function e(e, t, n) { | |
this._index = 0, this._keys = e, | |
this._values = t, this._selector = | |
n | |
} | |
return e.prototype["@@iterator"] = | |
function() { | |
return this | |
}, e.prototype[z] = function() { | |
return this | |
}, e.prototype.next = function() { | |
var e = this._index; | |
if (e >= 0 && e < this._keys | |
.length) { | |
var t = this._selector( | |
this._keys[e], | |
this._values[e] | |
); | |
return e + 1 >= this._keys | |
.length ? (this._index = - | |
1, this._keys = | |
i, this._values = | |
i) : this._index++, { | |
value: t, | |
done: !1 | |
} | |
} | |
return { | |
value: void 0, | |
done: !0 | |
} | |
}, e.prototype.throw = function( | |
e) { | |
throw this._index >= 0 && ( | |
this._index = -1, | |
this._keys = i, | |
this._values = i), | |
e | |
}, e.prototype.return = | |
function(e) { | |
return this._index >= 0 && | |
(this._index = -1, this | |
._keys = i, this._values = | |
i), { | |
value: e, | |
done: !0 | |
} | |
}, e | |
}(); | |
return function() { | |
function i() { | |
this._keys = [], this._values = [], | |
this._cacheKey = r, this._cacheIndex = - | |
2 | |
} | |
return Object.defineProperty(i.prototype, | |
"size", { | |
get: function() { | |
return this._keys | |
.length | |
}, | |
enumerable: !0, | |
configurable: !0 | |
}), i.prototype.has = | |
function(e) { | |
return this._find(e, !1) >= | |
0 | |
}, i.prototype.get = function(e) { | |
var t = this._find(e, !1); | |
return t >= 0 ? this._values[ | |
t] : void 0 | |
}, i.prototype.set = function(e, | |
t) { | |
var n = this._find(e, !0); | |
return this._values[n] = t, | |
this | |
}, i.prototype.delete = | |
function(e) { | |
var t = this._find(e, !1); | |
if (t >= 0) { | |
for (var n = this._keys | |
.length, i = t + | |
1; i < n; i++) | |
this._keys[i - 1] = | |
this._keys[i], this | |
._values[i - 1] = | |
this._values[i]; | |
return this._keys.length--, | |
this._values.length--, | |
e === this._cacheKey && | |
(this._cacheKey = r, | |
this._cacheIndex = - | |
2), !0 | |
} | |
return !1 | |
}, i.prototype.clear = function() { | |
this._keys.length = 0, this | |
._values.length = 0, | |
this._cacheKey = r, | |
this._cacheIndex = -2 | |
}, i.prototype.keys = function() { | |
return new o(this._keys, | |
this._values, e) | |
}, i.prototype.values = | |
function() { | |
return new o(this._keys, | |
this._values, t) | |
}, i.prototype.entries = | |
function() { | |
return new o(this._keys, | |
this._values, n) | |
}, i.prototype["@@iterator"] = | |
function() { | |
return this.entries() | |
}, i.prototype[z] = function() { | |
return this.entries() | |
}, i.prototype._find = function( | |
e, t) { | |
return this._cacheKey !== | |
e && (this._cacheIndex = | |
this._keys.indexOf( | |
this._cacheKey = | |
e)), this._cacheIndex < | |
0 && t && (this._cacheIndex = | |
this._keys.length, | |
this._keys.push(e), | |
this._values.push( | |
void 0)), this._cacheIndex | |
}, i | |
}() | |
}() : Map, | |
Q = X || "function" != typeof Set || "function" != | |
typeof Set.prototype.entries ? function() { | |
return function() { | |
function e() { | |
this._map = new $ | |
} | |
return Object.defineProperty(e.prototype, | |
"size", { | |
get: function() { | |
return this._map | |
.size | |
}, | |
enumerable: !0, | |
configurable: !0 | |
}), e.prototype.has = | |
function(e) { | |
return this._map.has(e) | |
}, e.prototype.add = function(e) { | |
return this._map.set(e, e), | |
this | |
}, e.prototype.delete = | |
function(e) { | |
return this._map.delete(e) | |
}, e.prototype.clear = function() { | |
this._map.clear() | |
}, e.prototype.keys = function() { | |
return this._map.keys() | |
}, e.prototype.values = | |
function() { | |
return this._map.values() | |
}, e.prototype.entries = | |
function() { | |
return this._map.entries() | |
}, e.prototype["@@iterator"] = | |
function() { | |
return this.keys() | |
}, e.prototype[z] = function() { | |
return this.keys() | |
}, e | |
}() | |
}() : Set, | |
Z = X || "function" != typeof WeakMap ? | |
function() { | |
function e() { | |
var e; | |
do { | |
e = "@@WeakMap@@" + i() | |
} while (W.has(s, e)); | |
return s[e] = !0, e | |
} | |
function t(e, t) { | |
if (!G.call(e, a)) { | |
if (!t) return; | |
Object.defineProperty(e, a, { | |
value: W.create() | |
}) | |
} | |
return e[a] | |
} | |
function n(e, t) { | |
for (var n = 0; n < t; ++n) e[n] = 255 * | |
Math.random() | 0; | |
return e | |
} | |
function r(e) { | |
return "function" == typeof Uint8Array ? | |
"undefined" != typeof crypto ? | |
crypto.getRandomValues(new Uint8Array( | |
e)) : "undefined" != typeof msCrypto ? | |
msCrypto.getRandomValues(new Uint8Array( | |
e)) : n(new Uint8Array(e), e) : | |
n(new Array(e), e) | |
} | |
function i() { | |
var e = r(o); | |
e[6] = 79 & e[6] | 64, e[8] = 191 & e[8] | | |
128; | |
for (var t = "", n = 0; n < o; ++n) { | |
var i = e[n]; | |
4 !== n && 6 !== n && 8 !== n || (t += | |
"-"), i < 16 && (t += "0"), | |
t += i.toString(16).toLowerCase() | |
} | |
return t | |
} | |
var o = 16, | |
s = W.create(), | |
a = e(); | |
return function() { | |
function n() { | |
this._key = e() | |
} | |
return n.prototype.has = function(e) { | |
var n = t(e, !1); | |
return void 0 !== n && W.has( | |
n, this._key) | |
}, n.prototype.get = function(e) { | |
var n = t(e, !1); | |
return void 0 !== n ? W.get( | |
n, this._key) : | |
void 0 | |
}, n.prototype.set = function(e, | |
n) { | |
return t(e, !0)[this._key] = | |
n, this | |
}, n.prototype.delete = | |
function(e) { | |
var n = t(e, !1); | |
return void 0 !== n && | |
delete n[this._key] | |
}, n.prototype.clear = function() { | |
this._key = e() | |
}, n | |
}() | |
}() : WeakMap, | |
ee = new Z; | |
n.decorate = r, n.metadata = i, n.defineMetadata = | |
o, n.hasMetadata = s, n.hasOwnMetadata = a, n.getMetadata = | |
u, n.getOwnMetadata = c, n.getMetadataKeys = l, | |
n.getOwnMetadataKeys = p, n.deleteMetadata = h, | |
function(e) { | |
if (void 0 !== e.Reflect) { | |
if (e.Reflect !== n) | |
for (var t in n) G.call(n, t) && (e | |
.Reflect[t] = n[t]) | |
} else e.Reflect = n | |
}(void 0 !== t ? t : "undefined" != typeof self ? | |
self : Function("return this;")()) | |
}(n || (n = {})) | |
}).call(t, n(42), n(4)) | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n, r, i) { | |
return i || (i = new Date), e.call(this, o.EventType | |
.AD, t, { | |
duration: n, | |
skipTime: r | |
}, i) || this | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.AdEvent = s | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n, r, i, s) { | |
return s || (s = new Date), e.call(this, o.EventType | |
.AD, t, { | |
startTime: n, | |
duration: r, | |
adCount: i | |
}, s) || this | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.AdBreakEvent = s | |
}, function(e, t) { | |
t.encode = function(e) { | |
var t = ""; | |
for (var n in e) e.hasOwnProperty(n) && (t.length && (t += | |
"&"), t += encodeURIComponent(n) + "=" + | |
encodeURIComponent(e[n])); | |
return t | |
}, t.decode = function(e) { | |
for (var t = {}, n = e.split("&"), r = 0, i = n.length; r < | |
i; r++) { | |
var o = n[r].split("="); | |
t[decodeURIComponent(o[0])] = decodeURIComponent(o[ | |
1]) | |
} | |
return t | |
} | |
}, function(e, t) { | |
e.exports = function(e, t) { | |
var n = function() {}; | |
n.prototype = t.prototype, e.prototype = new n, e.prototype | |
.constructor = e | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(41), | |
i = function() { | |
function e(e) { | |
this._binding = e | |
} | |
return e.prototype.onActivation = function(e) { | |
return this._binding.onActivation = e, new r.BindingWhenSyntax( | |
this._binding) | |
}, e | |
}(); | |
t.BindingOnSyntax = i | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(40), | |
i = n(53), | |
o = function() { | |
function e(e) { | |
this._binding = e | |
} | |
return e.prototype.when = function(e) { | |
return this._binding.constraint = e, new r.BindingOnSyntax( | |
this._binding) | |
}, e.prototype.whenTargetNamed = function(e) { | |
return this._binding.constraint = i.namedConstraint( | |
e), new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenTargetIsDefault = function() { | |
return this._binding.constraint = function(e) { | |
return null !== e.target && !e.target.isNamed() && | |
!e.target.isTagged() | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenTargetTagged = function(e, t) { | |
return this._binding.constraint = i.taggedConstraint( | |
e)(t), new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenInjectedInto = function(e) { | |
return this._binding.constraint = function(t) { | |
return i.typeConstraint(e)(t.parentRequest) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenParentNamed = function(e) { | |
return this._binding.constraint = function(t) { | |
return i.namedConstraint(e)(t.parentRequest) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenParentTagged = function(e, t) { | |
return this._binding.constraint = function(n) { | |
return i.taggedConstraint(e)(t)(n.parentRequest) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenAnyAncestorIs = function(e) { | |
return this._binding.constraint = function(t) { | |
return i.traverseAncerstors(t, i.typeConstraint( | |
e)) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenNoAncestorIs = function(e) { | |
return this._binding.constraint = function(t) { | |
return !i.traverseAncerstors(t, i.typeConstraint( | |
e)) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenAnyAncestorNamed = function(e) { | |
return this._binding.constraint = function(t) { | |
return i.traverseAncerstors(t, i.namedConstraint( | |
e)) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenNoAncestorNamed = function(e) { | |
return this._binding.constraint = function(t) { | |
return !i.traverseAncerstors(t, i.namedConstraint( | |
e)) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenAnyAncestorTagged = function(e, | |
t) { | |
return this._binding.constraint = function(n) { | |
return i.traverseAncerstors(n, i.taggedConstraint( | |
e)(t)) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenNoAncestorTagged = function(e, t) { | |
return this._binding.constraint = function(n) { | |
return !i.traverseAncerstors(n, i.taggedConstraint( | |
e)(t)) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenAnyAncestorMatches = function(e) { | |
return this._binding.constraint = function(t) { | |
return i.traverseAncerstors(t, e) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e.prototype.whenNoAncestorMatches = function(e) { | |
return this._binding.constraint = function(t) { | |
return !i.traverseAncerstors(t, e) | |
}, new r.BindingOnSyntax(this._binding) | |
}, e | |
}(); | |
t.BindingWhenSyntax = o | |
}, function(e, t) { | |
function n() { | |
throw new Error("setTimeout has not been defined") | |
} | |
function r() { | |
throw new Error("clearTimeout has not been defined") | |
} | |
function i(e) { | |
if (l === setTimeout) return setTimeout(e, 0); | |
if ((l === n || !l) && setTimeout) return l = setTimeout, | |
setTimeout(e, 0); | |
try { | |
return l(e, 0) | |
} catch (t) { | |
try { | |
return l.call(null, e, 0) | |
} catch (t) { | |
return l.call(this, e, 0) | |
} | |
} | |
} | |
function o(e) { | |
if (p === clearTimeout) return clearTimeout(e); | |
if ((p === r || !p) && clearTimeout) return p = | |
clearTimeout, clearTimeout(e); | |
try { | |
return p(e) | |
} catch (t) { | |
try { | |
return p.call(null, e) | |
} catch (t) { | |
return p.call(this, e) | |
} | |
} | |
} | |
function s() { | |
y && d && (y = !1, d.length ? f = d.concat(f) : v = -1, f.length && | |
a()) | |
} | |
function a() { | |
if (!y) { | |
var e = i(s); | |
y = !0; | |
for (var t = f.length; t;) { | |
for (d = f, f = []; ++v < t;) d && d[v].run(); | |
v = -1, t = f.length | |
} | |
d = null, y = !1, o(e) | |
} | |
} | |
function u(e, t) { | |
this.fun = e, this.array = t | |
} | |
function c() {} | |
var l, p, h = e.exports = {}; | |
! function() { | |
try { | |
l = "function" == typeof setTimeout ? setTimeout : n | |
} catch (e) { | |
l = n | |
} | |
try { | |
p = "function" == typeof clearTimeout ? clearTimeout : | |
r | |
} catch (e) { | |
p = r | |
} | |
}(); | |
var d, f = [], | |
y = !1, | |
v = -1; | |
h.nextTick = function(e) { | |
var t = new Array(arguments.length - 1); | |
if (arguments.length > 1) | |
for (var n = 1; n < arguments.length; n++) t[n - 1] = | |
arguments[n]; | |
f.push(new u(e, t)), 1 !== f.length || y || i(a) | |
}, u.prototype.run = function() { | |
this.fun.apply(null, this.array) | |
}, h.title = "browser", h.browser = !0, h.env = {}, h.argv = [], | |
h.version = "", h.versions = {}, h.on = c, h.addListener = | |
c, h.once = c, h.off = c, h.removeListener = c, h.removeAllListeners = | |
c, h.emit = c, h.prependListener = c, h.prependOnceListener = | |
c, h.listeners = function(e) { | |
return [] | |
}, h.binding = function(e) { | |
throw new Error("process.binding is not supported") | |
}, h.cwd = function() { | |
return "/" | |
}, h.chdir = function(e) { | |
throw new Error("process.chdir is not supported") | |
}, h.umask = function() { | |
return 0 | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n, r, i) { | |
return i || (i = new Date), e.call(this, o.EventType | |
.LOG, n, r, i) || this | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.LogEvent = s | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.youtubePlayerId = "youtube", t.youtubeJsUrl = | |
"https://www.youtube.com/iframe_api", t.playerIds = { | |
theoplayerHls: "theoplayer-hls", | |
theoplayerDash: "theoplayer-dash", | |
theoplayerHlsAes: "theoplayer-aes-hls", | |
dashJs: "dash-js", | |
vuplaySilverlight: "vuplay-silverlight", | |
vuplayHls: "vuplay-hls", | |
youtube: "youtube" | |
} | |
}, function(e, t, n) { | |
function r() {} | |
function i(e) { | |
var n = "" + e.type; | |
return t.BINARY_EVENT !== e.type && t.BINARY_ACK !== e.type || | |
(n += e.attachments + "-"), e.nsp && "/" !== e.nsp && ( | |
n += e.nsp + ","), null != e.id && (n += e.id), | |
null != e.data && (n += JSON.stringify(e.data)), p( | |
"encoded %j as %s", e, n), n | |
} | |
function o(e, t) { | |
function n(e) { | |
var n = f.deconstructPacket(e), | |
r = i(n.packet), | |
o = n.buffers; | |
o.unshift(r), t(o) | |
} | |
f.removeBlobs(e, n) | |
} | |
function s() { | |
this.reconstructor = null | |
} | |
function a(e) { | |
var n = 0, | |
r = { | |
type: Number(e.charAt(0)) | |
}; | |
if (null == t.types[r.type]) return l(); | |
if (t.BINARY_EVENT === r.type || t.BINARY_ACK === r.type) { | |
for (var i = ""; | |
"-" !== e.charAt(++n) && (i += e.charAt(n), n != e.length); | |
); | |
if (i != Number(i) || "-" !== e.charAt(n)) throw new Error( | |
"Illegal attachments"); | |
r.attachments = Number(i) | |
} | |
if ("/" === e.charAt(n + 1)) | |
for (r.nsp = ""; ++n;) { | |
var o = e.charAt(n); | |
if ("," === o) break; | |
if (r.nsp += o, n === e.length) break | |
} else r.nsp = "/"; | |
var s = e.charAt(n + 1); | |
if ("" !== s && Number(s) == s) { | |
for (r.id = ""; ++n;) { | |
var o = e.charAt(n); | |
if (null == o || Number(o) != o) { | |
--n; | |
break | |
} | |
if (r.id += e.charAt(n), n === e.length) break | |
} | |
r.id = Number(r.id) | |
} | |
return e.charAt(++n) && (r = u(r, e.substr(n))), p( | |
"decoded %s as %j", e, r), r | |
} | |
function u(e, t) { | |
try { | |
e.data = JSON.parse(t) | |
} catch (e) { | |
return l() | |
} | |
return e | |
} | |
function c(e) { | |
this.reconPack = e, this.buffers = [] | |
} | |
function l() { | |
return { | |
type: t.ERROR, | |
data: "parser error" | |
} | |
} | |
var p = n(13)("socket.io-parser"), | |
h = n(25), | |
d = n(58), | |
f = n(146), | |
y = n(60); | |
t.protocol = 4, t.types = ["CONNECT", "DISCONNECT", "EVENT", | |
"ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK" | |
], t.CONNECT = 0, t.DISCONNECT = 1, t.EVENT = 2, t.ACK = 3, | |
t.ERROR = 4, t.BINARY_EVENT = 5, t.BINARY_ACK = 6, t.Encoder = | |
r, t.Decoder = s, r.prototype.encode = function(e, n) { | |
if (e.type !== t.EVENT && e.type !== t.ACK || !d(e.data) || | |
(e.type = e.type === t.EVENT ? t.BINARY_EVENT : t.BINARY_ACK), | |
p("encoding packet %j", e), t.BINARY_EVENT === e.type || | |
t.BINARY_ACK === e.type) o(e, n); | |
else { | |
n([i(e)]) | |
} | |
}, h(s.prototype), s.prototype.add = function(e) { | |
var n; | |
if ("string" == typeof e) n = a(e), t.BINARY_EVENT === | |
n.type || t.BINARY_ACK === n.type ? (this.reconstructor = | |
new c(n), 0 === this.reconstructor.reconPack.attachments && | |
this.emit("decoded", n)) : this.emit("decoded", | |
n); | |
else { | |
if (!y(e) && !e.base64) throw new Error( | |
"Unknown type: " + e); | |
if (!this.reconstructor) throw new Error( | |
"got binary data when not reconstructing a packet" | |
); | |
(n = this.reconstructor.takeBinaryData(e)) && (this | |
.reconstructor = null, this.emit("decoded", n)) | |
} | |
}, s.prototype.destroy = function() { | |
this.reconstructor && this.reconstructor.finishedReconstruction() | |
}, c.prototype.takeBinaryData = function(e) { | |
if (this.buffers.push(e), this.buffers.length === this.reconPack | |
.attachments) { | |
var t = f.reconstructPacket(this.reconPack, this.buffers); | |
return this.finishedReconstruction(), t | |
} | |
return null | |
}, c.prototype.finishedReconstruction = function() { | |
this.reconPack = null, this.buffers = [] | |
} | |
}, function(e, t, n) { | |
(function(t) { | |
var r = n(149); | |
e.exports = function(e) { | |
var n = e.xdomain, | |
i = e.xscheme, | |
o = e.enablesXDR; | |
try { | |
if ("undefined" != typeof XMLHttpRequest && | |
(!n || r)) return new XMLHttpRequest | |
} catch (e) {} | |
try { | |
if ("undefined" != typeof XDomainRequest && | |
!i && o) return new XDomainRequest | |
} catch (e) {} | |
if (!n) try { | |
return new(t[["Active"].concat("Object") | |
.join("X")])( | |
"Microsoft.XMLHTTP") | |
} catch (e) {} | |
} | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
function r(e) { | |
this.path = e.path, this.hostname = e.hostname, this.port = | |
e.port, this.secure = e.secure, this.query = e.query, | |
this.timestampParam = e.timestampParam, this.timestampRequests = | |
e.timestampRequests, this.readyState = "", this.agent = | |
e.agent || !1, this.socket = e.socket, this.enablesXDR = | |
e.enablesXDR, this.pfx = e.pfx, this.key = e.key, this.passphrase = | |
e.passphrase, this.cert = e.cert, this.ca = e.ca, this.ciphers = | |
e.ciphers, this.rejectUnauthorized = e.rejectUnauthorized, | |
this.forceNode = e.forceNode, this.extraHeaders = e.extraHeaders, | |
this.localAddress = e.localAddress | |
} | |
var i = n(26), | |
o = n(25); | |
e.exports = r, o(r.prototype), r.prototype.onError = function(e, | |
t) { | |
var n = new Error(e); | |
return n.type = "TransportError", n.description = t, | |
this.emit("error", n), this | |
}, r.prototype.open = function() { | |
return "closed" !== this.readyState && "" !== this.readyState || | |
(this.readyState = "opening", this.doOpen()), this | |
}, r.prototype.close = function() { | |
return "opening" !== this.readyState && "open" !== this | |
.readyState || (this.doClose(), this.onClose()), | |
this | |
}, r.prototype.send = function(e) { | |
if ("open" !== this.readyState) throw new Error( | |
"Transport not open"); | |
this.write(e) | |
}, r.prototype.onOpen = function() { | |
this.readyState = "open", this.writable = !0, this.emit( | |
"open") | |
}, r.prototype.onData = function(e) { | |
var t = i.decodePacket(e, this.socket.binaryType); | |
this.onPacket(t) | |
}, r.prototype.onPacket = function(e) { | |
this.emit("packet", e) | |
}, r.prototype.onClose = function() { | |
this.readyState = "closed", this.emit("close") | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(22), | |
i = n(99), | |
o = n(5), | |
s = n(9), | |
a = n(56), | |
u = n(23), | |
c = n(34); | |
t.Vuplay = { | |
LogLevel: r.LogLevel, | |
Smart: i.default, | |
Events: o.EventName, | |
EventType: s.EventType, | |
AdType: a.AdType, | |
SkinType: u.SkinType, | |
CastType: c.CastType | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(3), | |
i = function() { | |
function e() {} | |
return e.prototype.getConstructorMetadata = function(e) { | |
return { | |
compilerGeneratedMetadata: Reflect.getMetadata( | |
r.PARAM_TYPES, e), | |
userGeneratedMetadata: Reflect.getMetadata( | |
r.TAGGED, e) || {} | |
} | |
}, e.prototype.getPropertiesMetadata = function(e) { | |
return Reflect.getMetadata(r.TAGGED_PROP, e) || | |
[] | |
}, e | |
}(); | |
t.MetadataReader = i | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return e instanceof RangeError || e.message === i.STACK_OVERFLOW | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(7); | |
t.isStackOverflowExeption = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(3), | |
i = n(20), | |
o = n(8), | |
s = n(77), | |
a = function() { | |
function e(e, t, n, a) { | |
this.guid = i.guid(), this.type = e, this.serviceIdentifier = | |
n, this.name = new s.QueryableString(t || ""), | |
this.metadata = new Array; | |
var u = null; | |
"string" == typeof a ? u = new o.Metadata(r.NAMED_TAG, | |
a) : a instanceof o.Metadata && (u = a), | |
null !== u && this.metadata.push(u) | |
} | |
return e.prototype.hasTag = function(e) { | |
for (var t = 0, n = this.metadata; t < n.length; t++) { | |
if (n[t].key === e) return !0 | |
} | |
return !1 | |
}, e.prototype.isArray = function() { | |
return this.hasTag(r.MULTI_INJECT_TAG) | |
}, e.prototype.matchesArray = function(e) { | |
return this.matchesTag(r.MULTI_INJECT_TAG)(e) | |
}, e.prototype.isNamed = function() { | |
return this.hasTag(r.NAMED_TAG) | |
}, e.prototype.isTagged = function() { | |
return this.metadata.some(function(e) { | |
return e.key !== r.INJECT_TAG && e.key !== | |
r.MULTI_INJECT_TAG && e.key !== | |
r.NAME_TAG && e.key !== r.UNMANAGED_TAG && | |
e.key !== r.NAMED_TAG | |
}) | |
}, e.prototype.isOptional = function() { | |
return this.matchesTag(r.OPTIONAL_TAG)(!0) | |
}, e.prototype.getNamedTag = function() { | |
return this.isNamed() ? this.metadata.filter( | |
function(e) { | |
return e.key === r.NAMED_TAG | |
})[0] : null | |
}, e.prototype.getCustomTags = function() { | |
return this.isTagged() ? this.metadata.filter( | |
function(e) { | |
return e.key !== r.INJECT_TAG && e.key !== | |
r.MULTI_INJECT_TAG && e.key !== | |
r.NAME_TAG && e.key !== r.UNMANAGED_TAG && | |
e.key !== r.NAMED_TAG | |
}) : null | |
}, e.prototype.matchesNamedTag = function(e) { | |
return this.matchesTag(r.NAMED_TAG)(e) | |
}, e.prototype.matchesTag = function(e) { | |
var t = this; | |
return function(n) { | |
for (var r = 0, i = t.metadata; r < i.length; r++) { | |
var o = i[r]; | |
if (o.key === e && o.value === n) | |
return !0 | |
} | |
return !1 | |
} | |
}, e | |
}(); | |
t.Target = a | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(40), | |
i = n(41), | |
o = function() { | |
function e(e) { | |
this._binding = e, this._bindingWhenSyntax = new i.BindingWhenSyntax( | |
this._binding), this._bindingOnSyntax = new r | |
.BindingOnSyntax(this._binding) | |
} | |
return e.prototype.when = function(e) { | |
return this._bindingWhenSyntax.when(e) | |
}, e.prototype.whenTargetNamed = function(e) { | |
return this._bindingWhenSyntax.whenTargetNamed( | |
e) | |
}, e.prototype.whenTargetIsDefault = function() { | |
return this._bindingWhenSyntax.whenTargetIsDefault() | |
}, e.prototype.whenTargetTagged = function(e, t) { | |
return this._bindingWhenSyntax.whenTargetTagged( | |
e, t) | |
}, e.prototype.whenInjectedInto = function(e) { | |
return this._bindingWhenSyntax.whenInjectedInto( | |
e) | |
}, e.prototype.whenParentNamed = function(e) { | |
return this._bindingWhenSyntax.whenParentNamed( | |
e) | |
}, e.prototype.whenParentTagged = function(e, t) { | |
return this._bindingWhenSyntax.whenParentTagged( | |
e, t) | |
}, e.prototype.whenAnyAncestorIs = function(e) { | |
return this._bindingWhenSyntax.whenAnyAncestorIs( | |
e) | |
}, e.prototype.whenNoAncestorIs = function(e) { | |
return this._bindingWhenSyntax.whenNoAncestorIs( | |
e) | |
}, e.prototype.whenAnyAncestorNamed = function(e) { | |
return this._bindingWhenSyntax.whenAnyAncestorNamed( | |
e) | |
}, e.prototype.whenAnyAncestorTagged = function(e, | |
t) { | |
return this._bindingWhenSyntax.whenAnyAncestorTagged( | |
e, t) | |
}, e.prototype.whenNoAncestorNamed = function(e) { | |
return this._bindingWhenSyntax.whenNoAncestorNamed( | |
e) | |
}, e.prototype.whenNoAncestorTagged = function(e, t) { | |
return this._bindingWhenSyntax.whenNoAncestorTagged( | |
e, t) | |
}, e.prototype.whenAnyAncestorMatches = function(e) { | |
return this._bindingWhenSyntax.whenAnyAncestorMatches( | |
e) | |
}, e.prototype.whenNoAncestorMatches = function(e) { | |
return this._bindingWhenSyntax.whenNoAncestorMatches( | |
e) | |
}, e.prototype.onActivation = function(e) { | |
return this._bindingOnSyntax.onActivation(e) | |
}, e | |
}(); | |
t.BindingWhenOnSyntax = o | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(3), | |
i = n(8), | |
o = function(e, t) { | |
var n = e.parentRequest; | |
return null !== n && (!!t(n) || o(n, t)) | |
}; | |
t.traverseAncerstors = o; | |
var s = function(e) { | |
return function(t) { | |
var n = function(n) { | |
return null !== n && null !== n.target && | |
n.target.matchesTag(e)(t) | |
}; | |
return n.metaData = new i.Metadata(e, t), n | |
} | |
}; | |
t.taggedConstraint = s; | |
var a = s(r.NAMED_TAG); | |
t.namedConstraint = a; | |
var u = function(e) { | |
return function(t) { | |
var n = null; | |
if (null !== t) { | |
if (n = t.bindings[0], "string" == typeof e) { | |
return n.serviceIdentifier === e | |
} | |
var r = t.bindings[0].implementationType; | |
return e === r | |
} | |
return !1 | |
} | |
}; | |
t.typeConstraint = u | |
}, function(e, t, n) { | |
"use strict"; | |
var r = function() { | |
function e() {} | |
return e.UUID = function() { | |
if ("undefined" != typeof window && void 0 !== | |
window.crypto && void 0 !== window.crypto.getRandomValues | |
) { | |
var e = new Uint16Array(8); | |
return window.crypto.getRandomValues(e), | |
this.pad4(e[0]) + this.pad4(e[1]) + "-" + | |
this.pad4(e[2]) + "-" + this.pad4(e[3]) + | |
"-" + this.pad4(e[4]) + "-" + this.pad4( | |
e[5]) + this.pad4(e[6]) + this.pad4( | |
e[7]) | |
} | |
return this.random4() + this.random4() + "-" + | |
this.random4() + "-" + this.random4() + "-" + | |
this.random4() + "-" + this.random4() + | |
this.random4() + this.random4() | |
}, e.pad4 = function(e) { | |
for (var t = e.toString(16); t.length < 4;) t = | |
"0" + t; | |
return t | |
}, e.random4 = function() { | |
return Math.floor(65536 * (1 + Math.random())).toString( | |
16).substring(1) | |
}, e | |
}(); | |
t.UUID = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t) { | |
this.header = e, this.data = t | |
} | |
return e | |
}(); | |
t.Header = r, t.JsonContentTypeHeader = new r("Content-Type", | |
"application/json") | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
! function(e) { | |
e[e.VAST = 0] = "VAST", e[e.REMIX = 1] = "REMIX" | |
}(t.AdType || (t.AdType = {})) | |
}, function(e, t) { | |
var n = | |
/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, | |
r = ["source", "protocol", "authority", "userInfo", "user", | |
"password", "host", "port", "relative", "path", | |
"directory", "file", "query", "anchor" | |
]; | |
e.exports = function(e) { | |
var t = e, | |
i = e.indexOf("["), | |
o = e.indexOf("]"); - 1 != i && -1 != o && (e = e.substring( | |
0, i) + e.substring(i, o).replace(/:/g, ";") + | |
e.substring(o, e.length)); | |
for (var s = n.exec(e || ""), a = {}, u = 14; u--;) a[r[ | |
u]] = s[u] || ""; | |
return -1 != i && -1 != o && (a.source = t, a.host = a.host | |
.substring(1, a.host.length - 1).replace(/;/g, | |
":"), a.authority = a.authority.replace("[", | |
"").replace("]", "").replace(/;/g, ":"), a.ipv6uri = ! | |
0), a | |
} | |
}, function(e, t, n) { | |
(function(t) { | |
function r(e) { | |
if (!e || "object" != typeof e) return !1; | |
if (i(e)) { | |
for (var n = 0, o = e.length; n < o; n++) | |
if (r(e[n])) return !0; | |
return !1 | |
} | |
if ("function" == typeof t.Buffer && t.Buffer.isBuffer && | |
t.Buffer.isBuffer(e) || "function" == typeof t.ArrayBuffer && | |
e instanceof ArrayBuffer || s && e instanceof Blob || | |
a && e instanceof File) return !0; | |
if (e.toJSON && "function" == typeof e.toJSON && 1 === | |
arguments.length) return r(e.toJSON(), !0); | |
for (var u in e) | |
if (Object.prototype.hasOwnProperty.call(e, u) && | |
r(e[u])) return !0; | |
return !1 | |
} | |
var i = n(59), | |
o = Object.prototype.toString, | |
s = "function" == typeof t.Blob || | |
"[object BlobConstructor]" === o.call(t.Blob), | |
a = "function" == typeof t.File || | |
"[object FileConstructor]" === o.call(t.File); | |
e.exports = r | |
}).call(t, n(4)) | |
}, function(e, t) { | |
var n = {}.toString; | |
e.exports = Array.isArray || function(e) { | |
return "[object Array]" == n.call(e) | |
} | |
}, function(e, t, n) { | |
(function(t) { | |
function n(e) { | |
return t.Buffer && t.Buffer.isBuffer(e) || t.ArrayBuffer && | |
e instanceof ArrayBuffer | |
} | |
e.exports = n | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
function r(e, t) { | |
if (!(this instanceof r)) return new r(e, t); | |
e && "object" == typeof e && (t = e, e = void 0), t = t || | |
{}, t.path = t.path || "/socket.io", this.nsps = {}, | |
this.subs = [], this.opts = t, this.reconnection(!1 !== | |
t.reconnection), this.reconnectionAttempts(t.reconnectionAttempts || | |
1 / 0), this.reconnectionDelay(t.reconnectionDelay || | |
1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || | |
5e3), this.randomizationFactor(t.randomizationFactor || | |
.5), this.backoff = new h({ | |
min: this.reconnectionDelay(), | |
max: this.reconnectionDelayMax(), | |
jitter: this.randomizationFactor() | |
}), this.timeout(null == t.timeout ? 2e4 : t.timeout), | |
this.readyState = "closed", this.uri = e, this.connecting = [], | |
this.lastPing = null, this.encoding = !1, this.packetBuffer = []; | |
var n = t.parser || a; | |
this.encoder = new n.Encoder, this.decoder = new n.Decoder, | |
this.autoConnect = !1 !== t.autoConnect, this.autoConnect && | |
this.open() | |
} | |
var i = n(147), | |
o = n(66), | |
s = n(25), | |
a = n(45), | |
u = n(67), | |
c = n(68), | |
l = n(13)("socket.io-client:manager"), | |
p = n(65), | |
h = n(161), | |
d = Object.prototype.hasOwnProperty; | |
e.exports = r, r.prototype.emitAll = function() { | |
this.emit.apply(this, arguments); | |
for (var e in this.nsps) d.call(this.nsps, e) && this.nsps[ | |
e].emit.apply(this.nsps[e], arguments) | |
}, r.prototype.updateSocketIds = function() { | |
for (var e in this.nsps) d.call(this.nsps, e) && (this.nsps[ | |
e].id = this.generateId(e)) | |
}, r.prototype.generateId = function(e) { | |
return ("/" === e ? "" : e + "#") + this.engine.id | |
}, s(r.prototype), r.prototype.reconnection = function(e) { | |
return arguments.length ? (this._reconnection = !!e, | |
this) : this._reconnection | |
}, r.prototype.reconnectionAttempts = function(e) { | |
return arguments.length ? (this._reconnectionAttempts = | |
e, this) : this._reconnectionAttempts | |
}, r.prototype.reconnectionDelay = function(e) { | |
return arguments.length ? (this._reconnectionDelay = e, | |
this.backoff && this.backoff.setMin(e), this) : | |
this._reconnectionDelay | |
}, r.prototype.randomizationFactor = function(e) { | |
return arguments.length ? (this._randomizationFactor = | |
e, this.backoff && this.backoff.setJitter(e), | |
this) : this._randomizationFactor | |
}, r.prototype.reconnectionDelayMax = function(e) { | |
return arguments.length ? (this._reconnectionDelayMax = | |
e, this.backoff && this.backoff.setMax(e), this | |
) : this._reconnectionDelayMax | |
}, r.prototype.timeout = function(e) { | |
return arguments.length ? (this._timeout = e, this) : | |
this._timeout | |
}, r.prototype.maybeReconnectOnOpen = function() { | |
!this.reconnecting && this._reconnection && 0 === this.backoff | |
.attempts && this.reconnect() | |
}, r.prototype.open = r.prototype.connect = function(e, t) { | |
if (l("readyState %s", this.readyState), ~this.readyState | |
.indexOf("open")) return this; | |
l("opening %s", this.uri), this.engine = i(this.uri, | |
this.opts); | |
var n = this.engine, | |
r = this; | |
this.readyState = "opening", this.skipReconnect = !1; | |
var o = u(n, "open", function() { | |
r.onopen(), e && e() | |
}), | |
s = u(n, "error", function(t) { | |
if (l("connect_error"), r.cleanup(), r.readyState = | |
"closed", r.emitAll("connect_error", t), | |
e) { | |
var n = new Error("Connection error"); | |
n.data = t, e(n) | |
} else r.maybeReconnectOnOpen() | |
}); | |
if (!1 !== this._timeout) { | |
var a = this._timeout; | |
l("connect attempt will timeout after %d", a); | |
var c = setTimeout(function() { | |
l("connect attempt timed out after %d", | |
a), o.destroy(), n.close(), n.emit( | |
"error", "timeout"), r.emitAll( | |
"connect_timeout", a) | |
}, a); | |
this.subs.push({ | |
destroy: function() { | |
clearTimeout(c) | |
} | |
}) | |
} | |
return this.subs.push(o), this.subs.push(s), this | |
}, r.prototype.onopen = function() { | |
l("open"), this.cleanup(), this.readyState = "open", | |
this.emit("open"); | |
var e = this.engine; | |
this.subs.push(u(e, "data", c(this, "ondata"))), this.subs | |
.push(u(e, "ping", c(this, "onping"))), this.subs.push( | |
u(e, "pong", c(this, "onpong"))), this.subs.push( | |
u(e, "error", c(this, "onerror"))), this.subs.push( | |
u(e, "close", c(this, "onclose"))), this.subs.push( | |
u(this.decoder, "decoded", c(this, "ondecoded")) | |
) | |
}, r.prototype.onping = function() { | |
this.lastPing = new Date, this.emitAll("ping") | |
}, r.prototype.onpong = function() { | |
this.emitAll("pong", new Date - this.lastPing) | |
}, r.prototype.ondata = function(e) { | |
this.decoder.add(e) | |
}, r.prototype.ondecoded = function(e) { | |
this.emit("packet", e) | |
}, r.prototype.onerror = function(e) { | |
l("error", e), this.emitAll("error", e) | |
}, r.prototype.socket = function(e, t) { | |
function n() { | |
~p(i.connecting, r) || i.connecting.push(r) | |
} | |
var r = this.nsps[e]; | |
if (!r) { | |
r = new o(this, e, t), this.nsps[e] = r; | |
var i = this; | |
r.on("connecting", n), r.on("connect", function() { | |
r.id = i.generateId(e) | |
}), this.autoConnect && n() | |
} | |
return r | |
}, r.prototype.destroy = function(e) { | |
var t = p(this.connecting, e); | |
~t && this.connecting.splice(t, 1), this.connecting.length || | |
this.close() | |
}, r.prototype.packet = function(e) { | |
l("writing packet %j", e); | |
var t = this; | |
e.query && 0 === e.type && (e.nsp += "?" + e.query), t.encoding ? | |
t.packetBuffer.push(e) : (t.encoding = !0, this.encoder | |
.encode(e, function(n) { | |
for (var r = 0; r < n.length; r++) t.engine | |
.write(n[r], e.options); | |
t.encoding = !1, t.processPacketQueue() | |
})) | |
}, r.prototype.processPacketQueue = function() { | |
if (this.packetBuffer.length > 0 && !this.encoding) { | |
var e = this.packetBuffer.shift(); | |
this.packet(e) | |
} | |
}, r.prototype.cleanup = function() { | |
l("cleanup"); | |
for (var e = this.subs.length, t = 0; t < e; t++) { | |
this.subs.shift().destroy() | |
} | |
this.packetBuffer = [], this.encoding = !1, this.lastPing = | |
null, this.decoder.destroy() | |
}, r.prototype.close = r.prototype.disconnect = function() { | |
l("disconnect"), this.skipReconnect = !0, this.reconnecting = ! | |
1, "opening" === this.readyState && this.cleanup(), | |
this.backoff.reset(), this.readyState = "closed", | |
this.engine && this.engine.close() | |
}, r.prototype.onclose = function(e) { | |
l("onclose"), this.cleanup(), this.backoff.reset(), | |
this.readyState = "closed", this.emit("close", e), | |
this._reconnection && !this.skipReconnect && this.reconnect() | |
}, r.prototype.reconnect = function() { | |
if (this.reconnecting || this.skipReconnect) return this; | |
var e = this; | |
if (this.backoff.attempts >= this._reconnectionAttempts) | |
l("reconnect failed"), this.backoff.reset(), this.emitAll( | |
"reconnect_failed"), this.reconnecting = !1; | |
else { | |
var t = this.backoff.duration(); | |
l("will wait %dms before reconnect attempt", t), | |
this.reconnecting = !0; | |
var n = setTimeout(function() { | |
e.skipReconnect || (l( | |
"attempting reconnect"), e.emitAll( | |
"reconnect_attempt", e.backoff | |
.attempts), e.emitAll( | |
"reconnecting", e.backoff.attempts | |
), e.skipReconnect || e.open( | |
function(t) { | |
t ? (l( | |
"reconnect attempt error" | |
), e.reconnecting = ! | |
1, e.reconnect(), | |
e.emitAll( | |
"reconnect_error", | |
t.data)) : | |
(l( | |
"reconnect success" | |
), e.onreconnect()) | |
})) | |
}, t); | |
this.subs.push({ | |
destroy: function() { | |
clearTimeout(n) | |
} | |
}) | |
} | |
}, r.prototype.onreconnect = function() { | |
var e = this.backoff.attempts; | |
this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), | |
this.emitAll("reconnect", e) | |
} | |
}, function(e, t, n) { | |
(function(e) { | |
function r(t) { | |
var n = !1, | |
r = !1, | |
a = !1 !== t.jsonp; | |
if (e.location) { | |
var u = "https:" === location.protocol, | |
c = location.port; | |
c || (c = u ? 443 : 80), n = t.hostname !== | |
location.hostname || c !== t.port, r = t.secure !== | |
u | |
} | |
if (t.xdomain = n, t.xscheme = r, "open" in new i(t) && | |
!t.forceJSONP) return new o(t); | |
if (!a) throw new Error("JSONP disabled"); | |
return new s(t) | |
} | |
var i = n(46), | |
o = n(150), | |
s = n(157), | |
a = n(158); | |
t.polling = r, t.websocket = a | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
function r(e) { | |
var t = e && e.forceBase64; | |
l && !t || (this.supportsBinary = !1), i.call(this, e) | |
} | |
var i = n(47), | |
o = n(38), | |
s = n(26), | |
a = n(39), | |
u = n(64), | |
c = n(13)("engine.io-client:polling"); | |
e.exports = r; | |
var l = function() { | |
return null != new(n(46))({ | |
xdomain: !1 | |
}).responseType | |
}(); | |
a(r, i), r.prototype.name = "polling", r.prototype.doOpen = | |
function() { | |
this.poll() | |
}, r.prototype.pause = function(e) { | |
function t() { | |
c("paused"), n.readyState = "paused", e() | |
} | |
var n = this; | |
if (this.readyState = "pausing", this.polling || !this.writable) { | |
var r = 0; | |
this.polling && (c( | |
"we are currently polling - waiting to pause" | |
), r++, this.once("pollComplete", function() { | |
c("pre-pause polling complete"), -- | |
r || t() | |
})), this.writable || (c( | |
"we are currently writing - waiting to pause" | |
), r++, this.once("drain", function() { | |
c("pre-pause writing complete"), -- | |
r || t() | |
})) | |
} else t() | |
}, r.prototype.poll = function() { | |
c("polling"), this.polling = !0, this.doPoll(), this.emit( | |
"poll") | |
}, r.prototype.onData = function(e) { | |
var t = this; | |
c("polling got data %s", e); | |
var n = function(e, n, r) { | |
if ("opening" === t.readyState && t.onOpen(), | |
"close" === e.type) return t.onClose(), !1; | |
t.onPacket(e) | |
}; | |
s.decodePayload(e, this.socket.binaryType, n), "closed" !== | |
this.readyState && (this.polling = !1, this.emit( | |
"pollComplete"), "open" === this.readyState ? | |
this.poll() : c( | |
'ignoring poll - transport state "%s"', | |
this.readyState)) | |
}, r.prototype.doClose = function() { | |
function e() { | |
c("writing close packet"), t.write([{ | |
type: "close" | |
}]) | |
} | |
var t = this; | |
"open" === this.readyState ? (c( | |
"transport open - closing"), e()) : (c( | |
"transport not open - deferring close"), | |
this.once("open", e)) | |
}, r.prototype.write = function(e) { | |
var t = this; | |
this.writable = !1; | |
var n = function() { | |
t.writable = !0, t.emit("drain") | |
}; | |
s.encodePayload(e, this.supportsBinary, function(e) { | |
t.doWrite(e, n) | |
}) | |
}, r.prototype.uri = function() { | |
var e = this.query || {}, | |
t = this.secure ? "https" : "http", | |
n = ""; | |
return !1 !== this.timestampRequests && (e[this.timestampParam] = | |
u()), this.supportsBinary || e.sid || (e.b64 = | |
1), e = o.encode(e), this.port && ("https" === | |
t && 443 !== Number(this.port) || "http" === t && | |
80 !== Number(this.port)) && (n = ":" + this.port), | |
e.length && (e = "?" + e), t + "://" + (-1 !== this | |
.hostname.indexOf(":") ? "[" + this.hostname + | |
"]" : this.hostname) + n + this.path + e | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
var t = ""; | |
do { | |
t = a[e % u] + t, e = Math.floor(e / u) | |
} while (e > 0); | |
return t | |
} | |
function i(e) { | |
var t = 0; | |
for (p = 0; p < e.length; p++) t = t * u + c[e.charAt(p)]; | |
return t | |
} | |
function o() { | |
var e = r(+new Date); | |
return e !== s ? (l = 0, s = e) : e + "." + r(l++) | |
} | |
for (var s, a = | |
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_" | |
.split(""), u = 64, c = {}, l = 0, p = 0; p < u; p++) c[ | |
a[p]] = p; | |
o.encode = r, o.decode = i, e.exports = o | |
}, function(e, t) { | |
var n = [].indexOf; | |
e.exports = function(e, t) { | |
if (n) return e.indexOf(t); | |
for (var r = 0; r < e.length; ++r) | |
if (e[r] === t) return r; | |
return -1 | |
} | |
}, function(e, t, n) { | |
function r(e, t, n) { | |
this.io = e, this.nsp = t, this.json = this, this.ids = 0, | |
this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], | |
this.connected = !1, this.disconnected = !0, n && n.query && | |
(this.query = n.query), this.io.autoConnect && this.open() | |
} | |
var i = n(45), | |
o = n(25), | |
s = n(160), | |
a = n(67), | |
u = n(68), | |
c = n(13)("socket.io-client:socket"), | |
l = n(38); | |
e.exports = r; | |
var p = { | |
connect: 1, | |
connect_error: 1, | |
connect_timeout: 1, | |
connecting: 1, | |
disconnect: 1, | |
error: 1, | |
reconnect: 1, | |
reconnect_attempt: 1, | |
reconnect_failed: 1, | |
reconnect_error: 1, | |
reconnecting: 1, | |
ping: 1, | |
pong: 1 | |
}, | |
h = o.prototype.emit; | |
o(r.prototype), r.prototype.subEvents = function() { | |
if (!this.subs) { | |
var e = this.io; | |
this.subs = [a(e, "open", u(this, "onopen")), a(e, | |
"packet", u(this, "onpacket")), a(e, | |
"close", u(this, "onclose"))] | |
} | |
}, r.prototype.open = r.prototype.connect = function() { | |
return this.connected ? this : (this.subEvents(), this.io | |
.open(), "open" === this.io.readyState && this.onopen(), | |
this.emit("connecting"), this) | |
}, r.prototype.send = function() { | |
var e = s(arguments); | |
return e.unshift("message"), this.emit.apply(this, e), | |
this | |
}, r.prototype.emit = function(e) { | |
if (p.hasOwnProperty(e)) return h.apply(this, arguments), | |
this; | |
var t = s(arguments), | |
n = { | |
type: i.EVENT, | |
data: t | |
}; | |
return n.options = {}, n.options.compress = !this.flags || | |
!1 !== this.flags.compress, "function" == typeof t[ | |
t.length - 1] && (c( | |
"emitting packet with ack id %d", this.ids), | |
this.acks[this.ids] = t.pop(), n.id = this.ids++ | |
), this.connected ? this.packet(n) : this.sendBuffer | |
.push(n), delete this.flags, this | |
}, r.prototype.packet = function(e) { | |
e.nsp = this.nsp, this.io.packet(e) | |
}, r.prototype.onopen = function() { | |
if (c("transport is open - connecting"), "/" !== this.nsp) | |
if (this.query) { | |
var e = "object" == typeof this.query ? l.encode( | |
this.query) : this.query; | |
c("sending connect packet with query %s", e), | |
this.packet({ | |
type: i.CONNECT, | |
query: e | |
}) | |
} else this.packet({ | |
type: i.CONNECT | |
}) | |
}, r.prototype.onclose = function(e) { | |
c("close (%s)", e), this.connected = !1, this.disconnected = ! | |
0, delete this.id, this.emit("disconnect", e) | |
}, r.prototype.onpacket = function(e) { | |
if (e.nsp === this.nsp) switch (e.type) { | |
case i.CONNECT: | |
this.onconnect(); | |
break; | |
case i.EVENT: | |
case i.BINARY_EVENT: | |
this.onevent(e); | |
break; | |
case i.ACK: | |
case i.BINARY_ACK: | |
this.onack(e); | |
break; | |
case i.DISCONNECT: | |
this.ondisconnect(); | |
break; | |
case i.ERROR: | |
this.emit("error", e.data) | |
} | |
}, r.prototype.onevent = function(e) { | |
var t = e.data || []; | |
c("emitting event %j", t), null != e.id && (c( | |
"attaching ack callback to event"), t.push( | |
this.ack(e.id))), this.connected ? h.apply(this, | |
t) : this.receiveBuffer.push(t) | |
}, r.prototype.ack = function(e) { | |
var t = this, | |
n = !1; | |
return function() { | |
if (!n) { | |
n = !0; | |
var r = s(arguments); | |
c("sending ack %j", r), t.packet({ | |
type: i.ACK, | |
id: e, | |
data: r | |
}) | |
} | |
} | |
}, r.prototype.onack = function(e) { | |
var t = this.acks[e.id]; | |
"function" == typeof t ? (c("calling ack %s with %j", e | |
.id, e.data), t.apply(this, e.data), delete this | |
.acks[e.id]) : c("bad ack %s", e.id) | |
}, r.prototype.onconnect = function() { | |
this.connected = !0, this.disconnected = !1, this.emit( | |
"connect"), this.emitBuffered() | |
}, r.prototype.emitBuffered = function() { | |
var e; | |
for (e = 0; e < this.receiveBuffer.length; e++) h.apply( | |
this, this.receiveBuffer[e]); | |
for (this.receiveBuffer = [], e = 0; e < this.sendBuffer | |
.length; e++) this.packet(this.sendBuffer[e]); | |
this.sendBuffer = [] | |
}, r.prototype.ondisconnect = function() { | |
c("server disconnect (%s)", this.nsp), this.destroy(), | |
this.onclose("io server disconnect") | |
}, r.prototype.destroy = function() { | |
if (this.subs) { | |
for (var e = 0; e < this.subs.length; e++) this.subs[ | |
e].destroy(); | |
this.subs = null | |
} | |
this.io.destroy(this) | |
}, r.prototype.close = r.prototype.disconnect = function() { | |
return this.connected && (c( | |
"performing disconnect (%s)", this.nsp), | |
this.packet({ | |
type: i.DISCONNECT | |
})), this.destroy(), this.connected && this.onclose( | |
"io client disconnect"), this | |
}, r.prototype.compress = function(e) { | |
return this.flags = this.flags || {}, this.flags.compress = | |
e, this | |
} | |
}, function(e, t) { | |
function n(e, t, n) { | |
return e.on(t, n), { | |
destroy: function() { | |
e.removeListener(t, n) | |
} | |
} | |
} | |
e.exports = n | |
}, function(e, t) { | |
var n = [].slice; | |
e.exports = function(e, t) { | |
if ("string" == typeof t && (t = e[t]), "function" != | |
typeof t) throw new Error( | |
"bind() requires a function"); | |
var r = n.call(arguments, 2); | |
return function() { | |
return t.apply(e, r.concat(n.call(arguments))) | |
} | |
} | |
}, function(e, t) { | |
e.exports = function(e) { | |
return e.webpackPolyfill || (e.deprecate = function() {}, | |
e.paths = [], e.children || (e.children = []), | |
Object.defineProperty(e, "loaded", { | |
enumerable: !0, | |
get: function() { | |
return e.l | |
} | |
}), Object.defineProperty(e, "id", { | |
enumerable: !0, | |
get: function() { | |
return e.i | |
} | |
}), e.webpackPolyfill = 1), e | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(71), | |
i = n(7), | |
o = n(12), | |
s = n(3), | |
a = n(49), | |
u = n(72), | |
c = n(79), | |
l = n(81), | |
p = n(20), | |
h = n(28), | |
d = n(84), | |
f = n(85), | |
y = function() { | |
function e(e) { | |
if (void 0 !== e) { | |
if ("object" != typeof e) throw new Error("" + | |
i.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT | |
); | |
if (void 0 !== e.defaultScope && e.defaultScope !== | |
o.BindingScopeEnum.Singleton && e.defaultScope !== | |
o.BindingScopeEnum.Transient && e.defaultScope !== | |
o.BindingScopeEnum.Request) throw new Error( | |
"" + i.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE | |
); | |
if (void 0 !== e.autoBindInjectable && | |
"boolean" != typeof e.autoBindInjectable) | |
throw new Error("" + i.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE); | |
this.options = { | |
autoBindInjectable: e.autoBindInjectable, | |
defaultScope: e.defaultScope | |
} | |
} else this.options = { | |
autoBindInjectable: !1, | |
defaultScope: o.BindingScopeEnum.Transient | |
}; | |
this.guid = p.guid(), this._bindingDictionary = new f | |
.Lookup, this._snapshots = [], this._middleware = | |
null, this.parent = null, this._metadataReader = | |
new a.MetadataReader | |
} | |
return e.merge = function(t, n) { | |
function r(e, t) { | |
e.traverse(function(e, n) { | |
n.forEach(function(e) { | |
t.add(e.serviceIdentifier, | |
e.clone()) | |
}) | |
}) | |
} | |
var i = new e, | |
o = u.getBindingDictionary(i), | |
s = u.getBindingDictionary(t), | |
a = u.getBindingDictionary(n); | |
return r(s, o), r(a, o), i | |
}, e.prototype.load = function() { | |
for (var e = this, t = [], n = 0; n < arguments | |
.length; n++) t[n] = arguments[n]; | |
var r = function(e, t) { | |
e._binding.moduleId = t | |
}, | |
i = function(t) { | |
return function(n) { | |
var i = e.bind.call(e, n); | |
return r(i, t), i | |
} | |
}, | |
o = function(t) { | |
return function(t) { | |
e.unbind.bind(e)(t) | |
} | |
}, | |
s = function(t) { | |
return function(t) { | |
return e.isBound.bind(e)(t) | |
} | |
}, | |
a = function(t) { | |
return function(n) { | |
var i = e.rebind.call(e, n); | |
return r(i, t), i | |
} | |
}; | |
t.forEach(function(e) { | |
var t = i(e.guid), | |
n = o(e.guid), | |
r = s(e.guid), | |
u = a(e.guid); | |
e.registry(t, n, r, u) | |
}) | |
}, e.prototype.unload = function() { | |
for (var e = this, t = [], n = 0; n < arguments | |
.length; n++) t[n] = arguments[n]; | |
var r = function(e) { | |
return function(t) { | |
return t.moduleId === e | |
} | |
}; | |
t.forEach(function(t) { | |
var n = r(t.guid); | |
e._bindingDictionary.removeByCondition( | |
n) | |
}) | |
}, e.prototype.bind = function(e) { | |
var t = this.options.defaultScope || o.BindingScopeEnum | |
.Transient, | |
n = new r.Binding(e, t); | |
return this._bindingDictionary.add(e, n), new l | |
.BindingToSyntax(n) | |
}, e.prototype.rebind = function(e) { | |
return this.unbind(e), this.bind(e) | |
}, e.prototype.unbind = function(e) { | |
try { | |
this._bindingDictionary.remove(e) | |
} catch (t) { | |
throw new Error(i.CANNOT_UNBIND + " " + h.getServiceIdentifierAsString( | |
e)) | |
} | |
}, e.prototype.unbindAll = function() { | |
this._bindingDictionary = new f.Lookup | |
}, e.prototype.isBound = function(e) { | |
var t = this._bindingDictionary.hasKey(e); | |
return !t && this.parent && (t = this.parent.isBound( | |
e)), t | |
}, e.prototype.isBoundNamed = function(e, t) { | |
return this.isBoundTagged(e, s.NAMED_TAG, t) | |
}, e.prototype.isBoundTagged = function(e, t, n) { | |
var r = !1; | |
if (this._bindingDictionary.hasKey(e)) { | |
var i = this._bindingDictionary.get(e), | |
o = u.createMockRequest(this, e, t, n); | |
r = i.some(function(e) { | |
return e.constraint(o) | |
}) | |
} | |
return !r && this.parent && (r = this.parent.isBoundTagged( | |
e, t, n)), r | |
}, e.prototype.snapshot = function() { | |
this._snapshots.push(d.ContainerSnapshot.of( | |
this._bindingDictionary.clone(), | |
this._middleware)) | |
}, e.prototype.restore = function() { | |
var e = this._snapshots.pop(); | |
if (void 0 === e) throw new Error(i.NO_MORE_SNAPSHOTS_AVAILABLE); | |
this._bindingDictionary = e.bindings, this._middleware = | |
e.middleware | |
}, e.prototype.createChild = function() { | |
var t = new e; | |
return t.parent = this, t | |
}, e.prototype.applyMiddleware = function() { | |
for (var e = [], t = 0; t < arguments.length; t++) | |
e[t] = arguments[t]; | |
var n = this._middleware ? this._middleware : | |
this._planAndResolve(); | |
this._middleware = e.reduce(function(e, t) { | |
return t(e) | |
}, n) | |
}, e.prototype.applyCustomMetadataReader = function( | |
e) { | |
this._metadataReader = e | |
}, e.prototype.get = function(e) { | |
return this._get(!1, !1, o.TargetTypeEnum.Variable, | |
e) | |
}, e.prototype.getTagged = function(e, t, n) { | |
return this._get(!1, !1, o.TargetTypeEnum.Variable, | |
e, t, n) | |
}, e.prototype.getNamed = function(e, t) { | |
return this.getTagged(e, s.NAMED_TAG, t) | |
}, e.prototype.getAll = function(e) { | |
return this._get(!0, !0, o.TargetTypeEnum.Variable, | |
e) | |
}, e.prototype.getAllTagged = function(e, t, n) { | |
return this._get(!1, !0, o.TargetTypeEnum.Variable, | |
e, t, n) | |
}, e.prototype.getAllNamed = function(e, t) { | |
return this.getAllTagged(e, s.NAMED_TAG, t) | |
}, e.prototype.resolve = function(t) { | |
var n = new e; | |
return n.bind(t).toSelf(), n.parent = this, n.get( | |
t) | |
}, e.prototype._get = function(e, t, n, r, o, s) { | |
var a = null, | |
u = { | |
avoidConstraints: e, | |
contextInterceptor: function(e) { | |
return e | |
}, | |
isMultiInject: t, | |
key: o, | |
serviceIdentifier: r, | |
targetType: n, | |
value: s | |
}; | |
if (this._middleware) { | |
if (void 0 === (a = this._middleware(u)) || | |
null === a) throw new Error(i.INVALID_MIDDLEWARE_RETURN) | |
} else a = this._planAndResolve()(u); | |
return a | |
}, e.prototype._planAndResolve = function() { | |
var e = this; | |
return function(t) { | |
var n = u.plan(e._metadataReader, e, t.isMultiInject, | |
t.targetType, t.serviceIdentifier, | |
t.key, t.value, t.avoidConstraints | |
); | |
return n = t.contextInterceptor(n), c.resolve( | |
n) | |
} | |
}, e | |
}(); | |
t.Container = y | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(12), | |
i = n(20), | |
o = function() { | |
function e(e, t) { | |
this.guid = i.guid(), this.activated = !1, this.serviceIdentifier = | |
e, this.scope = t, this.type = r.BindingTypeEnum | |
.Invalid, this.constraint = function(e) { | |
return !0 | |
}, this.implementationType = null, this.cache = | |
null, this.factory = null, this.provider = null, | |
this.onActivation = null, this.dynamicValue = | |
null | |
} | |
return e.prototype.clone = function() { | |
var t = new e(this.serviceIdentifier, this.scope); | |
return t.activated = !1, t.implementationType = | |
this.implementationType, t.dynamicValue = | |
this.dynamicValue, t.scope = this.scope, t.type = | |
this.type, t.factory = this.factory, t.provider = | |
this.provider, t.constraint = this.constraint, | |
t.onActivation = this.onActivation, t.cache = | |
this.cache, t | |
}, e | |
}(); | |
t.Binding = o | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return e._bindingDictionary | |
} | |
function i(e, t, n, r, i, o) { | |
var s = e ? f.MULTI_INJECT_TAG : f.INJECT_TAG, | |
a = new g.Metadata(s, n), | |
u = new w.Target(t, r, n, a); | |
if (void 0 !== i) { | |
var c = new g.Metadata(i, o); | |
u.metadata.push(c) | |
} | |
return u | |
} | |
function o(e, t, n, r, i) { | |
var o = u(n.container, i.serviceIdentifier), | |
a = []; | |
return o.length === p.BindingCount.NoBindingsAvailable && n | |
.container.options.autoBindInjectable && "function" == | |
typeof i.serviceIdentifier && e.getConstructorMetadata( | |
i.serviceIdentifier).compilerGeneratedMetadata && ( | |
n.container.bind(i.serviceIdentifier).toSelf(), o = | |
u(n.container, i.serviceIdentifier)), a = t ? o : o | |
.filter(function(e) { | |
var t = new E.Request(e.serviceIdentifier, n, r, | |
e, i); | |
return e.constraint(t) | |
}), s(i.serviceIdentifier, a, i, n.container), a | |
} | |
function s(e, t, n, r) { | |
switch (t.length) { | |
case p.BindingCount.NoBindingsAvailable: | |
if (n.isOptional()) return t; | |
var i = v.getServiceIdentifierAsString(e), | |
o = h.NOT_REGISTERED; | |
throw o += v.listMetadataForTarget(i, n), o += v.listRegisteredBindingsForServiceIdentifier( | |
r, i, u), new Error(o); | |
case p.BindingCount.OnlyOneBindingAvailable: | |
if (!n.isArray()) return t; | |
case p.BindingCount.MultipleBindingsAvailable: | |
default: | |
if (n.isArray()) return t; | |
var i = v.getServiceIdentifierAsString(e), | |
o = h.AMBIGUOUS_MATCH + " " + i; | |
throw o += v.listRegisteredBindingsForServiceIdentifier( | |
r, i, u), new Error(o) | |
} | |
} | |
function a(e, t, n, r, i, s) { | |
var u, c; | |
if (null === i) { | |
u = o(e, t, r, null, s), c = new E.Request(n, r, null, | |
u, s); | |
var l = new m.Plan(r, c); | |
r.addPlan(l) | |
} else u = o(e, t, r, i, s), c = i.addChildRequest(s.serviceIdentifier, | |
u, s); | |
u.forEach(function(t) { | |
var n = null; | |
if (s.isArray()) n = c.addChildRequest(t.serviceIdentifier, | |
t, s); | |
else { | |
if (t.cache) return; | |
n = c | |
} | |
if (t.type === d.BindingTypeEnum.Instance && | |
null !== t.implementationType) { | |
b.getDependencies(e, t.implementationType).forEach( | |
function(t) { | |
a(e, !1, t.serviceIdentifier, r, | |
n, t) | |
}) | |
} | |
}) | |
} | |
function u(e, t) { | |
var n = [], | |
i = r(e); | |
return i.hasKey(t) ? n = i.get(t) : null !== e.parent && (n = | |
u(e.parent, t)), n | |
} | |
function c(e, t, n, r, o, s, u, c) { | |
void 0 === c && (c = !1); | |
var l = new _.Context(t), | |
p = i(n, r, o, "", s, u); | |
try { | |
return a(e, c, o, l, null, p), l | |
} catch (e) { | |
throw y.isStackOverflowExeption(e) && l.plan && v.circularDependencyToException( | |
l.plan.rootRequest), e | |
} | |
} | |
function l(e, t, n, r) { | |
var i = new w.Target(d.TargetTypeEnum.Variable, "", t, new g | |
.Metadata(n, r)), | |
o = new _.Context(e); | |
return new E.Request(t, o, null, [], i) | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var p = n(73), | |
h = n(7), | |
d = n(12), | |
f = n(3), | |
y = n(50), | |
v = n(28), | |
_ = n(74), | |
g = n(8), | |
m = n(75), | |
b = n(76), | |
E = n(78), | |
w = n(51); | |
t.getBindingDictionary = r, t.plan = c, t.createMockRequest = l | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = { | |
MultipleBindingsAvailable: 2, | |
NoBindingsAvailable: 0, | |
OnlyOneBindingAvailable: 1 | |
}; | |
t.BindingCount = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(20), | |
i = function() { | |
function e(e) { | |
this.guid = r.guid(), this.container = e | |
} | |
return e.prototype.addPlan = function(e) { | |
this.plan = e | |
}, e.prototype.setCurrentRequest = function(e) { | |
this.currentRequest = e | |
}, e | |
}(); | |
t.Context = i | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t) { | |
this.parentContext = e, this.rootRequest = t | |
} | |
return e | |
}(); | |
t.Plan = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
return i(e, d.getFunctionName(t), t, !1) | |
} | |
function i(e, t, n, r) { | |
var i = e.getConstructorMetadata(n), | |
o = i.compilerGeneratedMetadata; | |
if (void 0 === o) { | |
var c = l.MISSING_INJECTABLE_ANNOTATION + " " + t + "."; | |
throw new Error(c) | |
} | |
var p = i.userGeneratedMetadata, | |
h = Object.keys(p), | |
d = 0 === n.length && h.length > 0, | |
f = d ? h.length : n.length, | |
y = s(r, t, o, p, f), | |
v = a(e, n), | |
_ = y.concat(v), | |
g = u(e, n); | |
if (_.length < g) { | |
var m = l.ARGUMENTS_LENGTH_MISMATCH_1 + t + l.ARGUMENTS_LENGTH_MISMATCH_2; | |
throw new Error(m) | |
} | |
return _ | |
} | |
function o(e, t, n, r, i) { | |
var o = i[e.toString()] || [], | |
s = c(o), | |
a = !0 !== s.unmanaged, | |
u = r[e], | |
h = s.inject || s.multiInject; | |
if (u = h || u, a) { | |
var d = u === Object, | |
y = u === Function, | |
v = void 0 === u, | |
_ = d || y || v; | |
if (!t && _) { | |
var g = l.MISSING_INJECT_ANNOTATION + " argument " + | |
e + " in class " + n + "."; | |
throw new Error(g) | |
} | |
var m = new f.Target(p.TargetTypeEnum.ConstructorArgument, | |
s.targetName, u); | |
return m.metadata = o, m | |
} | |
return null | |
} | |
function s(e, t, n, r, i) { | |
for (var s = [], a = 0; a < i; a++) { | |
var u = a, | |
c = o(u, e, t, n, r); | |
null !== c && s.push(c) | |
} | |
return s | |
} | |
function a(e, t) { | |
for (var n = e.getPropertiesMetadata(t), r = [], i = Object | |
.keys(n), o = 0, s = i; o < s.length; o++) { | |
var u = s[o], | |
l = n[u], | |
h = c(n[u]), | |
d = h.targetName || u, | |
y = h.inject || h.multiInject, | |
v = new f.Target(p.TargetTypeEnum.ClassProperty, d, | |
y); | |
v.metadata = l, r.push(v) | |
} | |
var _ = Object.getPrototypeOf(t.prototype).constructor; | |
if (_ !== Object) { | |
var g = a(e, _); | |
r = r.concat(g) | |
} | |
return r | |
} | |
function u(e, t) { | |
var n = Object.getPrototypeOf(t.prototype).constructor; | |
if (n !== Object) { | |
var r = d.getFunctionName(n), | |
o = i(e, r, n, !0), | |
s = o.map(function(e) { | |
return e.metadata.filter(function(e) { | |
return e.key === h.UNMANAGED_TAG | |
}) | |
}), | |
a = [].concat.apply([], s).length, | |
c = o.length - a; | |
return c > 0 ? c : u(e, n) | |
} | |
return 0 | |
} | |
function c(e) { | |
var t = {}; | |
return e.forEach(function(e) { | |
t[e.key.toString()] = e.value | |
}), { | |
inject: t[h.INJECT_TAG], | |
multiInject: t[h.MULTI_INJECT_TAG], | |
targetName: t[h.NAME_TAG], | |
unmanaged: t[h.UNMANAGED_TAG] | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var l = n(7), | |
p = n(12), | |
h = n(3), | |
d = n(28), | |
f = n(51); | |
t.getDependencies = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e) { | |
this.str = e | |
} | |
return e.prototype.startsWith = function(e) { | |
return 0 === this.str.indexOf(e) | |
}, e.prototype.endsWith = function(e) { | |
var t = "", | |
n = e.split("").reverse().join(""); | |
return t = this.str.split("").reverse().join(""), | |
this.startsWith.call({ | |
str: t | |
}, n) | |
}, e.prototype.contains = function(e) { | |
return -1 !== this.str.indexOf(e) | |
}, e.prototype.equals = function(e) { | |
return this.str === e | |
}, e.prototype.value = function() { | |
return this.str | |
}, e | |
}(); | |
t.QueryableString = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(20), | |
i = function() { | |
function e(e, t, n, i, o) { | |
this.guid = r.guid(), this.serviceIdentifier = e, | |
this.parentContext = t, this.parentRequest = n, | |
this.target = o, this.childRequests = [], this.bindings = | |
Array.isArray(i) ? i : [i], this.requestScope = | |
null === n ? new Map : null | |
} | |
return e.prototype.addChildRequest = function(t, n, r) { | |
var i = new e(t, this.parentContext, this, n, r); | |
return this.childRequests.push(i), i | |
}, e | |
}(); | |
t.Request = i | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return l(e.plan.rootRequest.requestScope)(e.plan.rootRequest) | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(7), | |
o = n(12), | |
s = n(50), | |
a = n(28), | |
u = n(80), | |
c = function(e, t, n) { | |
try { | |
return n() | |
} catch (n) { | |
throw s.isStackOverflowExeption(n) ? new Error(i.CIRCULAR_DEPENDENCY_IN_FACTORY( | |
e, t.toString())) : n | |
} | |
}, | |
l = function(e) { | |
return function(t) { | |
t.parentContext.setCurrentRequest(t); | |
var n = t.bindings, | |
r = t.childRequests, | |
s = t.target && t.target.isArray(), | |
p = !(t.parentRequest && t.parentRequest.target && | |
t.target && t.parentRequest.target.matchesArray( | |
t.target.serviceIdentifier)); | |
if (s && p) return r.map(function(t) { | |
return l(e)(t) | |
}); | |
var h = null; | |
if (!t.target.isOptional() || 0 !== n.length) { | |
var d = n[0], | |
f = d.scope === o.BindingScopeEnum.Singleton, | |
y = d.scope === o.BindingScopeEnum.Request; | |
if (f && d.activated) return d.cache; | |
if (y && null !== e && e.has(d.guid)) return e | |
.get(d.guid); | |
if (d.type === o.BindingTypeEnum.ConstantValue) | |
h = d.cache; | |
else if (d.type === o.BindingTypeEnum.Function) | |
h = d.cache; | |
else if (d.type === o.BindingTypeEnum.Constructor) | |
h = d.implementationType; | |
else if (d.type === o.BindingTypeEnum.DynamicValue && | |
null !== d.dynamicValue) h = c( | |
"toDynamicValue", d.serviceIdentifier, | |
function() { | |
return d.dynamicValue(t.parentContext) | |
}); | |
else if (d.type === o.BindingTypeEnum.Factory && | |
null !== d.factory) h = c("toFactory", | |
d.serviceIdentifier, | |
function() { | |
return d.factory(t.parentContext) | |
}); | |
else if (d.type === o.BindingTypeEnum.Provider && | |
null !== d.provider) h = c("toProvider", | |
d.serviceIdentifier, | |
function() { | |
return d.provider(t.parentContext) | |
}); | |
else { | |
if (d.type !== o.BindingTypeEnum.Instance || | |
null === d.implementationType) { | |
var v = a.getServiceIdentifierAsString( | |
t.serviceIdentifier); | |
throw new Error(i.INVALID_BINDING_TYPE + | |
" " + v) | |
} | |
h = u.resolveInstance(d.implementationType, | |
r, l(e)) | |
} | |
return "function" == typeof d.onActivation && | |
(h = d.onActivation(t.parentContext, h)), | |
f && (d.cache = h, d.activated = !0), y && | |
null !== e && !e.has(d.guid) && e.set(d | |
.guid, h), h | |
} | |
} | |
}; | |
t.resolve = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e, t, n) { | |
var r = t.filter(function(e) { | |
return null !== e.target && e.target.type === | |
u.TargetTypeEnum.ClassProperty | |
}), | |
i = r.map(n); | |
return r.forEach(function(t, n) { | |
var r = ""; | |
r = t.target.name.value(); | |
var o = i[n]; | |
e[r] = o | |
}), e | |
} | |
function i(e, t) { | |
return new(e.bind.apply(e, [void 0].concat(t))) | |
} | |
function o(e, t) { | |
if (Reflect.hasMetadata(c.POST_CONSTRUCT, e)) { | |
var n = Reflect.getMetadata(c.POST_CONSTRUCT, e); | |
try { | |
t[n.value]() | |
} catch (t) { | |
throw new Error(a.POST_CONSTRUCT_ERROR(e.name, t.message)) | |
} | |
} | |
} | |
function s(e, t, n) { | |
var s = null; | |
if (t.length > 0) { | |
s = i(e, t.filter(function(e) { | |
return null !== e.target && e.target.type === | |
u.TargetTypeEnum.ConstructorArgument | |
}).map(n)), s = r(s, t, n) | |
} else s = new e; | |
return o(e, s), s | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var a = n(7), | |
u = n(12), | |
c = n(3); | |
t.resolveInstance = s | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(7), | |
i = n(12), | |
o = n(82), | |
s = n(52), | |
a = function() { | |
function e(e) { | |
this._binding = e | |
} | |
return e.prototype.to = function(e) { | |
return this._binding.type = i.BindingTypeEnum.Instance, | |
this._binding.implementationType = e, new o | |
.BindingInWhenOnSyntax(this._binding) | |
}, e.prototype.toSelf = function() { | |
if ("function" != typeof this._binding.serviceIdentifier) | |
throw new Error("" + r.INVALID_TO_SELF_VALUE); | |
var e = this._binding.serviceIdentifier; | |
return this.to(e) | |
}, e.prototype.toConstantValue = function(e) { | |
return this._binding.type = i.BindingTypeEnum.ConstantValue, | |
this._binding.cache = e, this._binding.dynamicValue = | |
null, this._binding.implementationType = | |
null, new s.BindingWhenOnSyntax(this._binding) | |
}, e.prototype.toDynamicValue = function(e) { | |
return this._binding.type = i.BindingTypeEnum.DynamicValue, | |
this._binding.cache = null, this._binding.dynamicValue = | |
e, this._binding.implementationType = null, | |
new o.BindingInWhenOnSyntax(this._binding) | |
}, e.prototype.toConstructor = function(e) { | |
return this._binding.type = i.BindingTypeEnum.Constructor, | |
this._binding.implementationType = e, new s | |
.BindingWhenOnSyntax(this._binding) | |
}, e.prototype.toFactory = function(e) { | |
return this._binding.type = i.BindingTypeEnum.Factory, | |
this._binding.factory = e, new s.BindingWhenOnSyntax( | |
this._binding) | |
}, e.prototype.toFunction = function(e) { | |
if ("function" != typeof e) throw new Error(r.INVALID_FUNCTION_BINDING); | |
var t = this.toConstantValue(e); | |
return this._binding.type = i.BindingTypeEnum.Function, | |
t | |
}, e.prototype.toAutoFactory = function(e) { | |
return this._binding.type = i.BindingTypeEnum.Factory, | |
this._binding.factory = function(t) { | |
return function() { | |
return t.container.get(e) | |
} | |
}, new s.BindingWhenOnSyntax(this._binding) | |
}, e.prototype.toProvider = function(e) { | |
return this._binding.type = i.BindingTypeEnum.Provider, | |
this._binding.provider = e, new s.BindingWhenOnSyntax( | |
this._binding) | |
}, e.prototype.toService = function(e) { | |
this.toDynamicValue(function(t) { | |
return t.container.get(e) | |
}) | |
}, e | |
}(); | |
t.BindingToSyntax = a | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(83), | |
i = n(40), | |
o = n(41), | |
s = function() { | |
function e(e) { | |
this._binding = e, this._bindingWhenSyntax = new o.BindingWhenSyntax( | |
this._binding), this._bindingOnSyntax = new i | |
.BindingOnSyntax(this._binding), this._bindingInSyntax = | |
new r.BindingInSyntax(e) | |
} | |
return e.prototype.inRequestScope = function() { | |
return this._bindingInSyntax.inRequestScope() | |
}, e.prototype.inSingletonScope = function() { | |
return this._bindingInSyntax.inSingletonScope() | |
}, e.prototype.inTransientScope = function() { | |
return this._bindingInSyntax.inTransientScope() | |
}, e.prototype.when = function(e) { | |
return this._bindingWhenSyntax.when(e) | |
}, e.prototype.whenTargetNamed = function(e) { | |
return this._bindingWhenSyntax.whenTargetNamed( | |
e) | |
}, e.prototype.whenTargetIsDefault = function() { | |
return this._bindingWhenSyntax.whenTargetIsDefault() | |
}, e.prototype.whenTargetTagged = function(e, t) { | |
return this._bindingWhenSyntax.whenTargetTagged( | |
e, t) | |
}, e.prototype.whenInjectedInto = function(e) { | |
return this._bindingWhenSyntax.whenInjectedInto( | |
e) | |
}, e.prototype.whenParentNamed = function(e) { | |
return this._bindingWhenSyntax.whenParentNamed( | |
e) | |
}, e.prototype.whenParentTagged = function(e, t) { | |
return this._bindingWhenSyntax.whenParentTagged( | |
e, t) | |
}, e.prototype.whenAnyAncestorIs = function(e) { | |
return this._bindingWhenSyntax.whenAnyAncestorIs( | |
e) | |
}, e.prototype.whenNoAncestorIs = function(e) { | |
return this._bindingWhenSyntax.whenNoAncestorIs( | |
e) | |
}, e.prototype.whenAnyAncestorNamed = function(e) { | |
return this._bindingWhenSyntax.whenAnyAncestorNamed( | |
e) | |
}, e.prototype.whenAnyAncestorTagged = function(e, | |
t) { | |
return this._bindingWhenSyntax.whenAnyAncestorTagged( | |
e, t) | |
}, e.prototype.whenNoAncestorNamed = function(e) { | |
return this._bindingWhenSyntax.whenNoAncestorNamed( | |
e) | |
}, e.prototype.whenNoAncestorTagged = function(e, t) { | |
return this._bindingWhenSyntax.whenNoAncestorTagged( | |
e, t) | |
}, e.prototype.whenAnyAncestorMatches = function(e) { | |
return this._bindingWhenSyntax.whenAnyAncestorMatches( | |
e) | |
}, e.prototype.whenNoAncestorMatches = function(e) { | |
return this._bindingWhenSyntax.whenNoAncestorMatches( | |
e) | |
}, e.prototype.onActivation = function(e) { | |
return this._bindingOnSyntax.onActivation(e) | |
}, e | |
}(); | |
t.BindingInWhenOnSyntax = s | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(12), | |
i = n(52), | |
o = function() { | |
function e(e) { | |
this._binding = e | |
} | |
return e.prototype.inRequestScope = function() { | |
return this._binding.scope = r.BindingScopeEnum | |
.Request, new i.BindingWhenOnSyntax(this._binding) | |
}, e.prototype.inSingletonScope = function() { | |
return this._binding.scope = r.BindingScopeEnum | |
.Singleton, new i.BindingWhenOnSyntax(this._binding) | |
}, e.prototype.inTransientScope = function() { | |
return this._binding.scope = r.BindingScopeEnum | |
.Transient, new i.BindingWhenOnSyntax(this._binding) | |
}, e | |
}(); | |
t.BindingInSyntax = o | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e() {} | |
return e.of = function(t, n) { | |
var r = new e; | |
return r.bindings = t, r.middleware = n, r | |
}, e | |
}(); | |
t.ContainerSnapshot = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(7), | |
i = function() { | |
function e() { | |
this._map = new Map | |
} | |
return e.prototype.getMap = function() { | |
return this._map | |
}, e.prototype.add = function(e, t) { | |
if (null === e || void 0 === e) throw new Error( | |
r.NULL_ARGUMENT); | |
if (null === t || void 0 === t) throw new Error( | |
r.NULL_ARGUMENT); | |
var n = this._map.get(e); | |
void 0 !== n ? (n.push(t), this._map.set(e, n)) : | |
this._map.set(e, [t]) | |
}, e.prototype.get = function(e) { | |
if (null === e || void 0 === e) throw new Error( | |
r.NULL_ARGUMENT); | |
var t = this._map.get(e); | |
if (void 0 !== t) return t; | |
throw new Error(r.KEY_NOT_FOUND) | |
}, e.prototype.remove = function(e) { | |
if (null === e || void 0 === e) throw new Error( | |
r.NULL_ARGUMENT); | |
if (!this._map.delete(e)) throw new Error(r.KEY_NOT_FOUND) | |
}, e.prototype.removeByCondition = function(e) { | |
var t = this; | |
this._map.forEach(function(n, r) { | |
var i = n.filter(function(t) { | |
return !e(t) | |
}); | |
i.length > 0 ? t._map.set(r, i) : t | |
._map.delete(r) | |
}) | |
}, e.prototype.hasKey = function(e) { | |
if (null === e || void 0 === e) throw new Error( | |
r.NULL_ARGUMENT); | |
return this._map.has(e) | |
}, e.prototype.clone = function() { | |
var t = new e; | |
return this._map.forEach(function(e, n) { | |
e.forEach(function(e) { | |
return t.add(n, e.clone()) | |
}) | |
}), t | |
}, e.prototype.traverse = function(e) { | |
this._map.forEach(function(t, n) { | |
e(n, t) | |
}) | |
}, e | |
}(); | |
t.Lookup = i | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(20), | |
i = function() { | |
function e(e) { | |
this.guid = r.guid(), this.registry = e | |
} | |
return e | |
}(); | |
t.ContainerModule = i | |
}, function(e, t, n) { | |
"use strict"; | |
function r() { | |
return function(e) { | |
if (Reflect.hasOwnMetadata(o.PARAM_TYPES, e)) throw new Error( | |
i.DUPLICATED_INJECTABLE_DECORATOR); | |
var t = Reflect.getMetadata(o.DESIGN_PARAM_TYPES, e) || | |
[]; | |
return Reflect.defineMetadata(o.PARAM_TYPES, t, e), | |
e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(7), | |
o = n(3); | |
t.injectable = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
return function(n, r, s) { | |
var a = new i.Metadata(e, t); | |
"number" == typeof s ? o.tagParameter(n, r, s, a) : | |
o.tagProperty(n, r, a) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(8), | |
o = n(17); | |
t.tagged = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return function(t, n, r) { | |
var a = new o.Metadata(i.NAMED_TAG, e); | |
"number" == typeof r ? s.tagParameter(t, n, r, a) : | |
s.tagProperty(t, n, a) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(3), | |
o = n(8), | |
s = n(17); | |
t.named = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return function(t, n, r) { | |
var a = new o.Metadata(i.INJECT_TAG, e); | |
"number" == typeof r ? s.tagParameter(t, n, r, a) : | |
s.tagProperty(t, n, a) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(3), | |
o = n(8), | |
s = n(17); | |
t.inject = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r() { | |
return function(e, t, n) { | |
var r = new o.Metadata(i.OPTIONAL_TAG, !0); | |
"number" == typeof n ? s.tagParameter(e, t, n, r) : | |
s.tagProperty(e, t, r) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(3), | |
o = n(8), | |
s = n(17); | |
t.optional = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r() { | |
return function(e, t, n) { | |
var r = new o.Metadata(i.UNMANAGED_TAG, !0); | |
s.tagParameter(e, t, n, r) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(3), | |
o = n(8), | |
s = n(17); | |
t.unmanaged = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return function(t, n, r) { | |
var a = new o.Metadata(i.MULTI_INJECT_TAG, e); | |
"number" == typeof r ? s.tagParameter(t, n, r, a) : | |
s.tagProperty(t, n, a) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(3), | |
o = n(8), | |
s = n(17); | |
t.multiInject = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return function(t, n, r) { | |
var a = new o.Metadata(i.NAME_TAG, e); | |
s.tagParameter(t, n, r, a) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(3), | |
o = n(8), | |
s = n(17); | |
t.targetName = r | |
}, function(e, t, n) { | |
"use strict"; | |
function r() { | |
return function(e, t, n) { | |
var r = new s.Metadata(o.POST_CONSTRUCT, t); | |
if (Reflect.hasOwnMetadata(o.POST_CONSTRUCT, e.constructor)) | |
throw new Error(i.MULTIPLE_POST_CONSTRUCT_METHODS); | |
Reflect.defineMetadata(o.POST_CONSTRUCT, r, e.constructor) | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(7), | |
o = n(3), | |
s = n(8); | |
t.postConstruct = r | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t.multiBindToService = function(e) { | |
return function(t) { | |
return function() { | |
for (var n = [], r = 0; r < arguments.length; r++) | |
n[r] = arguments[r]; | |
return n.forEach(function(n) { | |
return e.bind(n).toService( | |
t) | |
}) | |
} | |
} | |
} | |
}, function(e, t, n) { | |
(function(t, r) { | |
! function(t, n) { | |
e.exports = n() | |
}(0, function() { | |
"use strict"; | |
function e(e) { | |
return "function" == typeof e || "object" == | |
typeof e && null !== e | |
} | |
function i(e) { | |
return "function" == typeof e | |
} | |
function o(e) { | |
G = e | |
} | |
function s(e) { | |
Y = e | |
} | |
function a() { | |
return function() { | |
W(c) | |
} | |
} | |
function u() { | |
var e = setTimeout; | |
return function() { | |
return e(c, 1) | |
} | |
} | |
function c() { | |
for (var e = 0; e < q; e += 2) { | |
(0, Q[e])(Q[e + 1]), Q[e] = void 0, Q[e + | |
1] = void 0 | |
} | |
q = 0 | |
} | |
function l(e, t) { | |
var n = arguments, | |
r = this, | |
i = new this.constructor(h); | |
void 0 === i[ee] && L(i); | |
var o = r._state; | |
return o ? function() { | |
var e = n[o - 1]; | |
Y(function() { | |
return C(o, i, e, r._result) | |
}) | |
}() : P(r, i, e, t), i | |
} | |
function p(e) { | |
var t = this; | |
if (e && "object" == typeof e && e.constructor === | |
t) return e; | |
var n = new t(h); | |
return b(n, e), n | |
} | |
function h() {} | |
function d() { | |
return new TypeError( | |
"You cannot resolve a promise with itself" | |
) | |
} | |
function f() { | |
return new TypeError( | |
"A promises callback cannot return that same promise." | |
) | |
} | |
function y(e) { | |
try { | |
return e.then | |
} catch (e) { | |
return ie.error = e, ie | |
} | |
} | |
function v(e, t, n, r) { | |
try { | |
e.call(t, n, r) | |
} catch (e) { | |
return e | |
} | |
} | |
function _(e, t, n) { | |
Y(function(e) { | |
var r = !1, | |
i = v(n, t, function(n) { | |
r || (r = !0, t !== | |
n ? b(e, n) : | |
w(e, n)) | |
}, function(t) { | |
r || (r = !0, T(e, | |
t)) | |
}, "Settle: " + (e._label || | |
" unknown promise")); | |
!r && i && (r = !0, T(e, i)) | |
}, e) | |
} | |
function g(e, t) { | |
t._state === ne ? w(e, t._result) : t._state === | |
re ? T(e, t._result) : P(t, void 0, | |
function(t) { | |
return b(e, t) | |
}, | |
function(t) { | |
return T(e, t) | |
}) | |
} | |
function m(e, t, n) { | |
t.constructor === e.constructor && n === l && | |
t.constructor.resolve === p ? g(e, t) : | |
n === ie ? T(e, ie.error) : void 0 === | |
n ? w(e, t) : i(n) ? _(e, t, n) : w(e, | |
t) | |
} | |
function b(t, n) { | |
t === n ? T(t, d()) : e(n) ? m(t, n, y(n)) : | |
w(t, n) | |
} | |
function E(e) { | |
e._onerror && e._onerror(e._result), S(e) | |
} | |
function w(e, t) { | |
e._state === te && (e._result = t, e._state = | |
ne, 0 !== e._subscribers.length && | |
Y(S, e)) | |
} | |
function T(e, t) { | |
e._state === te && (e._state = re, e._result = | |
t, Y(E, e)) | |
} | |
function P(e, t, n, r) { | |
var i = e._subscribers, | |
o = i.length; | |
e._onerror = null, i[o] = t, i[o + ne] = n, | |
i[o + re] = r, 0 === o && e._state && Y( | |
S, e) | |
} | |
function S(e) { | |
var t = e._subscribers, | |
n = e._state; | |
if (0 !== t.length) { | |
for (var r = void 0, i = void 0, o = e._result, | |
s = 0; s < t.length; s += 3) r = | |
t[s], i = t[s + n], r ? C(n, r, i, | |
o) : i(o); | |
e._subscribers.length = 0 | |
} | |
} | |
function k() { | |
this.error = null | |
} | |
function A(e, t) { | |
try { | |
return e(t) | |
} catch (e) { | |
return oe.error = e, oe | |
} | |
} | |
function C(e, t, n, r) { | |
var o = i(n), | |
s = void 0, | |
a = void 0, | |
u = void 0, | |
c = void 0; | |
if (o) { | |
if (s = A(n, r), s === oe ? (c = !0, a = | |
s.error, s = null) : u = !0, t === | |
s) return void T(t, f()) | |
} else s = r, u = !0; | |
t._state !== te || (o && u ? b(t, s) : c ? | |
T(t, a) : e === ne ? w(t, s) : e === | |
re && T(t, s)) | |
} | |
function B(e, t) { | |
try { | |
t(function(t) { | |
b(e, t) | |
}, function(t) { | |
T(e, t) | |
}) | |
} catch (t) { | |
T(e, t) | |
} | |
} | |
function O() { | |
return se++ | |
} | |
function L(e) { | |
e[ee] = se++, e._state = void 0, e._result = | |
void 0, e._subscribers = [] | |
} | |
function M(e, t) { | |
this._instanceConstructor = e, this.promise = | |
new e(h), this.promise[ee] || L(this.promise), | |
H(t) ? (this._input = t, this.length = | |
t.length, this._remaining = t.length, | |
this._result = new Array(this.length), | |
0 === this.length ? w(this.promise, | |
this._result) : (this.length = | |
this.length || 0, this._enumerate(), | |
0 === this._remaining && w(this | |
.promise, this._result))) : | |
T(this.promise, N()) | |
} | |
function N() { | |
return new Error( | |
"Array Methods must be provided an Array" | |
) | |
} | |
function D(e) { | |
return new M(this, e).promise | |
} | |
function R(e) { | |
var t = this; | |
return new t(H(e) ? function(n, r) { | |
for (var i = e.length, o = 0; o < | |
i; o++) t.resolve(e[o]).then( | |
n, r) | |
} : function(e, t) { | |
return t(new TypeError( | |
"You must pass an array to race." | |
)) | |
}) | |
} | |
function I(e) { | |
var t = this, | |
n = new t(h); | |
return T(n, e), n | |
} | |
function x() { | |
throw new TypeError( | |
"You must pass a resolver function as the first argument to the promise constructor" | |
) | |
} | |
function j() { | |
throw new TypeError( | |
"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function." | |
) | |
} | |
function V(e) { | |
this[ee] = O(), this._result = this._state = | |
void 0, this._subscribers = [], h !== | |
e && ("function" != typeof e && x(), | |
this instanceof V ? B(this, e) : j() | |
) | |
} | |
function F() { | |
var e = void 0; | |
if (void 0 !== r) e = r; | |
else if ("undefined" != typeof self) e = | |
self; | |
else try { | |
e = Function("return this")() | |
} catch (e) { | |
throw new Error( | |
"polyfill failed because global object is unavailable in this environment" | |
) | |
} | |
var t = e.Promise; | |
if (t) { | |
var n = null; | |
try { | |
n = Object.prototype.toString.call( | |
t.resolve()) | |
} catch (e) {} | |
if ("[object Promise]" === n && !t.cast) | |
return | |
} | |
e.Promise = V | |
} | |
var U = void 0; | |
U = Array.isArray ? Array.isArray : function(e) { | |
return "[object Array]" === Object.prototype | |
.toString.call(e) | |
}; | |
var H = U, | |
q = 0, | |
W = void 0, | |
G = void 0, | |
Y = function(e, t) { | |
Q[q] = e, Q[q + 1] = t, 2 === (q += 2) && | |
(G ? G(c) : Z()) | |
}, | |
J = "undefined" != typeof window ? window : | |
void 0, | |
z = J || {}, | |
K = z.MutationObserver || z.WebKitMutationObserver, | |
X = "undefined" == typeof self && void 0 !== | |
t && "[object process]" === {}.toString.call( | |
t), | |
$ = "undefined" != typeof Uint8ClampedArray && | |
"undefined" != typeof importScripts && | |
"undefined" != typeof MessageChannel, | |
Q = new Array(1e3), | |
Z = void 0; | |
Z = X ? function() { | |
return function() { | |
return t.nextTick(c) | |
} | |
}() : K ? function() { | |
var e = 0, | |
t = new K(c), | |
n = document.createTextNode(""); | |
return t.observe(n, { | |
characterData: !0 | |
}), | |
function() { | |
n.data = e = ++e % 2 | |
} | |
}() : $ ? function() { | |
var e = new MessageChannel; | |
return e.port1.onmessage = c, | |
function() { | |
return e.port2.postMessage(0) | |
} | |
}() : void 0 === J ? function() { | |
try { | |
var e = n(98); | |
return W = e.runOnLoop || e.runOnContext, | |
a() | |
} catch (e) { | |
return u() | |
} | |
}() : u(); | |
var ee = Math.random().toString(36).substring( | |
16), | |
te = void 0, | |
ne = 1, | |
re = 2, | |
ie = new k, | |
oe = new k, | |
se = 0; | |
return M.prototype._enumerate = function() { | |
for (var e = this.length, t = this._input, | |
n = 0; this._state === te && n < | |
e; n++) this._eachEntry(t[n], n) | |
}, M.prototype._eachEntry = function(e, t) { | |
var n = this._instanceConstructor, | |
r = n.resolve; | |
if (r === p) { | |
var i = y(e); | |
if (i === l && e._state !== te) this | |
._settledAt(e._state, t, e._result); | |
else if ("function" != typeof i) | |
this._remaining--, this._result[ | |
t] = e; | |
else if (n === V) { | |
var o = new n(h); | |
m(o, e, i), this._willSettleAt( | |
o, t) | |
} else this._willSettleAt(new n( | |
function(t) { | |
return t(e) | |
}), t) | |
} else this._willSettleAt(r(e), t) | |
}, M.prototype._settledAt = function(e, t, | |
n) { | |
var r = this.promise; | |
r._state === te && (this._remaining--, | |
e === re ? T(r, n) : this._result[ | |
t] = n), 0 === this._remaining && | |
w(r, this._result) | |
}, M.prototype._willSettleAt = function(e, | |
t) { | |
var n = this; | |
P(e, void 0, function(e) { | |
return n._settledAt(ne, t, | |
e) | |
}, function(e) { | |
return n._settledAt(re, t, | |
e) | |
}) | |
}, V.all = D, V.race = R, V.resolve = p, V.reject = | |
I, V._setScheduler = o, V._setAsap = s, V._asap = | |
Y, V.prototype = { | |
constructor: V, | |
then: l, | |
catch: function(e) { | |
return this.then(null, e) | |
} | |
}, F(), V.polyfill = F, V.Promise = V, V | |
}) | |
}).call(t, n(42), n(4)) | |
}, function(e, t) {}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(100), | |
i = n(44), | |
o = n(10), | |
s = n(16), | |
a = n(162), | |
u = n(22), | |
c = n(2), | |
l = n(0), | |
p = n(33), | |
h = n(5), | |
d = n(27), | |
f = n(11), | |
y = n(23), | |
v = function() { | |
function e(e, t) { | |
void 0 === t && (t = u.LogLevel.WARN); | |
var n = this; | |
if (this._allStatsPluginsHaveLoaded = !1, this._loadDefaultSkin = ! | |
1, this._loadPlayer = function() { | |
n._allStatsPluginsHaveLoaded ? n._playerLoader | |
.load().then(function(e) { | |
n._onPlayerLoaded(e), e.playerId !== | |
i.playerIds.youtube && n._skinManager | |
.loadSkin(n) | |
}).catch(function(e) { | |
n._onPlayerLoadError(e) | |
}) : (n._eventBus.publish(new f.LogDebug( | |
"cannot start loading the player, still waiting for stats plugins to load. Will retry in ~50ms." | |
)), setTimeout(n._loadPlayer, 50)) | |
}, this._goossensContainer = new r.GoossensContainer( | |
p.default), this._bindDependencies(), this._logger | |
.setLogLevel(t), this._checkForSSL(), void 0 !== | |
e && null !== e && "" !== e) this._config.setPlayerKey( | |
e), this._eventBus.publish(new d.LogInfo( | |
"vuplay constructed")), this._statsManager.loadAllPlugins( | |
this).then(function() { | |
n._allStatsPluginsHaveLoaded = !0 | |
}).catch(function(e) { | |
var t = new s.ErrorEvent(e); | |
n._eventBus.publish(t) | |
}); | |
else { | |
var o = new l.VuplayError("invalid player key", | |
l.VuplayErrorType.SETUP, { | |
playerKey: e | |
}); | |
this._eventBus.publish(new s.ErrorEvent(o)) | |
} | |
} | |
return e.prototype._bindDependencies = function() { | |
this._eventBus = this._goossensContainer.getDependency( | |
c.default.IEventBus), this._logger = | |
this._goossensContainer.getDependency(c.default | |
.ILog), this._logger.setDependencies( | |
this._goossensContainer), this._config = | |
this._goossensContainer.getDependency(c.default | |
.IConfig), this._config.setDependencies( | |
this._goossensContainer), this._playerLoader = | |
p.default.get(c.default.IPlayerLoader), | |
this._playerLoader.setDependencies(this._goossensContainer), | |
this._statsManager = p.default.get(c.default | |
.IStatsManager), this._statsManager.setDependencies( | |
this._goossensContainer), this._skinManager = | |
p.default.get(c.default.ISkinManager), this | |
._skinManager.setDependencies(this._goossensContainer), | |
this._castManager = p.default.get(c.default | |
.ICastManager), this._castManager.setDependencies( | |
this._goossensContainer), this._adManager = | |
this._goossensContainer.getDependency(c.default | |
.IAdManager), this._adManager.setDependencies( | |
this._goossensContainer), this._socketsManager = | |
this._goossensContainer.getDependency(c.default | |
.ISocketsManager), this._socketsManager | |
.setDependencies(this._goossensContainer) | |
}, e.prototype.setup = function(e, t) { | |
if (this._validate(e, t)) { | |
this.setSrc(e.src), this._config.setLoadYoutube( | |
e.loadYoutube), this.setAutoStart(e | |
.autoStart), this._config.setContainerDiv( | |
t); | |
var n = document.createElement("div"); | |
t.appendChild(n), this._config.setPlayerDiv( | |
n), this._config.setSkin(e.skin), e | |
.skin === y.SkinType.VUALTO && (this._config | |
.setSkinConfig(e.skinConfig), this._config | |
.setClipping(e.clipping), this._config | |
.setFramerate(e.framerate)), e.playerDivOverride && | |
this._config.setPlayerDivOverride(e.playerDivOverride), ! | |
1 === this._config.getLoadYoutube() && | |
(this.setVudrmToken(e.vudrmToken), this | |
._castManager.loadAllCasts(this)), | |
this._eventBus.publish(new d.LogInfo( | |
"config loaded", { | |
config: e | |
})), this._loadPlayer() | |
} else { | |
var r = new l.VuplayError( | |
"a container div and a config with src are required", | |
l.VuplayErrorType.SETUP, { | |
config: e, | |
containerDiv: t | |
}); | |
this._eventBus.publish(new s.ErrorEvent(r)) | |
} | |
}, e.prototype._onPlayerLoaded = function(e) { | |
this._eventBus.publish(new d.LogInfo( | |
"player loaded", { | |
playerId: e.playerId | |
})), this._player = e, this._adManager.setPlayer( | |
this._player), this._player.setSrc(); | |
var t = new a.VuplayEvent(h.EventName.playerready, | |
this._player.playerId); | |
this._eventBus.publish(t) | |
}, e.prototype._onPlayerLoadError = function(e) { | |
this._loadNoPlayerError(e.message), this._eventBus | |
.publish(new s.ErrorEvent(e)) | |
}, e.prototype._loadNoPlayerError = function(e) { | |
var t = this._config.getContainerDiv(), | |
n = document.createElement("p"); | |
n.innerText = e, n.style.textAlign = "center", | |
n.style.verticalAlign = "middle", n.style.lineHeight = | |
"90px", n.style.paddingTop = "30%", t.appendChild( | |
n), t.style.width = "50%", t.style.backgroundColor = | |
"#000000", t.style.color = "#FFFFFF" | |
}, e.prototype.getSmartId = function() { | |
return this._eventBus.getSmartId() | |
}, e.prototype.setStatsConfigs = function(e) { | |
this._statsManager.setStatsConfigs(e) | |
}, e.prototype.startStatsMonitoring = function() { | |
var e = this; | |
this._allStatsPluginsHaveLoaded ? this._statsManager | |
.startAllPlugins() : (this._eventBus.publish( | |
new f.LogDebug( | |
"cannot start the stats monitoring, still waiting for stats plugins to load. Will retry in ~50ms." | |
)), setTimeout(function() { | |
e.startStatsMonitoring() | |
}, 50)) | |
}, e.prototype.stopStatsMonitoring = function() { | |
this._statsManager.stopAllPlugins() | |
}, e.prototype.setLogLevel = function(e) { | |
this._logger.setLogLevel(e), this._eventBus.publish( | |
new d.LogInfo("log level set to", { | |
logLevel: e | |
})) | |
}, e.prototype.getLogLevel = function() { | |
return this._logger.getLogLevel() | |
}, e.prototype.getPlayerKey = function() { | |
return this._config.getPlayerKey() | |
}, e.prototype.getLoadedPlayerId = function() { | |
return this._player ? this._player.playerId : | |
null | |
}, e.prototype.setSrc = function(e) { | |
this._config.setSrc(e), this._player && this._player | |
.setSrc() | |
}, e.prototype.getSrc = function() { | |
return this._player ? this._player.getSrc() : | |
this._config.getSrc() | |
}, e.prototype.getUtcTime = function() { | |
return this._player ? this._player.getUtcTime() : | |
null | |
}, e.prototype.setVudrmToken = function(e) { | |
this._config.setVudrmToken(e) | |
}, e.prototype.getVudrmToken = function() { | |
return this._config.getVudrmToken() | |
}, e.prototype.setAutoStart = function(e) { | |
this._config.setAutoStart(e) | |
}, e.prototype.getAutoStart = function() { | |
return this._config.getAutoStart() | |
}, e.prototype.getAvailableCastTypes = function() { | |
return this._castManager.getAvailableCastTypes() | |
}, e.prototype.startCasting = function(e, t) { | |
this._castManager.startCasting(e, this._config.getSrc(), | |
t) | |
}, e.prototype.stopCasting = function() { | |
this._castManager.stopCasting() | |
}, e.prototype.isCasting = function() { | |
return this._castManager.isCasting() | |
}, e.prototype.isLive = function() { | |
return this._config.isLive() | |
}, e.prototype.getContainerDiv = function() { | |
return this._config.getContainerDiv() | |
}, e.prototype.reset = function() { | |
this._player && this._player.reset(), this._config | |
.reset(), this._statsManager.stopAllPlugins() | |
}, e.prototype.play = function() { | |
this._castManager.isCasting() ? this._castManager | |
.play() : this._player && this._player.play() | |
}, e.prototype.pause = function() { | |
this._castManager.isCasting() ? this._castManager | |
.pause() : this._player && this._player.pause() | |
}, e.prototype.isPaused = function() { | |
if (!this._castManager.isCasting()) return this | |
._player ? this._player.isPaused() : | |
null; | |
this._castManager.isPaused() | |
}, e.prototype.seek = function(e) { | |
this._castManager.isCasting() ? this._config.isLive() || | |
this._castManager.seek(e) : this._player && | |
this._player.seek(e) | |
}, e.prototype.skipTo = function(e) { | |
this._player && this._player.skipTo(e) | |
}, e.prototype.setVolume = function(e) { | |
this._castManager.isCasting() ? this._castManager | |
.setVolume(e) : this._player && this._player | |
.setVolume(e) | |
}, e.prototype.getVolume = function() { | |
if (!this._castManager.isCasting()) return this | |
._player ? this._player.getVolume() : | |
null; | |
this._castManager.getVolume() | |
}, e.prototype.getCurrentTime = function() { | |
return this._castManager.isCasting() ? this._castManager | |
.getCurrentTime() : this._player ? this._player | |
.getCurrentTime() : null | |
}, e.prototype.getDuration = function() { | |
return this._castManager.isCasting() ? this._castManager | |
.getDuration() : this._player ? this._player | |
.getDuration() : null | |
}, e.prototype.getTextTracks = function() { | |
if (this._player) { | |
return this._player.getTextTracks() | |
} | |
return [] | |
}, e.prototype.setTextTrack = function(e) { | |
this._player && this._player.setTextTrack(e), | |
this._skinManager.setSelectedTextTrack(e) | |
}, e.prototype.getAudioTracks = function() { | |
return this._player ? this._player.getAudioTracks() : | |
[] | |
}, e.prototype.setAudioTrack = function(e) { | |
this._player && this._player.setAudioTrack(e), | |
this._skinManager.setSelectedAudioTrack(e) | |
}, e.prototype.setFullScreen = function(e) { | |
this._player && this._player.setFullScreen(e) | |
}, e.prototype.isFullScreen = function() { | |
return !!this._player && this._player.isFullScreen() | |
}, e.prototype.on = function(e, t, n) { | |
this._eventBus.on(e, t, n) | |
}, e.prototype.off = function(e, t, n) { | |
this._eventBus.off(e, t, n) | |
}, e.prototype.scheduleAd = function(e, t, n, r) { | |
this._adManager.scheduleAd(e, t, n, r) | |
}, e.prototype.schedulePlaylistAd = function(e, t) { | |
this._adManager.schedulePlaylistAds(e, t) | |
}, e.prototype.skipCurrentAd = function() { | |
return this._adManager.skipCurrentAd() | |
}, e.prototype.addSocketChannel = function(e) { | |
this._socketsManager.addChannel(e) | |
}, e.prototype.removeSocketChannel = function(e) { | |
this._socketsManager.removeChannel(e) | |
}, e.prototype.getOpenSocketChannels = function() { | |
return this._socketsManager.getOpenChannels() | |
}, e.prototype.setClipStart = function(e) { | |
return this._skinManager.setClipStart(e) | |
}, e.prototype.setClipEnd = function(e) { | |
return this._skinManager.setClipEnd(e) | |
}, e.prototype._validate = function(e, t) { | |
return void 0 !== e && null !== e && (void 0 !== | |
e.src && null !== e.src && "" !== e.src && | |
(void 0 !== t && null !== t)) | |
}, e.prototype._checkForSSL = function() { | |
window.location.toString().indexOf("https://") < | |
0 && this._eventBus.publish(new o.LogWarn( | |
"SSL is not enabled on this page. This could cause abnormal behaviour.", { | |
location: window.location | |
})) | |
}, e | |
}(); | |
t.default = v | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(6), | |
i = n(2), | |
o = n(101), | |
s = n(103), | |
a = n(22), | |
u = n(136), | |
c = n(140), | |
l = function() { | |
function e(e) { | |
this._container = new r.Container, this._container.parent = | |
e, this._container.bind(i.default.IEventBus).to( | |
o.EventBus).inSingletonScope(), this._container | |
.bind(i.default.IConfig).to(s.Config).inSingletonScope(), | |
this._container.bind(i.default.ILog).to(a.Log).inSingletonScope(), | |
this._container.bind(i.default.IAdManager).to(u | |
.AdManager).inSingletonScope(), this._container | |
.bind(i.default.ISocketsManager).to(c.SocketsManager) | |
.inSingletonScope() | |
} | |
return e.prototype.getDependency = function(e) { | |
return this._container.get(e) | |
}, e | |
}(); | |
t.GoossensContainer = l | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.decorate) s = Reflect.decorate(e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = e[a]) && | |
(s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, | |
n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.metadata) return Reflect.metadata(e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(54), | |
s = n(102), | |
a = n(6), | |
u = function() { | |
function e() { | |
this._handlers = [], this._smartId = o.UUID.UUID() | |
} | |
return e.prototype.on = function(e, t, n) { | |
var r = new s.EventHandler(e, t, n); | |
this._handlers.push(r) | |
}, e.prototype.off = function(e, t, n) { | |
this._handlers = this._handlers.filter(function( | |
r) { | |
return r.type !== e || r.name !== | |
t || r.listener !== n | |
}) | |
}, e.prototype.publish = function(e) { | |
for (var t = 0; t < this._handlers.length; t++) { | |
var n = this._handlers[t]; | |
e.type === n.type && e.name === n.name && ( | |
e.setSmartId(this._smartId), n.listener | |
.apply(this, [e])) | |
} | |
}, e.prototype.getSmartId = function() { | |
return this._smartId | |
}, e = r([a.injectable(), i("design:paramtypes", [])], | |
e) | |
}(); | |
t.EventBus = u | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t, n) { | |
this.type = e, this.name = t, this.listener = n | |
} | |
return e | |
}(); | |
t.EventHandler = r | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.decorate) s = Reflect.decorate(e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = e[a]) && | |
(s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, | |
n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.metadata) return Reflect.metadata(e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(10), | |
s = n(6); | |
n(35); | |
var a = n(2), | |
u = n(27), | |
c = n(23), | |
l = n(33), | |
p = function() { | |
function e() { | |
this._containerDivSet = !1, this._autoStart = !1, | |
this._skin = c.SkinType.DEFAULT, this._skinConfig = {}, | |
this._loadYoutube = !1, this._isLive = null, | |
this._playerDivOverride = !1, this._clipping = ! | |
1 | |
} | |
return e.prototype.setDependencies = function(e) { | |
this._goossensContainer = e, this._eventBus = | |
this._goossensContainer.getDependency(a.default | |
.IEventBus) | |
}, e.prototype.getPlayerKey = function() { | |
return this._playerKey | |
}, e.prototype.setPlayerKey = function(e) { | |
this._eventBus.publish(new u.LogInfo( | |
"setting new player key", { | |
playerKey: e | |
})), this._playerKey = e | |
}, e.prototype.getSrc = function() { | |
return this._src | |
}, e.prototype.setSrc = function(e) { | |
null == e || "" === e ? this._eventBus.publish( | |
new o.LogWarn( | |
"cannot set null or empty src. src will not be set", { | |
src: e | |
})) : (this._eventBus.publish(new u | |
.LogInfo("setting new src", { | |
src: e | |
})), this._src = e, this._setIsLive()) | |
}, e.prototype.getVudrmToken = function() { | |
return this._vudrmToken | |
}, e.prototype.setVudrmToken = function(e) { | |
void 0 === e || null == e || "" === e ? this._eventBus | |
.publish(new u.LogInfo( | |
"undefined, null or empty vudrm token passed so assuming the content is not encrypted", { | |
vudrmToken: e | |
})) : (this._eventBus.publish(new u.LogInfo( | |
"setting new vudrm token", { | |
vudrmToken: e | |
})), this._vudrmToken = e) | |
}, e.prototype.getIsDrmRequired = function() { | |
return "undefined" !== this._vudrmToken && null != | |
this._vudrmToken && "" !== this._vudrmToken | |
}, e.prototype.getContainerDiv = function() { | |
return this._containerDiv | |
}, e.prototype.getAutoStart = function() { | |
return this._autoStart | |
}, e.prototype.setAutoStart = function(e) { | |
void 0 === e || null === e ? (this._eventBus.publish( | |
new o.LogWarn( | |
"cannot set null autoStart. autoStart will default to false", { | |
autoStart: e | |
})), this._autoStart = !1) : (this._eventBus | |
.publish(new u.LogInfo( | |
"setting new autoStart", { | |
autoStart: e | |
})), this._autoStart = e) | |
}, e.prototype.setContainerDiv = function(e) { | |
this._containerDiv = e, null == e ? this._eventBus | |
.publish(new o.LogWarn( | |
"cannot set null containerDiv. containerDiv will not be set", { | |
containerDiv: e | |
})) : this._containerDivSet ? this._eventBus | |
.publish(new o.LogWarn( | |
"cannot set container div more than once. container div will not be set", { | |
_containerDiv: this._containerDiv, | |
containerDiv: e | |
})) : (this._eventBus.publish(new u.LogInfo( | |
"setting container div", { | |
containerDiv: e | |
})), this._containerDiv = e, this._containerDivSet = ! | |
0) | |
}, e.prototype.setSkin = function(e) { | |
void 0 === e || null === e ? this._eventBus.publish( | |
new o.LogWarn( | |
"no skin set during setup. default skin will be loaded", { | |
skin: e | |
})) : e in c.SkinType == !1 ? this._eventBus | |
.publish(new o.LogWarn( | |
"invalid skin selected. default skin will be used", { | |
skin: e | |
})) : this._skin = e | |
}, e.prototype.getSkin = function() { | |
return this._skin | |
}, e.prototype.setSkinConfig = function(e) { | |
void 0 === e || null === e ? this._eventBus.publish( | |
new o.LogWarn( | |
"no skin configuration set during setup. default skin configuration will be loaded", { | |
skinConfig: e | |
})) : "object" != typeof e ? this._eventBus | |
.publish(new o.LogWarn( | |
"invalid skin configuration supplied, default skin configuration will be used", { | |
skinConfig: e | |
})) : this._skinConfig = e | |
}, e.prototype.getSkinConfig = function() { | |
return this._skinConfig | |
}, e.prototype.setClipping = function(e) { | |
this._clipping = e | |
}, e.prototype.getClipping = function() { | |
return this._clipping | |
}, e.prototype.setFramerate = function(e) { | |
this._framerate = e | |
}, e.prototype.getFramerate = function() { | |
return this._framerate | |
}, e.prototype.isLive = function() { | |
return this._isLive | |
}, e.prototype.reset = function() { | |
this._src = void 0, this._vudrmToken = void 0 | |
}, e.prototype.setLoadYoutube = function(e) { | |
void 0 !== e && null !== e && (this._loadYoutube = | |
e) | |
}, e.prototype.isIOS = function() { | |
return /iPad|iPhone|iPod/.test(navigator.userAgent) && | |
!window.MSStream | |
}, e.prototype.getLoadYoutube = function() { | |
return this._loadYoutube | |
}, e.prototype.getVideoElement = function() { | |
var e = this.getPlayerDivOverride() ? this.getContainerDiv() : | |
this.getPlayerDiv(); | |
if (void 0 !== e && null !== e) | |
for (var t = e.getElementsByTagName("video"), | |
n = 0; n < t.length; n++) { | |
var r = t[n]; | |
if (void 0 !== r.src && null !== r.src && | |
"" !== r.src && "block" === r.style | |
.display) return r | |
} | |
}, e.prototype._setIsLive = function() { | |
var e = this, | |
t = new RegExp("(/([^/])*.mpd)", "gmi"), | |
n = this._src.replace(t, "/state"), | |
r = l.default.get(a.default.IHttpRequest); | |
r.setDependencies(this._goossensContainer), r.get( | |
n).then(function(t) { | |
for (var n = new DOMParser, r = n.parseFromString( | |
t.rawResponse, | |
"text/xml"), i = r.getElementsByTagName( | |
"meta"), o = 0; o < i.length; o++) | |
"state" === i[o].getAttribute( | |
"name") && (e._isLive = | |
"started" === i[o].getAttribute( | |
"content")) | |
}).catch(function(t) { | |
e._isLive = -1 !== e._src.indexOf( | |
"isml") | |
}) | |
}, e.prototype.setPlayerDiv = function(e) { | |
this._playerDiv = e | |
}, e.prototype.getPlayerDiv = function() { | |
return this._playerDiv | |
}, e.prototype.getPlayerDivOverride = function() { | |
return this._playerDivOverride | |
}, e.prototype.setPlayerDivOverride = function(e) { | |
this._playerDivOverride = e | |
}, e = r([s.injectable(), i("design:paramtypes", [])], | |
e) | |
}(); | |
t.Config = p | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.decorate) s = Reflect.decorate( | |
e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = | |
e[a]) && (s = (o < 3 ? i(s) : o > 3 ? | |
i(t, n, s) : i(t, n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, | |
s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.metadata) return Reflect.metadata( | |
e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(105), | |
s = n(6), | |
a = n(2), | |
u = n(0), | |
c = n(32), | |
l = n(55), | |
p = n(106), | |
h = n(114), | |
d = n(11), | |
f = n(44), | |
y = n(33), | |
v = function() { | |
function t() {} | |
return t.prototype.setDependencies = function(e) { | |
this._goossensContainer = e, this._eventBus = | |
this._goossensContainer.getDependency( | |
a.default.IEventBus), this._config = | |
this._goossensContainer.getDependency( | |
a.default.IConfig) | |
}, t.prototype.load = function() { | |
return this._config.getLoadYoutube() ? | |
this._loadYoutubePlayer(this._goossensContainer) : | |
this._loadPlayer() | |
}, t.prototype._loadPlayer = function() { | |
var t = this; | |
return new e(function(e, n) { | |
var r = JSON.stringify({ | |
player_key: t._config | |
.getPlayerKey(), | |
drm_required: t | |
._config.getIsDrmRequired() | |
}), | |
i = y.default.get(a.default | |
.IHttpRequest); | |
i.setDependencies(t._goossensContainer), | |
i.post(c.VuplayApiUrl, | |
r, [l.JsonContentTypeHeader] | |
).then(function(e) { | |
var n = t._getPlayerInstance( | |
e); | |
if (void 0 === | |
n || null === | |
n) throw new u | |
.VuplayError( | |
"No player can be loaded for this environment", | |
u.VuplayErrorType | |
.PLAYER, {} | |
); | |
return n.setDependencies( | |
t._goossensContainer | |
), n.load() | |
}).then(function(t) { | |
e(t) | |
}).catch(function(e) { | |
n(e) | |
}) | |
}) | |
}, t.prototype._loadYoutubePlayer = | |
function(e) { | |
var t = new h.default(f.youtubeJsUrl, | |
null), | |
n = (new o.DrmProvider(""), p.playerFactory( | |
f.playerIds.youtube, t, | |
null)); | |
return n.setDependencies(e), n.load() | |
}, t.prototype._getPlayerInstance = | |
function(e) { | |
this._eventBus.publish(new d.LogDebug( | |
"received response for player load request", { | |
responseData: e | |
})); | |
var t = JSON.parse(e.rawResponse); | |
if (void 0 === t.player || null === t.player) | |
return null; | |
var n = t.player.player_id, | |
r = this._parsePlayerConfig(t), | |
i = this._parseDrmProviders(t); | |
return p.playerFactory(n, r, i) | |
}, t.prototype._parsePlayerConfig = | |
function(e) { | |
var t = e.player.config, | |
n = new h.default(t.js_url, t.stream_manifest); | |
if (t.scripts_path && (n.scriptsPath = | |
t.scripts_path), t.css_url && ( | |
n.cssUrl = t.css_url), t.stream_type && | |
(n.streamType = t.stream_type), t.xap_url && | |
(n.xapUrl = t.xap_url), t.mpeg_dash_url_transform | |
) { | |
var r = t.mpeg_dash_url_transform; | |
r.isml && (n.ismlRegex = new RegExp( | |
r.isml.regex, "gmi"), n | |
.ismlReplacement = r.isml.replacement | |
), r.ism && (n.ismRegex = new RegExp( | |
r.ism.regex, "gmi"), n.ismReplacement = | |
r.ism.replacement) | |
} | |
return n | |
}, t.prototype._parseDrmProviders = | |
function(e) { | |
var t = e.drm_providers, | |
n = new o.DrmProviders; | |
if (t.playready && (n.playReady = new o | |
.DrmProvider(t.playready.la_url) | |
), t.widevine && (n.widevine = new o | |
.DrmProvider(t.widevine.la_url) | |
), t.fairplay) { | |
var r = t.fairplay; | |
n.fairplay = new o.DrmProvider(r.la_url, | |
r.cert_url) | |
} | |
return n | |
}, t = r([s.injectable(), i( | |
"design:paramtypes", [])], t) | |
}(); | |
t.PlayerLoader = v | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e() {} | |
return e | |
}(); | |
t.DrmProviders = r; | |
var i = function() { | |
function e(e, t) { | |
void 0 === t && (t = null), this.laUrl = e, this.certUrl = | |
t | |
} | |
return e | |
}(); | |
t.DrmProvider = i | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e, t, n) { | |
var r = (d = {}, d[i.playerIds.theoplayerHls] = c.TheoPlayerHLSWrapper, | |
d[i.playerIds.theoplayerDash] = l.TheoPlayerDashWrapper, | |
d[i.playerIds.theoplayerHlsAes] = p.TheoPlayerAESWrapper, | |
d[i.playerIds.dashJs] = u.DashJsWrapper, d[i.playerIds | |
.vuplaySilverlight] = a.SilverlightWrapper, d[i | |
.playerIds.vuplayHls] = s.VuplayHLSWrapper, d[i | |
.playerIds.youtube] = o.YoutubeWrapper, d), | |
h = r[e]; | |
return h ? new h(e, t, n) : null; | |
var d | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(44), | |
o = n(107), | |
s = n(108), | |
a = n(109), | |
u = n(110), | |
c = n(111), | |
l = n(112), | |
p = n(113); | |
t.playerFactory = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(5), | |
o = n(15), | |
s = n(10), | |
a = n(21), | |
u = n(2), | |
c = n(11), | |
l = n(0), | |
p = n(16), | |
h = n(14), | |
d = n(54), | |
f = function(t) { | |
function n(e, n, r) { | |
var a = t.call(this, e, n, r) || this; | |
return a._isBuffering = !1, a._onYoutubePlayerStateChange = | |
function(e) { | |
switch (e.data) { | |
case YT.PlayerState.UNSTARTED: | |
a._onUnstarted(e); | |
break; | |
case YT.PlayerState.ENDED: | |
a._onEnded(); | |
break; | |
case YT.PlayerState.PLAYING: | |
a._onPlaying(); | |
break; | |
case YT.PlayerState.PAUSED: | |
a._onPaused(); | |
break; | |
case YT.PlayerState.BUFFERING: | |
a._onBuffering(); | |
break; | |
case YT.PlayerState.CUED: | |
a._onCued(e); | |
break; | |
default: | |
a._eventBus.publish(new s.LogWarn( | |
"unknown state fired by youtube implementation", { | |
event: e | |
})) | |
} | |
}, a._onPlaybackRateChange = function(e) { | |
a._eventBus.publish(new o.MediaEvent( | |
i.EventName.ratechange, { | |
rate: e.data | |
})) | |
}, a._onError = function(e) { | |
var t = new l.VuplayError( | |
"youtube player has fired an error", | |
l.VuplayErrorType.PLAYER, { | |
error: e | |
}); | |
a._eventBus.publish(new p.ErrorEvent( | |
t)) | |
}, a._uniqueDivId = d.UUID.UUID(), a | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
this._eventBus = e.getDependency(u.default | |
.IEventBus), this._config = e.getDependency( | |
u.default.IConfig) | |
}, n.prototype.load = function() { | |
var t = this; | |
return this._createYoutubeDiv(), new e( | |
function(e, n) { | |
if (window.YT) return void t | |
._onYouTubeIframeAPIReady( | |
e); | |
h.Helpers.loadScript(t.playerConfig | |
.jsUrl, | |
function() { | |
return !0 | |
}).then(function() { | |
try { | |
window.onYouTubeIframeAPIReady = | |
function() { | |
t._onYouTubeIframeAPIReady( | |
e | |
) | |
} | |
} catch (e) { | |
var r = new l | |
.VuplayError( | |
"failed to load youtube player", | |
l.VuplayErrorType | |
.PLAYER, { | |
error: e | |
}); | |
n(r) | |
} | |
}).catch(function(e) { | |
n(e) | |
}) | |
}) | |
}, n.prototype._onYouTubeIframeAPIReady = | |
function(e) { | |
var t = this, | |
n = { | |
videoId: "", | |
playerVars: { | |
autoplay: this._config.getAutoStart() ? | |
1 : 0 | |
}, | |
events: { | |
onReady: function() { | |
e && e(t) | |
}, | |
onStateChange: this._onYoutubePlayerStateChange, | |
onPlaybackRateChange: this._onPlaybackRateChange, | |
onError: this._onError | |
} | |
}; | |
this._youtubePlayer = new YT.Player( | |
this._config.getContainerDiv().id + | |
"-youtube-" + this._uniqueDivId, | |
n) | |
}, n.prototype._createYoutubeDiv = function() { | |
var e = document.createElement("div"); | |
e.id = this._config.getContainerDiv().id + | |
"-youtube-" + this._uniqueDivId, e.style | |
.width = "100%", e.style.height = | |
"100%"; | |
var t = this._config.getPlayerDiv(); | |
t.style.width = "100%", t.style.height = | |
"100%", t.appendChild(e), this._eventBus | |
.publish(new c.LogDebug( | |
"added youtube div to the dom", { | |
youtubeDiv: e | |
})) | |
}, n.prototype.play = function() { | |
this._youtubePlayer.playVideo() | |
}, n.prototype.pause = function() { | |
this._youtubePlayer.pauseVideo() | |
}, n.prototype.isPaused = function() { | |
return this._youtubePlayer.getPlayerState() === | |
YT.PlayerState.PAUSED | |
}, n.prototype.reset = function() { | |
this._youtubePlayer.destroy(), this._createYoutubeDiv(), | |
this._onYouTubeIframeAPIReady() | |
}, n.prototype.setSrc = function() { | |
this._youtubePlayer.cueVideoById(this.getSrc()), | |
this._config.getAutoStart() && this | |
._youtubePlayer.playVideo() | |
}, n.prototype.getSrc = function() { | |
return this._config.getSrc() | |
}, n.prototype.getCurrentTime = function() { | |
return this._youtubePlayer.getCurrentTime() | |
}, n.prototype.getDuration = function() { | |
return this._youtubePlayer.getDuration() | |
}, n.prototype.seek = function(e) { | |
return this._youtubePlayer.seekTo(e, !0) | |
}, n.prototype.skipTo = function(e) { | |
return this._youtubePlayer.seekTo(this._youtubePlayer | |
.getCurrentTime() + e, !0) | |
}, n.prototype.getVolume = function() { | |
return this._youtubePlayer.getVolume() / | |
100 | |
}, n.prototype.setVolume = function(e) { | |
return this._youtubePlayer.setVolume( | |
100 * e) | |
}, n.prototype.getTextTracks = function() { | |
return this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support getting text tracks. An empty array will be returned." | |
)), [] | |
}, n.prototype.setTextTrack = function(e) { | |
this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support setting text tracks. Text track will not be set.", { | |
id: e | |
})) | |
}, n.prototype.getAudioTracks = function() { | |
return this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support getting audio tracks. An empty array will be returned." | |
)), [] | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
return this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support getting audio tracks. Null will be returned." | |
)), null | |
}, n.prototype.setAudioTrack = function(e) { | |
this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support setting audio tracks. Text track will not be set.", { | |
id: e | |
})) | |
}, n.prototype.setFullScreen = function(e) { | |
this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not allow programmatically setting fullscreen." | |
)) | |
}, n.prototype.isFullScreen = function() { | |
return this._eventBus.publish(new s.LogWarn( | |
"youtube implementation cannot determine the fullscreen mode. Will return null." | |
)), null | |
}, n.prototype.scheduleAd = function(e) { | |
this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support ads. Ad will not be scheduled", { | |
ad: e | |
})) | |
}, n.prototype.skipCurrentAd = function() { | |
return this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support ads. Ad will not be skipped", {} | |
)), !1 | |
}, n.prototype.getUtcTime = function() { | |
return this._eventBus.publish(new s.LogWarn( | |
"youtube implementation does not support UTC time codes. Null will be returned", { | |
currentTime: this.getCurrentTime() | |
})), null | |
}, n.prototype._resizePlayerDiv = function() { | |
var e = this._config.getContainerDiv(); | |
e.style.height = e.offsetWidth / 16 * 9 + | |
"px" | |
}, n.prototype._onUnstarted = function(e) { | |
var t = new c.LogDebug( | |
"unstarted event fired by youtube implementation", { | |
event: e | |
}); | |
this._eventBus.publish(t) | |
}, n.prototype._onEnded = function() { | |
var e = new o.MediaEvent(i.EventName.ended, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaying = function() { | |
this._sendBufferComplete(); | |
var e = new o.MediaEvent(i.EventName.playing, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPaused = function() { | |
this._sendBufferComplete(); | |
var e = this.getCurrentTime() >= this.getDuration(), | |
t = new o.MediaEvent(i.EventName.pause, { | |
ended: e | |
}); | |
this._eventBus.publish(t) | |
}, n.prototype._sendBufferComplete = | |
function() { | |
if (this._isBuffering) { | |
this._isBuffering = !1; | |
var e = new o.MediaEvent(i.EventName | |
.bufferend, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
} | |
}, n.prototype._onBuffering = function() { | |
this._isBuffering = !0; | |
var e = new o.MediaEvent(i.EventName.bufferstart, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
}, n.prototype._onCued = function(e) { | |
this._resizePlayerDiv(); | |
var t = new o.MediaEvent(i.EventName.loadsrc, { | |
src: this._youtubePlayer.getVideoUrl() | |
}); | |
this._eventBus.publish(t) | |
}, n | |
}(a.VuplayPlayer); | |
t.YoutubeWrapper = f | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(5), | |
o = n(15), | |
s = n(0), | |
a = n(2), | |
u = n(11), | |
c = n(21), | |
l = n(29), | |
p = n(30), | |
h = n(10), | |
d = function(t) { | |
function n(e, n, r) { | |
var s = t.call(this, e, n, r) || this; | |
return s.playerId = e, s.playerConfig = n, | |
s.drmProviders = r, s._onTextTrackAdded = | |
function(e) { | |
if (s.getTextTracks().length > 0) { | |
var t = new o.MediaEvent(i.EventName | |
.texttrackadded, { | |
textTrack: e.track | |
}); | |
s._eventBus.publish(t) | |
} | |
}, s | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
this._eventBus = e.getDependency(a.default | |
.IEventBus), this._config = e.getDependency( | |
a.default.IConfig) | |
}, n.prototype.load = function() { | |
var t = this; | |
return this._checkForPlayerLoaded() || | |
this._loadPlayerIntoDom(), new e( | |
function(e, n) { | |
var r = setInterval( | |
function() { | |
t._checkForPlayerLoaded() && | |
( | |
clearInterval( | |
r), | |
t._setUpHLS(), | |
e(t)) | |
}, 50) | |
}) | |
}, n.prototype._loadPlayerIntoDom = | |
function() { | |
var e = document.createElement("script"); | |
e.type = "text/javascript", e.src = | |
this.playerConfig.jsUrl, document.body | |
.appendChild(e), this._eventBus.publish( | |
new u.LogDebug( | |
"adding player js to the dom", { | |
scriptElement: e | |
})) | |
}, n.prototype._checkForPlayerLoaded = | |
function() { | |
return void 0 === Vuplay.HLS || null === | |
Vuplay.HLS ? (this._eventBus.publish( | |
new u.LogDebug( | |
"still loading the player into the dom" | |
)), !1) : (this._eventBus.publish( | |
new u.LogDebug( | |
"player loaded into the dom" | |
)), !0) | |
}, n.prototype._setUpHLS = function() { | |
this._hlsPlayer = new Vuplay.HLS({ | |
container: this._config.getPlayerDiv(), | |
autostart: this._config.getAutoStart(), | |
source: this.getSrc(), | |
debug: !0, | |
drmToken: this._config.getVudrmToken(), | |
overrideLaUrl: this.drmProviders | |
.fairplay.laUrl, | |
overrideDrmCertUrl: this.drmProviders | |
.fairplay.certUrl | |
}), this._subscribeToHLSEvents() | |
}, n.prototype.getSrc = function() { | |
var e = this._config.getSrc(), | |
t = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlRegex : this.playerConfig.ismRegex, | |
n = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlReplacement : this.playerConfig | |
.ismReplacement; | |
return e.replace(t, n) | |
}, n.prototype.play = function() { | |
this._hlsPlayer.play() | |
}, n.prototype.pause = function() { | |
this._hlsPlayer.pause() | |
}, n.prototype.isPaused = function() { | |
return this._hlsPlayer.isPaused() | |
}, n.prototype.reset = function() { | |
this._hlsPlayer.reset() | |
}, n.prototype.scheduleAd = function(e) { | |
this._eventBus.publish(new h.LogWarn( | |
"vuplay hls implementation does not support ads. Ad will not be scheduled", { | |
ad: e | |
})) | |
}, n.prototype.skipCurrentAd = function() { | |
return this._eventBus.publish(new h.LogWarn( | |
"vuplay hls implementation does not support ads. Ad will not be skipped", {} | |
)), !1 | |
}, n.prototype.setSrc = function() { | |
this._config.getVudrmToken() && this._hlsPlayer | |
.setVudrmToken(this._config.getVudrmToken()), | |
this._eventBus.publish(new o.MediaEvent( | |
i.EventName.loadsrc, { | |
src: this._config.getSrc(), | |
player: this.playerId | |
})), this._hlsPlayer.setSrc( | |
this.getSrc()) | |
}, n.prototype.getCurrentTime = function() { | |
return this._hlsPlayer.getCurrentTime() | |
}, n.prototype.getDuration = function() { | |
return this._hlsPlayer.getDuration() | |
}, n.prototype.seek = function(e) { | |
this._hlsPlayer.seek(e) | |
}, n.prototype.skipTo = function(e) { | |
this._hlsPlayer.seek(this._hlsPlayer.getCurrentTime() + | |
e) | |
}, n.prototype.getVolume = function() { | |
return this._hlsPlayer.getVolume() | |
}, n.prototype.setVolume = function(e) { | |
this._hlsPlayer.setVolume(e) | |
}, n.prototype.getTextTracks = function() { | |
for (var e = [], t = this._hlsPlayer.getVideoElement() | |
.textTracks, n = 0; n < t.length; n++) { | |
var r = t[n].id; | |
"" === r && (r = n); | |
var i = new p.TextTrack(r, t[n].language, | |
t[n].label, t[n].kind, !1); | |
e.push(i) | |
} | |
return 1 === e.length && "" === e[0].label && | |
"" === e[0].lang && (e = []), e | |
}, n.prototype.setTextTrack = function(e) { | |
for (var t = 0; t < this._hlsPlayer.getVideoElement() | |
.textTracks.length; t++) { | |
var n = this._hlsPlayer.getVideoElement() | |
.textTracks[t].id; | |
e.toString() === n || "" === n && e === | |
t ? this._hlsPlayer.getVideoElement() | |
.textTracks[t].mode = "showing" : | |
this._hlsPlayer.getVideoElement() | |
.textTracks[t].mode = | |
"disabled" | |
} | |
}, n.prototype.getAudioTracks = function() { | |
for (var e = [], t = this._hlsPlayer.getVideoElement() | |
.audioTracks, n = 0; n < t.length; n++) { | |
var r = t[n].id; | |
"" === r && (r = n); | |
var i = new l.AudioTrack(r, t[n].language, | |
t[n].enabled); | |
e.push(i) | |
} | |
return e | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
for (var e = null, t = this.getAudioTracks(), | |
n = 0; n < t.length; n++) t[n].isActive && | |
(e = t[n]); | |
return e | |
}, n.prototype.setAudioTrack = function(e) { | |
for (var t = 0; t < this._hlsPlayer.getVideoElement() | |
.audioTracks.length; t++) { | |
var n = this._hlsPlayer.getVideoElement() | |
.audioTracks[t]; | |
if (e.toString() === n.id || "" === | |
n.id && e === t) { | |
n.enabled = !0; | |
var r = new l.AudioTrack(n.id, | |
n.language, n.enabled); | |
this._eventBus.publish(new o.MediaEvent( | |
i.EventName.audiotrackchanged, { | |
track: r | |
})) | |
} else this._hlsPlayer.getVideoElement() | |
.audioTracks[t].enabled = !1 | |
} | |
}, n.prototype.setFullScreen = function(e) { | |
this._supportsFullScreen() && (e && ! | |
this.isFullScreen() ? this._enterFullScreen() : | |
this._exitFullScreen()) | |
}, n.prototype.getUtcTime = function() { | |
var e = new s.VuplayError( | |
"Method not implemented.", s.VuplayErrorType | |
.PLAYER, {}); | |
return this._eventBus.publish(new h.LogWarn( | |
"Method not implemented.", { | |
error: e | |
})), null | |
}, n.prototype._supportsFullScreen = | |
function() { | |
var e = document; | |
return !(document.fullscreenEnabled && | |
e.mozFullScreenEnabled && e.webkitFullscreenEnabled && | |
e.msFullscreenEnabled) | |
}, n.prototype._isIOS = function() { | |
return /iPad|iPhone|iPod/.test( | |
navigator.userAgent) && !window | |
.MSStream | |
}, n.prototype.isFullScreen = function() { | |
var e = document; | |
return !!(document.fullscreenElement || | |
e.mozFullScreenElement || e.webkitFullscreenElement || | |
e.msFullscreenElement) | |
}, n.prototype._enterFullScreen = function() { | |
var e = this._isIOS() ? this._hlsPlayer | |
.getVideoElement() : this._config.getPlayerDiv(); | |
e.requestFullscreen ? e.requestFullscreen() : | |
e.mozRequestFullScreen ? e.mozRequestFullScreen() : | |
e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : | |
e.webkitEnterFullscreen ? e.webkitEnterFullscreen() : | |
e.msRequestFullscreen && e.msRequestFullscreen() | |
}, n.prototype._exitFullScreen = function() { | |
var e = document; | |
document.exitFullscreen ? document.exitFullscreen() : | |
document.webkitExitFullscreen ? | |
document.webkitExitFullscreen() : e | |
.mozCancelFullScreen ? e.mozCancelFullScreen() : | |
e.msExitFullscreen && e.msExitFullscreen() | |
}, n.prototype._subscribeToHLSEvents = | |
function() { | |
var e = this; | |
document.addEventListener( | |
"webkitfullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"mozfullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"MSFullscreenChange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"fullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.ERROR, | |
function() { | |
e._onError() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.CANPLAY, | |
function() { | |
e._onCanPlay() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.WAITING, | |
function() { | |
e._onWaiting() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.PLAYING, | |
function() { | |
e._onPlaybackPlaying() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.PLAY, | |
function() { | |
e._onPlaybackStarted() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.PAUSE, | |
function() { | |
e._onPlaybackPaused() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.SEEKING, | |
function() { | |
e._onPlaybackSeeking() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.SEEKED, | |
function() { | |
e._onPlaybackSeeked() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.RATECHANGE, | |
function() { | |
e._onPlaybackRateChanged() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.PROGRESS, | |
function() { | |
e._onPlaybackProgress() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.TIMEUPDATE, | |
function() { | |
e._onPlaybackTimeUpdated() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.ENDED, | |
function() { | |
e._onPlaybackEnded() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.LOADEDMETADATA, | |
function() { | |
e._onPlaybackMetadataLoaded() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.LOADEDDATA, | |
function() { | |
e._onLoadedData() | |
}), this._hlsPlayer.addEventListener( | |
Vuplay.HLS.events.VOLUMECHANGE, | |
function() { | |
e._onVolumeChange() | |
}), this._hlsPlayer.getVideoElement() | |
.textTracks.onaddtrack = this._onTextTrackAdded | |
}, n.prototype._fullScreenChangeHandler = | |
function(e) { | |
this._eventBus.publish(new o.MediaEvent( | |
i.EventName.fullscreenchanged, { | |
isFullScreen: this.isFullScreen() | |
})) | |
}, n.prototype._onError = function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.ERROR, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onCanPlay = function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.CANPLAY, {}); | |
this._eventBus.publish(e), this.setTextTrack(- | |
1), this._eventBus.publish(new o | |
.MediaEvent(i.EventName.audiotrackchanged, { | |
track: this.getEnabledAudioTrack() | |
})) | |
}, n.prototype._onWaiting = function() { | |
var e = new o.MediaEvent(i.EventName.bufferstart, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackPlaying = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.PLAYING, {}); | |
this._eventBus.publish(e); | |
var t = new o.MediaEvent(i.EventName.bufferend, {}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlaybackStarted = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.PLAY, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackPaused = function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.PAUSE, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackSeeking = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.SEEKING, {}); | |
this._eventBus.publish(e); | |
var t = new o.MediaEvent(i.EventName.bufferstart, {}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlaybackSeeked = function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.SEEKED, {}); | |
this._eventBus.publish(e); | |
var t = new o.MediaEvent(i.EventName.bufferend, {}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlaybackRateChanged = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.RATECHANGE, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackProgress = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.PROGRESS, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackTimeUpdated = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.TIMEUPDATE, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackEnded = function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.ENDED, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onPlaybackMetadataLoaded = | |
function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.LOADEDMETADATA, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onLoadedData = function() { | |
var e = new o.MediaEvent(i.EventName.loadeddata, {}); | |
this._eventBus.publish(e) | |
}, n.prototype._onVolumeChange = function() { | |
var e = new o.MediaEvent(Vuplay.HLS.events | |
.VOLUMECHANGE, { | |
volume: this.getVolume() | |
}); | |
this._eventBus.publish(e) | |
}, n | |
}(c.VuplayPlayer); | |
t.VuplayHLSWrapper = d | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(11), | |
o = n(16), | |
s = n(5), | |
a = n(15), | |
u = n(21), | |
c = n(0), | |
l = n(14), | |
p = n(32), | |
h = n(2), | |
d = n(10), | |
f = function(t) { | |
function n(e, n, r) { | |
var s = t.call(this, e, n, r) || this; | |
return s.getVuplayJavascriptPlayer = | |
function() { | |
return s | |
}, s._propagateEvent = function(e) { | |
var t = e; | |
if ("string" == typeof t && (t = | |
JSON.parse(e)), "error" === | |
t.type) { | |
var n = new c.VuplayError(t.message, | |
c.VuplayErrorType.PLAYER, { | |
args: t.args | |
}), | |
r = new o.ErrorEvent(n); | |
s._eventBus.publish(r) | |
} else s._eventBus.publish(new i.LogDebug( | |
t.message, t.args)) | |
}, s._checkPlayerloaded = function() { | |
return void 0 !== s._silverlightPlayer && | |
null !== s._silverlightPlayer | |
}, s._xapDownloadUrl = s.playerConfig.xapUrl, | |
window.onVuplaySilverlightAppStartUp = | |
s._propagateEvent, window.onVuplaySilverlightAppExit = | |
s._propagateEvent, window.onVuplaySilverlightAppException = | |
s._propagateEvent, window.getVuplayJavascriptPlayer = | |
s.getVuplayJavascriptPlayer, s | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
this._eventBus = e.getDependency(h.default | |
.IEventBus), this._config = e.getDependency( | |
h.default.IConfig) | |
}, n.prototype.load = function() { | |
var t = this; | |
return this._setUpSilverlightPlayer(), | |
new e(function(e, n) { | |
l.Helpers.loadScript(t.playerConfig | |
.jsUrl, t._checkPlayerloaded | |
).then(function() { | |
t._loadPlaylist(), | |
t._subscribeToSilverlightEvents(), | |
e(t) | |
}).catch(function(e) { | |
n(e) | |
}) | |
}) | |
}, n.prototype.play = function() { | |
this._silverlightPlayer.Play() | |
}, n.prototype.pause = function() { | |
this._silverlightPlayer.Pause() | |
}, n.prototype.setAutoplay = function(e) { | |
this._silverlightPlayer.SetAutoPlay(e) | |
}, n.prototype.scheduleAd = function(e) { | |
this._eventBus.publish(new d.LogWarn( | |
"vuplay silverlight implementation does not support ads. Ad will not be scheduled", { | |
ad: e | |
})) | |
}, n.prototype.skipCurrentAd = function() { | |
return this._eventBus.publish(new d.LogWarn( | |
"vuplay silverlight implementation does not support ads. Ad will not be skipped", {} | |
)), !1 | |
}, n.prototype._setUpSilverlightPlayer = | |
function() { | |
this._createSilverlightObject(), this._createHTML(); | |
var e = this._config.getPlayerDiv(); | |
e.innerHTML = "", e.appendChild(this._silverlightControlHost) | |
}, n.prototype._subscribeToSilverlightEvents = | |
function() {}, n.prototype._onError = | |
function(e) { | |
var t = new c.VuplayError("error: " + e | |
.error, c.VuplayErrorType.PLAYER, { | |
error: e | |
}), | |
n = new o.ErrorEvent(t); | |
this._eventBus.publish(n) | |
}, n.prototype.onSilverlightLoaded = | |
function() { | |
this._silverlightPlayer = this._silverlightObject | |
.Content.VuplaySilverlightPlayer | |
}, n.prototype._loadPlaylist = function() { | |
var e = this._config.getVudrmToken(); | |
void 0 === e && (e = ""); | |
var t = this.getSrc(), | |
n = { | |
source: t, | |
autoStart: this._config.getAutoStart() | |
.toString(), | |
preferInStreamCaptions: !0, | |
drmToken: e, | |
laUrl: "" !== e ? this.drmProviders | |
.playReady.laUrl : "" | |
}, | |
r = JSON.stringify(n); | |
this._eventBus.publish(new a.MediaEvent( | |
s.EventName.loadsrc, { | |
src: this.getSrc(), | |
player: this.playerId | |
})), this._silverlightPlayer.SetPlaylist( | |
r) | |
}, n.prototype.getSrc = function() { | |
var e = this._config.getSrc(), | |
t = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlRegex : this.playerConfig.ismRegex, | |
n = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlReplacement : this.playerConfig | |
.ismReplacement; | |
return e.replace(t, n) | |
}, n.prototype.reset = function() { | |
this._silverlightObject.parentElement.innerHtml = | |
"" | |
}, n.prototype.isPaused = function() { | |
return this._silverlightPlayer.IsPaused() | |
}, n.prototype.isFullScreen = function() { | |
return this._silverlightPlayer.IsFullScreen() | |
}, n.prototype.setFullScreen = function() { | |
var e = new c.VuplayError( | |
"set fullscreen must be user initiated in silverlight", | |
c.VuplayErrorType.PLAYER, {}), | |
t = new o.ErrorEvent(e); | |
this._eventBus.publish(t) | |
}, n.prototype.seek = function(e) { | |
this._silverlightPlayer.Seek(e) | |
}, n.prototype.skipTo = function(e) { | |
var t = new c.VuplayError( | |
"Skipping has not been implemented in silverlight", | |
c.VuplayErrorType.PLAYER, {}), | |
n = new o.ErrorEvent(t); | |
this._eventBus.publish(n) | |
}, n.prototype.getVolume = function() { | |
return this._silverlightPlayer.GetVolume() | |
}, n.prototype.setVolume = function(e) { | |
this._silverlightPlayer.SetVolume(e) | |
}, n.prototype.getAudioTracks = function() { | |
return new Array | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
return null | |
}, n.prototype.setAudioTrack = function(e) {}, | |
n.prototype.setSrc = function() { | |
this._loadPlaylist() | |
}, n.prototype.getCurrentTime = function() { | |
return this._silverlightPlayer.GetCurrentTime() | |
}, n.prototype.getDuration = function() { | |
return this._silverlightPlayer.GetDuration() | |
}, n.prototype.getTextTracks = function() { | |
return new Array | |
}, n.prototype.setTextTrack = function(e) { | |
var t = new c.VuplayError( | |
"setting external subtitles has not been implemented in silverlight", | |
c.VuplayErrorType.PLAYER, {}), | |
n = new o.ErrorEvent(t); | |
this._eventBus.publish(n) | |
}, n.prototype.getUtcTime = function() { | |
var e = new c.VuplayError( | |
"Method not implemented.", c.VuplayErrorType | |
.PLAYER, {}); | |
return this._eventBus.publish(new d.LogWarn( | |
"Method not implemented.", { | |
error: e | |
})), null | |
}, n.prototype._createSilverlightObject = | |
function() { | |
this._silverlightObject = document.createElement( | |
"object"), l.Helpers.setAttributes( | |
this._silverlightObject, { | |
data: "data:application/x-silverlight-2,", | |
type: "application/x-silverlight-2", | |
width: "100%", | |
height: "100%" | |
}); | |
var e = document.createElement("param"); | |
l.Helpers.setAttributes(e, { | |
name: "source", | |
value: this._xapDownloadUrl | |
}), this._silverlightObject.appendChild( | |
e); | |
var t = document.createElement("param"); | |
l.Helpers.setAttributes(t, { | |
name: "background", | |
value: "white" | |
}), this._silverlightObject.appendChild( | |
t); | |
var n = document.createElement("param"); | |
l.Helpers.setAttributes(n, { | |
name: "minRuntimeVersion", | |
value: p.silverlightMinRuntimeVersion | |
}), this._silverlightObject.appendChild( | |
n); | |
var r = document.createElement("param"); | |
l.Helpers.setAttributes(r, { | |
name: "autoUpgrade", | |
value: "true" | |
}), this._silverlightObject.appendChild( | |
r); | |
var i = document.createElement("param"); | |
l.Helpers.setAttributes(i, { | |
name: "enableHtmlAccess", | |
value: !0 | |
}), this._silverlightObject.appendChild( | |
i); | |
var o = document.createElement("a"); | |
l.Helpers.setAttributes(o, { | |
href: "http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0", | |
style: "text-decoration: none" | |
}), this._silverlightObject.appendChild( | |
o); | |
var s = document.createElement("img"); | |
l.Helpers.setAttributes(s, { | |
src: "http://go.microsoft.com/fwlink/?LinkId=161376", | |
alt: "Get Microsoft Silverlight", | |
style: "border-style: none" | |
}), o.appendChild(s) | |
}, n.prototype._createHTML = function() { | |
var e = this._config.getPlayerDiv(), | |
t = e.clientWidth <= 0 ? 640 : e.clientWidth, | |
n = t / 16 * 9; | |
window.addEventListener("resize", this._onWindowResize | |
.bind(this)); | |
var r = "width: " + t + "px;height: " + | |
n + "px;"; | |
this._silverlightControlHost = document | |
.createElement("div"), l.Helpers.setAttributes( | |
this._silverlightControlHost, { | |
id: "vuplaySilverlightControlHost", | |
style: r | |
}), this._silverlightControlHost | |
.appendChild(this._silverlightObject); | |
var i = document.createElement("iframe"); | |
l.Helpers.setAttributes(i, { | |
id: "_sl_historyFrame", | |
style: "visibility: hidden; height: 0px; width: 0px; border: 0px" | |
}), this._silverlightControlHost.appendChild( | |
i) | |
}, n.prototype._onWindowResize = function() { | |
var e = this._config.getPlayerDiv(), | |
t = e.clientWidth <= 0 ? 640 : e.clientWidth, | |
n = t / 16 * 9, | |
r = "width: " + t + "px;height: " + | |
n + "px;"; | |
this._silverlightControlHost.setAttribute( | |
"style", r) | |
}, n | |
}(u.VuplayPlayer); | |
t.SilverlightWrapper = f | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(10), | |
o = n(30), | |
s = n(16), | |
a = n(0), | |
u = n(21), | |
c = n(2), | |
l = n(15), | |
p = n(0), | |
h = n(29), | |
d = n(5), | |
f = n(27), | |
y = n(11), | |
v = n(14), | |
_ = function(t) { | |
function n(e, n, r) { | |
var i = t.call(this, e, n, r) || this; | |
return i._hasEnded = !1, i._checkForPlayerLoaded = | |
function() { | |
return "undefined" == typeof dashjs || | |
null === dashjs ? (i._eventBus.publish( | |
new y.LogDebug( | |
"still loading the player into the dom" | |
)), !1) : (i._eventBus.publish( | |
new y.LogDebug( | |
"player loaded into the dom" | |
)), !0) | |
}, i._setUpDashJs = function() { | |
i._dashJsPlayer = (new dashjs.MediaPlayer) | |
.create(), i._subscribeToDashJsEvents(), | |
i._dashJsPlayer.getDebug().setLogToBrowserConsole(! | |
1), i._extendDashJs(), i._dashJsPlayer | |
.initialize(), i._dashJsPlayer.attachView( | |
i._videoElement), i._dashJsPlayer | |
.attachVideoContainer(i._config | |
.getPlayerDiv()), i._dashJsPlayer | |
.attachTTMLRenderingDiv(i._ttmlRenderingDiv), | |
i._dashJsPlayer.setAutoPlay(i._config | |
.getAutoStart()), i._eventBus | |
.publish(new y.LogDebug( | |
"dash js set up", { | |
_dashJsPlayer: i._dashJsPlayer | |
})) | |
}, i._subscribeToDashJsEvents = | |
function() { | |
document.addEventListener( | |
"webkitfullscreenchange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), document.addEventListener( | |
"mozfullscreenchange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), document.addEventListener( | |
"MSFullscreenChange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), document.addEventListener( | |
"fullscreenchange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), i._videoElement.addEventListener( | |
"volumechange", | |
function(e) { | |
i._onVolumeChange(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.ERROR, | |
function(e) { | |
i._onPlaybackError(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.CAN_PLAY, | |
function(e) { | |
i._onCanPlay(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_PLAYING, | |
function(e) { | |
i._onPlaybackPlaying(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_STARTED, | |
function(e) { | |
i._onPlaybackStarted(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_PAUSED, | |
function(e) { | |
i._onPlayBackPaused(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_SEEKING, | |
function(e) { | |
i._onPlaybackSeeking(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_SEEKED, | |
function(e) { | |
i._onPlaybackSeeked(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_RATE_CHANGED, | |
function(e) { | |
i._onPlaybackRateChanged( | |
e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_PROGRESS, | |
function(e) { | |
i._onPlaybackProgress(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_TIME_UPDATED, | |
function(e) { | |
i._onPlaybackTimeUpdated( | |
e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_ENDED, | |
function(e) { | |
i._onPlaybackEnded(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.STREAM_INITIALIZED, | |
function(e) { | |
i._onStreamInitialized( | |
e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED, | |
function(e) { | |
i._onPlaybackMetadataLoaded( | |
e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.TEXT_TRACK_ADDED, | |
function(e) { | |
i._onTextTrackAdded(e) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.LOG, | |
function(e) { | |
i._eventBus.publish(new y | |
.LogDebug( | |
"dashjs log", { | |
e: e | |
})) | |
}), i._dashJsPlayer.on( | |
dashjs.MediaPlayer.events.BUFFER_EMPTY, | |
function(e) { | |
i._onBufferEmpty(e) | |
}) | |
}, i._simulateEnded = function() { | |
if (!1 === i._hasEnded) { | |
i._eventBus.publish(new f.LogInfo( | |
"simulating ended event in dash.js due to an issue with the content.", { | |
currentTime: i.getCurrentTime(), | |
duration: i.getDuration() | |
})), i.pause(); | |
var e = { | |
timeToEnd: i.getDuration() - | |
i.getCurrentTime() | |
}; | |
i._onPlaybackEnded(e) | |
} | |
}, i | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
this._eventBus = e.getDependency(c.default | |
.IEventBus), this._config = e.getDependency( | |
c.default.IConfig) | |
}, n.prototype.load = function() { | |
var t = this; | |
return new e(function(e, n) { | |
v.Helpers.loadScript(t.playerConfig | |
.jsUrl, t._checkForPlayerLoaded | |
).then(function() { | |
t._createVideoElementAndTTMLRenderingDiv(), | |
t._setUpDashJs(), | |
e(t) | |
}).catch(function(e) { | |
n(e) | |
}) | |
}) | |
}, n.prototype.play = function() { | |
var e = this.getDuration() - this.getCurrentTime(); | |
this._hasEnded && e < 1 && this.seek(0), | |
this._dashJsPlayer.play() | |
}, n.prototype.pause = function() { | |
this._dashJsPlayer.pause() | |
}, n.prototype.isPaused = function() { | |
return this._dashJsPlayer.isPaused() | |
}, n.prototype.getCurrentTime = function() { | |
var e = this._dashJsPlayer.time(); | |
return this._config.isLive() ? -1 * ( | |
this.getDuration() - e) : e | |
}, n.prototype.getDuration = function() { | |
return this._config.isLive() ? this._dashJsPlayer | |
.getDVRWindowSize() : this._dashJsPlayer | |
.duration() | |
}, n.prototype.seek = function(e) { | |
this._dashJsPlayer.seek(e) | |
}, n.prototype.skipTo = function(e) { | |
this._dashJsPlayer.seek(this._dashJsPlayer | |
.time() + e) | |
}, n.prototype.reset = function() { | |
this._dashJsPlayer.reset(), this._dashJsPlayer | |
.attachView(this._videoElement) | |
}, n.prototype.getVolume = function() { | |
return this._videoElement.volume | |
}, n.prototype.setVolume = function(e) { | |
this._videoElement.volume = e | |
}, n.prototype.getTextTracks = function() { | |
for (var e = this._dashJsPlayer.getTracksFor( | |
"fragmentedText"), t = new Array, | |
n = 0; n < e.length; n++) { | |
var r = new o.TextTrack(n, e[n].lang, | |
e[n].label, e[n].kind, !1); | |
t.push(r) | |
} | |
return t | |
}, n.prototype.setTextTrack = function(e) { | |
this._dashJsPlayer.setTextTrack(e) | |
}, n.prototype.getAudioTracks = function() { | |
var e = this._dashJsPlayer.getTracksFor( | |
"audio"), | |
t = this._dashJsPlayer.getCurrentTrackFor( | |
"audio"), | |
n = new Array; | |
return e.forEach(function(e) { | |
var r = e.index === t.index; | |
n.push(new h.AudioTrack(e.index, | |
e.lang, r)) | |
}), n | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
for (var e = null, t = this.getAudioTracks(), | |
n = 0; n < t.length; n++) t[n].isActive && | |
(e = t[n]); | |
return e | |
}, n.prototype.setAudioTrack = function(e) { | |
var t = this._dashJsPlayer.getTracksFor( | |
"audio"); | |
this._dashJsPlayer.setCurrentTrack(t[e]); | |
var n = new h.AudioTrack(t[e].index, t[ | |
e].lang, !0); | |
this._eventBus.publish(new l.MediaEvent( | |
d.EventName.audiotrackchanged, { | |
track: n | |
})) | |
}, n.prototype.setFullScreen = function(e) { | |
this._supportsFullScreen() && (e && ! | |
this.isFullScreen() ? this._enterFullScreen() : | |
this._exitFullScreen()) | |
}, n.prototype.scheduleAd = function(e) { | |
this._eventBus.publish(new i.LogWarn( | |
"dash.js implementation does not support ads. Ad will not be scheduled", { | |
ad: e | |
})) | |
}, n.prototype.skipCurrentAd = function() { | |
return this._eventBus.publish(new i.LogWarn( | |
"dash.js implementation does not support ads. Ad will not be skipped", {} | |
)), !1 | |
}, n.prototype._supportsFullScreen = | |
function() { | |
var e = document; | |
return !(document.fullscreenEnabled && | |
e.mozFullScreenEnabled && e.webkitFullscreenEnabled && | |
e.msFullscreenEnabled) | |
}, n.prototype._isIOS = function() { | |
return /iPad|iPhone|iPod/.test( | |
navigator.userAgent) && !window | |
.MSStream | |
}, n.prototype.isFullScreen = function() { | |
var e = document; | |
return !!(document.fullscreenElement || | |
e.mozFullScreenElement || e.webkitFullscreenElement || | |
e.msFullscreenElement) | |
}, n.prototype._enterFullScreen = function() { | |
var e = this._isIOS() ? this._dashJsPlayer | |
.getVideoElement() : this._config.getPlayerDiv(); | |
e.requestFullscreen ? e.requestFullscreen() : | |
e.mozRequestFullScreen ? e.mozRequestFullScreen() : | |
e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : | |
e.webkitEnterFullscreen ? e.webkitEnterFullscreen() : | |
e.msRequestFullscreen && e.msRequestFullscreen() | |
}, n.prototype._exitFullScreen = function() { | |
var e = document; | |
document.exitFullscreen ? document.exitFullscreen() : | |
document.webkitExitFullscreen ? | |
document.webkitExitFullscreen() : e | |
.mozCancelFullScreen ? e.mozCancelFullScreen() : | |
e.msExitFullscreen && e.msExitFullscreen() | |
}, n.prototype.setSrc = function() { | |
this._dashJsPlayer.setAutoPlay(this._config | |
.getAutoStart()), this._config.getIsDrmRequired() && | |
this._setProtectionData(), null !== | |
this._config.getSrc() && "" !== | |
this._config.getSrc() && (this._eventBus | |
.publish(new l.MediaEvent(d.EventName | |
.loadsrc, { | |
src: this._config.getSrc(), | |
player: this.playerId | |
})), this._dashJsPlayer.attachSource( | |
this.getSrc())) | |
}, n.prototype.getUtcTime = function() { | |
return new Date(1e3 * this._dashJsPlayer | |
.timeAsUTC()) | |
}, n.prototype.getSrc = function() { | |
var e = this._config.getSrc(), | |
t = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlRegex : this.playerConfig.ismRegex, | |
n = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlReplacement : this.playerConfig | |
.ismReplacement; | |
return e.replace(t, n) | |
}, n.prototype._setProtectionData = | |
function() { | |
var e = this.drmProviders.playReady.laUrl + | |
"?token=" + encodeURIComponent(this | |
._config.getVudrmToken()), | |
t = this.drmProviders.widevine.laUrl, | |
n = { | |
"com.widevine.alpha": { | |
serverURL: t, | |
httpRequestHeaders: {} | |
}, | |
"com.microsoft.playready": { | |
serverURL: e, | |
httpRequestHeaders: {} | |
} | |
}; | |
this._dashJsPlayer.setProtectionData(n), | |
this._eventBus.publish(new y.LogDebug( | |
"protection data set on dash js", { | |
protData: n | |
})) | |
}, n.prototype._createVideoElementAndTTMLRenderingDiv = | |
function() { | |
this._eventBus.publish(new y.LogDebug( | |
"creating video element and ttml rendering div for dash js", { | |
_videoElement: this._videoElement | |
})), this._videoElement = | |
document.createElement("video"), | |
this._videoElement.setAttribute( | |
"id", "vuplay-video"), this._config | |
.getPlayerDiv().appendChild(this._videoElement), | |
this._ttmlRenderingDiv = document.createElement( | |
"div"), this._ttmlRenderingDiv.setAttribute( | |
"id", | |
"vuplay-ttml-rendering-div"), | |
this._config.getPlayerDiv().appendChild( | |
this._ttmlRenderingDiv) | |
}, n.prototype._fullScreenChangeHandler = | |
function(e) { | |
this._eventBus.publish(new l.MediaEvent( | |
d.EventName.fullscreenchanged, { | |
isFullScreen: this.isFullScreen() | |
})) | |
}, n.prototype._onPlaybackError = function( | |
e) { | |
var t = new a.VuplayError("error: " + e | |
.error, p.VuplayErrorType.PLAYER, { | |
error: e | |
}), | |
n = new s.ErrorEvent(t); | |
this._eventBus.publish(n) | |
}, n.prototype._onCanPlay = function(e) { | |
this._hasEnded = !1; | |
var t = new l.MediaEvent(d.EventName.canplay, {}); | |
this._eventBus.publish(t), this._eventBus | |
.publish(new l.MediaEvent(d.EventName | |
.audiotrackchanged, { | |
track: this.getEnabledAudioTrack() | |
})) | |
}, n.prototype._onPlaybackPlaying = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.playing, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(t), this._sendBufferEndEvent() | |
}, n.prototype._onPlaybackStarted = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.play, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlayBackPaused = function( | |
e) { | |
var t = new l.MediaEvent(d.EventName.pause, { | |
ended: e.ended | |
}); | |
this._eventBus.publish(t), this._sendBufferEndEvent() | |
}, n.prototype._onPlaybackSeeking = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.seeking, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(t), this._sendBufferStartEvent() | |
}, n.prototype._onPlaybackSeeked = function( | |
e) { | |
var t = new l.MediaEvent(d.EventName.seeked, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(t), this._sendBufferEndEvent() | |
}, n.prototype._onPlaybackRateChanged = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.ratechange, {}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlaybackProgress = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.progress, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlaybackTimeUpdated = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.timeupdate, { | |
currentTime: this.getCurrentTime(), | |
timeToEnd: e.timeToEnd | |
}); | |
this._eventBus.publish(t); | |
var n = this.getDuration() - this.getCurrentTime(); | |
!1 === this._config.isLive() && n < .5 && | |
(this._simulateEndedTimer = | |
setTimeout(this._simulateEnded, | |
500)) | |
}, n.prototype._onPlaybackEnded = function( | |
e) { | |
var t = new l.MediaEvent(d.EventName.ended, {}); | |
this._eventBus.publish(t), this._sendBufferEndEvent(), | |
this._hasEnded = !0 | |
}, n.prototype._onStreamInitialized = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.loadedmetadata, { | |
streamInfo: e.streamInfo | |
}); | |
this._eventBus.publish(t) | |
}, n.prototype._onPlaybackMetadataLoaded = | |
function(e) { | |
var t = new l.MediaEvent(d.EventName.loadeddata, {}); | |
this._eventBus.publish(t) | |
}, n.prototype._onTextTrackAdded = function( | |
e) { | |
var t = new l.MediaEvent(d.EventName.texttrackadded, {}); | |
this._eventBus.publish(t) | |
}, n.prototype._onVolumeChange = function(e) { | |
var t = new l.MediaEvent(d.EventName.volumechange, { | |
volume: e.target.volume | |
}); | |
this._eventBus.publish(t) | |
}, n.prototype._onBufferEmpty = function(e) { | |
this._sendBufferStartEvent() | |
}, n.prototype._sendBufferStartEvent = | |
function() { | |
var e = new l.MediaEvent(d.EventName.bufferstart, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
}, n.prototype._sendBufferEndEvent = | |
function() { | |
var e = new l.MediaEvent(d.EventName.bufferend, { | |
currentTime: this.getCurrentTime() | |
}); | |
this._eventBus.publish(e) | |
}, n.prototype._extendDashJs = function() { | |
var e = this; | |
this._dashJsPlayer.extend( | |
"KeySystemWidevine", | |
function() { | |
return { | |
getInitData: function(t, | |
n) { | |
if (this.kid = | |
n, "pssh" in | |
t) { | |
var r = new a | |
.VuplayError( | |
"inline pssh not supported", | |
p.VuplayErrorType | |
.PLAYER, | |
t), | |
i = new s | |
.ErrorEvent( | |
r); | |
e._eventBus | |
.publish( | |
i) | |
} | |
return null | |
}, | |
getLicenseRequestFromMessage: function( | |
t) { | |
var n = { | |
token: e | |
._config | |
.getVudrmToken(), | |
drm_info: Array | |
.apply( | |
null, | |
new Uint8Array( | |
t | |
) | |
), | |
kid: this | |
.kid | |
}; | |
return JSON.stringify( | |
n) | |
} | |
} | |
}, !0), this._dashJsPlayer.extend( | |
"ProtectionKeyController", | |
function() { | |
var e = this.parent; | |
return { | |
getSupportedKeySystemsFromContentProtection: function( | |
t) { | |
var n = [], | |
r = e.getKeySystems(); | |
if (t) { | |
for (var i = | |
null, | |
o = | |
0; t | |
.length > | |
o; o++) { | |
var s = | |
t[o]; | |
null !== | |
s.KID && | |
(i = | |
s | |
) | |
} | |
for (var a = | |
0; a < | |
r.length; ++ | |
a) | |
for ( | |
var | |
u = | |
r[ | |
a | |
], | |
o = | |
0; o < | |
t.length; ++ | |
o) { | |
var | |
c = | |
t[ | |
o | |
]; | |
if ( | |
c | |
.schemeIdUri | |
.toLowerCase() === | |
u | |
.schemeIdURI | |
) { | |
var | |
l = | |
u | |
.getInitData( | |
c, | |
i | |
.KID | |
); | |
l | |
&& | |
n | |
.push({ | |
ks: r[ | |
a | |
], | |
initData: l | |
}) | |
} | |
} | |
} | |
return n | |
} | |
} | |
}, !0) | |
}, n | |
}(u.VuplayPlayer); | |
t.DashJsWrapper = _ | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(29), | |
o = n(30), | |
s = n(5), | |
a = n(15), | |
u = n(0), | |
c = n(21), | |
l = n(2), | |
p = n(0), | |
h = n(16), | |
d = n(11), | |
f = n(14), | |
y = n(10), | |
v = n(36), | |
_ = n(37), | |
g = function(t) { | |
function n(e, n, r) { | |
var i = t.call(this, e, n, r) || this; | |
return i._enabledTextTrack = -1, i._isBuffering = ! | |
1, i._checkForPlayerLoaded = function() { | |
return "undefined" == typeof THEOplayer || | |
null === THEOplayer ? (i._eventBus | |
.publish(new d.LogDebug( | |
"still loading the player into the dom" | |
)), !1) : (i._eventBus.publish( | |
new d.LogDebug( | |
"player loaded into the dom" | |
)), !0) | |
}, i._setUpTheoPlayer = function() { | |
var e = i._config.getPlayerDivOverride() ? | |
i._config.getContainerDiv() : i | |
._config.getPlayerDiv(); | |
i._theoPlayer = new THEOplayer.Player( | |
e, { | |
libraryLocation: i.playerConfig | |
.scriptsPath | |
}), i._theoPlayer.autoplay = | |
i._config.getAutoStart(), i._subscribeTheoPlayerEvents() | |
}, i._subscribeTheoPlayerEvents = | |
function() { | |
document.addEventListener( | |
"webkitfullscreenchange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), document.addEventListener( | |
"mozfullscreenchange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), document.addEventListener( | |
"MSFullscreenChange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), document.addEventListener( | |
"fullscreenchange", | |
function(e) { | |
i._fullScreenChangeHandler( | |
e) | |
}), i._theoPlayer.addEventListener( | |
"error", | |
function(e) { | |
i._onError(e) | |
}), i._theoPlayer.addEventListener( | |
"contentprotectionerror", | |
function(e) { | |
i._onError(e) | |
}), i._theoPlayer.addEventListener( | |
"canplay", | |
function(e) { | |
i._onCanPlay(e) | |
}), i._theoPlayer.addEventListener( | |
"playing", | |
function(e) { | |
i._onPlaying(e) | |
}), i._theoPlayer.addEventListener( | |
"play", | |
function(e) { | |
i._onPlay(e) | |
}), i._theoPlayer.addEventListener( | |
"pause", | |
function(e) { | |
i._onPause(e) | |
}), i._theoPlayer.addEventListener( | |
"seeking", | |
function(e) { | |
i._onSeeking(e) | |
}), i._theoPlayer.addEventListener( | |
"seeked", | |
function(e) { | |
i._onSeeked(e) | |
}), i._theoPlayer.addEventListener( | |
"ratechange", | |
function(e) { | |
i._onRateChange(e) | |
}), i._theoPlayer.addEventListener( | |
"progress", | |
function(e) { | |
i._onProgress(e) | |
}), i._theoPlayer.addEventListener( | |
"timeupdate", | |
function(e) { | |
i._onTimeUpdate(e) | |
}), i._theoPlayer.addEventListener( | |
"ended", | |
function(e) { | |
i._onEnded(e) | |
}), i._theoPlayer.addEventListener( | |
"loadedmetadata", | |
function(e) { | |
i._onLoadedMetadata(e) | |
}), i._theoPlayer.addEventListener( | |
"loadeddata", | |
function(e) { | |
i._onLoadedData(e) | |
}), i._theoPlayer.addEventListener( | |
"volumechange", | |
function(e) { | |
i._onVolumeChange(e) | |
}), i._theoPlayer.textTracks | |
.addEventListener("addtrack", | |
function(e) { | |
i._onAddTrack(e) | |
}), i._theoPlayer.addEventListener( | |
"readystatechange", | |
function(e) { | |
i._onReadyStateChange(e) | |
}), i._theoPlayer.ads && (i | |
._theoPlayer.ads.addEventListener( | |
"adbegin", i._onAdBegin | |
), i._theoPlayer.ads.addEventListener( | |
"adend", i._onAdEnd), i | |
._theoPlayer.ads.addEventListener( | |
"aderror", i._onAdError | |
), i._theoPlayer.ads.addEventListener( | |
"adbreakbegin", i._onAdBreakBegin | |
), i._theoPlayer.ads.addEventListener( | |
"adbreakend", i._onAdBreakEnd | |
)) | |
}, i._fullScreenChangeHandler = | |
function(e) { | |
i._eventBus.publish(new a.MediaEvent( | |
s.EventName.fullscreenchanged, { | |
isFullScreen: i.isFullScreen() | |
})) | |
}, i._onAdBegin = function(e) { | |
var t = new v.AdEvent(s.EventName.adbegin, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdEnd = function(e) { | |
var t = new v.AdEvent(s.EventName.adend, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdError = function(e) { | |
var t = new v.AdEvent(s.EventName.aderror, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t); | |
var n = new y.LogWarn( | |
"an ad threw an error. see ad error event for more detail.", { | |
errorEvent: e | |
}); | |
i._eventBus.publish(n) | |
}, i._onAdBreakBegin = function(e) { | |
var t = new _.AdBreakEvent(s.EventName | |
.adbreakbegin, e.ad.timeOffset, | |
e.ad.maxDuration, e.ad.ads.length, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdBreakEnd = function(e) { | |
var t = new _.AdBreakEvent(s.EventName | |
.adbreakend, e.ad.timeOffset, | |
e.ad.maxDuration, e.ad.ads.length, | |
e.date); | |
i._eventBus.publish(t) | |
}, i | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
var t = this; | |
this._eventBus = e.getDependency(l.default | |
.IEventBus), this._config = e.getDependency( | |
l.default.IConfig), this._sizingInterval = | |
setInterval(function() { | |
t._calculateHeight() | |
}, 500) | |
}, n.prototype._calculateHeight = function() { | |
var e = this._config.getPlayerDivOverride() ? | |
this._config.getContainerDiv() : | |
this._config.getPlayerDiv(), | |
t = e.offsetWidth; | |
if (this._containerWidth !== t && !this | |
.isFullScreen()) { | |
var n = t / 16 * 9; | |
e.style.height = n + "px", this._containerWidth = | |
t | |
} | |
}, n.prototype.load = function() { | |
var t = this; | |
return new e(function(e, n) { | |
f.Helpers.loadScript(t.playerConfig | |
.jsUrl, t._checkForPlayerLoaded | |
).then(function() { | |
t._setUpTheoPlayer(), | |
e(t) | |
}).catch(function(e) { | |
n(e) | |
}) | |
}) | |
}, n.prototype.play = function() { | |
this._theoPlayer.play() | |
}, n.prototype.pause = function() { | |
this._theoPlayer.pause() | |
}, n.prototype.isPaused = function() { | |
return this._theoPlayer.paused | |
}, n.prototype.getCurrentTime = function() { | |
if (this._config.isLive()) { | |
var e = 0; | |
try { | |
e = this._theoPlayer.seekable.end( | |
0) | |
} catch (e) { | |
return this._eventBus.publish( | |
new y.LogWarn( | |
"current live time unavailable: 0 will be returned until available", { | |
error: e | |
})), 0 | |
} | |
var t = -1 * (e - this._theoPlayer.currentTime); | |
return t > 0 && (t = -1), t | |
} | |
return this._theoPlayer.currentTime | |
}, n.prototype.getDuration = function() { | |
if (this._config.isLive()) try { | |
return -1 * (this._theoPlayer.seekable | |
.end(0) - this._theoPlayer | |
.seekable.start(0)) | |
} catch (e) { | |
return this._eventBus.publish( | |
new y.LogWarn( | |
"unable to access duration in theoplayer hls. returning 0", { | |
error: e | |
})), 0 | |
} | |
return this._theoPlayer.duration | |
}, n.prototype.seek = function(e) { | |
if (this._config.isLive()) { | |
e *= -1; | |
e += this._theoPlayer.seekable.start( | |
0) | |
} | |
this._theoPlayer.currentTime = e | |
}, n.prototype.skipTo = function(e) { | |
if (this._config.isLive()) try { | |
var t = this.getUtcTime(), | |
n = t; | |
n.setSeconds(t.getSeconds() + e), | |
this._theoPlayer.currentProgramDateTime = | |
n | |
} catch (e) { | |
this._eventBus.publish(new y.LogWarn( | |
"Unable to set currentProgramDateTime in THEOplayer-HLS.", { | |
error: e | |
})) | |
} else this._theoPlayer.currentTime = | |
this._theoPlayer.currentTime + | |
e | |
}, n.prototype.getVolume = function() { | |
return this._theoPlayer.volume | |
}, n.prototype.setVolume = function(e) { | |
this._theoPlayer.volume = e | |
}, n.prototype.getTextTracks = function() { | |
for (var e = this._theoPlayer.textTracks, | |
t = new Array, n = 0; n < e.length; n++) { | |
var r = new o.TextTrack(n, e[n].language, | |
e[n].label, e[n].kind, !1); | |
t.push(r) | |
} | |
return t | |
}, n.prototype.setTextTrack = function(e) { | |
var t = this._theoPlayer.textTracks; - | |
1 !== this._enabledTextTrack && | |
"showing" === t[this._enabledTextTrack] | |
.mode && e !== this._enabledTextTrack ? | |
(t[this._enabledTextTrack].mode = | |
"disabled", this._enabledTextTrack = | |
e) : t.length > e ? (t[e].mode = | |
"showing", this._enabledTextTrack = | |
e) : this._eventBus.publish(new y | |
.LogWarn( | |
"an attempt was made to enable a texttrack which is out of range", { | |
textTrackId: e | |
})) | |
}, n.prototype.getAudioTracks = function() { | |
var e = this._theoPlayer.audioTracks, | |
t = new Array; | |
return e.forEach(function(e) { | |
t.push(new i.AudioTrack( | |
Number(e.id), e | |
.language, e.enabled | |
)) | |
}), t | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
for (var e = null, t = this.getAudioTracks(), | |
n = 0; n < t.length; n++) t[n].isActive && | |
(e = t[n]); | |
return e | |
}, n.prototype.setAudioTrack = function(e) { | |
var t = this; | |
this._theoPlayer.audioTracks.forEach( | |
function(n) { | |
Number(n.id) === e && (n.enabled = ! | |
0, t._eventBus.publish( | |
new a.MediaEvent( | |
s.EventName | |
.audiotrackchanged, { | |
track: new i | |
.AudioTrack( | |
n | |
.id, | |
n | |
.language, | |
n | |
.enabled | |
) | |
}))) | |
}) | |
}, n.prototype.setFullScreen = function(e) { | |
this._supportsFullScreen() && (e && ! | |
this.isFullScreen() ? this._enterFullScreen() : | |
this._exitFullScreen()) | |
}, n.prototype._supportsFullScreen = | |
function() { | |
var e = document; | |
return !(document.fullscreenEnabled && | |
e.mozFullScreenEnabled && e.webkitFullscreenEnabled && | |
e.msFullscreenEnabled) | |
}, n.prototype.isFullScreen = function() { | |
var e = document; | |
return !!(document.fullscreenElement || | |
e.mozFullScreenElement || e.webkitFullscreenElement || | |
e.msFullscreenElement) | |
}, n.prototype._enterFullScreen = function() { | |
var e = this._config.getPlayerDivOverride() ? | |
this._config.getContainerDiv() : | |
this._config.getPlayerDiv(), | |
t = this._config.isIOS() ? this._config | |
.getVideoElement() : e; | |
t.requestFullscreen ? t.requestFullscreen() : | |
t.mozRequestFullScreen ? t.mozRequestFullScreen() : | |
t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : | |
t.webkitEnterFullscreen ? t.webkitEnterFullscreen() : | |
t.msRequestFullscreen && t.msRequestFullscreen() | |
}, n.prototype._exitFullScreen = function() { | |
var e = document; | |
document.exitFullscreen ? document.exitFullscreen() : | |
document.webkitExitFullscreen ? | |
document.webkitExitFullscreen() : e | |
.mozCancelFullScreen ? e.mozCancelFullScreen() : | |
e.msExitFullscreen && e.msExitFullscreen() | |
}, n.prototype.setSrc = function() { | |
if (this._theoPlayer.autoplay = this._config | |
.getAutoStart(), null !== this._config | |
.getSrc() && "" !== this._config.getSrc() | |
) { | |
var e = [this._getSources()]; | |
this._eventBus.publish(new a.MediaEvent( | |
s.EventName.loadsrc, { | |
src: this.getSrc(), | |
player: this.playerId | |
})), this._theoPlayer.source = { | |
sources: e | |
} | |
} else { | |
var t = new u.VuplayError( | |
"src cannot be set on the player when undefined, null or empty", | |
p.VuplayErrorType.PLAYER, | |
this._config.getSrc()), | |
n = new h.ErrorEvent(t); | |
this._eventBus.publish(n) | |
} | |
}, n.prototype.getUtcTime = function() { | |
return this._theoPlayer.currentProgramDateTime | |
}, n.prototype.reset = function() { | |
this._theoPlayer.stop(), this._config.reset() | |
}, n.prototype.scheduleAd = function(e) { | |
var t = this._theoPlayer.ads, | |
n = f.Helpers.toHHMMSS(e.getStartTime()), | |
r = { | |
sources: e.getSrc(), | |
timeOffset: String(n) | |
}; | |
e.getSkipTime() > -1 && (r.skipOffset = | |
String(e.getSkipTime())), t.schedule( | |
r) | |
}, n.prototype.skipCurrentAd = function() { | |
var e = this._theoPlayer.ads.currentAdBreak | |
.ads; | |
return e.length > 0 && this.getCurrentTime() > | |
e[0].skipOffset && (this._theoPlayer | |
.ads.skip(), this._eventBus.publish( | |
new v.AdEvent(s.EventName.adskipped, | |
e[0].duration, e[0].skipOffset | |
)), !0) | |
}, n.prototype.getSrc = function() { | |
var e = this._config.getSrc(), | |
t = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlRegex : this.playerConfig.ismRegex, | |
n = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlReplacement : this.playerConfig | |
.ismReplacement; | |
return e.replace(t, n) | |
}, n.prototype._getSources = function() { | |
var e = this.getSrc(); | |
return this._config.getIsDrmRequired() ? | |
{ | |
src: e, | |
type: this.playerConfig.streamType, | |
drm: { | |
integration: "vudrm", | |
token: this._config.getVudrmToken(), | |
fairplay: { | |
certificateURL: this.drmProviders | |
.fairplay.certUrl, | |
licenseAcquisitionURL: this | |
.drmProviders.fairplay | |
.laUrl | |
} | |
} | |
} : { | |
src: e, | |
type: this.playerConfig.streamType | |
} | |
}, n.prototype._onError = function(e) { | |
var t = new u.VuplayError(e.error, p.VuplayErrorType | |
.PLAYER, e); | |
this._eventBus.publish(new h.ErrorEvent( | |
t, e.date)) | |
}, n.prototype._onCanPlay = function(e) { | |
var t = new a.MediaEvent(s.EventName.canplay, { | |
currentTime: this.getCurrentTime() | |
}, e.Date); | |
this._eventBus.publish(t), this._eventBus | |
.publish(new a.MediaEvent(s.EventName | |
.audiotrackchanged, { | |
track: this.getEnabledAudioTrack() | |
})) | |
}, n.prototype._onPlaying = function(e) { | |
var t = new a.MediaEvent(s.EventName.playing, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onPlay = function(e) { | |
var t = new a.MediaEvent(s.EventName.play, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onPause = function(e) { | |
var t = !this._config.isLive() && this.getCurrentTime() >= | |
this.getDuration(), | |
n = new a.MediaEvent(s.EventName.pause, { | |
ended: t | |
}, e.date); | |
this._eventBus.publish(n), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onSeeking = function(e) { | |
var t = new a.MediaEvent(s.EventName.seeking, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferStartEvent( | |
e.date) | |
}, n.prototype._onSeeked = function(e) { | |
var t = new a.MediaEvent(s.EventName.seeked, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onRateChange = function(e) { | |
var t = new a.MediaEvent(s.EventName.ratechange, { | |
playbackRate: e.playbackRate | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onProgress = function(e) { | |
var t = new a.MediaEvent(s.EventName.progress, { | |
currentTime: this.getCurrentTime(), | |
buffered: e.buffered | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onTimeUpdate = function(e) { | |
var t = new a.MediaEvent(s.EventName.timeupdate, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onEnded = function(e) { | |
var t = new a.MediaEvent(s.EventName.ended, {}, | |
e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onLoadedMetadata = function( | |
e) { | |
var t = new a.MediaEvent(s.EventName.loadedmetadata, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onLoadedData = function(e) { | |
var t = new a.MediaEvent(s.EventName.loadeddata, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onVolumeChange = function(e) { | |
var t = new a.MediaEvent(s.EventName.volumechange, { | |
volume: e.volume | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onAddTrack = function(e) { | |
var t = new a.MediaEvent(s.EventName.texttrackadded, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onReadyStateChange = | |
function(e) { | |
!1 === this._isBuffering && e.readyState < | |
3 ? (this._isBuffering = !0, this._sendBufferStartEvent( | |
e.date)) : this._isBuffering && | |
e.readyState > 2 && (this._isBuffering = ! | |
1, this._sendBufferEndEvent(e.date) | |
) | |
}, n.prototype._sendBufferStartEvent = | |
function(e) { | |
var t = new a.MediaEvent(s.EventName.bufferstart, { | |
currentTime: this.getCurrentTime() | |
}, e); | |
this._eventBus.publish(t) | |
}, n.prototype._sendBufferEndEvent = | |
function(e) { | |
var t = new a.MediaEvent(s.EventName.bufferend, { | |
currentTime: this.getCurrentTime() | |
}, e); | |
this._eventBus.publish(t) | |
}, n | |
}(c.VuplayPlayer); | |
t.TheoPlayerHLSWrapper = g | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(29), | |
o = n(30), | |
s = n(5), | |
a = n(15), | |
u = n(0), | |
c = n(21), | |
l = n(2), | |
p = n(0), | |
h = n(16), | |
d = n(11), | |
f = n(10), | |
y = n(14), | |
v = n(37), | |
_ = n(36), | |
g = function(t) { | |
function n(e, n, r) { | |
var i = t.call(this, e, n, r) || this; | |
return i._isBuffering = !1, i._enabledTextTrack = - | |
1, i._checkForPlayerLoaded = function() { | |
return "undefined" == typeof THEOplayer || | |
null === THEOplayer ? (i._eventBus | |
.publish(new d.LogDebug( | |
"still loading the player into the dom" | |
)), !1) : (i._eventBus.publish( | |
new d.LogDebug( | |
"player loaded into the dom" | |
)), !0) | |
}, i._onAdBegin = function(e) { | |
var t = new _.AdEvent(s.EventName.adbegin, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdEnd = function(e) { | |
var t = new _.AdEvent(s.EventName.adend, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdError = function(e) { | |
var t = new _.AdEvent(s.EventName.aderror, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t); | |
var n = new f.LogWarn( | |
"an ad threw an error. see ad error event for more detail.", { | |
errorEvent: e | |
}); | |
i._eventBus.publish(n) | |
}, i._onAdBreakBegin = function(e) { | |
var t = new v.AdBreakEvent(s.EventName | |
.adbreakbegin, e.ad.timeOffset, | |
e.ad.maxDuration, e.ad.ads.length, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdBreakEnd = function(e) { | |
var t = new v.AdBreakEvent(s.EventName | |
.adbreakend, e.ad.timeOffset, | |
e.ad.maxDuration, e.ad.ads.length, | |
e.date); | |
i._eventBus.publish(t) | |
}, i | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
this._eventBus = e.getDependency(l.default | |
.IEventBus), this._config = e.getDependency( | |
l.default.IConfig) | |
}, n.prototype.load = function() { | |
var t = this; | |
return new e(function(e, n) { | |
y.Helpers.loadScript(t.playerConfig | |
.jsUrl, t._checkForPlayerLoaded | |
).then(function() { | |
t._setUpTheoPlayer(), | |
e(t) | |
}).catch(function(e) { | |
n(e) | |
}) | |
}) | |
}, n.prototype.play = function() { | |
this._theoPlayer.play() | |
}, n.prototype.pause = function() { | |
this._theoPlayer.pause() | |
}, n.prototype.isPaused = function() { | |
return this._theoPlayer.paused | |
}, n.prototype.getCurrentTime = function() { | |
if (this._config.isLive()) { | |
var e = 0; | |
try { | |
e = this._theoPlayer.seekable.end() | |
} catch (e) { | |
return this._eventBus.publish( | |
new f.LogWarn( | |
"current live time unavailable: 0 will be returned until available", { | |
error: e | |
})), 0 | |
} | |
var t = -1 * (e - this._theoPlayer.currentTime); | |
return t > 0 && (t = -1), t | |
} | |
return this._theoPlayer.currentTime | |
}, n.prototype.getDuration = function() { | |
if (this._config.isLive()) try { | |
return -1 * (this._theoPlayer.seekable | |
.end(0) - this._theoPlayer | |
.seekable.start(0)) | |
} catch (e) { | |
return this._eventBus.publish( | |
new f.LogWarn( | |
"unable to access duration in theoplayer dash. returning 0", { | |
error: e | |
})), 0 | |
} | |
return this._theoPlayer.duration | |
}, n.prototype.seek = function(e) { | |
if (this._config.isLive()) { | |
e *= -1; | |
e += this._theoPlayer.seekable.start( | |
0) | |
} | |
this._theoPlayer.currentTime = e | |
}, n.prototype.skipTo = function(e) { | |
if (this._config.isLive()) try { | |
var t = this.getUtcTime(), | |
n = t; | |
n.setSeconds(t.getSeconds() + e), | |
this._theoPlayer.currentProgramDateTime = | |
n | |
} catch (e) { | |
this._eventBus.publish(new f.LogWarn( | |
"Unable to set currentProgramDateTime in THEOplayer-DASH.", { | |
error: e | |
})) | |
} else this._theoPlayer.currentTime = | |
this._theoPlayer.currentTime + | |
e | |
}, n.prototype.getVolume = function() { | |
return this._theoPlayer.volume | |
}, n.prototype.setVolume = function(e) { | |
this._theoPlayer.volume = e | |
}, n.prototype.getTextTracks = function() { | |
for (var e = this._theoPlayer.textTracks, | |
t = new Array, n = 0; n < e.length; n++) { | |
var r = new o.TextTrack(e[n].id, e[ | |
n].language, e[n].label, | |
e[n].kind, !1); | |
t.push(r) | |
} | |
return t | |
}, n.prototype.setTextTrack = function(e) { | |
var t = this._theoPlayer.textTracks; - | |
1 !== this._enabledTextTrack && | |
"showing" === t[this._enabledTextTrack] | |
.mode && e !== this._enabledTextTrack ? | |
(t[this._enabledTextTrack].mode = | |
"disabled", this._enabledTextTrack = | |
e) : t.length > e ? (t[e].mode = | |
"showing", this._enabledTextTrack = | |
e) : this._eventBus.publish(new f | |
.LogWarn( | |
"an attempt was made to enable a texttrack which is out of range", { | |
textTrackId: e | |
})) | |
}, n.prototype.getAudioTracks = function() { | |
var e = this._theoPlayer.audioTracks, | |
t = new Array; | |
return e.forEach(function(e) { | |
t.push(new i.AudioTrack( | |
Number(e.id), e | |
.language, e.enabled | |
)) | |
}), t | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
for (var e = null, t = this.getAudioTracks(), | |
n = 0; n < t.length; n++) t[n].isActive && | |
(e = t[n]); | |
return e | |
}, n.prototype.setAudioTrack = function(e) { | |
var t = this; | |
this._theoPlayer.audioTracks.forEach( | |
function(n) { | |
Number(n.id) === e && (n.enabled = ! | |
0, t._eventBus.publish( | |
new a.MediaEvent( | |
s.EventName | |
.audiotrackchanged, { | |
track: new i | |
.AudioTrack( | |
n | |
.id, | |
n | |
.language, | |
n | |
.enabled | |
) | |
}))) | |
}) | |
}, n.prototype.setFullScreen = function(e) { | |
this._supportsFullScreen() && (e && ! | |
this.isFullScreen() ? this._enterFullScreen() : | |
this._exitFullScreen()) | |
}, n.prototype._supportsFullScreen = | |
function() { | |
var e = document; | |
return !(document.fullscreenEnabled && | |
e.mozFullScreenEnabled && e.webkitFullscreenEnabled && | |
e.msFullscreenEnabled) | |
}, n.prototype.isFullScreen = function() { | |
var e = document; | |
return !!(document.fullscreenElement || | |
e.mozFullScreenElement || e.webkitFullscreenElement || | |
e.msFullscreenElement) | |
}, n.prototype._enterFullScreen = function() { | |
var e = this._config.isIOS() ? this._config | |
.getVideoElement() : this._config.getPlayerDiv(); | |
e.requestFullscreen ? e.requestFullscreen() : | |
e.mozRequestFullScreen ? e.mozRequestFullScreen() : | |
e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : | |
e.webkitEnterFullscreen ? e.webkitEnterFullscreen() : | |
e.msRequestFullscreen && e.msRequestFullscreen() | |
}, n.prototype._exitFullScreen = function() { | |
var e = document; | |
document.exitFullscreen ? document.exitFullscreen() : | |
document.webkitExitFullscreen ? | |
document.webkitExitFullscreen() : e | |
.mozCancelFullScreen ? e.mozCancelFullScreen() : | |
e.msExitFullscreen && e.msExitFullscreen() | |
}, n.prototype.setSrc = function() { | |
if (this._theoPlayer.autoplay = this._config | |
.getAutoStart(), null !== this._config | |
.getSrc() && "" !== this._config.getSrc() | |
) this._eventBus.publish(new a.MediaEvent( | |
s.EventName.loadsrc, { | |
src: this.getSrc(), | |
player: this.playerId | |
})), this._theoPlayer.source = { | |
sources: [this._getSources()] | |
}; | |
else { | |
var e = new u.VuplayError( | |
"src cannot be set on the player when undefined, null or empty", | |
p.VuplayErrorType.PLAYER, | |
this._config.getSrc()), | |
t = new h.ErrorEvent(e); | |
this._eventBus.publish(t) | |
} | |
}, n.prototype.getUtcTime = function() { | |
return this._theoPlayer.currentProgramDateTime | |
}, n.prototype.reset = function() { | |
this._theoPlayer.stop(), this._config.reset() | |
}, n.prototype.scheduleAd = function(e) { | |
var t = this._theoPlayer.ads, | |
n = y.Helpers.toHHMMSS(e.getStartTime()), | |
r = { | |
sources: e.getSrc(), | |
timeOffset: String(n) | |
}; | |
e.getSkipTime() > -1 && (r.skipOffset = | |
String(e.getSkipTime())), t.schedule( | |
r) | |
}, n.prototype.skipCurrentAd = function() { | |
var e = this._theoPlayer.ads.currentAdBreak | |
.ads; | |
return e.length > 0 && this.getCurrentTime() > | |
e[0].skipOffset && (this._theoPlayer | |
.ads.skip(), this._eventBus.publish( | |
new _.AdEvent(s.EventName.adskipped, | |
e[0].duration, e[0].skipOffset | |
)), !0) | |
}, n.prototype._loadPlayerIntoDom = | |
function() { | |
var e = document.createElement("script"); | |
e.type = "text/javascript", e.src = | |
this.playerConfig.jsUrl, document.body | |
.appendChild(e), this._eventBus.publish( | |
new d.LogDebug( | |
"adding player js to the dom", { | |
scriptElement: e | |
})), document.body.appendChild( | |
e) | |
}, n.prototype.getSrc = function() { | |
var e = this._config.getSrc(), | |
t = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlRegex : this.playerConfig.ismRegex, | |
n = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlReplacement : this.playerConfig | |
.ismReplacement; | |
return e.replace(t, n) | |
}, n.prototype._setUpTheoPlayer = function() { | |
this._theoPlayer = new THEOplayer.Player( | |
this._config.getPlayerDiv(), { | |
libraryLocation: this.playerConfig | |
.scriptsPath | |
}), this._theoPlayer.autoplay = | |
this._config.getAutoStart(), this._subscribeTheoPlayerEvents() | |
}, n.prototype._getSources = function() { | |
var e = this.getSrc(); | |
return this._config.getIsDrmRequired() ? | |
{ | |
src: e, | |
type: this.playerConfig.streamType, | |
drm: { | |
integration: "vudrm", | |
token: this._config.getVudrmToken(), | |
widevine: { | |
licenseAcquisitionURL: this | |
.drmProviders.widevine | |
.laUrl | |
}, | |
playready: { | |
licenseAcquisitionURL: this | |
.drmProviders.playReady | |
.laUrl | |
} | |
} | |
} : { | |
src: e, | |
type: this.playerConfig.streamType | |
} | |
}, n.prototype._subscribeTheoPlayerEvents = | |
function() { | |
var e = this; | |
document.addEventListener( | |
"webkitfullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"mozfullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"MSFullscreenChange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"fullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), this._theoPlayer.addEventListener( | |
"error", | |
function(t) { | |
e._onError(t) | |
}), this._theoPlayer.addEventListener( | |
"contentprotectionerror", | |
function(t) { | |
e._onError(t) | |
}), this._theoPlayer.addEventListener( | |
"canplay", | |
function(t) { | |
e._onCanPlay(t) | |
}), this._theoPlayer.addEventListener( | |
"playing", | |
function(t) { | |
e._onPlaying(t) | |
}), this._theoPlayer.addEventListener( | |
"play", | |
function(t) { | |
e._onPlay(t) | |
}), this._theoPlayer.addEventListener( | |
"pause", | |
function(t) { | |
e._onPause(t) | |
}), this._theoPlayer.addEventListener( | |
"seeking", | |
function(t) { | |
e._onSeeking(t) | |
}), this._theoPlayer.addEventListener( | |
"seeked", | |
function(t) { | |
e._onSeeked(t) | |
}), this._theoPlayer.addEventListener( | |
"ratechange", | |
function(t) { | |
e._onRateChange(t) | |
}), this._theoPlayer.addEventListener( | |
"progress", | |
function(t) { | |
e._onProgress(t) | |
}), this._theoPlayer.addEventListener( | |
"timeupdate", | |
function(t) { | |
e._onTimeUpdate(t) | |
}), this._theoPlayer.addEventListener( | |
"ended", | |
function(t) { | |
e._onEnded(t) | |
}), this._theoPlayer.addEventListener( | |
"loadedmetadata", | |
function(t) { | |
e._onLoadedMetadata(t) | |
}), this._theoPlayer.addEventListener( | |
"loadeddata", | |
function(t) { | |
e._onLoadedData(t) | |
}), this._theoPlayer.addEventListener( | |
"volumechange", | |
function(t) { | |
e._onVolumeChange(t) | |
}), this._theoPlayer.textTracks | |
.addEventListener("addtrack", | |
function(t) { | |
e._onAddTrack(t) | |
}), this._theoPlayer.addEventListener( | |
"readystatechange", | |
function(t) { | |
e._onReadyStateChange(t) | |
}), this._theoPlayer.ads && ( | |
this._theoPlayer.ads.addEventListener( | |
"adbegin", this._onAdBegin), | |
this._theoPlayer.ads.addEventListener( | |
"adend", this._onAdEnd), | |
this._theoPlayer.ads.addEventListener( | |
"aderror", this._onAdError), | |
this._theoPlayer.ads.addEventListener( | |
"adbreakbegin", this._onAdBreakBegin | |
), this._theoPlayer.ads.addEventListener( | |
"adbreakend", this._onAdBreakEnd | |
)) | |
}, n.prototype._fullScreenChangeHandler = | |
function(e) { | |
this._eventBus.publish(new a.MediaEvent( | |
s.EventName.fullscreenchanged, { | |
isFullScreen: this.isFullScreen() | |
})) | |
}, n.prototype._onError = function(e) { | |
var t = new u.VuplayError(e.error, p.VuplayErrorType | |
.PLAYER, e); | |
this._eventBus.publish(new h.ErrorEvent( | |
t, e.date)) | |
}, n.prototype._onCanPlay = function(e) { | |
var t = new a.MediaEvent(s.EventName.canplay, { | |
currentTime: this.getCurrentTime() | |
}, e.Date); | |
this._eventBus.publish(t), this._eventBus | |
.publish(new a.MediaEvent(s.EventName | |
.audiotrackchanged, { | |
track: this.getEnabledAudioTrack() | |
})) | |
}, n.prototype._onPlaying = function(e) { | |
var t = new a.MediaEvent(s.EventName.playing, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onPlay = function(e) { | |
var t = new a.MediaEvent(s.EventName.play, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onPause = function(e) { | |
var t = !this._config.isLive() && this.getCurrentTime() >= | |
this.getDuration(), | |
n = new a.MediaEvent(s.EventName.pause, { | |
ended: t | |
}, e.date); | |
this._eventBus.publish(n), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onSeeking = function(e) { | |
var t = new a.MediaEvent(s.EventName.seeking, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferStartEvent( | |
e.date) | |
}, n.prototype._onSeeked = function(e) { | |
var t = new a.MediaEvent(s.EventName.seeked, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onRateChange = function(e) { | |
var t = new a.MediaEvent(s.EventName.ratechange, { | |
playbackRate: e.playbackRate | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onProgress = function(e) { | |
var t = new a.MediaEvent(s.EventName.progress, { | |
currentTime: this.getCurrentTime(), | |
buffered: e.buffered | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onTimeUpdate = function(e) { | |
var t = new a.MediaEvent(s.EventName.timeupdate, { | |
currentTime: this.getCurrentTime() | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onEnded = function(e) { | |
var t = new a.MediaEvent(s.EventName.ended, {}, | |
e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onLoadedMetadata = function( | |
e) { | |
var t = new a.MediaEvent(s.EventName.loadedmetadata, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onLoadedData = function(e) { | |
var t = new a.MediaEvent(s.EventName.loadeddata, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onVolumeChange = function(e) { | |
var t = new a.MediaEvent(s.EventName.volumechange, { | |
volume: e.volume | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onAddTrack = function(e) { | |
var t = new a.MediaEvent(s.EventName.texttrackadded, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onReadyStateChange = | |
function(e) { | |
!1 === this._isBuffering && e.readyState < | |
3 ? (this._isBuffering = !0, this._sendBufferStartEvent( | |
e.date)) : this._isBuffering && | |
e.readyState > 2 && (this._isBuffering = ! | |
1, this._sendBufferEndEvent(e.date) | |
) | |
}, n.prototype._sendBufferStartEvent = | |
function(e) { | |
var t = new a.MediaEvent(s.EventName.bufferstart, { | |
currentTime: this.getCurrentTime() | |
}, e); | |
this._eventBus.publish(t) | |
}, n.prototype._sendBufferEndEvent = | |
function(e) { | |
var t = new a.MediaEvent(s.EventName.bufferend, { | |
currentTime: this.getCurrentTime() | |
}, e); | |
this._eventBus.publish(t) | |
}, n | |
}(c.VuplayPlayer); | |
t.TheoPlayerDashWrapper = g | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(29), | |
o = n(30), | |
s = n(5), | |
a = n(15), | |
u = n(0), | |
c = n(21), | |
l = n(2), | |
p = n(0), | |
h = n(16), | |
d = n(11), | |
f = n(10), | |
y = n(14), | |
v = n(37), | |
_ = n(36), | |
g = function(t) { | |
function n(e, n, r) { | |
var i = t.call(this, e, n, r) || this; | |
return i._isBuffering = !1, i._enabledTextTrack = - | |
1, i._requestInterceptor = function(e) { | |
var t = e.url.toLowerCase(); | |
if (-1 !== t.indexOf("getkey") && - | |
1 === t.indexOf("token=")) { | |
var n = e.url + "?token=" + | |
encodeURIComponent(i._config | |
.getVudrmToken()); | |
e.redirect(n) | |
} | |
}, i._onAdBegin = function(e) { | |
var t = new _.AdEvent(s.EventName.adbegin, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdEnd = function(e) { | |
var t = new _.AdEvent(s.EventName.adend, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdError = function(e) { | |
var t = new _.AdEvent(s.EventName.aderror, | |
e.ad.duration, e.ad.skipOffset, | |
e.date); | |
i._eventBus.publish(t); | |
var n = new f.LogWarn( | |
"an ad threw an error. see ad error event for more detail.", { | |
errorEvent: e | |
}); | |
i._eventBus.publish(n) | |
}, i._onAdBreakBegin = function(e) { | |
var t = new v.AdBreakEvent(s.EventName | |
.adbreakbegin, e.ad.timeOffset, | |
e.ad.maxDuration, e.ad.ads.length, | |
e.date); | |
i._eventBus.publish(t) | |
}, i._onAdBreakEnd = function(e) { | |
var t = new v.AdBreakEvent(s.EventName | |
.adbreakend, e.ad.timeOffset, | |
e.ad.maxDuration, e.ad.ads.length, | |
e.date); | |
i._eventBus.publish(t) | |
}, i | |
} | |
return r(n, t), n.prototype.setDependencies = | |
function(e) { | |
this._eventBus = e.getDependency(l.default | |
.IEventBus), this._config = e.getDependency( | |
l.default.IConfig) | |
}, n.prototype.load = function() { | |
var t = this; | |
return this._checkForPlayerLoaded() || | |
this._loadPlayerIntoDom(), new e( | |
function(e, n) { | |
var r = setInterval( | |
function() { | |
t._checkForPlayerLoaded() && | |
( | |
clearInterval( | |
r), | |
t._setUpTheoPlayer(), | |
e(t)) | |
}, 50) | |
}) | |
}, n.prototype.play = function() { | |
this._theoPlayer.play() | |
}, n.prototype.pause = function() { | |
this._theoPlayer.pause() | |
}, n.prototype.isPaused = function() { | |
return this._theoPlayer.paused | |
}, n.prototype.getCurrentTime = function() { | |
if (this._config.isLive()) { | |
var e = 0; | |
try { | |
e = this._theoPlayer.seekable.start( | |
0) | |
} catch (e) { | |
return this._eventBus.publish( | |
new f.LogWarn( | |
"current live time unavailable: 0 will be returned until available", { | |
error: e | |
})), 0 | |
} | |
var t = this._theoPlayer.currentTime - | |
e, | |
n = this.getDuration(), | |
r = -1 * (n - t); | |
return Math.round(r) >= 0 ? -1 : r | |
} | |
return this._theoPlayer.currentTime | |
}, n.prototype.getDuration = function() { | |
if (this._config.isLive()) try { | |
return this._theoPlayer.seekable | |
.end(0) - this._theoPlayer.seekable | |
.start(0) | |
} catch (e) { | |
return this._eventBus.publish( | |
new f.LogWarn( | |
"unable to access duration in theoplayer aes. returning 0", { | |
error: e | |
})), 0 | |
} | |
return this._theoPlayer.duration | |
}, n.prototype.seek = function(e) { | |
if (this._config.isLive()) { | |
e *= -1; | |
e += this._theoPlayer.seekable.start( | |
0) | |
} | |
this._theoPlayer.currentTime = e | |
}, n.prototype.skipTo = function(e) { | |
if (this._config.isLive()) try { | |
var t = this.getUtcTime(), | |
n = t; | |
n.setSeconds(t.getSeconds() + e), | |
this._theoPlayer.currentProgramDateTime = | |
n | |
} catch (e) { | |
this._eventBus.publish(new f.LogWarn( | |
"Unable to set currentProgramDateTime in THEOplayer-AES.", { | |
error: e | |
})) | |
} else this._theoPlayer.currentTime = | |
this._theoPlayer.currentTime + | |
e | |
}, n.prototype.getVolume = function() { | |
return this._theoPlayer.volume | |
}, n.prototype.setVolume = function(e) { | |
this._theoPlayer.volume = e | |
}, n.prototype.getTextTracks = function() { | |
for (var e = this._theoPlayer.textTracks, | |
t = new Array, n = 0; n < e.length; n++) { | |
var r = new o.TextTrack(e[n].id, e[ | |
n].language, e[n].label, | |
e[n].kind, !1); | |
t.push(r) | |
} | |
return t | |
}, n.prototype.setTextTrack = function(e) { | |
var t = this._theoPlayer.textTracks; - | |
1 !== this._enabledTextTrack && | |
"showing" === t[this._enabledTextTrack] | |
.mode && e !== this._enabledTextTrack ? | |
(t[this._enabledTextTrack].mode = | |
"disabled", this._enabledTextTrack = | |
e) : t.length > e ? (t[e].mode = | |
"showing", this._enabledTextTrack = | |
e) : this._eventBus.publish(new f | |
.LogWarn( | |
"an attempt was made to enable a texttrack which is out of range", { | |
textTrackId: e | |
})) | |
}, n.prototype.getAudioTracks = function() { | |
var e = this._theoPlayer.audioTracks, | |
t = new Array; | |
return e.forEach(function(e) { | |
t.push(new i.AudioTrack( | |
Number(e.id), e | |
.language, e.enabled | |
)) | |
}), t | |
}, n.prototype.getEnabledAudioTrack = | |
function() { | |
for (var e = null, t = this.getAudioTracks(), | |
n = 0; n < t.length; n++) t[n].isActive && | |
(e = t[n]); | |
return e | |
}, n.prototype.setAudioTrack = function(e) { | |
var t = this; | |
this._theoPlayer.audioTracks.forEach( | |
function(n) { | |
Number(n.id) === e && (n.enabled = ! | |
0, t._eventBus.publish( | |
new a.MediaEvent( | |
s.EventName | |
.audiotrackchanged, { | |
track: new i | |
.AudioTrack( | |
n | |
.id, | |
n | |
.language, | |
n | |
.enabled | |
) | |
}))) | |
}) | |
}, n.prototype.setFullScreen = function(e) { | |
this._supportsFullScreen() && (e && ! | |
this.isFullScreen() ? this._enterFullScreen() : | |
this._exitFullScreen()) | |
}, n.prototype._supportsFullScreen = | |
function() { | |
var e = document; | |
return !(document.fullscreenEnabled && | |
e.mozFullScreenEnabled && e.webkitFullscreenEnabled && | |
e.msFullscreenEnabled) | |
}, n.prototype.isFullScreen = function() { | |
var e = document; | |
return !!(document.fullscreenElement || | |
e.mozFullScreenElement || e.webkitFullscreenElement || | |
e.msFullscreenElement) | |
}, n.prototype._enterFullScreen = function() { | |
var e = this._config.isIOS() ? this._config | |
.getVideoElement() : this._config.getPlayerDiv(); | |
e.requestFullscreen ? e.requestFullscreen() : | |
e.mozRequestFullScreen ? e.mozRequestFullScreen() : | |
e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : | |
e.webkitEnterFullscreen ? e.webkitEnterFullscreen() : | |
e.msRequestFullscreen && e.msRequestFullscreen() | |
}, n.prototype._exitFullScreen = function() { | |
var e = document; | |
document.exitFullscreen ? document.exitFullscreen() : | |
document.webkitExitFullscreen ? | |
document.webkitExitFullscreen() : e | |
.mozCancelFullScreen ? e.mozCancelFullScreen() : | |
e.msExitFullscreen && e.msExitFullscreen() | |
}, n.prototype.setSrc = function() { | |
if (this._theoPlayer.autoplay = this._config | |
.getAutoStart(), this._config.getSrc() | |
) this._eventBus.publish(new a.MediaEvent( | |
s.EventName.loadsrc, { | |
src: this.getSrc(), | |
player: this.playerId | |
})), this._theoPlayer.source = { | |
sources: [this._getSources()] | |
}; | |
else { | |
var e = new u.VuplayError( | |
"src cannot be set on the player when undefined, null or empty", | |
p.VuplayErrorType.PLAYER, | |
this._config.getSrc()), | |
t = new h.ErrorEvent(e); | |
this._eventBus.publish(t) | |
} | |
}, n.prototype.getUtcTime = function() { | |
return this._theoPlayer.currentProgramDateTime | |
}, n.prototype.reset = function() { | |
this._theoPlayer.stop(), this._config.reset() | |
}, n.prototype.scheduleAd = function(e) { | |
var t = this._theoPlayer.ads, | |
n = y.Helpers.toHHMMSS(e.getStartTime()), | |
r = { | |
sources: e.getSrc(), | |
timeOffset: String(n) | |
}; | |
e.getSkipTime() > -1 && (r.skipOffset = | |
String(e.getSkipTime())), t.schedule( | |
r) | |
}, n.prototype.skipCurrentAd = function() { | |
var e = this._theoPlayer.ads.currentAdBreak | |
.ads; | |
return e.length > 0 && this.getCurrentTime() > | |
e[0].skipOffset && (this._theoPlayer | |
.ads.skip(), this._eventBus.publish( | |
new _.AdEvent(s.EventName.adskipped, | |
e[0].duration, e[0].skipOffset | |
)), !0) | |
}, n.prototype._loadPlayerIntoDom = | |
function() { | |
var e = document.createElement("script"); | |
e.type = "text/javascript", e.src = | |
this.playerConfig.jsUrl, document.body | |
.appendChild(e), this._eventBus.publish( | |
new d.LogDebug( | |
"adding player js to the dom", { | |
scriptElement: e | |
})), document.body.appendChild( | |
e) | |
}, n.prototype._checkForPlayerLoaded = | |
function() { | |
return "undefined" == typeof THEOplayer || | |
null === THEOplayer ? (this._eventBus | |
.publish(new d.LogDebug( | |
"still loading the player into the dom" | |
)), !1) : (this._eventBus.publish( | |
new d.LogDebug( | |
"player loaded into the dom" | |
)), !0) | |
}, n.prototype.getSrc = function() { | |
var e = this._config.getSrc(), | |
t = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlRegex : this.playerConfig.ismRegex, | |
n = e.indexOf(".isml") > -1 ? this.playerConfig | |
.ismlReplacement : this.playerConfig | |
.ismReplacement; | |
return e.replace(t, n) | |
}, n.prototype._setUpTheoPlayer = function() { | |
this._theoPlayer = new THEOplayer.Player( | |
this._config.getPlayerDiv(), { | |
libraryLocation: this.playerConfig | |
.scriptsPath | |
}), this._theoPlayer.autoplay = | |
this._config.getAutoStart(), this._theoPlayer | |
.network.addRequestInterceptor(this | |
._requestInterceptor), this._subscribeTheoPlayerEvents() | |
}, n.prototype._getSources = function() { | |
return { | |
src: this.getSrc(), | |
type: this.playerConfig.streamType | |
} | |
}, n.prototype._subscribeTheoPlayerEvents = | |
function() { | |
var e = this; | |
document.addEventListener( | |
"webkitfullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"mozfullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"MSFullscreenChange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), document.addEventListener( | |
"fullscreenchange", | |
function(t) { | |
e._fullScreenChangeHandler( | |
t) | |
}), this._theoPlayer.addEventListener( | |
"error", | |
function(t) { | |
e._onError(t) | |
}), this._theoPlayer.addEventListener( | |
"contentprotectionerror", | |
function(t) { | |
e._onError(t) | |
}), this._theoPlayer.addEventListener( | |
"canplay", | |
function(t) { | |
e._onCanPlay(t) | |
}), this._theoPlayer.addEventListener( | |
"playing", | |
function(t) { | |
e._onPlaying(t) | |
}), this._theoPlayer.addEventListener( | |
"play", | |
function(t) { | |
e._onPlay(t) | |
}), this._theoPlayer.addEventListener( | |
"pause", | |
function(t) { | |
e._onPause(t) | |
}), this._theoPlayer.addEventListener( | |
"seeking", | |
function(t) { | |
e._onSeeking(t) | |
}), this._theoPlayer.addEventListener( | |
"seeked", | |
function(t) { | |
e._onSeeked(t) | |
}), this._theoPlayer.addEventListener( | |
"ratechange", | |
function(t) { | |
e._onRateChange(t) | |
}), this._theoPlayer.addEventListener( | |
"progress", | |
function(t) { | |
e._onProgress(t) | |
}), this._theoPlayer.addEventListener( | |
"timeupdate", | |
function(t) { | |
e._onTimeUpdate(t) | |
}), this._theoPlayer.addEventListener( | |
"ended", | |
function(t) { | |
e._onEnded(t) | |
}), this._theoPlayer.addEventListener( | |
"loadedmetadata", | |
function(t) { | |
e._onLoadedMetadata(t) | |
}), this._theoPlayer.addEventListener( | |
"loadeddata", | |
function(t) { | |
e._onLoadedData(t) | |
}), this._theoPlayer.addEventListener( | |
"volumechange", | |
function(t) { | |
e._onVolumeChange(t) | |
}), this._theoPlayer.textTracks | |
.addEventListener("addtrack", | |
function(t) { | |
e._onAddTrack(t) | |
}), this._theoPlayer.addEventListener( | |
"readystatechange", | |
function(t) { | |
e._onReadyStateChange(t) | |
}), this._theoPlayer.ads && ( | |
this._theoPlayer.ads.addEventListener( | |
"adbegin", this._onAdBegin), | |
this._theoPlayer.ads.addEventListener( | |
"adend", this._onAdEnd), | |
this._theoPlayer.ads.addEventListener( | |
"aderror", this._onAdError), | |
this._theoPlayer.ads.addEventListener( | |
"adbreakbegin", this._onAdBreakBegin | |
), this._theoPlayer.ads.addEventListener( | |
"adbreakend", this._onAdBreakEnd | |
)) | |
}, n.prototype._fullScreenChangeHandler = | |
function(e) { | |
this._eventBus.publish(new a.MediaEvent( | |
s.EventName.fullscreenchanged, { | |
isFullScreen: this.isFullScreen() | |
})) | |
}, n.prototype._onError = function(e) { | |
var t = new u.VuplayError(e.error, p.VuplayErrorType | |
.PLAYER, e); | |
this._eventBus.publish(new h.ErrorEvent( | |
t, e.date)) | |
}, n.prototype._onCanPlay = function(e) { | |
var t = new a.MediaEvent(s.EventName.canplay, { | |
currentTime: e.currentTime | |
}, e.Date); | |
this._eventBus.publish(t), this._eventBus | |
.publish(new a.MediaEvent(s.EventName | |
.audiotrackchanged, { | |
track: this.getEnabledAudioTrack() | |
})) | |
}, n.prototype._onPlaying = function(e) { | |
var t = new a.MediaEvent(s.EventName.playing, { | |
currentTime: e.currentTime | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onPlay = function(e) { | |
var t = new a.MediaEvent(s.EventName.play, { | |
currentTime: e.currentTime | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onPause = function(e) { | |
var t = Math.round(this._theoPlayer.currentTime) >= | |
Math.round(this._theoPlayer.duration), | |
n = new a.MediaEvent(s.EventName.pause, { | |
ended: t | |
}, e.date); | |
this._eventBus.publish(n), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onSeeking = function(e) { | |
var t = new a.MediaEvent(s.EventName.seeking, { | |
currentTime: e.currentTime | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferStartEvent( | |
e.date) | |
}, n.prototype._onSeeked = function(e) { | |
var t = new a.MediaEvent(s.EventName.seeked, { | |
currentTime: e.currentTime | |
}, e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onRateChange = function(e) { | |
var t = new a.MediaEvent(s.EventName.ratechange, { | |
playbackRate: e.playbackRate | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onProgress = function(e) { | |
var t = new a.MediaEvent(s.EventName.progress, { | |
currentTime: this.getCurrentTime(), | |
buffered: e.buffered | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onTimeUpdate = function(e) { | |
var t = new a.MediaEvent(s.EventName.timeupdate, { | |
currentTime: e.currentTime | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onEnded = function(e) { | |
var t = new a.MediaEvent(s.EventName.ended, {}, | |
e.date); | |
this._eventBus.publish(t), this._sendBufferEndEvent( | |
e.date) | |
}, n.prototype._onLoadedMetadata = function( | |
e) { | |
var t = new a.MediaEvent(s.EventName.loadedmetadata, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onLoadedData = function(e) { | |
var t = new a.MediaEvent(s.EventName.loadeddata, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onVolumeChange = function(e) { | |
var t = new a.MediaEvent(s.EventName.volumechange, { | |
volume: e.volume | |
}, e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onAddTrack = function(e) { | |
var t = new a.MediaEvent(s.EventName.texttrackadded, {}, | |
e.date); | |
this._eventBus.publish(t) | |
}, n.prototype._onReadyStateChange = | |
function(e) { | |
!1 === this._isBuffering && e.readyState < | |
3 ? (this._isBuffering = !0, this._sendBufferStartEvent( | |
e.date)) : this._isBuffering && | |
e.readyState > 2 && (this._isBuffering = ! | |
1, this._sendBufferEndEvent(e.date) | |
) | |
}, n.prototype._sendBufferStartEvent = | |
function(e) { | |
var t = new a.MediaEvent(s.EventName.bufferstart, { | |
currentTime: this._theoPlayer | |
.currentTime | |
}, e); | |
this._eventBus.publish(t) | |
}, n.prototype._sendBufferEndEvent = | |
function(e) { | |
var t = new a.MediaEvent(s.EventName.bufferend, { | |
currentTime: this._theoPlayer | |
.currentTime | |
}, e); | |
this._eventBus.publish(t) | |
}, n | |
}(c.VuplayPlayer); | |
t.TheoPlayerAESWrapper = g | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t) { | |
this.jsUrl = e, this.streamManifest = t | |
} | |
return e | |
}(); | |
t.default = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.decorate) s = Reflect.decorate( | |
e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = | |
e[a]) && (s = (o < 3 ? i(s) : o > 3 ? | |
i(t, n, s) : i(t, n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, | |
s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.metadata) return Reflect.metadata( | |
e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(6), | |
s = n(2), | |
a = n(0), | |
u = n(116), | |
c = function() { | |
function t() {} | |
return t.prototype.setDependencies = function(e) { | |
this._config = e.getDependency(s.default | |
.IConfig) | |
}, t.prototype.get = function(e, t) { | |
return void 0 === t && (t = null), this | |
._send("GET", e, t) | |
}, t.prototype.post = function(e, t, n) { | |
return void 0 === t && (t = ""), void 0 === | |
n && (n = null), this._send("POST", | |
e, n, t) | |
}, t.prototype._send = function(t, n, r, i) { | |
return void 0 === i && (i = ""), new e( | |
function(e, o) { | |
var s = new XMLHttpRequest; | |
s.open(t, n), null != r && | |
r.forEach(function(e) { | |
return s.setRequestHeader( | |
e.header, | |
e.data) | |
}), s.onload = function( | |
r) { | |
s.status > 199 && s | |
.status < 300 ? | |
e(new u.default( | |
s)) : o(new a | |
.VuplayError( | |
t.toUpperCase() + | |
"ing data to " + | |
n + | |
" caused a " + | |
s.status, | |
a.VuplayErrorType | |
.REQUEST, { | |
xhr: s, | |
event: r | |
})) | |
}, s.onerror = function( | |
e) { | |
o(new a.VuplayError( | |
t.toUpperCase() + | |
"ing data to url " + | |
n, a.VuplayErrorType | |
.REQUEST, { | |
xhr: s, | |
event: e | |
})) | |
}, "POST" === t ? s.send( | |
i) : s.send() | |
}) | |
}, t = r([o.injectable(), i( | |
"design:paramtypes", [])], t) | |
}(); | |
t.HttpRequest = c | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e) { | |
this.headers = e.getAllResponseHeaders(), this.rawResponse = | |
e.response, this.xml = e.responseXML, this.text = | |
e.responseText, this.type = e.responseType, | |
this.status = e.status, this.statusText = e.statusText, | |
this.xhr = e | |
} | |
return e | |
}(); | |
t.default = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.decorate) s = Reflect.decorate( | |
e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = | |
e[a]) && (s = (o < 3 ? i(s) : o > 3 ? | |
i(t, n, s) : i(t, n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, | |
s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.metadata) return Reflect.metadata( | |
e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(6); | |
n(35); | |
var s = n(2), | |
a = n(0), | |
u = n(33), | |
c = n(55), | |
l = n(32), | |
p = n(118), | |
h = n(0), | |
d = n(16), | |
f = function() { | |
function t() { | |
this._loadedPlugins = [], this._statsConfigs = {} | |
} | |
return t.prototype.setDependencies = function(e) { | |
this._goossensContainer = e, this._eventBus = | |
this._goossensContainer.getDependency( | |
s.default.IEventBus), this._config = | |
this._goossensContainer.getDependency( | |
s.default.IConfig) | |
}, t.prototype.setStatsConfigs = function(e) { | |
if ("object" != typeof e) { | |
var t = new a.VuplayError( | |
"passed stats config is not an object. The config will NOT be used.", | |
h.VuplayErrorType.SETUP, { | |
configs: e | |
}); | |
this._eventBus.publish(new d.ErrorEvent( | |
t)) | |
} else this._statsConfigs = e | |
}, t.prototype.loadAllPlugins = function(t) { | |
var n = this; | |
return this._vuplaySmart = t, new e( | |
function(e, t) { | |
var r = u.default.get(s.default | |
.IHttpRequest); | |
r.setDependencies(n._goossensContainer); | |
var i = l.GetStatsPlugins.replace( | |
"{player_key}", n._config | |
.getPlayerKey()); | |
r.get(i, [c.JsonContentTypeHeader]) | |
.then(function(r) { | |
n._onGetStatsPluginsSuccess( | |
r).then( | |
function() { | |
e() | |
}).catch( | |
function( | |
e) { | |
t(e) | |
}) | |
}).catch(function(e) { | |
t(e) | |
}) | |
}) | |
}, t.prototype.startAllPlugins = function() { | |
for (var e = 0; e < this._loadedPlugins | |
.length; e++) { | |
var t = this._statsConfigs[this._loadedPlugins[ | |
e].pluginId] || {}; | |
this._loadedPlugins[e].start(t) | |
} | |
}, t.prototype.stopAllPlugins = function() { | |
for (var e = 0; e < this._loadedPlugins | |
.length; e++) this._loadedPlugins[e] | |
.stop() | |
}, t.prototype._onGetStatsPluginsSuccess = | |
function(t) { | |
var n = this; | |
return new e(function(r, i) { | |
var o = JSON.parse(t.rawResponse); | |
if (Array.isArray(o) && o.length > | |
0) { | |
for (var s = new Array, | |
a = 0; a < o.length; a++) | |
s.push(n._addStatsPlugin( | |
o[a].plugin_id, | |
o[a].js_url | |
)); | |
e.all(s).then(function() { | |
r() | |
}).catch(function(e) { | |
i(e) | |
}) | |
} else r() | |
}) | |
}, t.prototype._addStatsPlugin = function(t, | |
n) { | |
var r = this; | |
return new e(function(i, o) { | |
p.statsPluginLoaderFactory( | |
t).load().then( | |
function(s) { | |
var a = new s.default( | |
t); | |
if (a.setDependencies( | |
r._goossensContainer | |
), Array.isArray( | |
n) && n | |
.length > 0 | |
) { | |
for (var u = | |
new Array, | |
c = | |
0; c < | |
n.length; c++ | |
) u.push(a.load( | |
n[ | |
c | |
], | |
r | |
._vuplaySmart | |
)); | |
e.all(u).then( | |
function() { | |
r | |
._loadedPlugins | |
.push( | |
a | |
), | |
i() | |
}).catch( | |
function( | |
e | |
) { | |
o | |
( | |
e | |
) | |
}) | |
} else a.load(n, | |
r._vuplaySmart | |
).then( | |
function() { | |
r._loadedPlugins | |
.push( | |
a | |
), | |
i() | |
}).catch( | |
function( | |
e) { | |
o(e) | |
}) | |
}).catch(function(e) { | |
o(e) | |
}) | |
}) | |
}, t = r([o.injectable(), i( | |
"design:paramtypes", [])], t) | |
}(); | |
t.StatsManager = f | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
var t = {}; | |
t[a.StatsPluginIds.YOUBORA] = o.YouboraLoader, t[a.StatsPluginIds | |
.VUALTO] = s.VualtoLoader, t[a.StatsPluginIds.COMSCORE] = | |
u.ComscoreLoader, t[a.StatsPluginIds.CIM] = c.CimLoader, | |
t[a.StatsPluginIds.AT_INTERNET] = i.ATInternetLoader, t[ | |
a.StatsPluginIds.ADOBE] = l.AdobeLoader; | |
var n = t[e]; | |
return n ? new n(e) : null | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(119), | |
o = n(120), | |
s = n(121), | |
a = n(18), | |
u = n(122), | |
c = n(123), | |
l = n(124); | |
t.statsPluginLoaderFactory = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(0), | |
o = n(18), | |
s = n(24), | |
a = n(0), | |
u = function(t) { | |
function s(e) { | |
return t.call(this, e) || this | |
} | |
return r(s, t), s.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(11).then(function(t) { | |
var r = n( | |
163 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new a.VuplayError( | |
"Failed to load " + | |
o.StatsPluginIds | |
.AT_INTERNET + | |
" stats plugin", | |
i.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, s | |
}(s.StatsPluginLoaderBase); | |
t.ATInternetLoader = u | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(18), | |
o = n(24), | |
s = n(0), | |
a = function(t) { | |
function o(e) { | |
return t.call(this, e) || this | |
} | |
return r(o, t), o.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(7).then(function(t) { | |
var r = n( | |
164 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new s.VuplayError( | |
"Failed to load " + | |
i.StatsPluginIds | |
.YOUBORA + | |
" stats plugin", | |
s.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, o | |
}(o.StatsPluginLoaderBase); | |
t.YouboraLoader = a | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(24), | |
o = n(0), | |
s = n(18), | |
a = function(t) { | |
function i(e) { | |
return t.call(this, e) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(8).then(function(t) { | |
var r = n( | |
165 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"Failed to load " + | |
s.StatsPluginIds | |
.VUALTO + | |
" stats plugin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.StatsPluginLoaderBase); | |
t.VualtoLoader = a | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(24), | |
o = n(0), | |
s = n(18), | |
a = function(t) { | |
function i(e) { | |
return t.call(this, e) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(9).then(function(t) { | |
var r = n( | |
166 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"Failed to load " + | |
s.StatsPluginIds | |
.COMSCORE + | |
" stats plugin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.StatsPluginLoaderBase); | |
t.ComscoreLoader = a | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(24), | |
o = n(0), | |
s = n(18), | |
a = function(t) { | |
function i(e) { | |
return t.call(this, e) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(10).then(function(t) { | |
var r = n( | |
167 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"Failed to load " + | |
s.StatsPluginIds | |
.CIM + | |
" stats plugin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.StatsPluginLoaderBase); | |
t.CimLoader = a | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(24), | |
o = n(0), | |
s = n(18), | |
a = function(t) { | |
function i(e) { | |
return t.call(this, e) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(6).then(function(t) { | |
var r = n( | |
168 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"Failed to load " + | |
s.StatsPluginIds | |
.ADOBE + | |
" stats plugin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.StatsPluginLoaderBase); | |
t.AdobeLoader = a | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.decorate) s = Reflect.decorate( | |
e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = | |
e[a]) && (s = (o < 3 ? i(s) : o > 3 ? | |
i(t, n, s) : i(t, n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, | |
s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.metadata) return Reflect.metadata( | |
e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(6), | |
s = n(2), | |
a = n(126), | |
u = n(27), | |
c = n(23), | |
l = function() { | |
function t() {} | |
return t.prototype.setDependencies = function(e) { | |
this._goossensContainer = e, this._eventBus = | |
this._goossensContainer.getDependency( | |
s.default.IEventBus), this._config = | |
this._goossensContainer.getDependency( | |
s.default.IConfig) | |
}, t.prototype.loadSkin = function(t) { | |
var n = this; | |
return this._vuplaySmart = t, new e( | |
function(e, t) { | |
var r = n._config.getSkin(); | |
if (r === c.SkinType.NO_SKIN) | |
e(); | |
else { | |
a.skinLoaderFactory(r).load() | |
.then(function(t) { | |
n._skin = | |
new t.default( | |
n._vuplaySmart, | |
n._config | |
.getPlayerDiv() | |
), n._skin | |
.setDependencies( | |
n._goossensContainer | |
), n._skin | |
.load(), | |
n._eventBus | |
.publish( | |
new u | |
.LogInfo( | |
"skin loaded", { | |
skinType: r | |
} | |
)), | |
e() | |
}).catch(function(e) { | |
t(e) | |
}) | |
} | |
}) | |
}, t.prototype.setSelectedAudioTrack = | |
function(e) { | |
this._config.getSkin() !== c.SkinType.NO_SKIN && | |
this._skin && this._skin.setSelectedAudioTrack( | |
e) | |
}, t.prototype.setSelectedTextTrack = | |
function(e) { | |
this._config.getSkin() !== c.SkinType.NO_SKIN && | |
this._skin && this._skin.setSelectedTextTrack( | |
e) | |
}, t.prototype.setClipStart = function(e) { | |
return this._config.getSkin() === c.SkinType | |
.VUALTO && this._skin ? this._skin.setClipStart( | |
e) : null | |
}, t.prototype.setClipEnd = function(e) { | |
return this._config.getSkin() === c.SkinType | |
.VUALTO && this._skin ? this._skin.setClipEnd( | |
e) : null | |
}, t = r([o.injectable(), i( | |
"design:paramtypes", [])], t) | |
}(); | |
t.SkinManager = l | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
switch (e) { | |
case a.SkinType.DEFAULT: | |
return new s.DefaultLoader; | |
case a.SkinType.VUPLAY: | |
return new o.VuplayLoader; | |
case a.SkinType.EUROPARL: | |
return new i.EuroparlLoader; | |
case a.SkinType.VIASAT: | |
return new u.ViasatLoader; | |
case a.SkinType.VUALTO: | |
return new c.VualtoLoader; | |
default: | |
return null | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(127), | |
o = n(128), | |
s = n(129), | |
a = n(23), | |
u = n(130), | |
c = n(131); | |
t.skinLoaderFactory = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(31), | |
o = n(0), | |
s = function(t) { | |
function i() { | |
return null !== t && t.apply(this, | |
arguments) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(0).then(function(t) { | |
var r = n( | |
169 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"failed to load vuplay skin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.SkinLoaderBase); | |
t.EuroparlLoader = s | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(31), | |
o = n(0), | |
s = function(t) { | |
function i() { | |
return null !== t && t.apply(this, | |
arguments) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(2).then(function(t) { | |
var r = n( | |
170 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"failed to load vuplay skin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.SkinLoaderBase); | |
t.VuplayLoader = s | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(31), | |
o = n(0), | |
s = function(t) { | |
function i() { | |
return null !== t && t.apply(this, | |
arguments) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(3).then(function(t) { | |
var r = n( | |
171 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"failed to load default skin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.SkinLoaderBase); | |
t.DefaultLoader = s | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(31), | |
o = n(0), | |
s = function(t) { | |
function i() { | |
return null !== t && t.apply(this, | |
arguments) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(1).then(function(t) { | |
var r = n( | |
172 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"failed to load viasat skin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.SkinLoaderBase); | |
t.ViasatLoader = s | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(31), | |
o = n(0), | |
s = function(t) { | |
function i() { | |
return null !== t && t.apply(this, | |
arguments) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(4).then(function(t) { | |
var r = n( | |
173 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"failed to load vualto skin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.SkinLoaderBase); | |
t.VualtoLoader = s | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.decorate) s = Reflect.decorate( | |
e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = | |
e[a]) && (s = (o < 3 ? i(s) : o > 3 ? | |
i(t, n, s) : i(t, n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, | |
s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == | |
typeof Reflect.metadata) return Reflect.metadata( | |
e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(5), | |
s = n(6); | |
n(35); | |
var a = n(2), | |
u = n(133), | |
c = n(34), | |
l = n(27), | |
p = n(9), | |
h = n(14), | |
d = function() { | |
function t() { | |
var e = this; | |
this._availableCasts = [], this._onCastLoaded = | |
function(t) { | |
e._availableCasts.push(t.args.castType) | |
}, this._loadedPlugins = [] | |
} | |
return t.prototype.setDependencies = function(e) { | |
this._goossensContainer = e, this._eventBus = | |
this._goossensContainer.getDependency( | |
a.default.IEventBus), this._config = | |
this._goossensContainer.getDependency( | |
a.default.IConfig), this._eventBus | |
.on(p.EventType.CAST, o.EventName.castloaded, | |
this._onCastLoaded) | |
}, t.prototype.loadAllCasts = function(t) { | |
var n = this; | |
if (this._vuplaySmart = t, h.Helpers.isChrome()) { | |
return new e(function(e, t) { | |
u.castLoaderFactory(c.CastType | |
.CHROMECAST).load() | |
.then(function(t) { | |
n._cast = | |
new t.default, | |
n._cast | |
.setDependencies( | |
n._goossensContainer | |
), n._cast | |
.load(n | |
._vuplaySmart | |
), n._eventBus | |
.publish( | |
new l | |
.LogInfo( | |
"cast loaded", { | |
castType: c | |
.CastType | |
.CHROMECAST | |
} | |
)), | |
e() | |
}).catch(function(e) { | |
t(e) | |
}) | |
}) | |
} | |
}, t.prototype.startCasting = function(e, t, | |
n) { | |
this._cast && this._cast.startCasting(t, | |
n, this._vuplaySmart.isLive()) | |
}, t.prototype.stopCasting = function() { | |
this._cast && this._cast.stopCasting() | |
}, t.prototype.isCasting = function() { | |
return !!this._cast && this._cast.isCasting() | |
}, t.prototype.getAvailableCastTypes = | |
function() { | |
return this._availableCasts | |
}, t.prototype.play = function() { | |
this._cast && this._cast.playOrPause() | |
}, t.prototype.pause = function() { | |
this._cast && this._cast.playOrPause() | |
}, t.prototype.seek = function(e) { | |
this._cast && this._cast.seek(e) | |
}, t.prototype.isPaused = function() { | |
if (this._cast) return this._cast.isPaused() | |
}, t.prototype.getVolume = function() { | |
if (this._cast) return this._cast.getVolume() | |
}, t.prototype.setVolume = function(e) { | |
if (this._cast) return this._cast.setVolume( | |
e) | |
}, t.prototype.getCurrentTime = function() { | |
if (this._cast) return this._cast.getCurrentTime() | |
}, t.prototype.getDuration = function() { | |
if (this._cast) return this._cast.getDuration() | |
}, t = r([s.injectable(), i( | |
"design:paramtypes", [])], t) | |
}(); | |
t.CastManager = d | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
switch (e) { | |
case o.CastType.CHROMECAST: | |
return new i.ChromecastLoader; | |
default: | |
return null | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(134), | |
o = n(34); | |
t.castLoaderFactory = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && | |
(e[n] = t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? | |
Object.create(n) : (r.prototype = n | |
.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(135), | |
o = n(0), | |
s = n(34), | |
a = function(t) { | |
function i() { | |
return null !== t && t.apply(this, | |
arguments) || this | |
} | |
return r(i, t), i.prototype.load = function() { | |
return new e(function(e, t) { | |
try { | |
n.e(5).then(function(t) { | |
var r = n( | |
174 | |
); | |
e(r) | |
}.bind(null, n)).catch( | |
n.oe) | |
} catch (e) { | |
t(new o.VuplayError( | |
"failed to load" + | |
s.CastType.CHROMECAST + | |
" cast plugin", | |
o.VuplayErrorType | |
.SETUP, e)) | |
} | |
}) | |
}, i | |
}(i.CastLoaderBase); | |
t.ChromecastLoader = a | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e() {} | |
return e | |
}(); | |
t.CastLoaderBase = r | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.decorate) s = Reflect.decorate(e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = e[a]) && | |
(s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, | |
n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.metadata) return Reflect.metadata(e, t) | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = n(6), | |
s = n(10), | |
a = n(2), | |
u = n(137), | |
c = n(139), | |
l = n(56), | |
p = function() { | |
function e() { | |
this._hasPlaylistBeenScheduled = !1, this._ads = [] | |
} | |
return e.prototype.setDependencies = function(e) { | |
this._goossensContainer = e, this._eventBus = e | |
.getDependency(a.default.IEventBus), this._config = | |
e.getDependency(a.default.IConfig) | |
}, e.prototype.scheduleAd = function(e, t, n, r) { | |
if (e === l.AdType.VAST) { | |
var i = new u.VastAd(t, n, r); | |
this._ads.push(i), this._player && (this._player | |
.scheduleAd(i), i.isScheduled = !0) | |
} else { | |
var o = new s.LogWarn( | |
"Unknown ad type. Ad will not be scheduled.", { | |
adType: e, | |
src: t | |
}); | |
this._eventBus.publish(o) | |
} | |
}, e.prototype.schedulePlaylistAds = function(e, t) { | |
if (e === l.AdType.REMIX) | |
if (Array.isArray(t)) this._remixService.scheduleRemixAds( | |
t), this._hasPlaylistBeenScheduled = ! | |
0; | |
else { | |
var n = new s.LogWarn( | |
"Unknown playlist type. Ad will not be scheduled.", { | |
adType: e, | |
playlist: t | |
}); | |
this._eventBus.publish(n) | |
} | |
else { | |
var n = new s.LogWarn( | |
"Unknown ad type. Ad will not be scheduled.", { | |
adType: e, | |
playlist: t | |
}); | |
this._eventBus.publish(n) | |
} | |
}, e.prototype.skipCurrentAd = function() { | |
if (this._hasPlaylistBeenScheduled) { | |
var e = new s.LogWarn( | |
"SkipCurrentAd method is not supported on server side ads", {} | |
); | |
this._eventBus.publish(e) | |
} | |
return !!this._player && this._player.skipCurrentAd() | |
}, e.prototype.setPlayer = function(e) { | |
this._player = e; | |
for (var t = 0; t < this._ads.length; t++) !1 === | |
this._ads[t].isScheduled && (this._player.scheduleAd( | |
this._ads[t]), this._ads[t].isScheduled = ! | |
0); | |
this._remixService = new c.RemixAdService, this | |
._remixService.setDependencies(this._goossensContainer) | |
}, e = r([o.injectable(), i("design:paramtypes", [])], | |
e) | |
}(); | |
t.AdManager = p | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(138), | |
o = function(e) { | |
function t(t, n, r) { | |
return e.call(this, t, n, r) || this | |
} | |
return r(t, e), t | |
}(i.VuplayAd); | |
t.VastAd = o | |
}, function(e, t, n) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = function() { | |
function e(e, t, n) { | |
this.isScheduled = !1, this._src = e, this._startTime = | |
t || 0, this._skipTime = n || -1 | |
} | |
return e.prototype.getSrc = function() { | |
return this._src | |
}, e.prototype.getStartTime = function() { | |
return this._startTime | |
}, e.prototype.getSkipTime = function() { | |
return this._skipTime | |
}, e | |
}(); | |
t.VuplayAd = r | |
}, function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var r = n(2), | |
i = n(48), | |
o = n(15), | |
s = n(36), | |
a = n(5), | |
u = n(37), | |
c = function() { | |
function t() { | |
var e = this; | |
this._currentAdBreakAdCount = 0, this._currentAdBreakDuration = | |
0, this._isAdBreakStarted = !1, this._isAdStarted = ! | |
1, this._onEnd = function() { | |
e._stopAdsIfVideoFinished(), e._removeEventListeners() | |
}, this._checkAdvertisementStatus = | |
function(t) { | |
if (e._playlist) { | |
var n = t.args.currentTime; | |
e._setCurrentSegment(1e3 * n).then( | |
function(t) { | |
e._publishEvents(n) | |
}) | |
} | |
} | |
} | |
return t.prototype.setDependencies = function(e) { | |
this._eventBus = e.getDependency(r.default | |
.IEventBus) | |
}, t.prototype.scheduleRemixAds = function( | |
e) { | |
this._playlist = e, this._checkAdvertisementStatus( | |
new o.MediaEvent(a.EventName.timeupdate, { | |
currentTime: 0 | |
})), this._setEventListeners() | |
}, t.prototype._setEventListeners = | |
function() { | |
this._eventBus.on(i.Vuplay.EventType.MEDIA, | |
i.Vuplay.Events.timeupdate, | |
this._checkAdvertisementStatus), | |
this._eventBus.on(i.Vuplay.EventType | |
.MEDIA, i.Vuplay.Events.ended, | |
this._onEnd), this._eventBus.on( | |
i.Vuplay.EventType.AD, i.Vuplay | |
.Events.aderror, this._onEnd), | |
this._eventBus.on(i.Vuplay.EventType | |
.ERROR, i.Vuplay.Events.error, | |
this._onEnd) | |
}, t.prototype._removeEventListeners = | |
function() { | |
this._eventBus.off(i.Vuplay.EventType.MEDIA, | |
i.Vuplay.Events.timeupdate, | |
this._checkAdvertisementStatus), | |
this._eventBus.off(i.Vuplay.EventType | |
.MEDIA, i.Vuplay.Events.ended, | |
this._onEnd), this._eventBus.off( | |
i.Vuplay.EventType.AD, i.Vuplay | |
.Events.aderror, this._onEnd), | |
this._eventBus.off(i.Vuplay.EventType | |
.ERROR, i.Vuplay.Events.error, | |
this._onEnd) | |
}, t.prototype._stopAdsIfVideoFinished = | |
function() { | |
this._isAdStarted && this._eventBus.publish( | |
new s.AdEvent(a.EventName.adend, | |
0, -1)), this._isAdBreakStarted && | |
this._eventBus.publish(new u.AdBreakEvent( | |
a.EventName.adbreakend, 0, | |
this._currentAdBreakDuration, | |
this._currentAdBreakAdCount | |
)), this._resetCurrentAdBreakInfo() | |
}, t.prototype._publishEvents = function(e) { | |
this._currentSegment && (this._hasAdBreakToBeStarted() && | |
(this._eventBus.publish(new u.AdBreakEvent( | |
a.EventName.adbreakbegin, | |
e, this._currentAdBreakDuration, | |
this._currentAdBreakAdCount | |
)), this._isAdBreakStarted = ! | |
0), this._hasAdToBeEnded() && | |
(this._eventBus.publish(new s.AdEvent( | |
a.EventName.adend, | |
this._currentSegment | |
.duration, -1)), this._isAdStarted = ! | |
1), this._hasAdToBeEndedAndNewOneStarted() && | |
(this._eventBus.publish(new s.AdEvent( | |
a.EventName.adend, | |
this._currentSegment | |
.duration, -1)), this._eventBus | |
.publish(new s.AdEvent(a.EventName | |
.adbegin, this._currentSegment | |
.duration, -1))), this._hasAdToBeStarted() && | |
(this._eventBus.publish(new s.AdEvent( | |
a.EventName.adbegin, | |
this._currentSegment | |
.duration, -1)), this._isAdStarted = ! | |
0), this._hasAdBreakToBeEnded() && | |
(this._eventBus.publish(new u.AdBreakEvent( | |
a.EventName.adbreakend, | |
this._currentSegment | |
.duration, this._currentAdBreakDuration, | |
this._currentAdBreakAdCount | |
)), this._resetCurrentAdBreakInfo()), | |
this._previousSegment = this._currentSegment | |
) | |
}, t.prototype._hasAdBreakToBeStarted = | |
function() { | |
return !this._isAdBreakStarted && | |
"promotional" === this._currentSegment | |
.eventType | |
}, t.prototype._hasAdToBeEnded = function() { | |
return this._isAdStarted && "standard" === | |
this._currentSegment.eventType | |
}, t.prototype._hasAdToBeEndedAndNewOneStarted = | |
function() { | |
return this._isAdStarted && this._previousSegment !== | |
this._currentSegment && | |
"promotional" === this._currentSegment | |
.eventType | |
}, t.prototype._hasAdToBeStarted = function() { | |
return !this._isAdStarted && | |
"promotional" === this._currentSegment | |
.eventType | |
}, t.prototype._hasAdBreakToBeEnded = | |
function() { | |
return this._isAdBreakStarted && !this._isAdStarted && | |
"standard" === this._currentSegment | |
.eventType | |
}, t.prototype._setCurrentSegment = | |
function(t) { | |
var n = this; | |
return new e(function(e, r) { | |
for (var i = 0, o = 0; o < | |
n._playlist.length; o++ | |
) { | |
var s = n._playlist[o]; | |
if (t >= i && t < i + s | |
.duration) { | |
if (!n._isAdBreakStarted && | |
"promotional" === | |
s.eventType) { | |
var a = n._getCurrentAdBreakInfo( | |
n._playlist, | |
o), | |
u = a.totalDuration, | |
c = a.adCount; | |
n._currentAdBreakAdCount = | |
c, n._currentAdBreakDuration = | |
u | |
} | |
return n._currentSegment = | |
s, void e() | |
} | |
i += s.duration | |
} | |
}) | |
}, t.prototype._resetCurrentAdBreakInfo = | |
function() { | |
this._currentAdBreakAdCount = 0, this._currentAdBreakDuration = | |
0, this._isAdBreakStarted = !1, | |
this._isAdStarted = !1 | |
}, t.prototype._getCurrentAdBreakInfo = | |
function(e, t) { | |
for (var n = 0, r = 0, i = t; i < e.length; i++) { | |
var o = e[i]; | |
if ("promotional" !== o.eventType) | |
break; | |
n += o.duration, r++ | |
} | |
return { | |
totalDuration: n, | |
adCount: r | |
} | |
}, t | |
}(); | |
t.RemixAdService = c | |
}).call(t, n(1)) | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__decorate || function(e, t, n, r) { | |
var i, o = arguments.length, | |
s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor( | |
t, n) : r; | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.decorate) s = Reflect.decorate(e, t, n, r); | |
else | |
for (var a = e.length - 1; a >= 0; a--)(i = e[a]) && | |
(s = (o < 3 ? i(s) : o > 3 ? i(t, n, s) : i(t, | |
n)) || s); | |
return o > 3 && s && Object.defineProperty(t, n, s), s | |
}, | |
i = this && this.__metadata || function(e, t) { | |
if ("object" == typeof Reflect && "function" == typeof Reflect | |
.metadata) return Reflect.metadata(e, t) | |
}, | |
o = this && this.__param || function(e, t) { | |
return function(n, r) { | |
t(n, r, e) | |
} | |
}; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var s = n(5), | |
a = n(141), | |
u = n(32), | |
c = n(6), | |
l = n(2), | |
p = n(142), | |
h = function() { | |
function e(e) { | |
var t = this; | |
this._onMessage = function(e, n) { | |
var r = new a.SocketEvent("socket message", | |
s.EventName.socketmessage, { | |
channel: e, | |
message: n | |
}); | |
t._eventBus.publish(r) | |
}, this._onConnect = function() { | |
var e = new a.SocketEvent("socket connect", | |
s.EventName.socketconnect, {}); | |
t._eventBus.publish(e) | |
}, this._onConnectError = function(e) { | |
var n = new a.SocketEvent( | |
"socket connect_error", s.EventName | |
.socketerror, { | |
error: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onConnectTimeout = function(e) { | |
var n = new a.SocketEvent( | |
"socket connect_timeout", s.EventName | |
.socketerror, { | |
timeout: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onError = function(e) { | |
var n = new a.SocketEvent("socket error", s | |
.EventName.socketerror, { | |
error: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onDisconnect = function(e) { | |
var n = new a.SocketEvent( | |
"socket disconnect", s.EventName.socketdisconnect, { | |
reason: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onReconnect = function(e) { | |
var n = new a.SocketEvent( | |
"socket reconnect", s.EventName.socketreconnect, { | |
attemptNumber: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onReconnectAttempt = function(e) { | |
var n = new a.SocketEvent( | |
"socket reconnect_attempt", s.EventName | |
.socketreconnect, { | |
attemptNumber: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onReconnecting = function(e) { | |
var n = new a.SocketEvent( | |
"socket reconnecting", s.EventName.socketreconnect, { | |
attemptNumber: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onReconnectError = function(e) { | |
var n = new a.SocketEvent( | |
"socket reconnect_error", s.EventName | |
.socketerror, { | |
error: e | |
}); | |
t._eventBus.publish(n) | |
}, this._onReconnectFailed = function() { | |
var e = new a.SocketEvent( | |
"socket reconnect_failed", s.EventName | |
.socketerror, {}); | |
t._eventBus.publish(e) | |
}, this._onPing = function() { | |
var e = new a.SocketEvent("socket ping", s.EventName | |
.socketping, {}); | |
t._eventBus.publish(e) | |
}, this._onPong = function(e) { | |
var n = new a.SocketEvent("socket pong", s.EventName | |
.socketpong, { | |
latencyMilliseconds: e | |
}); | |
t._eventBus.publish(n) | |
}, this._eventBus = e, this._openChannels = new Array | |
} | |
return e.prototype.setDependencies = function(e) { | |
this._eventBus = e.getDependency(l.default.IEventBus) | |
}, e.prototype.addChannel = function(e) { | |
0 === this._openChannels.length && this._connectSocket(), | |
this._socket.on(e, this._onMessage.bind( | |
this, e)), this._openChannels.push(e) | |
}, e.prototype.removeChannel = function(e) { | |
this._socket.off(e, this._onMessage); | |
var t = this._openChannels.indexOf(e); - 1 !== | |
t && this._openChannels.splice(t, 1), this._openChannels | |
.length < 1 && this._socket.disconnect() | |
}, e.prototype.getOpenChannels = function() { | |
return this._openChannels | |
}, e.prototype._connectSocket = function() { | |
this._socket = p(u.SocketsUrl, { | |
path: u.SocketsPath | |
}), this._addEventListeners() | |
}, e.prototype._addEventListeners = function() { | |
this._socket.on("connect", this._onConnect), | |
this._socket.on("connect_error", this._onConnectError), | |
this._socket.on("connect_timeout", this._onConnectTimeout), | |
this._socket.on("error", this._onError), | |
this._socket.on("disconnect", this._onDisconnect), | |
this._socket.on("reconnect", this._onReconnect), | |
this._socket.on("reconnect_attempt", this._onReconnectAttempt), | |
this._socket.on("reconnecting", this._onReconnecting), | |
this._socket.on("reconnect_error", this._onReconnectError), | |
this._socket.on("reconnect_failed", this._onReconnectFailed), | |
this._socket.on("ping", this._onPing), this | |
._socket.on("pong", this._onPong) | |
}, e = r([c.injectable(), o(0, c.inject(l.default.IEventBus)), | |
i("design:paramtypes", [Object]) | |
], e) | |
}(); | |
t.SocketsManager = h | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n, r) { | |
var i = new Date; | |
return e.call(this, o.EventType.SOCKET, n, r, i) || | |
this | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.SocketEvent = s | |
}, function(e, t, n) { | |
function r(e, t) { | |
"object" == typeof e && (t = e, e = void 0), t = t || {}; | |
var n, r = i(e), | |
o = r.source, | |
c = r.id, | |
l = r.path, | |
p = u[c] && l in u[c].nsps, | |
h = t.forceNew || t["force new connection"] || !1 === | |
t.multiplex || p; | |
return h ? (a("ignoring socket cache for %s", o), n = s(o, | |
t)) : (u[c] || (a("new io instance for %s", o), u[c] = | |
s(o, t)), n = u[c]), r.query && !t.query && (t.query = | |
r.query), n.socket(r.path, t) | |
} | |
var i = n(143), | |
o = n(45), | |
s = n(61), | |
a = n(13)("socket.io-client"); | |
e.exports = t = r; | |
var u = t.managers = {}; | |
t.protocol = o.protocol, t.connect = r, t.Manager = n(61), t.Socket = | |
n(66) | |
}, function(e, t, n) { | |
(function(t) { | |
function r(e, n) { | |
var r = e; | |
n = n || t.location, null == e && (e = n.protocol + | |
"//" + n.host), "string" == typeof e && ( | |
"/" === e.charAt(0) && (e = "/" === e.charAt( | |
1) ? n.protocol + e : n.host + e), | |
/^(https?|wss?):\/\//.test(e) || (o( | |
"protocol-less url %s", e), e = | |
void 0 !== n ? n.protocol + "//" + e : | |
"https://" + e), o("parse %s", e), r = | |
i(e)), r.port || (/^(http|ws)$/.test(r.protocol) ? | |
r.port = "80" : /^(http|ws)s$/.test(r.protocol) && | |
(r.port = "443")), r.path = r.path || "/"; | |
var s = -1 !== r.host.indexOf(":"), | |
a = s ? "[" + r.host + "]" : r.host; | |
return r.id = r.protocol + "://" + a + ":" + r.port, | |
r.href = r.protocol + "://" + a + (n && n.port === | |
r.port ? "" : ":" + r.port), r | |
} | |
var i = n(57), | |
o = n(13)("socket.io-client:url"); | |
e.exports = r | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
function r(e) { | |
var n, r = 0; | |
for (n in e) r = (r << 5) - r + e.charCodeAt(n), r |= 0; | |
return t.colors[Math.abs(r) % t.colors.length] | |
} | |
function i(e) { | |
function n() { | |
if (n.enabled) { | |
var e = n, | |
r = +new Date, | |
i = r - (c || r); | |
e.diff = i, e.prev = c, e.curr = r, c = r; | |
for (var o = new Array(arguments.length), s = 0; s < | |
o.length; s++) o[s] = arguments[s]; | |
o[0] = t.coerce(o[0]), "string" != typeof o[0] && o | |
.unshift("%O"); | |
var a = 0; | |
o[0] = o[0].replace(/%([a-zA-Z%])/g, function(n, r) { | |
if ("%%" === n) return n; | |
a++; | |
var i = t.formatters[r]; | |
if ("function" == typeof i) { | |
var s = o[a]; | |
n = i.call(e, s), o.splice(a, 1), a-- | |
} | |
return n | |
}), t.formatArgs.call(e, o); | |
(n.log || t.log || console.log.bind(console)).apply | |
(e, o) | |
} | |
} | |
return n.namespace = e, n.enabled = t.enabled(e), n.useColors = | |
t.useColors(), n.color = r(e), "function" == typeof t.init && | |
t.init(n), n | |
} | |
function o(e) { | |
t.save(e), t.names = [], t.skips = []; | |
for (var n = ("string" == typeof e ? e : "").split(/[\s,]+/), | |
r = n.length, i = 0; i < r; i++) n[i] && (e = n[i].replace( | |
/\*/g, ".*?"), "-" === e[0] ? t.skips.push(new RegExp( | |
"^" + e.substr(1) + "$")) : t.names.push(new RegExp( | |
"^" + e + "$"))) | |
} | |
function s() { | |
t.enable("") | |
} | |
function a(e) { | |
var n, r; | |
for (n = 0, r = t.skips.length; n < r; n++) | |
if (t.skips[n].test(e)) return !1; | |
for (n = 0, r = t.names.length; n < r; n++) | |
if (t.names[n].test(e)) return !0; | |
return !1 | |
} | |
function u(e) { | |
return e instanceof Error ? e.stack || e.message : e | |
} | |
t = e.exports = i.debug = i.default = i, t.coerce = u, t.disable = | |
s, t.enable = o, t.enabled = a, t.humanize = n(145), t.names = [], | |
t.skips = [], t.formatters = {}; | |
var c | |
}, function(e, t) { | |
function n(e) { | |
if (e = String(e), !(e.length > 100)) { | |
var t = | |
/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i | |
.exec(e); | |
if (t) { | |
var n = parseFloat(t[1]); | |
switch ((t[2] || "ms").toLowerCase()) { | |
case "years": | |
case "year": | |
case "yrs": | |
case "yr": | |
case "y": | |
return n * l; | |
case "days": | |
case "day": | |
case "d": | |
return n * c; | |
case "hours": | |
case "hour": | |
case "hrs": | |
case "hr": | |
case "h": | |
return n * u; | |
case "minutes": | |
case "minute": | |
case "mins": | |
case "min": | |
case "m": | |
return n * a; | |
case "seconds": | |
case "second": | |
case "secs": | |
case "sec": | |
case "s": | |
return n * s; | |
case "milliseconds": | |
case "millisecond": | |
case "msecs": | |
case "msec": | |
case "ms": | |
return n; | |
default: | |
return | |
} | |
} | |
} | |
} | |
function r(e) { | |
return e >= c ? Math.round(e / c) + "d" : e >= u ? Math.round( | |
e / u) + "h" : e >= a ? Math.round(e / a) + "m" : e >= | |
s ? Math.round(e / s) + "s" : e + "ms" | |
} | |
function i(e) { | |
return o(e, c, "day") || o(e, u, "hour") || o(e, a, | |
"minute") || o(e, s, "second") || e + " ms" | |
} | |
function o(e, t, n) { | |
if (!(e < t)) return e < 1.5 * t ? Math.floor(e / t) + " " + | |
n : Math.ceil(e / t) + " " + n + "s" | |
} | |
var s = 1e3, | |
a = 60 * s, | |
u = 60 * a, | |
c = 24 * u, | |
l = 365.25 * c; | |
e.exports = function(e, t) { | |
t = t || {}; | |
var o = typeof e; | |
if ("string" === o && e.length > 0) return n(e); | |
if ("number" === o && !1 === isNaN(e)) return t.long ? | |
i(e) : r(e); | |
throw new Error( | |
"val is not a non-empty string or a valid number. val=" + | |
JSON.stringify(e)) | |
} | |
}, function(e, t, n) { | |
(function(e) { | |
function r(e, t) { | |
if (!e) return e; | |
if (s(e)) { | |
var n = { | |
_placeholder: !0, | |
num: t.length | |
}; | |
return t.push(e), n | |
} | |
if (o(e)) { | |
for (var i = new Array(e.length), a = 0; a < e.length; a++) | |
i[a] = r(e[a], t); | |
return i | |
} | |
if ("object" == typeof e && !(e instanceof Date)) { | |
var i = {}; | |
for (var u in e) i[u] = r(e[u], t); | |
return i | |
} | |
return e | |
} | |
function i(e, t) { | |
if (!e) return e; | |
if (e && e._placeholder) return t[e.num]; | |
if (o(e)) | |
for (var n = 0; n < e.length; n++) e[n] = i(e[n], | |
t); | |
else if ("object" == typeof e) | |
for (var r in e) e[r] = i(e[r], t); | |
return e | |
} | |
var o = n(59), | |
s = n(60), | |
a = Object.prototype.toString, | |
u = "function" == typeof e.Blob || | |
"[object BlobConstructor]" === a.call(e.Blob), | |
c = "function" == typeof e.File || | |
"[object FileConstructor]" === a.call(e.File); | |
t.deconstructPacket = function(e) { | |
var t = [], | |
n = e.data, | |
i = e; | |
return i.data = r(n, t), i.attachments = t.length, { | |
packet: i, | |
buffers: t | |
} | |
}, t.reconstructPacket = function(e, t) { | |
return e.data = i(e.data, t), e.attachments = | |
void 0, e | |
}, t.removeBlobs = function(e, t) { | |
function n(e, a, l) { | |
if (!e) return e; | |
if (u && e instanceof Blob || c && e instanceof File) { | |
r++; | |
var p = new FileReader; | |
p.onload = function() { | |
l ? l[a] = this.result : i = | |
this.result, --r || t(i) | |
}, p.readAsArrayBuffer(e) | |
} else if (o(e)) | |
for (var h = 0; h < e.length; h++) n(e[ | |
h], h, e); | |
else if ("object" == typeof e && !s(e)) | |
for (var d in e) n(e[d], d, e) | |
} | |
var r = 0, | |
i = e; | |
n(i), r || t(i) | |
} | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
e.exports = n(148), e.exports.parser = n(26) | |
}, function(e, t, n) { | |
(function(t) { | |
function r(e, n) { | |
if (!(this instanceof r)) return new r(e, n); | |
n = n || {}, e && "object" == typeof e && (n = e, e = | |
null), e ? (e = l(e), n.hostname = e.host, | |
n.secure = "https" === e.protocol || "wss" === | |
e.protocol, n.port = e.port, e.query && (n.query = | |
e.query)) : n.host && (n.hostname = l(n | |
.host).host), this.secure = null != n.secure ? | |
n.secure : t.location && "https:" === location.protocol, | |
n.hostname && !n.port && (n.port = this.secure ? | |
"443" : "80"), this.agent = n.agent || !1, | |
this.hostname = n.hostname || (t.location ? | |
location.hostname : "localhost"), this.port = | |
n.port || (t.location && location.port ? | |
location.port : this.secure ? 443 : 80), | |
this.query = n.query || {}, "string" == typeof this | |
.query && (this.query = p.decode(this.query)), | |
this.upgrade = !1 !== n.upgrade, this.path = (n | |
.path || "/engine.io").replace(/\/$/, "") + | |
"/", this.forceJSONP = !!n.forceJSONP, this.jsonp = ! | |
1 !== n.jsonp, this.forceBase64 = !!n.forceBase64, | |
this.enablesXDR = !!n.enablesXDR, this.timestampParam = | |
n.timestampParam || "t", this.timestampRequests = | |
n.timestampRequests, this.transports = n.transports || | |
["polling", "websocket"], this.transportOptions = | |
n.transportOptions || {}, this.readyState = "", | |
this.writeBuffer = [], this.prevBufferLen = 0, | |
this.policyPort = n.policyPort || 843, this.rememberUpgrade = | |
n.rememberUpgrade || !1, this.binaryType = null, | |
this.onlyBinaryUpgrades = n.onlyBinaryUpgrades, | |
this.perMessageDeflate = !1 !== n.perMessageDeflate && | |
(n.perMessageDeflate || {}), !0 === this.perMessageDeflate && | |
(this.perMessageDeflate = {}), this.perMessageDeflate && | |
null == this.perMessageDeflate.threshold && ( | |
this.perMessageDeflate.threshold = 1024), | |
this.pfx = n.pfx || null, this.key = n.key || | |
null, this.passphrase = n.passphrase || null, | |
this.cert = n.cert || null, this.ca = n.ca || | |
null, this.ciphers = n.ciphers || null, this.rejectUnauthorized = | |
void 0 === n.rejectUnauthorized || n.rejectUnauthorized, | |
this.forceNode = !!n.forceNode; | |
var i = "object" == typeof t && t; | |
i.global === i && (n.extraHeaders && Object.keys(n.extraHeaders) | |
.length > 0 && (this.extraHeaders = n.extraHeaders), | |
n.localAddress && (this.localAddress = n.localAddress) | |
), this.id = null, this.upgrades = null, this.pingInterval = | |
null, this.pingTimeout = null, this.pingIntervalTimer = | |
null, this.pingTimeoutTimer = null, this.open() | |
} | |
function i(e) { | |
var t = {}; | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]); | |
return t | |
} | |
var o = n(62), | |
s = n(25), | |
a = n(13)("engine.io-client:socket"), | |
u = n(65), | |
c = n(26), | |
l = n(57), | |
p = n(38); | |
e.exports = r, r.priorWebsocketSuccess = !1, s(r.prototype), | |
r.protocol = c.protocol, r.Socket = r, r.Transport = | |
n(47), r.transports = n(62), r.parser = n(26), r.prototype | |
.createTransport = function(e) { | |
a('creating transport "%s"', e); | |
var t = i(this.query); | |
t.EIO = c.protocol, t.transport = e; | |
var n = this.transportOptions[e] || {}; | |
return this.id && (t.sid = this.id), new o[e]({ | |
query: t, | |
socket: this, | |
agent: n.agent || this.agent, | |
hostname: n.hostname || this.hostname, | |
port: n.port || this.port, | |
secure: n.secure || this.secure, | |
path: n.path || this.path, | |
forceJSONP: n.forceJSONP || this.forceJSONP, | |
jsonp: n.jsonp || this.jsonp, | |
forceBase64: n.forceBase64 || this.forceBase64, | |
enablesXDR: n.enablesXDR || this.enablesXDR, | |
timestampRequests: n.timestampRequests || | |
this.timestampRequests, | |
timestampParam: n.timestampParam || | |
this.timestampParam, | |
policyPort: n.policyPort || this.policyPort, | |
pfx: n.pfx || this.pfx, | |
key: n.key || this.key, | |
passphrase: n.passphrase || this.passphrase, | |
cert: n.cert || this.cert, | |
ca: n.ca || this.ca, | |
ciphers: n.ciphers || this.ciphers, | |
rejectUnauthorized: n.rejectUnauthorized || | |
this.rejectUnauthorized, | |
perMessageDeflate: n.perMessageDeflate || | |
this.perMessageDeflate, | |
extraHeaders: n.extraHeaders || | |
this.extraHeaders, | |
forceNode: n.forceNode || this.forceNode, | |
localAddress: n.localAddress || | |
this.localAddress, | |
requestTimeout: n.requestTimeout || | |
this.requestTimeout, | |
protocols: n.protocols || void 0 | |
}) | |
}, r.prototype.open = function() { | |
var e; | |
if (this.rememberUpgrade && r.priorWebsocketSuccess && | |
-1 !== this.transports.indexOf("websocket") | |
) e = "websocket"; | |
else { | |
if (0 === this.transports.length) { | |
var t = this; | |
return void setTimeout(function() { | |
t.emit("error", | |
"No transports available" | |
) | |
}, 0) | |
} | |
e = this.transports[0] | |
} | |
this.readyState = "opening"; | |
try { | |
e = this.createTransport(e) | |
} catch (e) { | |
return this.transports.shift(), void this.open() | |
} | |
e.open(), this.setTransport(e) | |
}, r.prototype.setTransport = function(e) { | |
a("setting transport %s", e.name); | |
var t = this; | |
this.transport && (a( | |
"clearing existing transport %s", | |
this.transport.name), this.transport | |
.removeAllListeners()), this.transport = | |
e, e.on("drain", function() { | |
t.onDrain() | |
}).on("packet", function(e) { | |
t.onPacket(e) | |
}).on("error", function(e) { | |
t.onError(e) | |
}).on("close", function() { | |
t.onClose("transport close") | |
}) | |
}, r.prototype.probe = function(e) { | |
function t() { | |
if (h.onlyBinaryUpgrades) { | |
var t = !this.supportsBinary && h.transport | |
.supportsBinary; | |
p = p || t | |
} | |
p || (a('probe transport "%s" opened', e), | |
l.send([{ | |
type: "ping", | |
data: "probe" | |
}]), l.once("packet", function(t) { | |
if (!p) | |
if ("pong" === t.type && | |
"probe" === t.data) { | |
if (a( | |
'probe transport "%s" pong', | |
e), h.upgrading = ! | |
0, h.emit( | |
"upgrading", | |
l), !l) | |
return; | |
r.priorWebsocketSuccess = | |
"websocket" === | |
l.name, a( | |
'pausing current transport "%s"', | |
h.transport | |
.name), h.transport | |
.pause(function() { | |
p || | |
"closed" !== | |
h.readyState && | |
(a( | |
"changing transport and sending upgrade packet" | |
), | |
c(), | |
h | |
.setTransport( | |
l | |
), | |
l | |
.send( | |
[{ | |
type: "upgrade" | |
}] | |
), | |
h | |
.emit( | |
"upgrade", | |
l | |
), | |
l = | |
null, | |
h | |
.upgrading = ! | |
1, | |
h | |
.flush() | |
) | |
}) | |
} else { | |
a( | |
'probe transport "%s" failed', | |
e); | |
var n = new Error( | |
"probe error" | |
); | |
n.transport = l.name, | |
h.emit( | |
"upgradeError", | |
n) | |
} | |
})) | |
} | |
function n() { | |
p || (p = !0, c(), l.close(), l = null) | |
} | |
function i(t) { | |
var r = new Error("probe error: " + t); | |
r.transport = l.name, n(), a( | |
'probe transport "%s" failed because of error: %s', | |
e, t), h.emit("upgradeError", r) | |
} | |
function o() { | |
i("transport closed") | |
} | |
function s() { | |
i("socket closed") | |
} | |
function u(e) { | |
l && e.name !== l.name && (a( | |
'"%s" works - aborting "%s"', e | |
.name, l.name), n()) | |
} | |
function c() { | |
l.removeListener("open", t), l.removeListener( | |
"error", i), l.removeListener( | |
"close", o), h.removeListener( | |
"close", s), h.removeListener( | |
"upgrading", u) | |
} | |
a('probing transport "%s"', e); | |
var l = this.createTransport(e, { | |
probe: 1 | |
}), | |
p = !1, | |
h = this; | |
r.priorWebsocketSuccess = !1, l.once("open", t), | |
l.once("error", i), l.once("close", o), | |
this.once("close", s), this.once( | |
"upgrading", u), l.open() | |
}, r.prototype.onOpen = function() { | |
if (a("socket open"), this.readyState = "open", | |
r.priorWebsocketSuccess = "websocket" === | |
this.transport.name, this.emit("open"), | |
this.flush(), "open" === this.readyState && | |
this.upgrade && this.transport.pause) { | |
a("starting upgrade probes"); | |
for (var e = 0, t = this.upgrades.length; e < | |
t; e++) this.probe(this.upgrades[e]) | |
} | |
}, r.prototype.onPacket = function(e) { | |
if ("opening" === this.readyState || "open" === | |
this.readyState || "closing" === this.readyState | |
) switch (a( | |
'socket receive: type "%s", data "%s"', | |
e.type, e.data), this.emit("packet", | |
e), this.emit("heartbeat"), e.type) { | |
case "open": | |
this.onHandshake(JSON.parse(e.data)); | |
break; | |
case "pong": | |
this.setPing(), this.emit("pong"); | |
break; | |
case "error": | |
var t = new Error("server error"); | |
t.code = e.data, this.onError(t); | |
break; | |
case "message": | |
this.emit("data", e.data), this.emit( | |
"message", e.data) | |
} else a( | |
'packet received with socket readyState "%s"', | |
this.readyState) | |
}, r.prototype.onHandshake = function(e) { | |
this.emit("handshake", e), this.id = e.sid, | |
this.transport.query.sid = e.sid, this.upgrades = | |
this.filterUpgrades(e.upgrades), this.pingInterval = | |
e.pingInterval, this.pingTimeout = e.pingTimeout, | |
this.onOpen(), "closed" !== this.readyState && | |
(this.setPing(), this.removeListener( | |
"heartbeat", this.onHeartbeat), | |
this.on("heartbeat", this.onHeartbeat)) | |
}, r.prototype.onHeartbeat = function(e) { | |
clearTimeout(this.pingTimeoutTimer); | |
var t = this; | |
t.pingTimeoutTimer = setTimeout(function() { | |
"closed" !== t.readyState && t.onClose( | |
"ping timeout") | |
}, e || t.pingInterval + t.pingTimeout) | |
}, r.prototype.setPing = function() { | |
var e = this; | |
clearTimeout(e.pingIntervalTimer), e.pingIntervalTimer = | |
setTimeout(function() { | |
a( | |
"writing ping packet - expecting pong within %sms", | |
e.pingTimeout), e.ping(), e | |
.onHeartbeat(e.pingTimeout) | |
}, e.pingInterval) | |
}, r.prototype.ping = function() { | |
var e = this; | |
this.sendPacket("ping", function() { | |
e.emit("ping") | |
}) | |
}, r.prototype.onDrain = function() { | |
this.writeBuffer.splice(0, this.prevBufferLen), | |
this.prevBufferLen = 0, 0 === this.writeBuffer | |
.length ? this.emit("drain") : this.flush() | |
}, r.prototype.flush = function() { | |
"closed" !== this.readyState && this.transport.writable && | |
!this.upgrading && this.writeBuffer.length && | |
(a("flushing %d packets in socket", this.writeBuffer | |
.length), this.transport.send(this.writeBuffer), | |
this.prevBufferLen = this.writeBuffer.length, | |
this.emit("flush")) | |
}, r.prototype.write = r.prototype.send = function( | |
e, t, n) { | |
return this.sendPacket("message", e, t, n), | |
this | |
}, r.prototype.sendPacket = function(e, t, n, r) { | |
if ("function" == typeof t && (r = t, t = void 0), | |
"function" == typeof n && (r = n, n = null), | |
"closing" !== this.readyState && "closed" !== | |
this.readyState) { | |
n = n || {}, n.compress = !1 !== n.compress; | |
var i = { | |
type: e, | |
data: t, | |
options: n | |
}; | |
this.emit("packetCreate", i), this.writeBuffer | |
.push(i), r && this.once("flush", r), | |
this.flush() | |
} | |
}, r.prototype.close = function() { | |
function e() { | |
r.onClose("forced close"), a( | |
"socket closing - telling transport to close" | |
), r.transport.close() | |
} | |
function t() { | |
r.removeListener("upgrade", t), r.removeListener( | |
"upgradeError", t), e() | |
} | |
function n() { | |
r.once("upgrade", t), r.once("upgradeError", | |
t) | |
} | |
if ("opening" === this.readyState || "open" === | |
this.readyState) { | |
this.readyState = "closing"; | |
var r = this; | |
this.writeBuffer.length ? this.once("drain", | |
function() { | |
this.upgrading ? n() : e() | |
}) : this.upgrading ? n() : e() | |
} | |
return this | |
}, r.prototype.onError = function(e) { | |
a("socket error %j", e), r.priorWebsocketSuccess = ! | |
1, this.emit("error", e), this.onClose( | |
"transport error", e) | |
}, r.prototype.onClose = function(e, t) { | |
if ("opening" === this.readyState || "open" === | |
this.readyState || "closing" === this.readyState | |
) { | |
a('socket close with reason: "%s"', e); | |
var n = this; | |
clearTimeout(this.pingIntervalTimer), | |
clearTimeout(this.pingTimeoutTimer), | |
this.transport.removeAllListeners( | |
"close"), this.transport.close(), | |
this.transport.removeAllListeners(), | |
this.readyState = "closed", this.id = | |
null, this.emit("close", e, t), n.writeBuffer = [], | |
n.prevBufferLen = 0 | |
} | |
}, r.prototype.filterUpgrades = function(e) { | |
for (var t = [], n = 0, r = e.length; n < r; n++) | |
~u(this.transports, e[n]) && t.push(e[n]); | |
return t | |
} | |
}).call(t, n(4)) | |
}, function(e, t) { | |
try { | |
e.exports = "undefined" != typeof XMLHttpRequest && | |
"withCredentials" in new XMLHttpRequest | |
} catch (t) { | |
e.exports = !1 | |
} | |
}, function(e, t, n) { | |
(function(t) { | |
function r() {} | |
function i(e) { | |
if (u.call(this, e), this.requestTimeout = e.requestTimeout, | |
this.extraHeaders = e.extraHeaders, t.location) { | |
var n = "https:" === location.protocol, | |
r = location.port; | |
r || (r = n ? 443 : 80), this.xd = e.hostname !== | |
t.location.hostname || r !== e.port, this.xs = | |
e.secure !== n | |
} | |
} | |
function o(e) { | |
this.method = e.method || "GET", this.uri = e.uri, | |
this.xd = !!e.xd, this.xs = !!e.xs, this.async = ! | |
1 !== e.async, this.data = void 0 !== e.data ? | |
e.data : null, this.agent = e.agent, this.isBinary = | |
e.isBinary, this.supportsBinary = e.supportsBinary, | |
this.enablesXDR = e.enablesXDR, this.requestTimeout = | |
e.requestTimeout, this.pfx = e.pfx, this.key = | |
e.key, this.passphrase = e.passphrase, this.cert = | |
e.cert, this.ca = e.ca, this.ciphers = e.ciphers, | |
this.rejectUnauthorized = e.rejectUnauthorized, | |
this.extraHeaders = e.extraHeaders, this.create() | |
} | |
function s() { | |
for (var e in o.requests) o.requests.hasOwnProperty( | |
e) && o.requests[e].abort() | |
} | |
var a = n(46), | |
u = n(63), | |
c = n(25), | |
l = n(39), | |
p = n(13)("engine.io-client:polling-xhr"); | |
e.exports = i, e.exports.Request = o, l(i, u), i.prototype | |
.supportsBinary = !0, i.prototype.request = | |
function(e) { | |
return e = e || {}, e.uri = this.uri(), e.xd = | |
this.xd, e.xs = this.xs, e.agent = this.agent || | |
!1, e.supportsBinary = this.supportsBinary, | |
e.enablesXDR = this.enablesXDR, e.pfx = | |
this.pfx, e.key = this.key, e.passphrase = | |
this.passphrase, e.cert = this.cert, e.ca = | |
this.ca, e.ciphers = this.ciphers, e.rejectUnauthorized = | |
this.rejectUnauthorized, e.requestTimeout = | |
this.requestTimeout, e.extraHeaders = this.extraHeaders, | |
new o(e) | |
}, i.prototype.doWrite = function(e, t) { | |
var n = "string" != typeof e && void 0 !== e, | |
r = this.request({ | |
method: "POST", | |
data: e, | |
isBinary: n | |
}), | |
i = this; | |
r.on("success", t), r.on("error", function(e) { | |
i.onError("xhr post error", e) | |
}), this.sendXhr = r | |
}, i.prototype.doPoll = function() { | |
p("xhr poll"); | |
var e = this.request(), | |
t = this; | |
e.on("data", function(e) { | |
t.onData(e) | |
}), e.on("error", function(e) { | |
t.onError("xhr poll error", e) | |
}), this.pollXhr = e | |
}, c(o.prototype), o.prototype.create = function() { | |
var e = { | |
agent: this.agent, | |
xdomain: this.xd, | |
xscheme: this.xs, | |
enablesXDR: this.enablesXDR | |
}; | |
e.pfx = this.pfx, e.key = this.key, e.passphrase = | |
this.passphrase, e.cert = this.cert, e.ca = | |
this.ca, e.ciphers = this.ciphers, e.rejectUnauthorized = | |
this.rejectUnauthorized; | |
var n = this.xhr = new a(e), | |
r = this; | |
try { | |
p("xhr open %s: %s", this.method, this.uri), | |
n.open(this.method, this.uri, this.async); | |
try { | |
if (this.extraHeaders) { | |
n.setDisableHeaderCheck && n.setDisableHeaderCheck(! | |
0); | |
for (var i in this.extraHeaders) | |
this.extraHeaders.hasOwnProperty( | |
i) && n.setRequestHeader(i, | |
this.extraHeaders[i]) | |
} | |
} catch (e) {} | |
if ("POST" === this.method) try { | |
this.isBinary ? n.setRequestHeader( | |
"Content-type", | |
"application/octet-stream") : | |
n.setRequestHeader( | |
"Content-type", | |
"text/plain;charset=UTF-8") | |
} catch (e) {} | |
try { | |
n.setRequestHeader("Accept", "*/*") | |
} catch (e) {} | |
"withCredentials" in n && (n.withCredentials = ! | |
0), this.requestTimeout && (n.timeout = | |
this.requestTimeout), this.hasXDR() ? | |
(n.onload = function() { | |
r.onLoad() | |
}, n.onerror = function() { | |
r.onError(n.responseText) | |
}) : n.onreadystatechange = function() { | |
if (2 === n.readyState) { | |
var e; | |
try { | |
e = n.getResponseHeader( | |
"Content-Type") | |
} catch (e) {} | |
"application/octet-stream" === | |
e && (n.responseType = | |
"arraybuffer") | |
} | |
4 === n.readyState && (200 === n.status || | |
1223 === n.status ? r.onLoad() : | |
setTimeout(function() { | |
r.onError(n.status) | |
}, 0)) | |
}, p("xhr data %s", this.data), n.send( | |
this.data) | |
} catch (e) { | |
return void setTimeout(function() { | |
r.onError(e) | |
}, 0) | |
} | |
t.document && (this.index = o.requestsCount++, | |
o.requests[this.index] = this) | |
}, o.prototype.onSuccess = function() { | |
this.emit("success"), this.cleanup() | |
}, o.prototype.onData = function(e) { | |
this.emit("data", e), this.onSuccess() | |
}, o.prototype.onError = function(e) { | |
this.emit("error", e), this.cleanup(!0) | |
}, o.prototype.cleanup = function(e) { | |
if (void 0 !== this.xhr && null !== this.xhr) { | |
if (this.hasXDR() ? this.xhr.onload = this.xhr | |
.onerror = r : this.xhr.onreadystatechange = | |
r, e) try { | |
this.xhr.abort() | |
} catch (e) {} | |
t.document && delete o.requests[this.index], | |
this.xhr = null | |
} | |
}, o.prototype.onLoad = function() { | |
var e; | |
try { | |
var t; | |
try { | |
t = this.xhr.getResponseHeader( | |
"Content-Type") | |
} catch (e) {} | |
e = "application/octet-stream" === t ? this | |
.xhr.response || this.xhr.responseText : | |
this.xhr.responseText | |
} catch (e) { | |
this.onError(e) | |
} | |
null != e && this.onData(e) | |
}, o.prototype.hasXDR = function() { | |
return void 0 !== t.XDomainRequest && !this.xs && | |
this.enablesXDR | |
}, o.prototype.abort = function() { | |
this.cleanup() | |
}, o.requestsCount = 0, o.requests = {}, t.document && | |
(t.attachEvent ? t.attachEvent("onunload", s) : t.addEventListener && | |
t.addEventListener("beforeunload", s, !1)) | |
}).call(t, n(4)) | |
}, function(e, t) { | |
e.exports = Object.keys || function(e) { | |
var t = [], | |
n = Object.prototype.hasOwnProperty; | |
for (var r in e) n.call(e, r) && t.push(r); | |
return t | |
} | |
}, function(e, t) { | |
e.exports = function(e, t, n) { | |
var r = e.byteLength; | |
if (t = t || 0, n = n || r, e.slice) return e.slice(t, | |
n); | |
if (t < 0 && (t += r), n < 0 && (n += r), n > r && (n = | |
r), t >= r || t >= n || 0 === r) return new ArrayBuffer( | |
0); | |
for (var i = new Uint8Array(e), o = new Uint8Array(n - | |
t), s = t, a = 0; s < n; s++, a++) o[a] = i[s]; | |
return o.buffer | |
} | |
}, function(e, t) { | |
function n(e, t, n) { | |
function i(e, r) { | |
if (i.count <= 0) throw new Error( | |
"after called too many times"); | |
--i.count, e ? (o = !0, t(e), t = n) : 0 !== i.count || | |
o || t(null, r) | |
} | |
var o = !1; | |
return n = n || r, i.count = e, 0 === e ? t() : i | |
} | |
function r() {} | |
e.exports = n | |
}, function(e, t, n) { | |
(function(e, r) { | |
var i; | |
! function(o) { | |
function s(e) { | |
for (var t, n, r = [], i = 0, o = e.length; i < | |
o;) t = e.charCodeAt(i++), t >= 55296 && t <= | |
56319 && i < o ? (n = e.charCodeAt(i++), | |
56320 == (64512 & n) ? r.push(((1023 & | |
t) << 10) + (1023 & n) + 65536) : ( | |
r.push(t), i--)) : r.push(t); | |
return r | |
} | |
function a(e) { | |
for (var t, n = e.length, r = -1, i = ""; ++r < | |
n;) t = e[r], t > 65535 && (t -= 65536, i += | |
b(t >>> 10 & 1023 | 55296), t = 56320 | | |
1023 & t), i += b(t); | |
return i | |
} | |
function u(e, t) { | |
if (e >= 55296 && e <= 57343) { | |
if (t) throw Error("Lone surrogate U+" + e.toString( | |
16).toUpperCase() + | |
" is not a scalar value"); | |
return !1 | |
} | |
return !0 | |
} | |
function c(e, t) { | |
return b(e >> t & 63 | 128) | |
} | |
function l(e, t) { | |
if (0 == (4294967168 & e)) return b(e); | |
var n = ""; | |
return 0 == (4294965248 & e) ? n = b(e >> 6 & | |
31 | 192) : 0 == (4294901760 & e) ? (u( | |
e, t) || (e = 65533), n = b(e >> 12 & | |
15 | 224), n += c(e, 6)) : 0 == ( | |
4292870144 & e) && (n = b(e >> 18 & 7 | | |
240), n += c(e, 12), n += c(e, 6)), n += | |
b(63 & e | 128) | |
} | |
function p(e, t) { | |
t = t || {}; | |
for (var n, r = !1 !== t.strict, i = s(e), o = | |
i.length, a = -1, u = ""; ++a < o;) n = | |
i[a], u += l(n, r); | |
return u | |
} | |
function h() { | |
if (m >= g) throw Error("Invalid byte index"); | |
var e = 255 & _[m]; | |
if (m++, 128 == (192 & e)) return 63 & e; | |
throw Error("Invalid continuation byte") | |
} | |
function d(e) { | |
var t, n, r, i, o; | |
if (m > g) throw Error("Invalid byte index"); | |
if (m == g) return !1; | |
if (t = 255 & _[m], m++, 0 == (128 & t)) return t; | |
if (192 == (224 & t)) { | |
if (n = h(), (o = (31 & t) << 6 | n) >= 128) | |
return o; | |
throw Error("Invalid continuation byte") | |
} | |
if (224 == (240 & t)) { | |
if (n = h(), r = h(), (o = (15 & t) << 12 | | |
n << 6 | r) >= 2048) return u(o, e) ? | |
o : 65533; | |
throw Error("Invalid continuation byte") | |
} | |
if (240 == (248 & t) && (n = h(), r = h(), i = | |
h(), (o = (7 & t) << 18 | n << 12 | r << | |
6 | i) >= 65536 && o <= 1114111)) | |
return o; | |
throw Error("Invalid UTF-8 detected") | |
} | |
function f(e, t) { | |
t = t || {}; | |
var n = !1 !== t.strict; | |
_ = s(e), g = _.length, m = 0; | |
for (var r, i = []; !1 !== (r = d(n));) i.push( | |
r); | |
return a(i) | |
} | |
var y = "object" == typeof t && t, | |
v = ("object" == typeof e && e && e.exports, | |
"object" == typeof r && r); | |
var _, g, m, b = String.fromCharCode, | |
E = { | |
version: "2.1.2", | |
encode: p, | |
decode: f | |
}; | |
void 0 !== (i = function() { | |
return E | |
}.call(t, n, t, e)) && (e.exports = i) | |
}() | |
}).call(t, n(69)(e), n(4)) | |
}, function(e, t) { | |
! function() { | |
"use strict"; | |
for (var e = | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", | |
n = new Uint8Array(256), r = 0; r < e.length; r++) n[ | |
e.charCodeAt(r)] = r; | |
t.encode = function(t) { | |
var n, r = new Uint8Array(t), | |
i = r.length, | |
o = ""; | |
for (n = 0; n < i; n += 3) o += e[r[n] >> 2], o += | |
e[(3 & r[n]) << 4 | r[n + 1] >> 4], o += e[(15 & | |
r[n + 1]) << 2 | r[n + 2] >> 6], o += e[63 & | |
r[n + 2]]; | |
return i % 3 == 2 ? o = o.substring(0, o.length - 1) + | |
"=" : i % 3 == 1 && (o = o.substring(0, o.length - | |
2) + "=="), o | |
}, t.decode = function(e) { | |
var t, r, i, o, s, a = .75 * e.length, | |
u = e.length, | |
c = 0; | |
"=" === e[e.length - 1] && (a--, "=" === e[e.length - | |
2] && a--); | |
var l = new ArrayBuffer(a), | |
p = new Uint8Array(l); | |
for (t = 0; t < u; t += 4) r = n[e.charCodeAt(t)], | |
i = n[e.charCodeAt(t + 1)], o = n[e.charCodeAt( | |
t + 2)], s = n[e.charCodeAt(t + 3)], p[c++] = | |
r << 2 | i >> 4, p[c++] = (15 & i) << 4 | o >> | |
2, p[c++] = (3 & o) << 6 | 63 & s; | |
return l | |
} | |
}() | |
}, function(e, t, n) { | |
(function(t) { | |
function n(e) { | |
for (var t = 0; t < e.length; t++) { | |
var n = e[t]; | |
if (n.buffer instanceof ArrayBuffer) { | |
var r = n.buffer; | |
if (n.byteLength !== r.byteLength) { | |
var i = new Uint8Array(n.byteLength); | |
i.set(new Uint8Array(r, n.byteOffset, n | |
.byteLength)), r = i.buffer | |
} | |
e[t] = r | |
} | |
} | |
} | |
function r(e, t) { | |
t = t || {}; | |
var r = new o; | |
n(e); | |
for (var i = 0; i < e.length; i++) r.append(e[i]); | |
return t.type ? r.getBlob(t.type) : r.getBlob() | |
} | |
function i(e, t) { | |
return n(e), new Blob(e, t || {}) | |
} | |
var o = t.BlobBuilder || t.WebKitBlobBuilder || t.MSBlobBuilder || | |
t.MozBlobBuilder, | |
s = function() { | |
try { | |
return 2 === new Blob(["hi"]).size | |
} catch (e) { | |
return !1 | |
} | |
}(), | |
a = s && function() { | |
try { | |
return 2 === new Blob([new Uint8Array([1, 2])]) | |
.size | |
} catch (e) { | |
return !1 | |
} | |
}(), | |
u = o && o.prototype.append && o.prototype.getBlob; | |
e.exports = function() { | |
return s ? a ? t.Blob : i : u ? r : void 0 | |
}() | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
(function(t) { | |
function r() {} | |
function i(e) { | |
o.call(this, e), this.query = this.query || {}, a || | |
(t.___eio || (t.___eio = []), a = t.___eio), | |
this.index = a.length; | |
var n = this; | |
a.push(function(e) { | |
n.onData(e) | |
}), this.query.j = this.index, t.document && t.addEventListener && | |
t.addEventListener("beforeunload", function() { | |
n.script && (n.script.onerror = r) | |
}, !1) | |
} | |
var o = n(63), | |
s = n(39); | |
e.exports = i; | |
var a, u = /\n/g, | |
c = /\\n/g; | |
s(i, o), i.prototype.supportsBinary = !1, i.prototype.doClose = | |
function() { | |
this.script && (this.script.parentNode.removeChild( | |
this.script), this.script = null), this | |
.form && (this.form.parentNode.removeChild( | |
this.form), this.form = null, this.iframe = | |
null), o.prototype.doClose.call(this) | |
}, i.prototype.doPoll = function() { | |
var e = this, | |
t = document.createElement("script"); | |
this.script && (this.script.parentNode.removeChild( | |
this.script), this.script = null), t.async = ! | |
0, t.src = this.uri(), t.onerror = function( | |
t) { | |
e.onError("jsonp poll error", t) | |
}; | |
var n = document.getElementsByTagName("script")[ | |
0]; | |
n ? n.parentNode.insertBefore(t, n) : (document | |
.head || document.body).appendChild(t), | |
this.script = t, "undefined" != typeof navigator && | |
/gecko/i.test(navigator.userAgent) && | |
setTimeout(function() { | |
var e = document.createElement( | |
"iframe"); | |
document.body.appendChild(e), | |
document.body.removeChild(e) | |
}, 100) | |
}, i.prototype.doWrite = function(e, t) { | |
function n() { | |
r(), t() | |
} | |
function r() { | |
if (i.iframe) try { | |
i.form.removeChild(i.iframe) | |
} catch (e) { | |
i.onError( | |
"jsonp polling iframe removal error", | |
e) | |
} | |
try { | |
var e = | |
'<iframe src="javascript:0" name="' + | |
i.iframeId + '">'; | |
o = document.createElement(e) | |
} catch (e) { | |
o = document.createElement("iframe"), o | |
.name = i.iframeId, o.src = | |
"javascript:0" | |
} | |
o.id = i.iframeId, i.form.appendChild(o), i | |
.iframe = o | |
} | |
var i = this; | |
if (!this.form) { | |
var o, s = document.createElement("form"), | |
a = document.createElement("textarea"), | |
l = this.iframeId = "eio_iframe_" + | |
this.index; | |
s.className = "socketio", s.style.position = | |
"absolute", s.style.top = "-1000px", s.style | |
.left = "-1000px", s.target = l, s.method = | |
"POST", s.setAttribute("accept-charset", | |
"utf-8"), a.name = "d", s.appendChild( | |
a), document.body.appendChild(s), | |
this.form = s, this.area = a | |
} | |
this.form.action = this.uri(), r(), e = e.replace( | |
c, "\\\n"), this.area.value = e.replace( | |
u, "\\n"); | |
try { | |
this.form.submit() | |
} catch (e) {} | |
this.iframe.attachEvent ? this.iframe.onreadystatechange = | |
function() { | |
"complete" === i.iframe.readyState && n() | |
} : this.iframe.onload = n | |
} | |
}).call(t, n(4)) | |
}, function(e, t, n) { | |
(function(t) { | |
function r(e) { | |
e && e.forceBase64 && (this.supportsBinary = !1), | |
this.perMessageDeflate = e.perMessageDeflate, | |
this.usingBrowserWebSocket = p && !e.forceNode, | |
this.protocols = e.protocols, this.usingBrowserWebSocket || | |
(h = i), o.call(this, e) | |
} | |
var i, o = n(47), | |
s = n(26), | |
a = n(38), | |
u = n(39), | |
c = n(64), | |
l = n(13)("engine.io-client:websocket"), | |
p = t.WebSocket || t.MozWebSocket; | |
if ("undefined" == typeof window) try { | |
i = n(159) | |
} catch (e) {} | |
var h = p; | |
h || "undefined" != typeof window || (h = i), e.exports = | |
r, u(r, o), r.prototype.name = "websocket", r.prototype | |
.supportsBinary = !0, r.prototype.doOpen = function() { | |
if (this.check()) { | |
var e = this.uri(), | |
t = this.protocols, | |
n = { | |
agent: this.agent, | |
perMessageDeflate: this.perMessageDeflate | |
}; | |
n.pfx = this.pfx, n.key = this.key, n.passphrase = | |
this.passphrase, n.cert = this.cert, n.ca = | |
this.ca, n.ciphers = this.ciphers, n.rejectUnauthorized = | |
this.rejectUnauthorized, this.extraHeaders && | |
(n.headers = this.extraHeaders), this.localAddress && | |
(n.localAddress = this.localAddress); | |
try { | |
this.ws = this.usingBrowserWebSocket ? | |
t ? new h(e, t) : new h(e) : new h( | |
e, t, n) | |
} catch (e) { | |
return this.emit("error", e) | |
} | |
void 0 === this.ws.binaryType && (this.supportsBinary = ! | |
1), this.ws.supports && this.ws.supports | |
.binary ? (this.supportsBinary = !0, | |
this.ws.binaryType = "nodebuffer") : | |
this.ws.binaryType = "arraybuffer", | |
this.addEventListeners() | |
} | |
}, r.prototype.addEventListeners = function() { | |
var e = this; | |
this.ws.onopen = function() { | |
e.onOpen() | |
}, this.ws.onclose = function() { | |
e.onClose() | |
}, this.ws.onmessage = function(t) { | |
e.onData(t.data) | |
}, this.ws.onerror = function(t) { | |
e.onError("websocket error", t) | |
} | |
}, r.prototype.write = function(e) { | |
function n() { | |
r.emit("flush"), setTimeout(function() { | |
r.writable = !0, r.emit("drain") | |
}, 0) | |
} | |
var r = this; | |
this.writable = !1; | |
for (var i = e.length, o = 0, a = i; o < a; o++) | |
! function(e) { | |
s.encodePacket(e, r.supportsBinary, | |
function(o) { | |
if (!r.usingBrowserWebSocket) { | |
var s = {}; | |
if (e.options && (s.compress = | |
e.options.compress | |
), r.perMessageDeflate) { | |
("string" == typeof o ? | |
t.Buffer.byteLength( | |
o) : o.length | |
) < r.perMessageDeflate | |
.threshold && ( | |
s.compress = ! | |
1) | |
} | |
} | |
try { | |
r.usingBrowserWebSocket ? | |
r.ws.send(o) : r.ws | |
.send(o, s) | |
} catch (e) { | |
l( | |
"websocket closed before onclose event" | |
) | |
}--i || n() | |
}) | |
}(e[o]) | |
}, r.prototype.onClose = function() { | |
o.prototype.onClose.call(this) | |
}, r.prototype.doClose = function() { | |
void 0 !== this.ws && this.ws.close() | |
}, r.prototype.uri = function() { | |
var e = this.query || {}, | |
t = this.secure ? "wss" : "ws", | |
n = ""; | |
return this.port && ("wss" === t && 443 !== | |
Number(this.port) || "ws" === t && 80 !== | |
Number(this.port)) && (n = ":" + this.port), | |
this.timestampRequests && (e[this.timestampParam] = | |
c()), this.supportsBinary || (e.b64 = 1), | |
e = a.encode(e), e.length && (e = "?" + e), | |
t + "://" + (-1 !== this.hostname.indexOf( | |
":") ? "[" + this.hostname + "]" : | |
this.hostname) + n + this.path + e | |
}, r.prototype.check = function() { | |
return !(!h || "__initialize" in h && this.name === | |
r.prototype.name) | |
} | |
}).call(t, n(4)) | |
}, function(e, t) {}, function(e, t) { | |
function n(e, t) { | |
var n = []; | |
t = t || 0; | |
for (var r = t || 0; r < e.length; r++) n[r - t] = e[r]; | |
return n | |
} | |
e.exports = n | |
}, function(e, t) { | |
function n(e) { | |
e = e || {}, this.ms = e.min || 100, this.max = e.max || | |
1e4, this.factor = e.factor || 2, this.jitter = e.jitter > | |
0 && e.jitter <= 1 ? e.jitter : 0, this.attempts = 0 | |
} | |
e.exports = n, n.prototype.duration = function() { | |
var e = this.ms * Math.pow(this.factor, this.attempts++); | |
if (this.jitter) { | |
var t = Math.random(), | |
n = Math.floor(t * this.jitter * e); | |
e = 0 == (1 & Math.floor(10 * t)) ? e - n : e + n | |
} | |
return 0 | Math.min(e, this.max) | |
}, n.prototype.reset = function() { | |
this.attempts = 0 | |
}, n.prototype.setMin = function(e) { | |
this.ms = e | |
}, n.prototype.setMax = function(e) { | |
this.max = e | |
}, n.prototype.setJitter = function(e) { | |
this.jitter = e | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
var r = this && this.__extends || function() { | |
var e = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(e, t) { | |
e.__proto__ = t | |
} || function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e[n] = | |
t[n]) | |
}; | |
return function(t, n) { | |
function r() { | |
this.constructor = t | |
} | |
e(t, n), t.prototype = null === n ? Object.create( | |
n) : (r.prototype = n.prototype, new r) | |
} | |
}(); | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var i = n(19), | |
o = n(9), | |
s = function(e) { | |
function t(t, n) { | |
var r = new Date; | |
return e.call(this, o.EventType.VUPLAY, t, { | |
playerId: n | |
}, r) || this | |
} | |
return r(t, e), t | |
}(i.EventBase); | |
t.VuplayEvent = s | |
}])); | |
! function(t, e) { | |
for (var n in e) t[n] = e[n] | |
}(this, function(t) { | |
function e(n) { | |
if (i[n]) return i[n].exports; | |
var s = i[n] = { | |
i: n, | |
l: !1, | |
exports: {} | |
}; | |
return t[n].call(s.exports, s, s.exports, e), s.l = !0, s.exports | |
} | |
var n = window.webpackJsonp; | |
window.webpackJsonp = function(e, i, r) { | |
for (var o, a, l = 0, u = []; l < e.length; l++) a = e[l], s[a] && | |
u.push(s[a][0]), s[a] = 0; | |
for (o in i) Object.prototype.hasOwnProperty.call(i, o) && (t[o] = | |
i[o]); | |
for (n && n(e, i, r); u.length;) u.shift()() | |
}; | |
var i = {}, | |
s = { | |
3: 0 | |
}; | |
return e.e = function(t) { | |
function n() { | |
a.onerror = a.onload = null, clearTimeout(l); | |
var e = s[t]; | |
0 !== e && (e && e[1](new Error("Loading chunk " + t + | |
" failed.")), s[t] = void 0) | |
} | |
var i = s[t]; | |
if (0 === i) return new Promise(function(t) { | |
t() | |
}); | |
if (i) return i[2]; | |
var r = new Promise(function(e, n) { | |
i = s[t] = [e, n] | |
}); | |
i[2] = r; | |
var o = document.getElementsByTagName("head")[0], | |
a = document.createElement("script"); | |
a.type = "text/javascript", a.charset = "utf-8", a.async = !0, | |
a.timeout = 12e4, e.nc && a.setAttribute("nonce", e.nc), a.src = | |
e.p + "" + ({ | |
0: "skin.ketnet", | |
1: "skin.default", | |
2: "skin.core" | |
}[t] || t) + ".vuplay-vrt.js"; | |
var l = setTimeout(n, 12e4); | |
return a.onerror = a.onload = n, o.appendChild(a), r | |
}, e.m = t, e.c = i, e.d = function(t, n, i) { | |
e.o(t, n) || Object.defineProperty(t, n, { | |
configurable: !1, | |
enumerable: !0, | |
get: i | |
}) | |
}, e.n = function(t) { | |
var n = t && t.__esModule ? function() { | |
return t.default | |
} : function() { | |
return t | |
}; | |
return e.d(n, "a", n), n | |
}, e.o = function(t, e) { | |
return Object.prototype.hasOwnProperty.call(t, e) | |
}, e.p = "https://cdn.vuplay.co.uk/vrt/vuplay/0.18.8/", e.oe = | |
function(t) { | |
throw console.error(t), t | |
}, e(e.s = 22) | |
}([function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(4); | |
e.VRT_API_URL = | |
"https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1", | |
e.VRT_MEDIA_TOKEN_KEY = "vrt-media-token", e.MPEG_DASH = | |
"mpeg_dash", e.VOD = "vod", e.POLLING_EPG_INTERVAL = 3e5, e | |
.CHECKING_EPG_DATA_INTERVAL = 1e4, e.IF_MODIFIED_SINCE_HEADER_KEY = | |
"If-Modified-Since", e.ScrubberTypes = i.Util.strEnum([ | |
"volume", "progress" | |
]), e.PlaylistItemTypes = i.Util.strEnum(["promotional", | |
"standard" | |
]), e.PREROLL_CONFIG_URL = | |
"https://services.vrt.be/videoplayer/r/ad_config.json", e.PREROLL_URL = | |
"https://ads-pebblemedia.adhese.com/ad/sl_%%CONTENT%%_content-vrt_-preroll/%%CATEGORY%%/?t=%%TIMESTAMP%%", | |
e.PREROLL_VIDEO_MIN_ALLOWED_DURATION = 30, e.PREROLL_DEFAULT_CATEGORY = | |
"seNieuws", e.PREROLL_START_TIMEOUT = 0, e.PREROLL_SKIP_TIMEOUT = | |
15, e.VIDEO_QUERY_PARAM_VSTART = "vstart", e.VIDEO_QUERY_PARAM_VEND = | |
"vend", e.SKIN_KETNET = "ketnet", e.GET = "GET", e.POST = | |
"POST", e.ADOBE_VISITOR_TRACKING_SERVER = | |
"vrt.sc.omtrdc.net", e.ADOBE_VISITOR_MARKETING_CLOUD_ORG_ID = | |
"046F8AC959E76A590A495CAA@AdobeOrg", e.ADOBE_APP_MEASUREMENT_TRACKING_SERVER = | |
"vrt.sc.omtrdc.net", e.ADOBE_HEARTBEAT_TRACKING_SERVER = | |
"vrt.hb.omtrdc.net", e.ADOBE_HEARTBEAT_PUBLISHER = | |
"046F8AC959E76A590A495CAA@AdobeOrg", e.VRT_WRAPPER_VERSION = | |
"0.18.8" | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
! function(t) { | |
t[t.SMART = 0] = "SMART", t[t.ERROR = 1] = "ERROR", t[t.TOKEN = | |
2] = "TOKEN", t[t.AGGREGATOR = 3] = "AGGREGATOR", t[ | |
t.LOG = 4] = "LOG" | |
}(e.EventType || (e.EventType = {})) | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}), e.DIV = "div", e.SVG = "svg", e.SPAN = "span", e.IMG = | |
"img", e.CLICK = "click", e.BUTTON = "button", e.LIVE = | |
"live", e.COLON = ":", e.PERCENTAGE_TOGGLE_LIVE_BUTTON = 98, | |
e.Translations = { | |
casting: "Aan het casten", | |
notCasting: "Niet aan het casten", | |
playVideoInFullscreen: "Video in volledig scherm afspelen", | |
exitFullscreen: "Volledige schermweergave verlaten", | |
volumeOff: "Geluid af", | |
volumeOn: "Geluid aan", | |
volume: "Geluid", | |
close: "Sluit", | |
errorTitle: "Oops, de video kan nu niet afgespeeld worden.", | |
HTTPRequestErrorFormat: "Performing a ${method} data to ${url} raised an error", | |
HTTPRequestErrorStatusFormat: "Performing a ${method} data to ${url} caused a ${status} HTTP status", | |
fragments: "Fragmenten", | |
subtitles: "Ondertitels", | |
watchFromStart: "Vanaf het begin kijken", | |
nextFragment: "Volgende (notice: can also be “Volgendâ€, like in “Volgend fragment", | |
seekingNotAllowed: "Zoeken is niet mogelijk in live wanneer aan het casten", | |
advertisement: "Sponsoring", | |
disableAdBlocker: "Zet je ad blocker uit om deze video te kunnen bekijken", | |
replay: "Overspelen", | |
skipButtonLabel: "Ga 10 seconden terug", | |
playButtonLabel: "Afspelen", | |
pauseButtonLabel: "Pauzeren", | |
scrubberLabel: "Navigeren binnen de video", | |
liveLabel: "Leven", | |
countdownText: "10 seconden", | |
googleCastButtonTitle: "Google Cast" | |
}, e.Accessibility = { | |
tabIndex: "tabindex", | |
ariaLabel: "aria-label", | |
role: "role", | |
slider: "slider", | |
ariaValueMin: "aria-valuemin", | |
ariaValueMax: "aria-valuemax", | |
ariaValueNow: "aria-valuenow", | |
ariaValueText: "aria-valuetext", | |
ariaHaspopup: "aria-haspopup", | |
ariaExpanded: "aria-expanded", | |
ariaVisible: "aria-visible", | |
ariaPressed: "aria-pressed", | |
ariaLive: "aria-live", | |
ariaPolite: "polite", | |
ariaMenu: "menu", | |
ariaLink: "link", | |
ariaLabelOf: "van" | |
}, e.SkinBrands = [{ | |
name: "default", | |
errorButtonBorder: "#B4B4B4", | |
iconTint: "#B4B4B4", | |
iconTintActive: "#FFFFFF", | |
spinnerTint: "##B4B4B4", | |
textColour: "#FFFFFF", | |
progressScrubber: { | |
current: "#FFFFFF", | |
nipple: "#FFFFFF", | |
loaded: "#B4B4B4", | |
container: "#2F2F2F" | |
}, | |
volumeScrubber: { | |
current: "#FFFFFF", | |
nipple: "#FFFFFF", | |
container: "#2F2F2F" | |
} | |
}, { | |
name: "green", | |
errorButtonBorder: "#5DEF71", | |
iconTint: "white", | |
iconTintActive: "#5DEF71", | |
spinnerTint: "#5DEF71", | |
textColour: "white", | |
progressScrubber: { | |
current: "#5DEF71", | |
nipple: "#5DEF71", | |
loaded: "#FFFFFF", | |
container: "rgba(255,255, 255, 0.2)" | |
}, | |
volumeScrubber: { | |
current: "#5DEF71", | |
nipple: "#5DEF71", | |
container: "light-grey" | |
} | |
}, { | |
name: "red", | |
errorButtonBorder: "#BC2A21", | |
iconTint: "#FFFFFF", | |
iconTintActive: "#BC2A21", | |
spinnerTint: "#BC2A21", | |
textColour: "#FFFFFF", | |
progressScrubber: { | |
current: "#BC2A21", | |
nipple: "#BC2A21", | |
loaded: "#B4B4B4", | |
container: "#2F2F2F" | |
}, | |
volumeScrubber: { | |
current: "#BC2A21", | |
nipple: "#BC2A21", | |
container: "#2F2F2F" | |
} | |
}, { | |
name: "blue", | |
errorButtonBorder: "#5DEF71", | |
iconTint: "#FFFFFF", | |
iconTintActive: "#0098CC", | |
spinnerTint: "#0098CC", | |
textColour: "#FFFFFF", | |
progressScrubber: { | |
current: "#0098CC", | |
nipple: "#0098CC", | |
loaded: "#B4B4B4", | |
container: "#2F2F2F" | |
}, | |
volumeScrubber: { | |
current: "#0098CC", | |
nipple: "#0098CC", | |
container: "#2F2F2F" | |
} | |
}, { | |
name: "ketnet", | |
errorButtonBorder: "#FF2254", | |
iconTint: "#FFFFFF", | |
iconTintActive: "#FF2254", | |
spinnerTint: "#FF2254", | |
textColour: "#FFFFFF", | |
progressScrubber: { | |
current: "#FF2254", | |
nipple: "#FF2254", | |
loaded: "#B4B4B4", | |
container: "#2F2F2F" | |
}, | |
volumeScrubber: { | |
current: "#FFFFFF", | |
nipple: "#FFFFFF", | |
container: "#2F2F2F" | |
} | |
}], e.SkinClasses = { | |
vuplayContainer: "vuplay-container", | |
vuplayExtraSmall: "vuplay-xs", | |
vuplaySmall: "vuplay-sm", | |
vuplayMedium: "vuplay-md", | |
vuplayLarge: "vuplay-lg", | |
vuplaySmartView: "vuplay-smart-view", | |
vuplayVideoContainer: "vuplay-video-container", | |
vuplayBufferContainer: "vuplay-buffer-container", | |
vuplayBufferSpinner: "vuplay-buffer-spinner", | |
vuplayCentralErrorContainer: "vuplay-central-error-container", | |
vuplayCentralErrorMessage: "vuplay-central-error-message", | |
vuplayCentralErrorTitle: "vuplay-central-error-title", | |
vuplayCentralErrorButton: "vuplay-central-error-button", | |
vuplayOverlay: "vuplay-overlay", | |
vuplayOverlayHit: "vuplay-overlay-hit", | |
vuplayVideoControlContainer: "vuplay-video-control-container", | |
vuplayVideoControlContainerLeft: "vuplay-video-control-container-left", | |
vuplayVideoSubcontrolContainer: "vuplay-video-subcontrol-container", | |
vuplayControl: "vuplay-control", | |
vuplayControlLeft: "vuplay-control-left", | |
vuplayBtn: "vuplay-btn", | |
vuplayStopBtn: "vuplay-stop-btn", | |
vuplayPlayBtn: "vuplay-play-btn", | |
vuplayFastForwardButton: "vuplay-fforward-btn", | |
vuplayMultiAudio: "vuplay-multi-audio", | |
vuplayMultiAudioBtn: "vuplay-multi-audio-btn", | |
vuplayListMultiAudio: "vuplay-list-multi-audio", | |
vuplayControlSubtitles: "vuplay-control-subtitles", | |
vuplaySubtitlesBtn: "vuplay-subtitles-btn", | |
vuplayListSubtitles: "vuplay-list-subtitles", | |
vuplayList: "vuplay-list", | |
vuplayControlProgress: "vuplay-control-progress", | |
vuplayControlProgressContainer: "vuplay-control-progress-container", | |
vuplayControlProgressCurrent: "vuplay-control-progress-current", | |
vuplayControlProgressNipple: "vuplay-control-progress-nipple", | |
vuplayControlRight: "vuplay-control-right", | |
vuplayControlFullscreen: "vuplay-control-fullscreen", | |
vuplayFullscreenBtn: "vuplay-fullscreen-btn", | |
vuplayControlVolume: "vuplay-control-volume", | |
vuplayMuteBtn: "vuplay-mute-btn", | |
vuplayBoxVolume: "vuplay-box-volume", | |
vuplayControlVolumeContainer: "vuplay-control-volume-container", | |
vuplayControlVolumeCurrent: "vuplay-control-volume-current", | |
vuplayControlVolumeNipple: "vuplay-control-volume-nipple", | |
vuplayControlVolumeVisible: "vuplay-control-volume-visible", | |
vuplayControlTime: "vuplay-control-time", | |
vuplayTimeText: "vuplay-time-text", | |
vuplayTimeDuration: "vuplay-time-duration", | |
vuplayTimeCurrent: "vuplay-time-current", | |
vuplayTitle: "vuplay-title", | |
vuplayLogo: "vuplay-logo", | |
vuplayLive: "vuplay-live", | |
vuplayControlLive: "vuplay-control-live", | |
vuplayLayoutSmall: "vuplay-layout-small", | |
visible: "visible", | |
fullscreen: "fullscreen", | |
muted: "muted", | |
volume: "volume", | |
active: "active", | |
listItem: "list-item", | |
playing: "playing", | |
paused: "paused", | |
settingsValue: "settings-value", | |
showSubtitles: "show-subtitles", | |
hasSubtitles: "has-subtitles", | |
showMultiAudio: "show-multi-audio", | |
live: "live", | |
enabled: "enabled", | |
vuplayControlTimeDivider: "vuplay-control-time-divider", | |
vuplayTimeDivider: "vuplay-time-divider", | |
vuplayPulse: "vuplay-pulse", | |
vuplayThumbnailContainer: "vuplay-thumbnail-container", | |
vuplayThumbnail: "vuplay-thumbnail", | |
vuplayTimeSeek: "vuplay-time-seek", | |
vuplayEpisodeTitle: "vuplay-episode-title", | |
vuplayControlAirplay: "vuplay-control-airplay", | |
vuplayAirplayBtn: "vuplay-airplay-btn", | |
vuplayControlGooglecast: "vuplay-control-googlecast", | |
vuplayGooglecastBtn: "vuplay-googlecast-btn", | |
vuplayControlStartOver: "vuplay-control-start-over", | |
vuplayStartOverBtn: "vuplay-start-over-btn", | |
vuplayHide: "vuplay-hide", | |
vuplayShow: "vuplay-show", | |
vuplaySkipAd: "vuplay-skip-ad", | |
vuplayControlProgressLoaded: "vuplay-control-progress-loaded", | |
vuplayControlSkipBack: "vuplay-control-skip-back", | |
vuplayControlPlay: "vuplay-control-play-btn", | |
vuplaySkipBackBtn: "vuplay-skip-back-btn", | |
edge: "edge", | |
background: "background", | |
color: "color", | |
vuplayUpNextOverlay: "vuplay-up-next-overlay", | |
vuplayUpNextCountdown: "vuplay-up-next-countdown", | |
vuplayUpNextCountdownValue: "vuplay-up-next-countdown-value", | |
vuplayUpNextLeftColumnContainer: "vuplay-up-next-left-column-container", | |
vuplayUpNextImageContainer: "vuplay-up-next-image-container", | |
vuplayUpNextImage: "vuplay-up-next-image", | |
vuplayChapters: "vuplay-chapters", | |
vuplayControlChapters: "vuplay-control-chapters", | |
vuplayChaptersBtn: "vuplay-chapters-btn", | |
vuplayChapterItem: "vuplay-chapter-item", | |
vuplayAdvert: "vuplay-advert", | |
vuplayProbablyKeyboardFocus: "vuplay-probably-keyboard-focus", | |
vuplayNumber: "vuplay-number", | |
vuplayColon: "vuplay-colon", | |
vuplayHidden: "vuplay-hidden", | |
vuplayReplay: "vuplay-replay", | |
hasEnded: "has-ended", | |
vuplayControlAdvertisementCountdownContainer: "vuplay-control-advertisement-countdown-container", | |
vuplayAdvertisementCountdownLabel: "vuplay-advertisement-countdown-label", | |
hasAdvertisements: "has-advertisements", | |
vuplayOverlayVisible: "vuplay-overlay-visible", | |
vuplaySkinDefault: "vuplay-skin-default", | |
vuplaySkinKetnet: "vuplay-skin-ketnet", | |
vuplayGoogleCastLoaded: "vuplay-google-cast-loaded", | |
vuplayWindows: "vuplay-windows", | |
vuplayHideCursor: "vuplay-hide-cursor" | |
}, e.VuplaySkinSvgIcons = { | |
airplay: '<svg class="airplay" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 19.1 13.9" style="enable-background:new 0 0 19.1 13.9;" xml:space="preserve"><g><polygon points="5.1,10 1.3,10 1.3,1.3 17.8,1.3 17.8,10 14,10 15.2,11.3 19.1,11.3 19.1,0 0,0 0,11.3 3.9,11.3 5.1,10"/><polygon points="3.4,13.9 9.5,6.9 15.7,13.9 3.4,13.9"/></g></svg>', | |
chapters: '<svg class="chapters" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 42 40" style="enable-background:new 0 0 42 40;" xml:space="preserve"><g><rect width="10" height="10"/><rect x="12" y="2" width="30" height="6"/><rect y="15" width="10" height="10"/><rect x="12" y="17" width="30" height="6"/><rect y="30" width="10" height="10"/><rect x="12" y="32" width="30" height="6"/></g></svg>', | |
chaptersActive: '<svg class="chapters-active" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 42 40" style="enable-background:new 0 0 42 40;" xml:space="preserve"><g><rect width="10" height="10"/><rect x="12" y="2" width="30" height="6"/><rect y="15" width="10" height="10"/><rect x="12" y="17" width="30" height="6"/><rect y="30" width="10" height="10"/><rect x="12" y="32" width="30" height="6"/></g></svg>', | |
fullscreen: '<svg class="fullscreen" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve"><path d="M2,9H0v5h5v-2H2V9z M0,5h2V2h3V0H0V5z M12,12H9v2h5V9h-2V12z M9,0v2h3v3h2V0H9z"/></svg>', | |
fullscreenExit: '<svg class="fullscreen-exit" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve"><path d="M0,11h3v3h2V9H0V11z M3,3H0v2h5V0H3V3z M9,14h2v-3h3V9H9V14z M11,3V0H9v5h5V3H11z"/></svg>', | |
googleCast: '<svg class="google-cast" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 17 13.9" style="enable-background:new 0 0 17 13.9;" xml:space="preserve"><g><path d="M0,5.4V7c3.8,0,7,3.1,7,7h1.5C8.5,9.2,4.7,5.4,0,5.4L0,5.4z M0,8.5v1.5c2.1,0,3.9,1.7,3.9,3.9h1.5\tC5.4,10.9,3,8.5,0,8.5L0,8.5z M0,11.6v2.3h2.3C2.3,12.6,1.3,11.6,0,11.6L0,11.6z M15.5,0H1.5C0.7,0,0,0.7,0,1.5v2.3h1.5V1.5h13.9 v10.8h-5.4v1.5h5.4c0.9,0,1.5-0.7,1.5-1.5V1.5C17,0.7,16.3,0,15.5,0L15.5,0z"/></g></svg>', | |
live: '<svg class="live" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 13.9 13.9" style="enable-background:new 0 0 13.9 13.9;" xml:space="preserve"><g><path d="M13,12.8H0.9V1.2H13V12.8L13,12.8z M0,0v13.9h13.9V0H0L0,0z"/></g><g><path d="M2.1,4.7h0.5v3.2h1.7v0.4H2.1V4.7z"/><path d="M4.9,4.7h0.5v3.6H4.9V4.7z"/><path d="M5.9,4.7h0.5l1.1,3.1h0l1.1-3.1h0.5L7.8,8.4H7.2L5.9,4.7z"/><path d="M9.7,4.7H12v0.4h-1.8v1h1.8v0.4h-1.8v1.2H12v0.4H9.7V4.7z"/></g></svg>', | |
mute: '<svg class="mute" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16.2 15.3" style="enable-background:new 0 0 16.2 15.3;" xml:space="preserve"><g><g><polygon points="0,5.1 4.6,5.1 7.5,2.2 7.5,13.5 4.8,10.7 0,10.5"/></g><g><path d="M9.4,4.3v7.2c0,0,2.6-0.6,2.6-3.6C12,4.9,9.4,4.3,9.4,4.3z"/></g><g><path d="M9.7,15.3l-0.3-2c0.2,0,4.8-0.9,4.8-6c0-5-4.5-5.3-4.7-5.4l0.1-2c0.1,0,6.6,0.5,6.6,7.4 C16.2,12.8,12,14.9,9.7,15.3z"/></g></g></svg>', | |
pause: '<svg class="pause" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 9.4 14" style="enable-background:new 0 0 9.4 14;" xml:space="preserve"><g><g><g><rect x="6.5" y="0" width="2.9" height="14"/></g><g><rect width="2.9" height="14"/></g></g></g></svg>', | |
pauseBig: '<svg class="pause-big" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 86.9 86.9" style="enable-background:new 0 0 86.9 86.9;" xml:space="preserve"><style type="text/css">.pause-big .st0{opacity:0.5;fill:#000000;stroke-width:2;stroke-miterlimit:10;}</style><g><circle class="st0" cx="43.4" cy="43.4" r="42.4"/></g><g><g><g><rect x="48.6" y="25.3" class="st1" width="8" height="38.6"/></g><g><rect x="30.7" y="25.2" class="st1" width="8" height="38.6"/></g></g></g></svg>', | |
play: '<svg class="play" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 8.4 13.8" style="enable-background:new 0 0 8.4 13.8;" xml:space="preserve"><g><polygon points="2,13.8 0,11.9 4.7,6.9 0,1.9 2,0 8.4,6.9"/></g></svg>', | |
playBig: '<svg class="play-big" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 86.9 86.9" style="enable-background:new 0 0 86.9 86.9;" xml:space="preserve"><style type="text/css">.play-big .st0{opacity:0.5;fill:#000000;stroke-width:2;stroke-miterlimit:10;}</style><g><circle class="st0" cx="43.4" cy="43.4" r="42.4"/><g><polygon points="37.1,62.1 31.4,56.9 44.5,42.7 31.4,28.7 37,23.4 55.1,42.7"/></g></g></svg>', | |
share: '<svg class="share" version="1.1" x="0px" y="0px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"><g><g><path d="M21,11l-7-7v4C7,9,4,14,3,19c2.5-3.5,6-5.1,11-5.1V18L21,11z"/><rect fill="none" width="24" height="24"/></g></g></svg>', | |
startOver: '<svg class="start-over" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 48.24487 40"><path d="M21.44373,14.08058l2.64014-2.64008L19.68372,7.04024,24.08386,2.64,21.44373,0,14.40344,7.04024l2.64014,2.64014Zm9.81476-8.92841c-.30792,0-.61133.01825-.91522.03436L32.88971,2.64,30.24963,0,25.84937,4.40016l-2.64,2.64008,2.64,2.64014.00012-.00006,4.40015,4.40027,2.64008-2.64008-2.5116-2.5116c.29224-.01917.58325-.043.88037-.043A13.69022,13.69022,0,1,1,18.618,27.83333H14.64569A17.42429,17.42429,0,1,0,31.25848,5.15217Z" transform="translate(-0.4375 -0.00001)" /><path d="M3.39941,19.8827c.625.08789,1.499.2251,2.29883.36279A2.56659,2.56659,0,0,1,8.123,22.90663c0,1.84961-1.76172,2.83789-3.88672,2.83789C1.8623,25.74452.5,24.75624.4375,22.682H2.21191c.0498,1.0498.7998,1.53711,2.02441,1.53711,1.14941,0,2.1123-.40039,2.1123-1.3125,0-.64941-.4248-.88672-1.2002-1.01172L2.97461,21.557A2.51623,2.51623,0,0,1,.5625,19.2079c0-1.79932,1.375-2.83643,3.54883-2.83643,2.25,0,3.63672.9248,3.69922,2.68652h-1.75c-.09961-.88721-.874-1.187-1.94922-1.187-1.1123,0-1.81152.375-1.81152,1.03711C2.2998,19.4955,2.77441,19.7953,3.39941,19.8827Z" transform="translate(-0.4375 -0.00001)" /><path d="M8.72461,16.55849H15.835v1.6123H13.16113V25.557h-1.7627V18.17079H8.72461Z" transform="translate(-0.4375 -0.00001)" /><path d="M22.21094,25.557l-.7373-2.19922H17.89941l-.7373,2.19922H15.33789l3.08691-8.99854h2.53711l3.124,8.99854Zm-3.79883-3.75h2.5498l-1.2373-3.71094h-.05078Z" transform="translate(-0.4375 -0.00001)" /><path d="M25.21289,16.55849H29.499c2.1123,0,3.21191.8877,3.21191,2.78711a2.47838,2.47838,0,0,1-2.125,2.59912l2.4375,3.6123H30.93652l-2.28711-3.4248h-1.6748V25.557H25.21289Zm1.76172,1.4751V20.6703h2.19922c1.0752,0,1.71289-.4375,1.71289-1.37451,0-.8877-.7627-1.26221-1.71289-1.26221Z" transform="translate(-0.4375 -0.00001)" /><path d="M33.58691,16.55849h7.11035v1.6123H38.02344V25.557h-1.7627V18.17079H33.58691Z" transform="translate(-0.4375 -0.00001)" /></svg>', | |
skip: '<svg class="skip" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 34.6 40" style="enable-background:new 0 0 34.6 40;" xml:space="preserve"><path d="M17.3,5.2c-0.3,0-0.6,0-0.9,0l2.5-2.5L16.3,0l-4.4,4.4l0,0L9.3,7l2.6,2.6l0,0l4.4,4.4l2.6-2.6l-2.5-2.5 c0.3,0,0.6,0,0.9,0c7.5,0,13.6,6.1,13.6,13.7s-6.1,13.7-13.6,13.7S3.7,30.1,3.7,22.6H0C0,32.2,7.7,40,17.3,40s17.3-7.8,17.3-17.4 S26.8,5.2,17.3,5.2z"/><g><path d="M7.7,18.7c0,0,1.9-0.6,2.9-2.4h2.3v13.1h-2.5V19.2c-1.7,1.5-2.7,1.5-2.7,1.5V18.7z"/><path d="M20.2,16c3.2,0,5.1,2.9,5.1,6.8c0,4.1-1.9,6.8-5.1,6.8s-5.1-2.7-5.1-6.8C15.1,18.9,17,16,20.2,16z M20.2,27.6 c1.6,0,2.6-1.8,2.6-4.7c0-2.7-1-4.7-2.6-4.7c-1.6,0-2.6,2-2.6,4.7C17.6,25.7,18.6,27.6,20.2,27.6z"/></g></svg>', | |
skipArrow: '<svg class="skip-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.49 20.39"><polygon points="3 20.39 0 17.61 6.89 10.17 0.01 2.79 3 0 12.48 10.15 3 20.39"/><rect class="cls-1" x="12.41" width="4.08" height="20.39"/></svg>', | |
spinner: '<svg class="vuplay-svg-spinner" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 441.6 441.6" style="enable-background:new 0 0 441.6 441.6;" xml:space="preserve"><style type="text/css">.vuplay-svg-spinner .st0{fill:none;stroke-width:30;stroke-linecap:round;stroke-miterlimit:10;}</style><g><path class="st0" d="M308.7,37c-26.6-12.8-56.5-19.9-87.9-19.9c-112.5,0-203.7,91.2-203.7,203.7s91.2,203.7,203.7,203.7 s203.7-91.2,203.7-203.7c0-42.1-12.8-81.2-34.7-113.7"/></g></svg>', | |
subtitles: '<svg class="subtitles" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 53.3 40" style="enable-background:new 0 0 53.3 40;" xml:space="preserve"><g><path d="M50,36.7H3.3V3.3H50V36.7L50,36.7z M0,0v40h53.3V0H0L0,0z"/><polygon points="43.7,22.7 9.7,22.7 9.7,17.7 43.7,17.7 43.7,22.7 "/><polygon points="39.7,31.7 13.7,31.7 13.7,26.7 39.7,26.7 39.7,31.7 "/></g></svg>', | |
subtitlesActive: '<svg class="subtitles-active" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 53.3 40" style="enable-background:new 0 0 53.3 40;" xml:space="preserve"><g><path d="M50,36.7H3.3V3.3H50V36.7L50,36.7z M0,0v40h53.3V0H0L0,0z"/><polygon points="43.7,22.7 9.7,22.7 9.7,17.7 43.7,17.7 43.7,22.7 "/><polygon points="39.7,31.7 13.7,31.7 13.7,26.7 39.7,26.7 39.7,31.7 "/></g></svg>', | |
unmute: '<svg class="unmute" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 54.3 40" style="enable-background:new 0 0 54.3 40;" xml:space="preserve"><g><polygon points="24.9,40 24.9,0 13.8,11.1 0,11.1 0,28.9 13.8,28.9 "/><polygon points="54.3,12.3 51.2,9.2 43.3,17 35.4,9.2 32.2,12.3 40.1,20.2 32.2,28.1 35.4,31.2 43.3,23.3 51.2,31.2 54.3,28.1 46.4,20.2 "/></g></svg>' | |
}, e.KetnetSkinSvgIcons = { | |
airplay: '<svg class="airplay" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 19.1 13.9" style="enable-background:new 0 0 19.1 13.9;" xml:space="preserve"><g><polygon points="5.1,10 1.3,10 1.3,1.3 17.8,1.3 17.8,10 14,10 15.2,11.3 19.1,11.3 19.1,0 0,0 0,11.3 3.9,11.3 5.1,10"/><polygon points="3.4,13.9 9.5,6.9 15.7,13.9 3.4,13.9"/></g></svg>', | |
chapters: '<svg class="chapters" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 40"><rect x="12" y="2" width="30" height="6" style="fill:#fff"/><rect x="12" y="17" width="30" height="6" style="fill:#fff"/><rect x="12" y="32" width="30" height="6" style="fill:#fff"/><rect width="10" height="10" rx="1.46" ry="1.46" style="fill:#fff"/><rect y="15" width="10" height="10" rx="1.46" ry="1.46" style="fill:#fff"/><rect y="30" width="10" height="10" rx="1.46" ry="1.46" style="fill:#fff"/></svg>', | |
chaptersActive: '<svg class="chapters-active" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 40"><rect x="12" y="2" width="30" height="6" style="fill:#ff2254"/><rect x="12" y="17" width="30" height="6" style="fill:#ff2254"/><rect x="12" y="32" width="30" height="6" style="fill:#ff2254"/><rect width="10" height="10" rx="1.46" ry="1.46" style="fill:#ff2254"/><rect y="15" width="10" height="10" rx="1.46" ry="1.46" style="fill:#ff2254"/><rect y="30" width="10" height="10" rx="1.46" ry="1.46" style="fill:#ff2254"/></svg>', | |
fullscreen: '<svg class="fullscreen" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 39.83 39.69"><path d="M37.09.09,26.84,3a2.29,2.29,0,0,0-1.1,3.76L27,8l-5.12,5.12a3.3,3.3,0,0,0,0,4.67h0a3.3,3.3,0,0,0,4.67,0l5.12-5.12L33,14.1A2.29,2.29,0,0,0,36.81,13L39.74,2.76A2.14,2.14,0,0,0,37.09.09Z" style="fill:#fff"/><path d="M2.74,39.61,13,36.67a2.29,2.29,0,0,0,1.1-3.76l-1.25-1.25L18,26.53a3.3,3.3,0,0,0,0-4.67h0a3.3,3.3,0,0,0-4.67,0L8.17,27,6.78,25.6A2.29,2.29,0,0,0,3,26.69L.09,36.94A2.14,2.14,0,0,0,2.74,39.61Z" style="fill:#fff"/></svg>', | |
fullscreenExit: '<svg class="fullscreen-exit" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 39.83 39.69"><path d="M23.65,18.67,33.9,15.76A2.29,2.29,0,0,0,35,12l-1.26-1.24,5.12-5.12a3.3,3.3,0,0,0,0-4.67h0A3.3,3.3,0,0,0,34.2,1h0L29.07,6.09,27.74,4.66a2.29,2.29,0,0,0-3.81,1.1L21,16a2.14,2.14,0,0,0,2.65,2.67Z" style="fill:#fff"/><path d="M16.23,21,6,23.91a2.29,2.29,0,0,0-1.1,3.76l1.25,1.25L1,34.05a3.3,3.3,0,0,0,0,4.67H1a3.3,3.3,0,0,0,4.67,0h0l5.16-5.14L12.19,35A2.29,2.29,0,0,0,16,33.89l2.91-10.25A2.14,2.14,0,0,0,16.23,21Z" style="fill:#fff"/></svg>', | |
googleCast: '<svg class="google-cast" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 17 13.9" style="enable-background:new 0 0 17 13.9;" xml:space="preserve"><g><path d="M0,5.4V7c3.8,0,7,3.1,7,7h1.5C8.5,9.2,4.7,5.4,0,5.4L0,5.4z M0,8.5v1.5c2.1,0,3.9,1.7,3.9,3.9h1.5\tC5.4,10.9,3,8.5,0,8.5L0,8.5z M0,11.6v2.3h2.3C2.3,12.6,1.3,11.6,0,11.6L0,11.6z M15.5,0H1.5C0.7,0,0,0.7,0,1.5v2.3h1.5V1.5h13.9 v10.8h-5.4v1.5h5.4c0.9,0,1.5-0.7,1.5-1.5V1.5C17,0.7,16.3,0,15.5,0L15.5,0z"/></g></svg>', | |
live: '<svg class="live" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 62 41"><path d="M58.67,0H3.33A3.33,3.33,0,0,0,0,3.33V37.67A3.33,3.33,0,0,0,3.33,41H58.67A3.33,3.33,0,0,0,62,37.67V3.33A3.33,3.33,0,0,0,58.67,0ZM10,33H5V9h5Zm9,0H14V16h5ZM16.72,14.33a3.13,3.13,0,1,1,3.15-3.15A3.13,3.13,0,0,1,16.72,14.33ZM33.61,33H27.8L21.07,16h5.74l3.9,10.84L34.57,16h5.77ZM59,26H46.51c.39,2,1.81,2.9,4.29,2.9A7.07,7.07,0,0,0,55,27.49l2.37,3.6a11.17,11.17,0,0,1-7.15,2.28c-5.28,0-9.32-3.43-9.32-9a8.93,8.93,0,0,1,9.22-9c5.07,0,8.9,3.72,8.9,9.53Z" style="fill:#fff"/><path d="M49.94,19.34A3.38,3.38,0,0,0,46.44,22h7A3.25,3.25,0,0,0,49.94,19.34Z" style="fill:#fff"/></svg>', | |
mute: '<svg class="mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56.74 40.12"><path d="M36.39,20.09q0,7.74,0,15.49a7.76,7.76,0,0,1-.18,1.68,2.87,2.87,0,0,1-4,2.25,8.38,8.38,0,0,1-1.48-.7q-9.22-5.28-18.44-10.56a2.46,2.46,0,0,0-1.15-.3c-2.71,0-5.43-.06-8.14,0a2.83,2.83,0,0,1-3-3c.05-3.28,0-6.56,0-9.84a2.67,2.67,0,0,1,2.86-2.89c2.76,0,5.52,0,8.28,0a2.36,2.36,0,0,0,1.11-.29Q21.54,6.6,30.79,1.27A5.32,5.32,0,0,1,33.2.42,2.69,2.69,0,0,1,35.93,2a5.65,5.65,0,0,1,.47,2.47Q36.4,12.3,36.39,20.09Z" style="fill:#fff"/><path d="M40.67,7.86a2.24,2.24,0,0,1,1.4-2.11l8.51-4.09c1-.47,2-1,3-1.42a2.18,2.18,0,1,1,1.88,3.93L49.33,7.1c-1.83.88-3.66,1.78-5.5,2.64a2.15,2.15,0,0,1-3.09-1.39A3.82,3.82,0,0,1,40.67,7.86Z" style="fill:#fff"/><path d="M40.68,32.61a2.21,2.21,0,0,1,3.14-2.25c1.66.78,3.3,1.58,5,2.38l6.64,3.2a2.18,2.18,0,1,1-1.82,4c-1.77-.83-3.53-1.69-5.29-2.54l-6.3-3A2.07,2.07,0,0,1,40.68,32.61Z" style="fill:#fff"/><path d="M48.71,18h5.88a2.17,2.17,0,0,1,.87,4.14,2.8,2.8,0,0,1-1,.21q-5.72,0-11.43,0a2.19,2.19,0,0,1-1.6-3.8,2.12,2.12,0,0,1,1.5-.57Z" style="fill:#fff"/></svg>', | |
pause: '<svg class="pause" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35.6 40.33"><path d="M0,20.17Q0,11.39,0,2.61A2.39,2.39,0,0,1,2.61,0H9.3a2.38,2.38,0,0,1,2.54,2.55q0,17.61,0,35.22a2.39,2.39,0,0,1-2.57,2.56H2.54A2.38,2.38,0,0,1,0,37.78Q0,29,0,20.17Z" style="fill:#fff"/><path d="M23.76,20.15q0-8.76,0-17.52A2.4,2.4,0,0,1,26.4,0H33A2.38,2.38,0,0,1,35.6,2.54q0,17.63,0,35.26A2.38,2.38,0,0,1,33,40.33H26.36a2.39,2.39,0,0,1-2.59-2.58Q23.76,29,23.76,20.15Z" style="fill:#fff"/></svg>', | |
pauseBig: '<svg class="pause-big" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121.57 121.57"><defs><style>.pause-big .cls-1{fill:#ff2254;stroke:none;}.pause-big .cls-2{fill:#fae021;stroke:none;}</style></defs><title>Asset 2</title><g id="Layer_2" data-name="Layer 2"><g id="Laag_1" data-name="Laag 1"><circle class="cls-1" cx="60.79" cy="60.79" r="60.79"/><path class="cls-2" d="M38.08,60.86q0-11.3,0-22.6a3.08,3.08,0,0,1,3.36-3.35H50a3.07,3.07,0,0,1,3.26,3.28q0,22.65,0,45.31A3.07,3.07,0,0,1,50,86.8H41.34a3.07,3.07,0,0,1-3.26-3.28Q38.08,72.19,38.08,60.86Z"/><path class="cls-2" d="M68.65,60.83q0-11.27,0-22.55A3.09,3.09,0,0,1,72,34.91h8.55a3.07,3.07,0,0,1,3.28,3.26q0,22.68,0,45.36a3.07,3.07,0,0,1-3.28,3.27H72a3.08,3.08,0,0,1-3.34-3.32Q68.65,72.15,68.65,60.83Z"/></g></g></svg>', | |
play: '<svg class="play" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37.64 39.99"><defs></defs><g id="Layer_2" data-name="Layer 2"><g id="Laag_1" data-name="Laag 1"><path d="M0,34.05V5.94C0,1.36,5.18-1.49,9.29.82l25.3,14.06a5.82,5.82,0,0,1,0,10.24L9.29,39.17C5.18,41.48,0,38.63,0,34.05"/></g></g></svg>', | |
playBig: '<svg class="play-big" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121.57 121.57"><defs><style>.play-big .cls-1{fill:#ff2254;stroke:none;}.play-big .cls-2{fill:#fae021;stroke:none;}</style></defs><title>Asset 1</title><g id="Layer_2" data-name="Layer 2"><g id="Laag_1" data-name="Laag 1"><circle class="cls-1" cx="60.79" cy="60.79" r="60.79"/><path class="cls-2" d="M41.1,79.08V42.6c0-5.95,6.72-9.65,12.05-6.64L86,54.2a7.55,7.55,0,0,1,0,13.28L53.16,85.72c-5.34,3-12.05-.69-12.05-6.64"/></g></g></svg>', | |
share: '<svg class="share" version="1.1" x="0px" y="0px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"><g><g><path d="M21,11l-7-7v4C7,9,4,14,3,19c2.5-3.5,6-5.1,11-5.1V18L21,11z"/><rect fill="none" width="24" height="24"/></g></g></svg>', | |
startOver: '<svg class="start-over" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48.24487 40"><path d="M21.44373,14.08058l2.64014-2.64008L19.68372,7.04024,24.08386,2.64,21.44373,0,14.40344,7.04024l2.64014,2.64014Zm9.81476-8.92841c-.30792,0-.61133.01825-.91522.03436L32.88971,2.64,30.24963,0,25.84937,4.40016l-2.64,2.64008,2.64,2.64014.00012-.00006,4.40015,4.40027,2.64008-2.64008-2.5116-2.5116c.29224-.01917.58325-.043.88037-.043A13.69022,13.69022,0,1,1,18.618,27.83333H14.64569A17.42429,17.42429,0,1,0,31.25848,5.15217Z" transform="translate(-0.4375 -0.00001)" style="fill:#fff"/><path d="M3.39941,19.8827c.625.08789,1.499.2251,2.29883.36279A2.56659,2.56659,0,0,1,8.123,22.90663c0,1.84961-1.76172,2.83789-3.88672,2.83789C1.8623,25.74452.5,24.75624.4375,22.682H2.21191c.0498,1.0498.7998,1.53711,2.02441,1.53711,1.14941,0,2.1123-.40039,2.1123-1.3125,0-.64941-.4248-.88672-1.2002-1.01172L2.97461,21.557A2.51623,2.51623,0,0,1,.5625,19.2079c0-1.79932,1.375-2.83643,3.54883-2.83643,2.25,0,3.63672.9248,3.69922,2.68652h-1.75c-.09961-.88721-.874-1.187-1.94922-1.187-1.1123,0-1.81152.375-1.81152,1.03711C2.2998,19.4955,2.77441,19.7953,3.39941,19.8827Z" transform="translate(-0.4375 -0.00001)" style="fill:#fff"/><path d="M8.72461,16.55849H15.835v1.6123H13.16113V25.557h-1.7627V18.17079H8.72461Z" transform="translate(-0.4375 -0.00001)" style="fill:#fff"/><path d="M22.21094,25.557l-.7373-2.19922H17.89941l-.7373,2.19922H15.33789l3.08691-8.99854h2.53711l3.124,8.99854Zm-3.79883-3.75h2.5498l-1.2373-3.71094h-.05078Z" transform="translate(-0.4375 -0.00001)" style="fill:#fff"/><path d="M25.21289,16.55849H29.499c2.1123,0,3.21191.8877,3.21191,2.78711a2.47838,2.47838,0,0,1-2.125,2.59912l2.4375,3.6123H30.93652l-2.28711-3.4248h-1.6748V25.557H25.21289Zm1.76172,1.4751V20.6703h2.19922c1.0752,0,1.71289-.4375,1.71289-1.37451,0-.8877-.7627-1.26221-1.71289-1.26221Z" transform="translate(-0.4375 -0.00001)" style="fill:#fff"/><path d="M33.58691,16.55849h7.11035v1.6123H38.02344V25.557h-1.7627V18.17079H33.58691Z" transform="translate(-0.4375 -0.00001)" style="fill:#fff"/></svg>', | |
skip: '<svg class="skip" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35.86 39.95"><path d="M18.07,4.14a5,5,0,0,0-.73,0V0L7,6.1,13.64,10h.15l3.55,2V7.69H17c.29,0,.58.14.88.14a14.18,14.18,0,0,1,14,14.25,13.94,13.94,0,0,1-14,14c-7.76,0-14-5.36-14-14.36H0A18.13,18.13,0,0,0,17.88,40a17.9,17.9,0,0,0,.19-35.81Z" style="fill:#fff"/><path d="M12.61,28.23V20.63L10.7,22.55,9,20.8l4-3.91h2.54V28.23Z" style="fill:#fff"/><path d="M17,22.57c0-3,1.55-5.85,4.87-5.85s4.87,2.86,4.87,5.85-1.55,5.87-4.87,5.87S17,25.56,17,22.57Zm6.77,0c0-2-.54-3.27-1.91-3.27S20,20.56,20,22.57s.54,3.28,1.91,3.28S23.77,24.58,23.77,22.57Z" style="fill:#fff"/></svg>', | |
skipArrow: '<svg class="skip-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.49 20.39"><polygon points="3 20.39 0 17.61 6.89 10.17 0.01 2.79 3 0 12.48 10.15 3 20.39"/><rect x="12.41" width="4.08" height="20.39"/></svg>', | |
spinner: '<svg class="vuplay-svg-spinner" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 441.6 441.6" style="enable-background:new 0 0 441.6 441.6;" xml:space="preserve"><style type="text/css">.vuplay-svg-spinner .st0{fill:none;stroke-width:30;stroke-linecap:round;stroke-miterlimit:10;}</style><g><path class="st0" d="M308.7,37c-26.6-12.8-56.5-19.9-87.9-19.9c-112.5,0-203.7,91.2-203.7,203.7s91.2,203.7,203.7,203.7 s203.7-91.2,203.7-203.7c0-42.1-12.8-81.2-34.7-113.7"/></g></svg>', | |
subtitles: '<svg class="subtitles" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 59.8 40.78"><path d="M54.95,40.78H4.86A4.86,4.86,0,0,1,0,35.92V4.86A4.86,4.86,0,0,1,4.86,0H54.95A4.86,4.86,0,0,1,59.8,4.86V35.92A4.86,4.86,0,0,1,54.95,40.78ZM4.86,3.64A1.22,1.22,0,0,0,3.64,4.86V35.92a1.22,1.22,0,0,0,1.21,1.21H54.95a1.22,1.22,0,0,0,1.21-1.21V4.86a1.22,1.22,0,0,0-1.21-1.21Z" style="fill:#fff"/><polygon points="50.4 25.35 9.4 25.35 9.4 21 50.4 21 50.4 25.35 50.4 25.35" style="fill:#fff"/><polygon points="45.58 33.17 14.22 33.17 14.22 28.82 45.58 28.82 45.58 33.17 45.58 33.17" style="fill:#fff"/></svg>', | |
subtitlesActive: '<svg class="subtitles-active" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 59.8 40.78"><path d="M54.95,40.78H4.86A4.86,4.86,0,0,1,0,35.92V4.86A4.86,4.86,0,0,1,4.86,0H54.95A4.86,4.86,0,0,1,59.8,4.86V35.92A4.86,4.86,0,0,1,54.95,40.78ZM4.86,3.64A1.22,1.22,0,0,0,3.64,4.86V35.92a1.22,1.22,0,0,0,1.21,1.21H54.95a1.22,1.22,0,0,0,1.21-1.21V4.86a1.22,1.22,0,0,0-1.21-1.21Z" style="fill:#ff2254"/><polygon points="50.4 25.35 9.4 25.35 9.4 21 50.4 21 50.4 25.35 50.4 25.35" style="fill:#ff2254"/><polygon points="45.58 33.17 14.22 33.17 14.22 28.82 45.58 28.82 45.58 33.17 45.58 33.17" style="fill:#ff2254"/></svg>', | |
unmute: '<svg class="unmute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56.74 40.12"><path d="M36.39,20.09q0,7.74,0,15.49a7.76,7.76,0,0,1-.18,1.68,2.87,2.87,0,0,1-4,2.25,8.38,8.38,0,0,1-1.48-.7q-9.22-5.28-18.44-10.56a2.46,2.46,0,0,0-1.15-.3c-2.71,0-5.43-.06-8.14,0a2.83,2.83,0,0,1-3-3c.05-3.28,0-6.56,0-9.84a2.67,2.67,0,0,1,2.86-2.89c2.76,0,5.52,0,8.28,0a2.36,2.36,0,0,0,1.11-.29Q21.54,6.6,30.79,1.27A5.32,5.32,0,0,1,33.2.42,2.69,2.69,0,0,1,35.93,2a5.65,5.65,0,0,1,.47,2.47Q36.4,12.3,36.39,20.09Z" style="fill:#fff"/></svg>' | |
} | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(4); | |
e.EventName = i.Util.strEnum(["tokensuccess", | |
"vrtmediaapisuccess", "error", "canplay", "playing", | |
"play", "pause", "seeking", "seeked", "ratechange", | |
"volumechange", "progress", "timeupdate", "ended", | |
"loadedmetadata", "loadeddata", "playerready", | |
"texttrackadded", "bufferstart", "bufferend", "log", | |
"adbreakbegin", "adbreakend", "adbegin", | |
"adskipped", "adend", "aderror", "caststart", | |
"castend", "castloaded", "castready", | |
"epgupdatetimer" | |
]) | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
! function(t) { | |
function e(t) { | |
return t.reduce(function(t, e) { | |
return t[e] = e, t | |
}, Object.create(null)) | |
} | |
function n() { | |
var t = document; | |
return !!(t.fullscreenElement || t.mozFullScreenElement || | |
t.webkitFullscreenElement || t.msFullscreenElement | |
) | |
} | |
function i(t, e) { | |
var n = new RegExp("[&]?" + e + "=([^&#]*)"); | |
return t.replace(n, "") | |
} | |
function s(t, e, n) { | |
var s = i(t, e); | |
return -1 === s.indexOf("?") ? s += "?" : "&" !== s[s.length - | |
1] && (s += "&"), s += e + "=" + n | |
} | |
function r(t) { | |
if (t.includes(v)) { | |
var e = t.indexOf(v); | |
return t.substring(0, e - 1) | |
} | |
} | |
function o(t, e) { | |
var n = t.getDuration(); | |
return "number" != typeof n || isNaN(n) ? e && e.getDuration() : | |
n | |
} | |
function a(t, e) { | |
var n = new Date(Date.parse(t)); | |
return e.getTime() - n.getTime() < h ? n : new Date(e.getTime() - | |
h) | |
} | |
function l() { | |
return /iPad|iPhone|iPod.Mobile/.test(navigator.userAgent) && | |
!window.MSStream | |
} | |
function u() { | |
return /Android|iPhone|iPad|iPod|Blackberry|Opera Mini|IEMobile/ | |
.test(navigator.userAgent) | |
} | |
function c() { | |
return /Chrome/.test(navigator.userAgent) && | |
/Google Inc/.test(navigator.vendor) | |
} | |
function p() { | |
return /Windows/.test(navigator.userAgent) | |
} | |
var h = 72e5, | |
v = "t"; | |
t.strEnum = e, t.isFullScreen = n, t.removeUrlQueryParameter = | |
i, t.setUrlQueryParameter = s, t.stripTimestampQueryParameter = | |
r, t.getDuration = o, t.calculateProgramStartTime = a, | |
t.isIOS = l, t.isDevice = u, t.isChrome = c, t.isWindows = | |
p | |
}(e.Util || (e.Util = {})) | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = function(t) { | |
function e(e, n, i) { | |
var s = t.call(this, e) || this; | |
return s.message = e, s.type = n, s.args = i, s | |
} | |
return i(e, t), e | |
}(Error); | |
e.VuplayError = s; | |
! function(t) { | |
t[t.UNKNOWN = 0] = "UNKNOWN", t[t.REQUEST = 1] = "REQUEST" | |
}(e.VuplayErrorType || (e.VuplayErrorType = {})) | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n, i) { | |
this.type = t, this.name = e, this.args = n, this.date = | |
i | |
} | |
return t | |
}(); | |
e.EventBase = i | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(6), | |
r = n(1), | |
o = function(t) { | |
function e(e, n, i, s) { | |
var o = this; | |
return s || (s = new Date), o = t.call(this, r.EventType | |
.LOG, n, i, s) || this, o._logLevel = e, o | |
} | |
return i(e, t), e | |
}(s.EventBase); | |
e.LogEvent = o | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(4); | |
e.LogLevel = i.Util.strEnum(["none", "error", "warn", "info", | |
"debug" | |
]) | |
}, function(t, e) { | |
function n() { | |
throw new Error("setTimeout has not been defined") | |
} | |
function i() { | |
throw new Error("clearTimeout has not been defined") | |
} | |
function s(t) { | |
if (c === setTimeout) return setTimeout(t, 0); | |
if ((c === n || !c) && setTimeout) return c = setTimeout, | |
setTimeout(t, 0); | |
try { | |
return c(t, 0) | |
} catch (e) { | |
try { | |
return c.call(null, t, 0) | |
} catch (e) { | |
return c.call(this, t, 0) | |
} | |
} | |
} | |
function r(t) { | |
if (p === clearTimeout) return clearTimeout(t); | |
if ((p === i || !p) && clearTimeout) return p = | |
clearTimeout, clearTimeout(t); | |
try { | |
return p(t) | |
} catch (e) { | |
try { | |
return p.call(null, t) | |
} catch (e) { | |
return p.call(this, t) | |
} | |
} | |
} | |
function o() { | |
_ && v && (_ = !1, v.length ? y = v.concat(y) : d = -1, y.length && | |
a()) | |
} | |
function a() { | |
if (!_) { | |
var t = s(o); | |
_ = !0; | |
for (var e = y.length; e;) { | |
for (v = y, y = []; ++d < e;) v && v[d].run(); | |
d = -1, e = y.length | |
} | |
v = null, _ = !1, r(t) | |
} | |
} | |
function l(t, e) { | |
this.fun = t, this.array = e | |
} | |
function u() {} | |
var c, p, h = t.exports = {}; | |
! function() { | |
try { | |
c = "function" == typeof setTimeout ? setTimeout : n | |
} catch (t) { | |
c = n | |
} | |
try { | |
p = "function" == typeof clearTimeout ? clearTimeout : | |
i | |
} catch (t) { | |
p = i | |
} | |
}(); | |
var v, y = [], | |
_ = !1, | |
d = -1; | |
h.nextTick = function(t) { | |
var e = new Array(arguments.length - 1); | |
if (arguments.length > 1) | |
for (var n = 1; n < arguments.length; n++) e[n - 1] = | |
arguments[n]; | |
y.push(new l(t, e)), 1 !== y.length || _ || s(a) | |
}, l.prototype.run = function() { | |
this.fun.apply(null, this.array) | |
}, h.title = "browser", h.browser = !0, h.env = {}, h.argv = [], | |
h.version = "", h.versions = {}, h.on = u, h.addListener = | |
u, h.once = u, h.off = u, h.removeListener = u, h.removeAllListeners = | |
u, h.emit = u, h.prependListener = u, h.prependOnceListener = | |
u, h.listeners = function(t) { | |
return [] | |
}, h.binding = function(t) { | |
throw new Error("process.binding is not supported") | |
}, h.cwd = function() { | |
return "/" | |
}, h.chdir = function(t) { | |
throw new Error("process.chdir is not supported") | |
}, h.umask = function() { | |
return 0 | |
} | |
}, function(t, e, n) { | |
(function(e, n) { | |
! function(e, n) { | |
t.exports = n() | |
}(0, function() { | |
"use strict"; | |
function t(t) { | |
var e = typeof t; | |
return null !== t && ("object" === e || | |
"function" === e) | |
} | |
function i(t) { | |
return "function" == typeof t | |
} | |
function s(t) { | |
U = t | |
} | |
function r(t) { | |
j = t | |
} | |
function o() { | |
return void 0 !== F ? function() { | |
F(l) | |
} : a() | |
} | |
function a() { | |
var t = setTimeout; | |
return function() { | |
return t(l, 1) | |
} | |
} | |
function l() { | |
for (var t = 0; t < H; t += 2) { | |
(0, q[t])(q[t + 1]), q[t] = void 0, q[t + | |
1] = void 0 | |
} | |
H = 0 | |
} | |
function u(t, e) { | |
var n = this, | |
i = new this.constructor(p); | |
void 0 === i[Q] && B(i); | |
var s = n._state; | |
if (s) { | |
var r = arguments[s - 1]; | |
j(function() { | |
return w(s, i, r, n._result) | |
}) | |
} else S(n, i, t, e); | |
return i | |
} | |
function c(t) { | |
var e = this; | |
if (t && "object" == typeof t && t.constructor === | |
e) return t; | |
var n = new e(p); | |
return g(n, t), n | |
} | |
function p() {} | |
function h() { | |
return new TypeError( | |
"You cannot resolve a promise with itself" | |
) | |
} | |
function v() { | |
return new TypeError( | |
"A promises callback cannot return that same promise." | |
) | |
} | |
function y(t) { | |
try { | |
return t.then | |
} catch (t) { | |
return tt.error = t, tt | |
} | |
} | |
function _(t, e, n, i) { | |
try { | |
t.call(e, n, i) | |
} catch (t) { | |
return t | |
} | |
} | |
function d(t, e, n) { | |
j(function(t) { | |
var i = !1, | |
s = _(n, e, function(n) { | |
i || (i = !0, e !== | |
n ? g(t, n) : | |
b(t, n)) | |
}, function(e) { | |
i || (i = !0, E(t, | |
e)) | |
}, "Settle: " + (t._label || | |
" unknown promise")); | |
!i && s && (i = !0, E(t, s)) | |
}, t) | |
} | |
function f(t, e) { | |
e._state === $ ? b(t, e._result) : e._state === | |
X ? E(t, e._result) : S(e, void 0, | |
function(e) { | |
return g(t, e) | |
}, | |
function(e) { | |
return E(t, e) | |
}) | |
} | |
function m(t, e, n) { | |
e.constructor === t.constructor && n === u && | |
e.constructor.resolve === c ? f(t, e) : | |
n === tt ? (E(t, tt.error), tt.error = | |
null) : void 0 === n ? b(t, e) : i( | |
n) ? d(t, e, n) : b(t, e) | |
} | |
function g(e, n) { | |
e === n ? E(e, h()) : t(n) ? m(e, n, y(n)) : | |
b(e, n) | |
} | |
function C(t) { | |
t._onerror && t._onerror(t._result), T(t) | |
} | |
function b(t, e) { | |
t._state === J && (t._result = e, t._state = | |
$, 0 !== t._subscribers.length && j( | |
T, t)) | |
} | |
function E(t, e) { | |
t._state === J && (t._state = X, t._result = | |
e, j(C, t)) | |
} | |
function S(t, e, n, i) { | |
var s = t._subscribers, | |
r = s.length; | |
t._onerror = null, s[r] = e, s[r + $] = n, | |
s[r + X] = i, 0 === r && t._state && j( | |
T, t) | |
} | |
function T(t) { | |
var e = t._subscribers, | |
n = t._state; | |
if (0 !== e.length) { | |
for (var i = void 0, s = void 0, r = t._result, | |
o = 0; o < e.length; o += 3) i = | |
e[o], s = e[o + n], i ? w(n, i, s, | |
r) : s(r); | |
t._subscribers.length = 0 | |
} | |
} | |
function k(t, e) { | |
try { | |
return t(e) | |
} catch (t) { | |
return tt.error = t, tt | |
} | |
} | |
function w(t, e, n, s) { | |
var r = i(n), | |
o = void 0, | |
a = void 0, | |
l = void 0, | |
u = void 0; | |
if (r) { | |
if (o = k(n, s), o === tt ? (u = !0, a = | |
o.error, o.error = null) : l = ! | |
0, e === o) return void E(e, v()) | |
} else o = s, l = !0; | |
e._state !== J || (r && l ? g(e, o) : u ? E( | |
e, a) : t === $ ? b(e, o) : t === | |
X && E(e, o)) | |
} | |
function L(t, e) { | |
try { | |
e(function(e) { | |
g(t, e) | |
}, function(e) { | |
E(t, e) | |
}) | |
} catch (e) { | |
E(t, e) | |
} | |
} | |
function A() { | |
return et++ | |
} | |
function B(t) { | |
t[Q] = et++, t._state = void 0, t._result = | |
void 0, t._subscribers = [] | |
} | |
function x() { | |
return new Error( | |
"Array Methods must be provided an Array" | |
) | |
} | |
function V(t) { | |
return new nt(this, t).promise | |
} | |
function P(t) { | |
var e = this; | |
return new e(R(t) ? function(n, i) { | |
for (var s = t.length, r = 0; r < | |
s; r++) e.resolve(t[r]).then( | |
n, i) | |
} : function(t, e) { | |
return e(new TypeError( | |
"You must pass an array to race." | |
)) | |
}) | |
} | |
function I(t) { | |
var e = this, | |
n = new e(p); | |
return E(n, t), n | |
} | |
function M() { | |
throw new TypeError( | |
"You must pass a resolver function as the first argument to the promise constructor" | |
) | |
} | |
function O() { | |
throw new TypeError( | |
"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function." | |
) | |
} | |
function N() { | |
var t = void 0; | |
if (void 0 !== n) t = n; | |
else if ("undefined" != typeof self) t = | |
self; | |
else try { | |
t = Function("return this")() | |
} catch (t) { | |
throw new Error( | |
"polyfill failed because global object is unavailable in this environment" | |
) | |
} | |
var e = t.Promise; | |
if (e) { | |
var i = null; | |
try { | |
i = Object.prototype.toString.call( | |
e.resolve()) | |
} catch (t) {} | |
if ("[object Promise]" === i && !e.cast) | |
return | |
} | |
t.Promise = it | |
} | |
var D = void 0; | |
D = Array.isArray ? Array.isArray : function(t) { | |
return "[object Array]" === Object.prototype | |
.toString.call(t) | |
}; | |
var R = D, | |
H = 0, | |
F = void 0, | |
U = void 0, | |
j = function(t, e) { | |
q[H] = t, q[H + 1] = e, 2 === (H += 2) && | |
(U ? U(l) : Y()) | |
}, | |
G = "undefined" != typeof window ? window : | |
void 0, | |
K = G || {}, | |
Z = K.MutationObserver || K.WebKitMutationObserver, | |
z = "undefined" == typeof self && void 0 !== | |
e && "[object process]" === {}.toString.call( | |
e), | |
W = "undefined" != typeof Uint8ClampedArray && | |
"undefined" != typeof importScripts && | |
"undefined" != typeof MessageChannel, | |
q = new Array(1e3), | |
Y = void 0; | |
Y = z ? function() { | |
return function() { | |
return e.nextTick(l) | |
} | |
}() : Z ? function() { | |
var t = 0, | |
e = new Z(l), | |
n = document.createTextNode(""); | |
return e.observe(n, { | |
characterData: !0 | |
}), | |
function() { | |
n.data = t = ++t % 2 | |
} | |
}() : W ? function() { | |
var t = new MessageChannel; | |
return t.port1.onmessage = l, | |
function() { | |
return t.port2.postMessage(0) | |
} | |
}() : void 0 === G ? function() { | |
try { | |
var t = Function("return this")().require( | |
"vertx"); | |
return F = t.runOnLoop || t.runOnContext, | |
o() | |
} catch (t) { | |
return a() | |
} | |
}() : a(); | |
var Q = Math.random().toString(36).substring(2), | |
J = void 0, | |
$ = 1, | |
X = 2, | |
tt = { | |
error: null | |
}, | |
et = 0, | |
nt = function() { | |
function t(t, e) { | |
this._instanceConstructor = t, this | |
.promise = new t(p), this.promise[ | |
Q] || B(this.promise), R(e) ? | |
(this.length = e.length, this._remaining = | |
e.length, this._result = | |
new Array(this.length), 0 === | |
this.length ? b(this.promise, | |
this._result) : (this.length = | |
this.length || 0, this._enumerate( | |
e), 0 === this._remaining && | |
b(this.promise, this._result) | |
)) : E(this.promise, x()) | |
} | |
return t.prototype._enumerate = | |
function(t) { | |
for (var e = 0; this._state === | |
J && e < t.length; e++) this | |
._eachEntry(t[e], e) | |
}, t.prototype._eachEntry = | |
function(t, e) { | |
var n = this._instanceConstructor, | |
i = n.resolve; | |
if (i === c) { | |
var s = y(t); | |
if (s === u && t._state !== | |
J) this._settledAt(t._state, | |
e, t._result); | |
else if ("function" != | |
typeof s) this._remaining--, | |
this._result[e] = t; | |
else if (n === it) { | |
var r = new n(p); | |
m(r, t, s), this._willSettleAt( | |
r, e) | |
} else this._willSettleAt( | |
new n(function(e) { | |
return e(t) | |
}), e) | |
} else this._willSettleAt(i(t), | |
e) | |
}, t.prototype._settledAt = | |
function(t, e, n) { | |
var i = this.promise; | |
i._state === J && (this._remaining--, | |
t === X ? E(i, n) : | |
this._result[e] = n), 0 === | |
this._remaining && b(i, | |
this._result) | |
}, t.prototype._willSettleAt = | |
function(t, e) { | |
var n = this; | |
S(t, void 0, function(t) { | |
return n._settledAt( | |
$, e, t) | |
}, function(t) { | |
return n._settledAt( | |
X, e, t) | |
}) | |
}, t | |
}(), | |
it = function() { | |
function t(e) { | |
this[Q] = A(), this._result = this._state = | |
void 0, this._subscribers = [], | |
p !== e && ("function" != | |
typeof e && M(), this instanceof t ? | |
L(this, e) : O()) | |
} | |
return t.prototype.catch = function(t) { | |
return this.then(null, t) | |
}, t.prototype.finally = function(t) { | |
var e = this, | |
n = e.constructor; | |
return e.then(function(e) { | |
return n.resolve(t()) | |
.then(function() { | |
return e | |
}) | |
}, function(e) { | |
return n.resolve(t()) | |
.then(function() { | |
throw e | |
}) | |
}) | |
}, t | |
}(); | |
return it.prototype.then = u, it.all = V, it.race = | |
P, it.resolve = c, it.reject = I, it._setScheduler = | |
s, it._setAsap = r, it._asap = j, it.polyfill = | |
N, it.Promise = it, it | |
}) | |
}).call(e, n(9), n(12)) | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
! function(t) { | |
t[t.CORE = 0] = "CORE", t[t.DEFAULT = 1] = "DEFAULT", t[t.KETNET = | |
2] = "KETNET" | |
}(e.SkinType || (e.SkinType = {})) | |
}, function(t, e) { | |
var n; | |
n = function() { | |
return this | |
}(); | |
try { | |
n = n || Function("return this")() || (0, eval)("this") | |
} catch (t) { | |
"object" == typeof window && (n = window) | |
} | |
t.exports = n | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e) { | |
this.type = t, this.url = e | |
} | |
return t.prototype.getType = function() { | |
return this.type | |
}, t.prototype.getUrl = function() { | |
return this.url | |
}, t | |
}(); | |
e.VrtVideoUrl = i | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(6), | |
r = n(1), | |
o = function(t) { | |
function e(e, n, i) { | |
var s = this; | |
return i || (i = new Date), s = n ? t.call(this, r.EventType | |
.ERROR, "error", n, i) || this : t.call( | |
this, r.EventType.ERROR, "error", { | |
error: e | |
}, i) || this, s.message = e, s | |
} | |
return i(e, t), e | |
}(s.EventBase); | |
e.ErrorEvent = o | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(5), | |
s = n(41), | |
r = n(10), | |
o = n(0), | |
a = n(2), | |
l = function() { | |
function t() {} | |
return t.prototype.get = function(t, e, n) { | |
return void 0 === e && (e = null), void 0 === | |
n && (n = !1), this._send(o.GET, t, e, n) | |
}, t.prototype.post = function(t, e, n, i) { | |
return void 0 === e && (e = ""), void 0 === n && | |
(n = null), void 0 === i && (i = !1), this._send( | |
o.POST, t, n, i, e) | |
}, t.prototype._send = function(t, e, n, l, u) { | |
return void 0 === u && (u = ""), new r.Promise( | |
function(r, c) { | |
var p = new XMLHttpRequest; | |
p.open(t, e), l && (p.withCredentials = | |
l), null != n && n.forEach( | |
function(t) { | |
return p.setRequestHeader( | |
t.header, t.data | |
) | |
}), p.onload = function(n) { | |
if (p.status > 199 && p.status < | |
300) r(new s.default(p)); | |
else { | |
var o = a.Translations.HTTPRequestErrorStatusFormat | |
.replace( | |
"${method}", t) | |
.replace("${url}", | |
encodeURIComponent( | |
e)).replace( | |
"${status}", p.status | |
.toString()); | |
c(new i.VuplayError(o, | |
i.VuplayErrorType | |
.REQUEST, { | |
xhr: p, | |
event: n | |
})) | |
} | |
}, p.onerror = function(n) { | |
var s = a.Translations.HTTPRequestErrorFormat | |
.replace("${method}", t) | |
.replace("${url}", | |
encodeURIComponent( | |
e)); | |
c(new i.VuplayError(s, i.VuplayErrorType | |
.REQUEST, { | |
xhr: p, | |
event: n | |
})) | |
}, t === o.POST && u ? p.send(u) : | |
p.send() | |
}) | |
}, t | |
}(); | |
e.HttpRequest = l | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e) { | |
this.header = t, this.data = e | |
} | |
return t | |
}(); | |
e.Header = i, e.JsonContentTypeHeader = new i("Content-Type", | |
"application/json") | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t() {} | |
return t.prototype.getCookie = function(t) { | |
var e = document.cookie.split(";"); | |
if (e.length > 0) | |
for (var n = 0; n < e.length; n++) | |
if (e[n].indexOf(t) > -1) return e[n].split( | |
"=")[1]; | |
return null | |
}, t.prototype.setCookie = function(t, e) { | |
var n = t.key + "=" + t.value + "; "; | |
n += "expires=" + e, document.cookie = n | |
}, t | |
}(); | |
e.CookieHandler = i | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(6), | |
r = n(1), | |
o = function(t) { | |
function e(e, n, i) { | |
return i || (i = new Date), t.call(this, r.EventType | |
.SMART, e, n, i) || this | |
} | |
return i(e, t), e | |
}(s.EventBase); | |
e.SmartEvent = o | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(50), | |
s = n(0), | |
r = n(4), | |
o = n(2), | |
a = n(51), | |
l = n(17), | |
u = n(3), | |
c = n(7), | |
p = n(8), | |
h = n(20), | |
v = n(11), | |
y = n(21), | |
_ = n(1), | |
d = function() { | |
function t(t, e, n, s, a) { | |
var h = this; | |
this._isMuted = !1, this._savedVolume = 100, this._hasPlayed = ! | |
1, this._setHideControlsTimer = function() { | |
h._overlayElement.classList.remove(o.SkinClasses | |
.vuplayHide), h._overlayElement.classList | |
.add(o.SkinClasses.vuplayShow); | |
var t = h._config.getContainer().firstChild; | |
t.classList.add(o.SkinClasses.vuplayOverlayVisible), | |
h._overlayHitArea.classList.remove(o.SkinClasses | |
.vuplayHideCursor), void 0 !== h._hideControlsTimer && | |
clearTimeout(h._hideControlsTimer), h._hideControlsTimer = | |
setTimeout(function() { | |
h._vuplay.isPaused() || (h._overlayElement | |
.classList.remove(o.SkinClasses | |
.vuplayShow), h._overlayElement | |
.classList.add(o.SkinClasses | |
.vuplayHide), t.classList | |
.remove(o.SkinClasses.vuplayOverlayVisible), | |
h._overlayHitArea.classList | |
.add(o.SkinClasses.vuplayHideCursor) | |
) | |
}, 3e3) | |
}, this._onErrorClick = function() { | |
h._hideError() | |
}, this._onFirstPlaySkipBack = function() { | |
h.showSkipBackControl(), h._vuplay.off( | |
Vuplay.EventType.MEDIA, u.EventName | |
.play, h._onFirstPlaySkipBack) | |
}, this._progressHandler = function(t) { | |
h._vuplay.isLive() && h._vuplay.isCasting() ? | |
h._eventBus.publish(new c.LogEvent(p.LogLevel | |
.warn, u.EventName.log, { | |
message: o.Translations.seekingNotAllowed | |
})) : h._setSeekTime(t) | |
}, this._timeUpdateHandler = function(t) { | |
var e = 0; | |
if (h._vuplay.isLive()) { | |
var n = h._vuplay.getDuration(); | |
e = 100 - h._vuplay.getCurrentTime() / | |
n * 100, e < 0 && (e = 0), e > o.PERCENTAGE_TOGGLE_LIVE_BUTTON ? | |
h._toggleStartOverLiveButton(!0) : | |
h._toggleStartOverLiveButton(!1) | |
} else { | |
var n = h._vuplay.getDuration(); | |
n = 0 !== n ? n : h._config.getDefaultDuration() / | |
1e3, e = h._vuplay.getCurrentTime() / | |
n * 100 | |
} | |
h._progressScrubber.setPercentage(e), h._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueNow, | |
e.toString()) | |
}, this._volumeHandler = function(t) { | |
h.setVolume(t) | |
}, this._onCastClick = function() { | |
h._vuplay.isCasting() ? h._vuplay.stopCasting() : | |
(h._vuplay.pause(), h._hideControlsTimer && | |
clearTimeout(h._hideControlsTimer), | |
h._vuplay.startCasting(Vuplay.CastType | |
.CHROMECAST, h._config.getTitle() | |
)) | |
}, this._onStartOverClick = function(t) { | |
if (h._vuplay.isLive() && h._currentProgram) { | |
var e = r.Util.calculateProgramStartTime( | |
h._currentProgram.getTime(), h._vuplay | |
.getUtcTime()), | |
n = r.Util.setUrlQueryParameter(h._vuplay | |
.getSrc(), "t", e.toISOString() | |
), | |
i = h._vuplay.getAutoStart(), | |
s = function() { | |
var t = h._vuplay.getDuration(); | |
h._vuplay.off(Vuplay.EventType.MEDIA, | |
Vuplay.Events.playing, | |
s), h._vuplay.seek(Math | |
.abs(t)), h._vuplay.setAutoStart( | |
i) | |
}; | |
h._vuplay.on(Vuplay.EventType.MEDIA, | |
Vuplay.Events.playing, s), h._vuplay | |
.setAutoStart(!0), h._vuplay.setSrc( | |
n) | |
} | |
}, this._eventBus = t, this._config = e, this._skinStyle = | |
n, this._vuplay = s, this._keyboardHandler = a, | |
this._timeCalculator = new i.TimeCalculator( | |
this._vuplay), this._cookieHandler = new l.CookieHandler, | |
this._loadSkinStylesheet(), this._setupSkinElements(), | |
this._videoTextTracks = this._vuplay.getTextTracks(), | |
this._vuplay.on(2, u.EventName.error, function( | |
t) { | |
return h.showerror(t) | |
}), this._eventBus.on(new y.EventHandler(_.EventType | |
.ERROR, u.EventName.error, | |
function(t) { | |
return h.showerror(t) | |
})) | |
} | |
return t.prototype._loadSkinStylesheet = function() { | |
h.SkinLoaderFactory(v.SkinType.CORE).load(), h.SkinLoaderFactory( | |
v.SkinType.DEFAULT).load(), this._config | |
.getContainer().firstChild.classList.add(o.SkinClasses | |
.vuplaySkinDefault) | |
}, t.prototype._setupSkinElements = function() { | |
this._svgIcons = o.VuplaySkinSvgIcons, this._setupHtmlElements() | |
}, t.prototype._setupHtmlElements = function() { | |
var t = this._config.getContainer().firstChild; | |
t.style.display = "none", t.classList.add(o.SkinClasses | |
.vuplayContainer), t.classList.add(o.SkinClasses | |
.vuplaySmartView), r.Util.isDevice() && | |
t.classList.add("device"), this._setupBufferContainer( | |
t), this._setupErrorContainer(t), this._setupOverlayElement( | |
t), this._controlsContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayVideoControlContainer], | |
this._overlayElement), this._subControlsContainer = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayVideoSubcontrolContainer], | |
this._overlayElement), this._setupOverlayPulse(), | |
this._setupSkipAdButton(t), this._setHideControlsTimer(), | |
this._setupProgressScubber(), this._leftControlsContainer = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayControlLeft, | |
o.SkinClasses.vuplayVideoControlContainerLeft | |
], this._controlsContainer), this._rightControlsContainer = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayControlRight], | |
this._controlsContainer), this._setupPlayButtonContainer(), | |
this._setupSkipBackButton(), this._setupCurrentTimeLabel(), | |
this._setupTimeDivider(), this._setupDurationContainer(), | |
r.Util.isIOS() || (this._setupMuteButton(), | |
this._setupVolumeScrubber()), this._setupTitleElement(), | |
this._setupEpisodeTitle(), r.Util.isChrome() && | |
this._setupGoogleCast(), this._setupLogo(), | |
this._config.getChapters().length > 0 && | |
this._createChapetrsConatiner(), this._vuplay | |
.isLive() ? (this._setupStartOverContainer(), | |
this.setLive()) : (this._setupReplay(), | |
this._setupAdvertisementCountdown()), | |
this._setupFullscreenButtonContainer(), | |
this._setupResponsiveClasses() | |
}, t.prototype.hideScrubBar = function() { | |
this._progressScrubberLayoutContainer.classList | |
.add(o.SkinClasses.vuplayHidden) | |
}, t.prototype._hideControlsContainer = function() { | |
this._controlsContainer.classList.add(o.SkinClasses | |
.vuplayHidden) | |
}, t.prototype.showScrubBar = function() { | |
this._progressScrubberLayoutContainer.classList | |
.remove(o.SkinClasses.vuplayHidden) | |
}, t.prototype.hideSkipBackControl = function() { | |
this._skipBackButtonContainer.classList.add(o.SkinClasses | |
.vuplayHidden) | |
}, t.prototype.showSkipBackControl = function() { | |
this._skipBackButtonContainer.classList.remove( | |
o.SkinClasses.vuplayHidden) | |
}, t.prototype.hideGoogleCastControl = function() { | |
this._googleCastButtonContainer && this._googleCastButtonContainer | |
.classList.add(o.SkinClasses.vuplayHidden) | |
}, t.prototype.showGoogleCastControl = function() { | |
this._googleCastButtonContainer && this._googleCastButtonContainer | |
.classList.remove(o.SkinClasses.vuplayHidden) | |
}, t.prototype.reset = function() { | |
this._resetBufferContainer(), this._resetErrorContainer(), | |
this._resetOverlayElement() | |
}, t.prototype.setSkinConfig = function(t) { | |
this._config = t | |
}, t.prototype.setLive = function() { | |
this._vuplay.isLive() ? this._showLive() : this | |
._hideLive() | |
}, t.prototype.enterAdvertisementsMode = function() { | |
this._hideControlElements(), this.showAdvertisementCountdown() | |
}, t.prototype.exitAdvertisementsMode = function() { | |
this._showControlElements(), this.hideAdvertisementCountdown() | |
}, t.prototype.enterAdMode = function() { | |
this._isAdPlaying = !0, this._hideControlElements() | |
}, t.prototype.exitAdMode = function() { | |
this._isAdPlaying && (this._showControlElements(), | |
this._hideSkipAd()), this._isAdPlaying = ! | |
1 | |
}, t.prototype.showSkipAd = function() { | |
this._skipAdElement.classList.remove(o.SkinClasses | |
.vuplayHidden) | |
}, t.prototype._hideSkipAd = function() { | |
this._skipAdElement.classList.add(o.SkinClasses | |
.vuplayHidden) | |
}, t.prototype._hideControlElements = function() { | |
this._keyboardHandler.disableScrubBarKeyboardControls(), | |
this.hideScrubBar(), this.hideSkipBackControl(), | |
this.hideTimeControls(), this.hideGoogleCastControl() | |
}, t.prototype._showControlElements = function() { | |
this._keyboardHandler.enableScrubBarKeyboardControls(), | |
this.showScrubBar(), this.showSkipBackControl(), | |
this.showTimeControls(), this.showGoogleCastControl() | |
}, t.prototype._setupSkipAdButton = function(t) { | |
var e = this; | |
this._isAdPlaying = !1, this._skipAdElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplaySkipAd | |
], t), this._skipAdElement.innerHTML = | |
"Skip " + this._svgIcons.skipArrow, this._skipAdElement | |
.classList.add(o.SkinClasses.vuplayHidden), | |
this._skipAdElement.addEventListener(o.CLICK, | |
function() { | |
e._vuplay.skipCurrentAd() | |
}) | |
}, t.prototype._setupBufferContainer = function(t) { | |
var e = this; | |
this._bufferContainer = this._createElement(o.DIV, [ | |
o.SkinClasses.vuplayBufferContainer | |
], t), this._bufferElement = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayBufferSpinner], | |
this._bufferContainer), this._bufferElement | |
.innerHTML = this._svgIcons.spinner, this._bufferElement | |
.getElementsByTagName(o.SVG)[0].style.stroke = | |
this._skinStyle.getSpinnerTintColour(), | |
this._vuplay.on(Vuplay.EventType.MEDIA, u.EventName | |
.bufferstart, | |
function(t) { | |
e._bufferContainer.classList.add(o.SkinClasses | |
.visible) | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.bufferend, | |
function(t) { | |
e._bufferContainer.classList.remove( | |
o.SkinClasses.visible) | |
}) | |
}, t.prototype._resetBufferContainer = function() { | |
var t = this; | |
this._bufferContainer.parentElement.removeChild( | |
this._bufferContainer), this._vuplay.off( | |
Vuplay.EventType.MEDIA, u.EventName.bufferstart, | |
function(e) { | |
t._bufferContainer.classList.add(o.SkinClasses | |
.visible) | |
}), this._vuplay.off(Vuplay.EventType.MEDIA, | |
u.EventName.bufferend, | |
function(e) { | |
t._bufferContainer.classList.remove( | |
o.SkinClasses.visible) | |
}) | |
}, t.prototype._setupErrorContainer = function(t) { | |
var e = this; | |
this._errorContainer = this._createElement(o.DIV, [ | |
o.SkinClasses.vuplayCentralErrorContainer | |
], t), this._errorTitleLabelElement = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayCentralErrorTitle], | |
this._errorContainer), this._errorTitleLabelElement | |
.style.color = this._skinStyle.getTextColour(), | |
this._errorTitleLabelElement.setAttribute(o | |
.Accessibility.tabIndex, "0"), this._errorMessageLabelElement = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayCentralErrorMessage], | |
this._errorContainer), this._errorMessageLabelElement | |
.style.color = this._skinStyle.getTextColour(), | |
this._errorMessageLabelElement.setAttribute( | |
o.Accessibility.tabIndex, "0"), this._errorButtonElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplayCentralErrorButton | |
], this._errorContainer, null, o.SkinClasses | |
.background, this._skinStyle.getErrorButtonBorderColour() | |
), this._errorButtonElement.addEventListener( | |
o.CLICK, | |
function() { | |
e._onErrorClick() | |
}) | |
}, t.prototype._resetErrorContainer = function() { | |
this._errorContainer.parentElement.removeChild( | |
this._errorContainer) | |
}, t.prototype._setupOverlayElement = function(t) { | |
var e = this; | |
this._overlayElement = this._createElement(o.DIV, [ | |
o.SkinClasses.vuplayOverlay | |
], t), this._overlayElement.setAttribute(o.Accessibility | |
.tabIndex, "0"), this._overlayHitArea = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayOverlayHit], | |
this._overlayElement), this._overlayElement | |
.addEventListener("mouseover", this._setHideControlsTimer), | |
this._overlayElement.addEventListener( | |
"mousemove", this._setHideControlsTimer | |
), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.ended, | |
function() { | |
return e._overlayElement.classList.add( | |
o.SkinClasses.hasEnded) | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.play, | |
function() { | |
return e._overlayElement.classList.remove( | |
o.SkinClasses.hasEnded) | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.seeked, | |
function() { | |
return e._overlayElement.classList.remove( | |
o.SkinClasses.hasEnded) | |
}), this._overlayElement.classList.add( | |
o.SkinClasses.edge), this._overlayHitArea | |
.addEventListener(o.CLICK, function() { | |
r.Util.isDevice() && e._hasPlayed || | |
(e._playPauseToggle(), e._overlayElement | |
.focus()) | |
}), this._setupPoster(!0) | |
}, t.prototype._setupPoster = function(t) { | |
t ? (this._overlayElement.style.backgroundImage = | |
"url('" + this._config.getPoster() + | |
"')", this._overlayElement.style.backgroundColor = | |
"#000000") : (this._overlayElement.style | |
.backgroundImage = "none", this._overlayElement | |
.style.backgroundColor = "transparent") | |
}, t.prototype._resetOverlayElement = function() { | |
this._overlayElement.parentElement.removeChild( | |
this._overlayElement) | |
}, t.prototype._setupOverlayPulse = function() { | |
this._overlayPulseElement = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayPulse], | |
this._overlayElement), this._overlayPulseElement | |
.innerHTML = this._svgIcons.pauseBig + this | |
._svgIcons.playBig; | |
var t = this._skinStyle.getIconTintColour(); | |
this._overlayPulseElement.getElementsByTagName( | |
o.SVG)[0].style.fill = t, this._overlayPulseElement | |
.getElementsByTagName(o.SVG)[0].style.stroke = | |
t, this._overlayPulseElement.getElementsByTagName( | |
o.SVG)[1].style.fill = t, this._overlayPulseElement | |
.getElementsByTagName(o.SVG)[1].style.stroke = | |
t | |
}, t.prototype._setupPlayButtonContainer = function() { | |
var t = this; | |
this._playButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayControlPlay | |
], this._leftControlsContainer), this._playButtonElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplayBtn, o.SkinClasses.vuplayPlayBtn | |
], this._playButtonContainer), this._playButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.playButtonLabel), this._playButtonElement | |
.innerHTML = this._svgIcons.play + this._svgIcons | |
.pause, this._playButtonElement.getElementsByTagName( | |
o.SVG)[0].style.fill = this._skinStyle.getIconTintColour(), | |
this._playButtonElement.getElementsByTagName( | |
o.SVG)[1].style.fill = this._skinStyle.getIconTintColour(), | |
this._vuplay.on(Vuplay.EventType.MEDIA, u.EventName | |
.play, | |
function(e) { | |
t._onPlay() | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.playing, | |
function(e) { | |
t._onPlaying() | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.pause, | |
function(e) { | |
t._onPause() | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.ended, | |
function(e) { | |
t._vuplay.pause() | |
}), this._playButtonElement.addEventListener( | |
o.CLICK, | |
function() { | |
t._playPauseToggle() | |
}) | |
}, t.prototype._setupReplay = function() { | |
this._replayElement = this._createElement(o.DIV, [ | |
o.SkinClasses.vuplayReplay | |
], this._overlayElement), this._replayElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.replay), this._replayElement.innerHTML = | |
this._svgIcons.playBig; | |
var t = this._skinStyle.getIconTintColour(); | |
this._replayElement.getElementsByTagName(o.SVG)[ | |
0].style.fill = t, this._replayElement.getElementsByTagName( | |
o.SVG)[0].style.stroke = t | |
}, t.prototype._setupSkipBackButton = function() { | |
var t = this; | |
this._skipBackButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayControlSkipBack, | |
o.SkinClasses.vuplayHidden | |
], this._leftControlsContainer), this._skipBackButtonElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplayBtn, o.SkinClasses.vuplaySkipBackBtn | |
], this._skipBackButtonContainer), this._skipBackButtonElement | |
.setAttribute("title", o.Translations.skipButtonLabel), | |
this._skipBackButtonElement.innerHTML = | |
this._svgIcons.skip, this._skipBackButtonElement | |
.getElementsByTagName(o.SVG)[0].style.fill = | |
this._skinStyle.getIconTintColour(), this._skipBackButtonElement | |
.addEventListener(o.CLICK, function() { | |
t._onSkipBackClick() | |
}), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.play, this._onFirstPlaySkipBack | |
) | |
}, t.prototype._onSkipBackClick = function() { | |
var t = this._vuplay.getCurrentTime(); | |
this._vuplay.seek(t - 10) | |
}, t.prototype._playPauseToggle = function() { | |
this._vuplay.isPaused() ? this._vuplay.play() : | |
this._vuplay.pause() | |
}, t.prototype._onPlay = function() { | |
this._overlayElement.classList.add(o.SkinClasses | |
.playing), this._overlayPulseElement.classList | |
.remove(o.SkinClasses.playing), this._overlayPulseElement | |
.classList.add(o.SkinClasses.paused), this._playButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.playButtonLabel), this._setupPoster(!1) | |
}, t.prototype._onPlaying = function() { | |
var t = this; | |
this._hasPlayed || (this._hasPlayed = !0, this._preSeekPosition && | |
(this._vuplay.seek(this._preSeekPosition), | |
this._vuplay.off(Vuplay.EventType.MEDIA, | |
u.EventName.playing, | |
function(e) { | |
t._onPlaying() | |
}))) | |
}, t.prototype._onPause = function() { | |
this._overlayElement.classList.remove(o.SkinClasses | |
.playing), this._overlayPulseElement.classList | |
.remove(o.SkinClasses.paused), this._overlayPulseElement | |
.classList.add(o.SkinClasses.playing), this | |
._playButtonElement.setAttribute(o.Accessibility | |
.ariaLabel, o.Translations.pauseButtonLabel | |
) | |
}, t.prototype._setupProgressScubber = function() { | |
this._progressScrubberLayoutContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControlProgress], | |
this._controlsContainer), this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.tabIndex, "0"), | |
this._progressScrubberLayoutContainer.setAttribute( | |
o.Accessibility.role, o.Accessibility.slider | |
), this._progressScrubberLayoutContainer.setAttribute( | |
o.Accessibility.ariaLabel, o.Translations | |
.scrubberLabel), this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueMin, | |
"0"), this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueMax, | |
"100"), this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueNow, | |
"0"), this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueText, | |
"0:00 " + o.Accessibility.ariaLabelOf + | |
" 0:00"), this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaLive, o.Accessibility | |
.ariaPolite); | |
var t = this._skinStyle.getProgressStyles(), | |
e = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlProgressContainer | |
], this._progressScrubberLayoutContainer, | |
null), | |
n = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlProgressCurrent | |
], e, null, o.SkinClasses.background, t | |
.getCurrentColour()), | |
i = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlProgressLoaded | |
], e, null, o.SkinClasses.background, t | |
.getLoadedColour()), | |
r = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlProgressNipple | |
], e, null, o.SkinClasses.background, t | |
.getNippleColour()), | |
l = this._vuplay.isLive() ? 100 : 0; | |
this._progressScrubber = new a.Scrubber(this._progressScrubberLayoutContainer, | |
e, n, i, r, l, !1, this._overlayElement, | |
this._controlsContainer, s.ScrubberTypes | |
.progress, this._vuplay, this._progressHandler, | |
this._eventBus), this._vuplay.on(Vuplay | |
.EventType.MEDIA, u.EventName.timeupdate, | |
this._timeUpdateHandler), this._timeUpdateHandler( | |
null) | |
}, t.prototype._setSeekTime = function(t) { | |
var e = this._vuplay.getDuration(); | |
Number.isNaN(e) && (e = this._config.getDefaultDuration() / | |
1e3); | |
var n = e * (t / 100); | |
this._vuplay.seek(n), this._hasPlayed || (this._preSeekPosition = | |
n) | |
}, t.prototype._setupCurrentTimeLabel = function() { | |
this._currentTimeLabelContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayControlTime | |
], this._leftControlsContainer), this._currentTimeLabelElement = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayTimeText, | |
o.SkinClasses.vuplayTimeCurrent | |
], this._currentTimeLabelContainer, | |
null, o.SkinClasses.color, this._skinStyle | |
.getTextColour()) | |
}, t.prototype._setupTimeDivider = function() { | |
this._timeDividerLabelContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayControlTimeDivider | |
], this._leftControlsContainer), this._timeDividerLabelElement = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayTimeText, | |
o.SkinClasses.vuplayTimeDivider | |
], this._timeDividerLabelContainer, | |
null, o.SkinClasses.color, this._skinStyle | |
.getTextColour()), r.Util.isWindows() && | |
this._timeDividerLabelElement.classList.add( | |
o.SkinClasses.vuplayWindows), this._timeDividerLabelElement | |
.style.display = "none", this._timeDividerLabelElement | |
.innerText = "/" | |
}, t.prototype._setupDurationContainer = function() { | |
var t = this; | |
this._durationLabelContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayControlTime | |
], this._leftControlsContainer), this._durationLabelElement = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayTimeText, | |
o.SkinClasses.vuplayTimeDuration | |
], this._durationLabelContainer, null, | |
o.SkinClasses.color, this._skinStyle.getTextColour() | |
), this._vuplay.on(Vuplay.EventType.MEDIA, | |
u.EventName.timeupdate, | |
function(e) { | |
t._onVuplayTimeupdate(e) | |
}), this._onVuplayTimeupdate(null) | |
}, t.prototype._onVuplayTimeupdate = function(t) { | |
if (this.setLive(), this._vuplay.isLive()) { | |
var e = this._timeCalculator.getLiveTimeHtml(), | |
n = this._timeCalculator.calculateTimeLive(); | |
this._spansToString(e); | |
this._appendTimeSpans(this._currentTimeLabelElement, | |
e), this._durationLabelElement.innerText = | |
o.Translations.liveLabel, this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueText, | |
n) | |
} else { | |
var i = this._timeCalculator.getVodTimeLabel( | |
this._vuplay.getCurrentTime()), | |
s = this._vuplay.getDuration(); | |
(void 0 === s || null === s || isNaN(s)) && | |
(s = this._config.getDefaultDuration() / | |
1e3); | |
var n = this._spansToString(i); | |
this._appendTimeSpans(this._currentTimeLabelElement, | |
i); | |
var r = this._timeCalculator.getVodTimeLabel( | |
s), | |
a = this._spansToString(r); | |
this._durationLabelElement.innerHTML = a, | |
this._appendTimeSpans(this._durationLabelElement, | |
r), this._timeDividerLabelElement.style | |
.display = "block", this._progressScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueText, | |
n + " " + o.Accessibility.ariaLabelOf + | |
" " + a) | |
} | |
}, t.prototype._appendTimeSpans = function(t, e) { | |
t.innerHTML = "", r.Util.isWindows() && t.classList | |
.add(o.SkinClasses.vuplayWindows); | |
for (var n = 0; n < e.length; n++) { | |
var i = e[n]; | |
t.appendChild(i) | |
} | |
}, t.prototype._spansToString = function(t) { | |
for (var e = "", n = 0; n < t.length; n++) { | |
e += t[n].innerHTML | |
} | |
return e | |
}, t.prototype._calculateStartVolume = function() { | |
var t = this._cookieHandler.getCookie( | |
"theoplayer-stored-volume"); | |
return void 0 === t || null === t ? 100 : 100 * | |
Number(t) | |
}, t.prototype._setVolumeScrubberInitialState = | |
function(t) { | |
t < 1 && this.setMute() | |
}, t.prototype._setupMuteButton = function() { | |
var t = this; | |
this._muteButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayControlVolume | |
], this._leftControlsContainer), this._muteButtonElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplayBtn, o.SkinClasses.vuplayMuteBtn | |
], this._muteButtonContainer), this._muteButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.volumeOff), this._muteButtonElement.innerHTML = | |
this._svgIcons.mute + this._svgIcons.unmute, | |
this._muteButtonElement.getElementsByTagName( | |
o.SVG)[0].style.fill = this._skinStyle.getIconTintColour(), | |
this._muteButtonElement.getElementsByTagName( | |
o.SVG)[1].style.fill = this._skinStyle.getIconTintColour(), | |
this._muteButtonElement.addEventListener(o.CLICK, | |
function() { | |
t.setMute() | |
}) | |
}, t.prototype._setupVolumeScrubber = function() { | |
var t = this._skinStyle.getVolumeScrubberStyles(); | |
this._volumeScrubberLayoutContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlLeft, o.SkinClasses.vuplayBoxVolume | |
], this._leftControlsContainer), this._volumeScrubberLayoutContainer | |
.setAttribute(o.Accessibility.tabIndex, "0"), | |
this._volumeScrubberLayoutContainer.setAttribute( | |
o.Accessibility.role, o.Translations.volume | |
), this._volumeScrubberLayoutContainer.setAttribute( | |
o.Accessibility.ariaValueMin, "0"), | |
this._volumeScrubberLayoutContainer.setAttribute( | |
o.Accessibility.ariaValueMax, "100"), | |
this._volumeScrubberLayoutContainer.setAttribute( | |
o.Accessibility.ariaValueNow, "0"), | |
this._volumeScrubberLayoutContainer.setAttribute( | |
o.Accessibility.ariaValueText, "100% " + | |
o.Translations.volume), this._volumeScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaLive, o.Accessibility | |
.ariaPolite); | |
var e = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlVolumeContainer | |
], this._volumeScrubberLayoutContainer, | |
null), | |
n = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlVolumeCurrent | |
], e, null, o.SkinClasses.background, t | |
.getCurrentColour()), | |
i = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayControlVolumeNipple | |
], e, null, o.SkinClasses.background, t | |
.getNippleColour()), | |
r = this._calculateStartVolume(); | |
this._volumeScrubber = new a.Scrubber(this._volumeScrubberLayoutContainer, | |
e, n, null, i, r, !1, this._overlayElement, | |
this._controlsContainer, s.ScrubberTypes | |
.volume, this._vuplay, this._volumeHandler, | |
this._eventBus), this._setVolumeScrubberInitialState( | |
r) | |
}, t.prototype.setVolume = function(t) { | |
this._volumeScrubber.setPercentage(t), this._savedVolume = | |
t / 100, this._volumeScrubberLayoutContainer | |
.setAttribute(o.Accessibility.ariaValueNow, | |
t.toString() + " " + o.Translations.volume | |
), this._vuplay.setVolume(this._savedVolume), | |
this._muteButtonDisplayHandler(100 * this._savedVolume) | |
}, t.prototype.setMute = function() { | |
if (this._isMuted) { | |
this._vuplay.setVolume(this._savedVolume); | |
var t = 100 * this._savedVolume; | |
this._volumeScrubber.setPercentage(t), this | |
._muteButtonDisplayHandler(t) | |
} else this._savedVolume = this._vuplay.getVolume(), | |
this._vuplay.setVolume(0), this._volumeScrubber | |
.setPercentage(0), this._muteButtonDisplayHandler( | |
0) | |
}, t.prototype._muteButtonDisplayHandler = function( | |
t) { | |
t < 1 ? (this._muteButtonElement.setAttribute(o | |
.Accessibility.ariaLabel, o.Translations | |
.volumeOff), this._muteButtonElement | |
.classList.add(o.SkinClasses.muted), | |
this._isMuted = !0) : (this._muteButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, | |
o.Translations.volumeOn), this._muteButtonElement | |
.classList.remove(o.SkinClasses.muted), | |
this._isMuted = !1) | |
}, t.prototype._muteHandler = function() { | |
this._isMuted ? this._volumeScrubber.setPercentage( | |
100 * this._savedVolume) : this._volumeScrubber | |
.setPercentage(0) | |
}, t.prototype._setupFullscreenButtonContainer = | |
function() { | |
var t = this; | |
this._fullscreenButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlFullscreen | |
], this._rightControlsContainer), this._fullscreenButtonElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplayBtn, o.SkinClasses.vuplayFullscreenBtn | |
], this._fullscreenButtonContainer), this._fullscreenButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.playVideoInFullscreen), this._fullscreenButtonElement | |
.innerHTML = this._svgIcons.fullscreen + | |
this._svgIcons.fullscreenExit, this._fullscreenButtonElement | |
.getElementsByTagName(o.SVG)[0].style.fill = | |
this._skinStyle.getIconTintColour(), this._fullscreenButtonElement | |
.getElementsByTagName(o.SVG)[1].style.fill = | |
this._skinStyle.getIconTintColour(), this._fullscreenButtonElement | |
.addEventListener(o.CLICK, function() { | |
t._onFullScreenClick() | |
}) | |
}, t.prototype._setupTitleElement = function() { | |
this._titleElement = this._createElement(o.SPAN, [ | |
o.SkinClasses.vuplayTitle | |
], this._overlayElement, this._subControlsContainer, | |
o.SkinClasses.color, this._skinStyle.getTextColour() | |
), this._titleElement.setAttribute(o.Accessibility | |
.tabIndex, "0"), this.setContentTitle() | |
}, t.prototype.setContentTitle = function() { | |
var t = this._config.getTitle(); | |
this._titleElement.innerText = void 0 === t || | |
null === t ? "" : t, this._titleElement.setAttribute( | |
o.Accessibility.ariaValueText, t) | |
}, t.prototype._setupEpisodeTitle = function() { | |
this._episodeTitleElement = this._createElement( | |
o.SPAN, [o.SkinClasses.vuplayEpisodeTitle], | |
this._overlayElement, this._subControlsContainer, | |
o.SkinClasses.color, this._skinStyle.getTextColour() | |
), this._episodeTitleElement.setAttribute(o | |
.Accessibility.tabIndex, "0"), this.setEpisodeTitle() | |
}, t.prototype.setEpisodeTitle = function() { | |
this._episodeTitleElement.innerText = "", this._episodeTitleElement | |
.setAttribute(o.Accessibility.ariaValueText, | |
"") | |
}, t.prototype._setupAirPlay = function() { | |
this._airplayButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlRight, o.SkinClasses.vuplayControlAirplay | |
], this._subControlsContainer), this._airplayButtonElement = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayBtn, | |
o.SkinClasses.vuplayAirplayBtn | |
], this._airplayButtonContainer) | |
}, t.prototype._setupGoogleCast = function() { | |
var t = this; | |
this._googleCastButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlRight, o.SkinClasses.vuplayControlGooglecast | |
], this._subControlsContainer), this._googleCastButtonElement = | |
this._createElement(o.BUTTON, [o.SkinClasses | |
.vuplayBtn, o.SkinClasses.vuplayGooglecastBtn | |
], this._googleCastButtonContainer), this._googleCastButtonElement | |
.setAttribute("title", o.Translations.googleCastButtonTitle), | |
this._googleCastButtonElement.innerHTML = | |
this._svgIcons.googleCast, this._googleCastButtonElement | |
.getElementsByTagName(o.SVG)[0].style.fill = | |
this._skinStyle.getIconTintColour(), this._googleCastButtonElement | |
.addEventListener(o.CLICK, this._onCastClick), | |
this._vuplay.isCasting() ? this._googleCastButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.casting) : this._googleCastButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.notCasting), this._vuplay.on(Vuplay.EventType | |
.CAST, Vuplay.Events.caststart, | |
function() { | |
t._onCastStart() | |
}), this._vuplay.on(Vuplay.EventType.CAST, | |
Vuplay.Events.castend, | |
function(e) { | |
t._onCastEnd(e) | |
}), this._checkAvailableCasts() | |
}, t.prototype._checkAvailableCasts = function() { | |
for (var t = this._vuplay.getAvailableCastTypes(), | |
e = 0; e < t.length; e++) | |
if (t[e] === Vuplay.CastType.CHROMECAST) { | |
this._onCastLoaded(); | |
break | |
} | |
}, t.prototype._onCastLoaded = function() { | |
this._googleCastButtonContainer.classList.add(o | |
.SkinClasses.vuplayGoogleCastLoaded) | |
}, t.prototype._onCastStart = function() { | |
this._googleCastButtonElement.setAttribute(o.Accessibility | |
.ariaLabel, o.Translations.casting), | |
this._googleCastButtonElement.getElementsByTagName( | |
o.SVG)[0].style.fill = this._skinStyle.getIconTintActive(), | |
this._setupPoster(!0) | |
}, t.prototype._onCastEnd = function(t) { | |
if (this._googleCastButtonElement.setAttribute( | |
o.Accessibility.ariaLabel, o.Translations | |
.notCasting), this._setupPoster(!1), | |
this._setHideControlsTimer(), this._googleCastButtonElement | |
.getElementsByTagName(o.SVG)[0].style.fill = | |
this._skinStyle.getIconTintColour(), this._vuplay | |
.isLive()) { | |
var e = r.Util.stripTimestampQueryParameter( | |
this._vuplay.getSrc()); | |
this._vuplay.setSrc(e) | |
} else t.args.liveCast || this._vuplay.seek(t.args | |
.currentTime); | |
this._vuplay.play() | |
}, t.prototype._setupLogo = function() { | |
var t = this._config.getLogo(); | |
t && (this._logoElement = this._createElement(o | |
.IMG, [o.SkinClasses.vuplayLogo], | |
this._overlayElement), this._logoElement | |
.src = t) | |
}, t.prototype._createChapetrsConatiner = function() { | |
this._chaptersButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlChapters | |
], this._rightControlsContainer, this._fullscreenButtonContainer | |
), this._chaptersButtonElement = this._createElement( | |
o.BUTTON, [o.SkinClasses.vuplayBtn, o.SkinClasses | |
.vuplayChaptersBtn | |
], this._chaptersButtonContainer), this | |
._chaptersButtonElement.setAttribute(o.Accessibility | |
.ariaLabel, o.Translations.fragments), | |
this._chaptersButtonElement.setAttribute(o.Accessibility | |
.ariaHaspopup, "true"), this._chaptersButtonElement | |
.setAttribute(o.Accessibility.ariaExpanded, | |
"false"), this._chaptersButtonElement.innerHTML = | |
this._svgIcons.chapters + this._svgIcons.chaptersActive, | |
this._chaptersButtonElement.getElementsByTagName( | |
o.SVG)[0].style.fill = this._skinStyle.getIconTintColour(), | |
this._chaptersButtonElement.getElementsByTagName( | |
o.SVG)[1].style.fill = this._skinStyle.getIconTintActive(), | |
this._chaptersLayoutContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayChapters], | |
this._overlayElement, this._controlsContainer | |
), this._chaptersLayoutContainer.setAttribute( | |
o.Accessibility.role, o.Accessibility.ariaMenu | |
), this._chaptersLayoutContainer.setAttribute( | |
o.Accessibility.ariaVisible, "false") | |
}, t.prototype._setupSubtitlesContainer = function() { | |
var t = this; | |
this._subtitlesButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlSubtitles | |
], this._rightControlsContainer, this._fullscreenButtonContainer | |
), this._subtitlesButtonElement = this._createElement( | |
o.BUTTON, [o.SkinClasses.vuplayBtn, o.SkinClasses | |
.vuplaySubtitlesBtn | |
], this._subtitlesButtonContainer), | |
this._subtitlesButtonElement.setAttribute(o | |
.Accessibility.ariaLabel, o.Translations | |
.subtitles), this._subtitlesButtonElement | |
.setAttribute(o.Accessibility.ariaPressed, | |
"false"), this._subtitlesButtonElement.innerHTML = | |
this._svgIcons.subtitles + this._svgIcons.subtitlesActive, | |
this._subtitlesButtonElement.getElementsByTagName( | |
o.SVG)[0].style.fill = this._skinStyle.getIconTintColour(), | |
this._subtitlesButtonElement.getElementsByTagName( | |
o.SVG)[1].style.fill = this._skinStyle.getIconTintActive(), | |
this._subtitlesButtonElement.addEventListener( | |
o.CLICK, | |
function() { | |
t._onSubtitleClick() | |
}) | |
}, t.prototype.setTextTrack = function() { | |
this._onSubtitleClick() | |
}, t.prototype.showStartOverButton = function() { | |
this._startOverButtonContainer.classList.remove( | |
o.SkinClasses.vuplayHidden) | |
}, t.prototype._onSubtitleClick = function() { | |
var t = this._config.getContainer().firstChild.querySelector( | |
".theoplayer-ttml-texttrack-"); | |
if (t) | |
for (; t.hasChildNodes();) t.removeChild(t.lastChild); | |
this._videoTextTracks.length > 0 && (this._subtitlesButtonElement | |
.classList.contains(o.SkinClasses.enabled) ? | |
(this._subtitlesButtonElement.classList | |
.remove(o.SkinClasses.enabled), | |
this._subtitlesButtonElement.setAttribute( | |
o.Accessibility.ariaPressed, | |
"false"), this._vuplay.setTextTrack(- | |
1), this._resetSubtitles()) : ( | |
this._subtitlesButtonElement.classList | |
.add(o.SkinClasses.enabled), this._subtitlesButtonElement | |
.setAttribute(o.Accessibility.ariaPressed, | |
"true"), this._vuplay.setTextTrack( | |
0))) | |
}, t.prototype._resetSubtitles = function() { | |
document.querySelectorAll( | |
"div[class^='theoplayer-webvtt-texttrack'] p" | |
).length && document.querySelector( | |
"div[class^='theoplayer-webvtt-texttrack']>div" | |
).remove() | |
}, t.prototype._setupStartOverContainer = function() { | |
this._startOverButtonContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayControl, o.SkinClasses | |
.vuplayControlStartOver, o.SkinClasses | |
.vuplayHidden | |
], this._rightControlsContainer, this._liveLabelContainer | |
), this._startOverButtonElement = this._createElement( | |
o.BUTTON, [o.SkinClasses.vuplayBtn, o.SkinClasses | |
.vuplayStartOverBtn | |
], this._startOverButtonContainer), | |
this._startOverButtonElement.setAttribute( | |
"title", o.Translations.watchFromStart), | |
this._startOverButtonElement.innerHTML = | |
this._svgIcons.startOver, this._startOverButtonElement | |
.addEventListener(o.CLICK, this._onStartOverClick), | |
this._startOverButtonElement.getElementsByTagName( | |
o.SVG)[0].style.fill = this._skinStyle.getIconTintColour() | |
}, t.prototype._setupUpNext = function(t) { | |
this._upNextContainer = this._createElement(o.DIV, [ | |
o.SkinClasses.vuplayUpNextOverlay | |
], t), this._upNextContainer.style.backgroundImage = | |
'url("' + this._config.getPoster() + '")', | |
this._upNextCountdownElement = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayUpNextCountdown], | |
this._upNextContainer), this._upNextCountdownElement | |
.innerHTML = o.Translations.nextFragment, | |
this._upNextCountdownElement.setAttribute(o | |
.Accessibility.tabIndex, "0"), this._upNextCountdownValueElement = | |
this._createElement(o.SPAN, [o.SkinClasses.vuplayUpNextCountdownValue], | |
this._upNextCountdownElement), this._upNextCountdownValueElement | |
.innerText = o.Translations.countdownText, | |
this._upNextLeftColumnContainer = this._createElement( | |
o.DIV, [o.SkinClasses.vuplayUpNextLeftColumnContainer], | |
this._upNextContainer), this._upNextImageContainer = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayUpNextImageContainer], | |
this._upNextLeftColumnContainer), this._upNextImageContainer | |
.setAttribute(o.Accessibility.tabIndex, "0"), | |
this._upNextImageContainer.setAttribute( | |
"title", o.Translations.nextFragment), | |
this._upNextImageContainer.setAttribute(o.Accessibility | |
.role, o.Accessibility.ariaLink), this._upNextPlayWrapper = | |
document.createElement(o.DIV), this._upNextPlayWrapper | |
.innerHTML = this._svgIcons.playBig, this._upNextImageContainer | |
.appendChild(this._upNextPlayWrapper.lastChild), | |
this._upNextImageElement = this._createElement( | |
o.IMG, [o.SkinClasses.vuplayUpNextImage], | |
this._upNextImageContainer), this._upNextImageElement | |
.src = "" | |
}, t.prototype.setTextTracks = function() { | |
this._videoTextTracks = this._vuplay.getTextTracks(), | |
this._subtitlesButtonContainer || this._setupSubtitlesContainer(), | |
this._showSubtitles() | |
}, t.prototype._showSubtitles = function() { | |
this._videoTextTracks.length > 0 && this._overlayElement | |
.classList.add(o.SkinClasses.hasSubtitles) | |
}, t.prototype._toggleStartOverLiveButton = | |
function(t) { | |
t ? this._overlayElement.classList.add(o.SkinClasses | |
.edge) : this._overlayElement.classList | |
.remove(o.SkinClasses.edge) | |
}, t.prototype.fullScreenStateChange = function() { | |
this._vuplay.isFullScreen() || (this._overlayElement | |
.classList.remove(o.SkinClasses.fullscreen), | |
this._fullscreenButtonElement.setAttribute( | |
o.Accessibility.ariaLabel, o.Translations | |
.playVideoInFullscreen)) | |
}, t.prototype.setFullScreen = function() { | |
this._onFullScreenClick() | |
}, t.prototype._onFullScreenClick = function() { | |
this._vuplay.isFullScreen() ? (this._vuplay.setFullScreen(! | |
1), this._overlayElement.classList.remove( | |
o.SkinClasses.fullscreen), this._fullscreenButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, | |
o.Translations.playVideoInFullscreen | |
)) : (this._vuplay.setFullScreen(!0), | |
this._overlayElement.classList.add(o.SkinClasses | |
.fullscreen), this._fullscreenButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, | |
o.Translations.exitFullscreen)) | |
}, t.prototype._showLive = function() { | |
this._overlayElement.classList.add(o.SkinClasses | |
.live) | |
}, t.prototype._hideLive = function() { | |
this._overlayElement.classList.remove(o.SkinClasses | |
.live) | |
}, t.prototype._setupAdvertisementCountdown = | |
function() { | |
this._advertisementCountdownLabelContainer = | |
this._createElement(o.DIV, [o.SkinClasses.vuplayControl, | |
o.SkinClasses.vuplayControlLeft, o.SkinClasses | |
.vuplayControlAdvertisementCountdownContainer | |
], this._leftControlsContainer, this._skipBackButtonContainer); | |
var t = this._createElement(o.DIV, [o.SkinClasses | |
.vuplayAdvertisementCountdownLabel | |
], this._advertisementCountdownLabelContainer, | |
null, o.SkinClasses.color, this._skinStyle | |
.getTextColour()); | |
r.Util.isWindows() && t.classList.add(o.SkinClasses | |
.vuplayWindows), this._createElement(o.SPAN, [], | |
t, null, o.SkinClasses.color, this._skinStyle | |
.getTextColour()).innerText = "" + o.Translations | |
.advertisement + o.COLON + " ", this._advertisementCountdownLabelElement = | |
this._createElement(o.SPAN, [o.SkinClasses.vuplayTimeText], | |
t, null, o.SkinClasses.color, this._skinStyle | |
.getTextColour()), this._createElement( | |
o.SPAN, [], t, null, o.SkinClasses.color, | |
this._skinStyle.getTextColour()).innerText = | |
" sec." | |
}, t.prototype.setAdvertisementCountdownLabel = | |
function(t) { | |
if (this._advertisementCountdownLabelElement) { | |
var e = this._timeCalculator.getAdvertisementsTimeLabel( | |
t); | |
this._appendTimeSpans(this._advertisementCountdownLabelElement, | |
e) | |
} | |
}, t.prototype.showAdvertisementCountdown = | |
function() { | |
this._overlayElement.classList.add(o.SkinClasses | |
.hasAdvertisements) | |
}, t.prototype.hideAdvertisementCountdown = | |
function() { | |
this._overlayElement.classList.remove(o.SkinClasses | |
.hasAdvertisements) | |
}, t.prototype.showTimeControls = function() { | |
this._currentTimeLabelContainer.classList.remove( | |
o.SkinClasses.vuplayHidden), this._timeDividerLabelContainer | |
.classList.remove(o.SkinClasses.vuplayHidden), | |
this._durationLabelContainer.classList.remove( | |
o.SkinClasses.vuplayHidden) | |
}, t.prototype.hideTimeControls = function() { | |
this._currentTimeLabelContainer.classList.add(o | |
.SkinClasses.vuplayHidden), this._timeDividerLabelContainer | |
.classList.add(o.SkinClasses.vuplayHidden), | |
this._durationLabelContainer.classList.add( | |
o.SkinClasses.vuplayHidden) | |
}, t.prototype.showerror = function(t) { | |
this._hideControlsContainer(), this._errorContainer | |
.classList.add(o.SkinClasses.visible), this | |
._errorTitleLabelElement.innerHTML = o.Translations | |
.errorTitle, this._errorTitleLabelElement.focus(), | |
this._errorMessageLabelElement.innerHTML = | |
t.message, this._errorButtonElement.innerHTML = | |
o.Translations.close, this._errorButtonElement | |
.setAttribute(o.Accessibility.ariaLabel, o.Translations | |
.close) | |
}, t.prototype._setupResponsiveClasses = function() { | |
var t = this; | |
this._setPlayerWidthClass(), window.addEventListener( | |
"resize", | |
function() { | |
t._setPlayerWidthClass() | |
}) | |
}, t.prototype._setPlayerWidthClass = function() { | |
var t = this._config.getContainer(), | |
e = t.firstChild; | |
e.classList.remove(o.SkinClasses.vuplayExtraSmall), | |
e.classList.remove(o.SkinClasses.vuplaySmall), | |
e.classList.remove(o.SkinClasses.vuplayMedium), | |
e.classList.remove(o.SkinClasses.vuplayLarge); | |
var n = t.offsetWidth; | |
n < 520 ? e.classList.add(o.SkinClasses.vuplayExtraSmall) : | |
n < 768 ? e.classList.add(o.SkinClasses.vuplaySmall) : | |
n < 1024 ? e.classList.add(o.SkinClasses.vuplayMedium) : | |
e.classList.add(o.SkinClasses.vuplayLarge) | |
}, t.prototype._hideError = function() { | |
this._errorContainer.classList.remove(o.SkinClasses | |
.visible) | |
}, t.prototype._createElement = function(t, e, n, i, | |
s, r) { | |
var a = document.createElement(t); | |
if ("video" === t && a.setAttribute("poster", | |
this._config.getPoster()), e) | |
for (var l = 0; l < e.length; l++) a.classList | |
.add(e[l]); | |
if (s) switch (s) { | |
case o.SkinClasses.background: | |
a.style.background = r; | |
break; | |
case o.SkinClasses.color: | |
a.style.color = r | |
} | |
return i ? n.insertBefore(a, i) : n.appendChild( | |
a), a | |
}, t.prototype.setCurrentProgram = function(t) { | |
this._currentProgram = t | |
}, t | |
}(); | |
e.VuplaySkin = d | |
}, function(t, e, n) { | |
"use strict"; | |
function i(t) { | |
switch (t) { | |
case a.SkinType.CORE: | |
return new s.CoreSkinLoader; | |
case a.SkinType.KETNET: | |
return new o.KetnetSkinLoader; | |
case a.SkinType.DEFAULT: | |
default: | |
return new r.DefaultSkinLoader | |
} | |
} | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(52), | |
r = n(53), | |
o = n(54), | |
a = n(11); | |
e.SkinLoaderFactory = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n) { | |
this.type = t, this.name = e, this.listener = n | |
} | |
return t | |
}(); | |
e.EventHandler = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(23), | |
s = n(1), | |
r = n(3); | |
e.VUALTO = { | |
EventType: s.EventType, | |
Wrapper: i.Wrapper, | |
EventNames: r.EventName | |
} | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}), n(24); | |
var i = n(26), | |
s = n(27), | |
r = n(34), | |
o = n(35), | |
a = n(42), | |
l = n(43), | |
u = n(44), | |
c = n(49), | |
p = n(55), | |
h = n(56), | |
v = n(2), | |
y = n(19), | |
_ = n(0), | |
d = n(14), | |
f = n(58), | |
m = n(21), | |
g = n(3), | |
C = n(1), | |
b = n(7), | |
E = n(8), | |
S = n(18), | |
T = n(4), | |
k = n(59), | |
w = n(60), | |
L = n(62), | |
A = n(13), | |
B = function() { | |
function t() { | |
var t = this; | |
this._playerExists = !1, this._isAdInitialised = !1, | |
this._loadingChunkFailedHandler = function(e) { | |
if (/Loading chunk \d+ failed/.test(e)) { | |
var n = t._config.container; | |
n.innerHTML = "<p>" + v.Translations.disableAdBlocker + | |
"</p>", n.style.backgroundColor = | |
"black", n.style.color = "white", n | |
.style.textAlign = "center", n.style | |
.padding = "20px" | |
} | |
}, this._updateProgramInfo = function() { | |
if (t._video) { | |
var e = t._video.getTitle(), | |
n = t._video.getShortDescription(), | |
i = null; | |
if (t._epgService) { | |
var s = t._epgService.getCurrentProgram(); | |
s && (e = s.getTitle(), n = s.getShortDescription(), | |
i = s, t._skin.showStartOverButton() | |
) | |
} | |
e && (t._skinConfig.setTitle(e), t._skin | |
.setContentTitle()), n && (t._skinConfig | |
.setEpisodeTitle(n), t._skin.setEpisodeTitle() | |
), i && t._skin.setCurrentProgram(i) | |
} | |
}, this._adBreakBegin = function() { | |
for (var e = [], n = 0; n < arguments.length; n++) | |
e[n] = arguments[n]; | |
t.on(C.EventType.SMART, g.EventName.timeupdate, | |
t._checkAdStatus), t._skin.enterAdMode() | |
}, this._resetUi = function() { | |
for (var e = [], n = 0; n < arguments.length; n++) | |
e[n] = arguments[n]; | |
t._skin.exitAdMode(), t.off(C.EventType.SMART, | |
t._checkAdStatus) | |
}, this._checkAdStatus = function() { | |
for (var e = [], n = 0; n < arguments.length; n++) | |
e[n] = arguments[n]; | |
t._vuplaySmart.getCurrentTime() >= _.PREROLL_SKIP_TIMEOUT && | |
(t._skin.showSkipAd(), t.off(C.EventType | |
.SMART, t._checkAdStatus)) | |
}, this._onCanPlay = function(e) { | |
if (t._video && !t._isAdInitialised) | |
if (t._isAdInitialised = !0, t._vuplaySmart | |
.isLive()) t._epgService = new a.default( | |
t._eventBus, t._vuplaySmart, t._vrtApiService | |
), t._epgService.start(t._video.getChannelId()) | |
.then(function() { | |
t._epgService.getCurrentProgram(); | |
t._updateProgramInfo(), t._config | |
.programId && t._updateVideoSrcByStartEndTime( | |
t._config.programId | |
) | |
}); | |
else { | |
var n = t._video.getPlaylist(); | |
n && 0 !== n.length ? (t._remixService = | |
new l.default(t._video, t._vuplaySmart, | |
t._skin), t._vuplaySmart | |
.schedulePlaylistAd(Vuplay.AdType | |
.REMIX, n)) : (t._prerollService = | |
new u.default(t._vuplaySmart, | |
t._config, t._eventBus, | |
t._video), t._prerollService | |
.getUrl().then(function(e) { | |
t._subscribeAdEvent(), | |
t._vuplaySmart.scheduleAd( | |
Vuplay.AdType | |
.VAST, e, _ | |
.PREROLL_START_TIMEOUT, | |
_.PREROLL_SKIP_TIMEOUT | |
) | |
}).catch(function(e) { | |
t._vuplaySmart.play(), | |
t._eventBus.publish( | |
new b.LogEvent( | |
E.LogLevel | |
.warn, | |
g.EventName | |
.log, { | |
message: e | |
.message | |
})) | |
})) | |
} | |
}, s().on("unhandledRejection", this._loadingChunkFailedHandler), | |
this._wrapperId = i.UUID.UUID(), this._eventBus = | |
new f.EventBus, this._eventBus.on(new m.EventHandler( | |
C.EventType.SMART, g.EventName.epgupdatetimer, | |
this._updateProgramInfo)), this._eventBus.on( | |
new m.EventHandler(C.EventType.ERROR, g.EventName | |
.error, | |
function(e) { | |
t._showError(e) | |
})) | |
} | |
return t.prototype.setup = function(t, e) { | |
this._playerExists ? this._eventBus.publish(new b | |
.LogEvent(E.LogLevel.warn, g.EventName.log, { | |
message: "setup has already been called, to change source please use the setVideoReference function" | |
})) : this._validateConfig(t, e) && ( | |
this._config = t, this._config.container = | |
e, this._startResizeCheck(), this._config | |
.youtubeSource ? this._setupYoutubePlayer() : | |
this._setupPlayer()) | |
}, t.prototype.version = function() { | |
return _.VRT_WRAPPER_VERSION | |
}, t.prototype._setVuplaySmart = function() { | |
this._vuplaySmart = new Vuplay.Smart(this._config | |
.playerKey, Vuplay.LogLevel.ERROR) | |
}, t.prototype._setupPlayer = function() { | |
if (this._config.mediaApiUrl || (this._config.mediaApiUrl = | |
_.VRT_API_URL), this._vrtApiService = | |
new o.VrtApiService(this._eventBus, this._config | |
.mediaApiUrl), this._config.src) { | |
var t = this._translateHlsToDash(this._config | |
.src), | |
e = new A.VrtVideoUrl(_.MPEG_DASH, t); | |
this._skinConfig = new p.SkinConfig(this._config | |
.container, "", "", "", "", [], !1, | |
this._config.autoStart, 100, _.VOD), | |
this._setupVuplay(this._config.container, | |
e) | |
} else this.setVideoReference(this._config.videoReference, | |
this._config.client) | |
}, t.prototype._setupYoutubePlayer = function() { | |
var t = this._getYoutubeVideoId(this._config.youtubeSource); | |
this._setVuplaySmart(), this._initialiseStats(), | |
this._subscribeToVuplayEvents(); | |
var e = { | |
src: t, | |
loadYoutube: !0, | |
autoStart: this._config.autoStart | |
}; | |
this._vuplaySmart.setup(e, this._config.container) | |
}, t.prototype._getYoutubeVideoId = function(t) { | |
var e = "", | |
n = t.replace(/(>|<)/gi, "").split( | |
/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/ | |
); | |
if ("string" == typeof n[2]) { | |
e = n[2].split(/[^0-9a-z_\-]/i)[0] | |
} else e = t; | |
return e | |
}, t.prototype._translateHlsToDash = function(t) { | |
return t.replace(new RegExp("(/([^/])*\\.m3u8)", | |
"gmi"), "/manifest.mpd") | |
}, t.prototype.setVideoReference = function(t, e) { | |
var n = this; | |
this._vuplaySmart && this._vuplaySmart.isCasting() && | |
this._vuplaySmart.stopCasting(), this._config | |
.videoReference = t, this._config.client = | |
e, this._vrtApiService.getToken(e, this._config | |
.credentials).then(function(t) { | |
n._token = t, n._vrtApiService.getStreamMetadata( | |
n._config.videoReference, n | |
._token, n._config.client).then( | |
function(t) { | |
n._video = t, t.getPosterImageUrl() || | |
t.setPosterImageUrl( | |
n._config.poster | |
), n._skinConfig = | |
new p.SkinConfig(n._config | |
.container, n._config | |
.logo, t.getTitle(), | |
t.getShortDescription(), | |
t.getPosterImageUrl(), | |
n._config.chapters, ! | |
1, n._config.autoStart, | |
100, t.getSkinType(), | |
t.getDuration() | |
); | |
var e = n._video.getStreamUrl(); | |
n._playerExists ? (n._vuplaySmart | |
.setSrc(e.getUrl()), | |
n._skin ? n._skin | |
.setSkinConfig( | |
n._skinConfig | |
) : n._setSkin(), | |
n._skin.setContentTitle(), | |
n._skin.setEpisodeTitle() | |
) : n._setupVuplay( | |
n._config.container, | |
e) | |
}) | |
}) | |
}, t.prototype._showError = function(t) { | |
this._vuplaySmart || this._setVuplaySmart(); | |
var e = this._config.container; | |
if (!e.firstChild) { | |
var n = document.createElement("div"); | |
e.appendChild(n) | |
} | |
this._skinConfig || (this._skinConfig = new p.SkinConfig( | |
e, this._config.logo, "", "", "", [], ! | |
1, this._config.autoStart, 0, _.VOD, | |
0)), this._skin || this._setSkin(), | |
this._skin.showerror(new d.ErrorEvent(t.message)) | |
}, t.prototype._setupVuplay = function(t, e) { | |
var n = this; | |
this._setVuplaySmart(), this._initialiseStats(), | |
this._subscribeToVuplayEvents(), this._config | |
.autoStart = !T.Util.isIOS() && this._config | |
.autoStart, this._vuplaySmart.on(Vuplay.EventType | |
.VUPLAY, g.EventName.playerready, | |
function(t) { | |
n._onVuplaySmartReady(t) | |
}), this._vuplaySmart.setup({ | |
src: e.getUrl(), | |
vudrmToken: this._getToken(), | |
autoStart: this._config.autoStart, | |
skin: Vuplay.SkinType.NO_SKIN | |
}, t) | |
}, t.prototype._getToken = function() { | |
return this._video ? this._video.getDrm() : | |
this._config && this._config.vudrmToken ? | |
this._config.vudrmToken : "" | |
}, t.prototype._initialiseStats = function() { | |
if (this._config.analytics) { | |
var t = new w.ComscoreConfig(this._config, | |
this._video), | |
e = new k.CimConfig(this._config), | |
n = new L.AdobeConfig(this._config, | |
this._video), | |
i = { | |
playbackLabels: t.getPlaybackLabels(), | |
assetLabels: t.getAssetLabels() | |
}, | |
s = e.getCimConfigJson(); | |
this._vuplaySmart.setStatsConfigs({ | |
comscore: i, | |
cim: s, | |
adobe: n | |
}) | |
} | |
}, t.prototype._onVuplaySmartReady = function(t) { | |
this._playerExists = !0, this._config.youtubeSource || | |
(this._config.audioOnly ? this._setZeroHeight() : | |
this._setSkin()) | |
}, t.prototype._setZeroHeight = function() { | |
this._config.container.style.display = "none" | |
}, t.prototype._onTextTrackAdded = function(t) { | |
this._skin && this._skin.setTextTracks() | |
}, t.prototype.getWrapperId = function() { | |
return this._wrapperId | |
}, t.prototype.setHlsSrc = function(t) { | |
this._skinConfig.setTitle(""), this._skin.setContentTitle(), | |
this._skinConfig.setEpisodeTitle(""), this._skin | |
.setEpisodeTitle(), this._config.src = t; | |
var e = this._translateHlsToDash(this._config.src); | |
this._vuplaySmart.setSrc(e) | |
}, t.prototype.setYoutubeSource = function(t) { | |
this._config.youtubeSource = t; | |
var e = this._getYoutubeVideoId(this._config.youtubeSource); | |
this._vuplaySmart.setSrc(e) | |
}, t.prototype.pause = function() { | |
this._vuplaySmart.pause() | |
}, t.prototype.play = function() { | |
this._vuplaySmart.play() | |
}, t.prototype.reset = function() { | |
this._skin && (this._skin.reset(), this._skin = | |
null, this._keyboardHandler = null), | |
this._vuplaySmart && this._vuplaySmart.reset() | |
}, t.prototype.setCurrentTime = function(t) { | |
this._vuplaySmart.seek(t) | |
}, t.prototype.getCurrentTime = function() { | |
return this._vuplaySmart.getCurrentTime() | |
}, t.prototype.setVolume = function(t) { | |
(t > 1 || t < 0) && this._eventBus.publish(new b | |
.LogEvent(E.LogLevel.warn, g.EventName.log, { | |
message: "volume must not be higher than 1 or lower than 0" | |
})), t = Math.max(0, Math.min(t, 1)), | |
this._skin ? this._skin.setVolume(100 * t) : | |
this._vuplaySmart.setVolume(t) | |
}, t.prototype.setAutostart = function(t) { | |
this._vuplaySmart.setAutoStart(t) | |
}, t.prototype.getAutostart = function() { | |
return this._vuplaySmart.getAutoStart() | |
}, t.prototype.getDuration = function() { | |
return T.Util.getDuration(this._vuplaySmart, | |
this._video) | |
}, t.prototype.isPaused = function() { | |
return this._vuplaySmart.isPaused() | |
}, t.prototype.stopGatheringStats = function() { | |
this._vuplaySmart.stopStatsMonitoring() | |
}, t.prototype.startGatheringStats = function() { | |
this._vuplaySmart.startStatsMonitoring() | |
}, t.prototype.on = function(t, e, n) { | |
this._eventBus.on(new m.EventHandler(t, e, n)) | |
}, t.prototype.off = function(t, e) { | |
this._eventBus.off(new m.EventHandler(t, name, | |
e)) | |
}, t.prototype.getStream = function(t) { | |
var e = this; | |
this._vrtApiService.getStreamMetadata(t, "", | |
this._config.client).then(function(t) { | |
e._video = t | |
}) | |
}, t.prototype._validateConfig = function(t, e) { | |
return "object" != typeof t ? (this._eventBus.publish( | |
new d.ErrorEvent( | |
"config must be an object")), ! | |
1) : t.playerKey ? t.videoReference || | |
t.src || t.youtubeSource ? !t.videoReference || | |
null !== t.client && void 0 !== t.client || | |
(this._eventBus.publish(new d.ErrorEvent( | |
"config must contain a valid client when passing a video reference" | |
)), !1) : (this._eventBus.publish(new d.ErrorEvent( | |
"config must contain a video reference, src or youtube source" | |
)), !1) : (this._eventBus.publish(new d.ErrorEvent( | |
"config must contain a player key" | |
)), !1) | |
}, t.prototype._startResizeCheck = function() { | |
var t = this; | |
this._resizeInterval = setInterval(function() { | |
if (t._config.container.firstChild) { | |
var e = t._config.container.firstChild | |
.offsetWidth, | |
n = e / 16 * 9 + "px"; | |
t._config.container.style.height = | |
n | |
} | |
}, 50) | |
}, t.prototype._setSkin = function() { | |
if (!this._skin) { | |
switch (this._setSkinStyle(), this._keyboardHandler = | |
new r.KeyboardHandler(this._vuplaySmart, | |
this._config), this._config.skin) { | |
case _.SKIN_KETNET: | |
this._skin = new c.KetnetSkin(this._eventBus, | |
this._skinConfig, this._skinStyle, | |
this._vuplaySmart, this._keyboardHandler | |
); | |
break; | |
default: | |
this._skin = new y.VuplaySkin(this._eventBus, | |
this._skinConfig, this._skinStyle, | |
this._vuplaySmart, this._keyboardHandler | |
) | |
} | |
this._keyboardHandler.setup(this._skin) | |
} | |
}, t.prototype._setSkinStyle = function() { | |
var t = v.SkinBrands[0]; | |
if ("ketnet" === this._config.skin && (this._config | |
.brand = "ketnet"), this._config.brand) | |
for (var e = 0; e < v.SkinBrands.length; e++) | |
if (v.SkinBrands[e].name === this._config | |
.brand.toLowerCase()) { | |
t = v.SkinBrands[e]; | |
break | |
} | |
this._skinStyle = new h.SkinStyle(t) | |
}, t.prototype._throwNotImplementedError = function( | |
t) { | |
var e = "NOT IMPLEMENTED: " + t + | |
" is not implemented"; | |
this._eventBus.publish(new d.ErrorEvent(e)) | |
}, t.prototype._updateVideoSrcByStartEndTime = | |
function(t) { | |
var e = this._epgService.getEpgProgramById(t); | |
if (e && e.getTime()) { | |
var n = this._vuplaySmart.getSrc(), | |
i = this._epgService.getNextProgram(e.getId()); | |
n = T.Util.setUrlQueryParameter(n, _.VIDEO_QUERY_PARAM_VSTART, | |
e.getTime()), i && i.getTime() && ( | |
n = T.Util.setUrlQueryParameter(n, | |
_.VIDEO_QUERY_PARAM_VEND, i.getTime() | |
)), this._vuplaySmart.setSrc(n) | |
} | |
}, t.prototype._subscribeAdEvent = function() { | |
this.on(C.EventType.SMART, g.EventName.adbreakbegin, | |
this._adBreakBegin), this.on(C.EventType | |
.SMART, g.EventName.adbreakend, this._resetUi | |
), this.on(C.EventType.SMART, g.EventName.adskipped, | |
this._resetUi), this.on(C.EventType.SMART, | |
g.EventName.aderror, this._resetUi) | |
}, t.prototype._subscribeToVuplayEvents = function() { | |
var t = this; | |
this._vuplaySmart.on(Vuplay.EventType.ERROR, | |
Vuplay.Events.error, | |
function(e) { | |
t._eventBus.publish(new d.ErrorEvent( | |
e.message)) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.VUPLAY, g.EventName.playerready, | |
function(e) { | |
t._onVuplaySmartReady(e), t._eventBus | |
.publish(new S.SmartEvent(g.EventName | |
.playerready, { | |
name: g.EventName.playerready | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.canplay, | |
function(e) { | |
t._onCanPlay(e), t._eventBus.publish( | |
new S.SmartEvent(g.EventName | |
.canplay, { | |
name: g.EventName.canplay | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.playing, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.playing, { | |
name: g.EventName.playing, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.play, | |
function(e) { | |
t._updateProgramInfo(), t._eventBus | |
.publish(new S.SmartEvent(g.EventName | |
.play, { | |
name: g.EventName.play, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.pause, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.pause, { | |
name: g.EventName.pause, | |
ended: e.args.ended | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.seeking, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.seeking, { | |
name: g.EventName.seeking, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.seeked, | |
function(e) { | |
t._updateProgramInfo(), t._eventBus | |
.publish(new S.SmartEvent(g.EventName | |
.seeked, { | |
name: g.EventName.seeked, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.ratechange, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.ratechange, { | |
name: g.EventName.ratechange | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.volumechange, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.volumechange, { | |
name: g.EventName.volumechange, | |
currentTime: e.args | |
.volume | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.progress, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.progress, { | |
name: g.EventName.progress | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.timeupdate, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.timeupdate, { | |
name: g.EventName.timeupdate, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.ended, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.ended, { | |
name: g.EventName.ended | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.loadedmetadata, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.loadedmetadata, { | |
name: g.EventName.loadedmetadata | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.loadeddata, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.loadeddata, { | |
name: g.EventName.loadeddata | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.VUPLAY, Vuplay.Events.playerready, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.playerready, { | |
name: g.EventName.playerready, | |
loadedPlayer: e.args | |
.playerId | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.texttrackadded, | |
function(e) { | |
t._onTextTrackAdded(e), t._eventBus | |
.publish(new S.SmartEvent(g.EventName | |
.texttrackadded, { | |
name: g.EventName.texttrackadded | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.bufferstart, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.bufferstart, { | |
name: g.EventName.bufferstart, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.MEDIA, Vuplay.Events.bufferend, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.bufferend, { | |
name: g.EventName.bufferend, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.AD, Vuplay.Events.adbreakbegin, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.adbreakbegin, { | |
name: g.EventName.adbreakbegin, | |
startTime: e.args.startTime, | |
duration: e.args.duration, | |
adCount: e.args.adCount | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.AD, Vuplay.Events.adbreakend, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.adbreakend, { | |
name: g.EventName.adbreakend, | |
startTime: e.args.startTime, | |
duration: e.args.duration, | |
adCount: e.args.adCount | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.AD, Vuplay.Events.adbegin, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.adbegin, { | |
name: g.EventName.adbegin, | |
duration: e.args.duration, | |
skipTime: e.args.skipTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.AD, Vuplay.Events.adend, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.adend, { | |
name: g.EventName.adend, | |
duration: e.args.duration, | |
skipTime: e.args.skipTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.AD, Vuplay.Events.adskipped, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.adskipped, { | |
name: g.EventName.adskipped, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.CAST, Vuplay.Events.caststart, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.caststart, { | |
name: g.EventName.caststart, | |
castType: e.args.castType, | |
castDevice: e.args.castDevice | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.CAST, Vuplay.Events.castend, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.castend, { | |
name: g.EventName.castend, | |
castType: e.args.castType, | |
currentTime: e.args | |
.currentTime | |
})) | |
}), this._vuplaySmart.on(Vuplay.EventType | |
.CAST, Vuplay.Events.castloaded, | |
function(e) { | |
t._eventBus.publish(new S.SmartEvent( | |
g.EventName.castloaded, { | |
name: g.EventName.castloaded, | |
castType: e.args.castType | |
})) | |
}) | |
}, t | |
}(); | |
e.Wrapper = B | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(25); | |
window.Promise = i, Number.isNaN = Number.isNaN || function(t) { | |
return t !== t | |
} | |
}, function(t, e, n) { | |
(function(e) { | |
! function() { | |
"use strict"; | |
function n() { | |
return it[U][G] || K | |
} | |
function i(t) { | |
return t && "object" == typeof t | |
} | |
function s(t) { | |
return "function" == typeof t | |
} | |
function r(t, e) { | |
return t instanceof e | |
} | |
function o(t) { | |
return r(t, D) | |
} | |
function a(t, e, n) { | |
if (!e(t)) throw h(n) | |
} | |
function l() { | |
try { | |
return L.apply(A, arguments) | |
} catch (t) { | |
return tt.e = t, tt | |
} | |
} | |
function u(t, e) { | |
return L = t, A = e, l | |
} | |
function c(t, e) { | |
function n() { | |
for (var n = 0; n < s;) e(i[n], i[n + 1]), | |
i[n++] = w, i[n++] = w; | |
s = 0, i.length > t && (i.length = t) | |
} | |
var i = N(t), | |
s = 0; | |
return function(t, e) { | |
i[s++] = t, i[s++] = e, 2 === s && it.nextTick( | |
n) | |
} | |
} | |
function p(t, e) { | |
var n, i, o, a, l = 0; | |
if (!t) throw h(Y); | |
var c = t[it[U][j]]; | |
if (s(c)) i = c.call(t); | |
else { | |
if (!s(t.next)) { | |
if (r(t, N)) { | |
for (n = t.length; l < n;) e(t[l], | |
l++); | |
return l | |
} | |
throw h(Y) | |
} | |
i = t | |
} | |
for (; !(o = i.next()).done;) | |
if ((a = u(e)(o.value, l++)) === tt) throw s( | |
i[Z]) && i[Z](), a.e; | |
return l | |
} | |
function h(t) { | |
return new TypeError(t) | |
} | |
function v(t) { | |
return (t ? "" : Q) + (new D).stack | |
} | |
function y(t, e) { | |
var n = "on" + t.toLowerCase(), | |
i = V[n]; | |
I && I.listeners(t).length ? t === X ? I.emit(t, | |
e._v, e) : I.emit(t, e) : i ? i({ | |
reason: e._v, | |
promise: e | |
}) : it[t](e._v, e) | |
} | |
function _(t) { | |
return t && t._s | |
} | |
function d(t) { | |
if (_(t)) return new t(et); | |
var e, n, i; | |
return e = new t(function(t, s) { | |
if (e) throw h(); | |
n = t, i = s | |
}), a(n, s), a(i, s), e | |
} | |
function f(t, e) { | |
var n = !1; | |
return function(i) { | |
n || (n = !0, O && (t[q] = v(!0)), e === | |
H ? S(t, i) : E(t, e, i)) | |
} | |
} | |
function m(t, e, n, i) { | |
return s(n) && (e._onFulfilled = n), s(i) && (t[ | |
z] && y($, t), e._onRejected = i), O && | |
(e._p = t), t[t._c++] = e, t._s !== F && st( | |
t, e), e | |
} | |
function g(t) { | |
if (t._umark) return !0; | |
t._umark = !0; | |
for (var e, n = 0, i = t._c; n < i;) | |
if (e = t[n++], e._onRejected || g(e)) | |
return !0 | |
} | |
function C(t, e) { | |
function n(t) { | |
return i.push(t.replace(/^\s+|\s+$/g, "")) | |
} | |
var i = []; | |
return O && (e[q] && n(e[q]), function t(e) { | |
e && W in e && (t(e._next), n(e[W] + | |
""), t(e._p)) | |
}(e)), (t && t.stack ? t.stack : t) + ("\n" + | |
i.join("\n")).replace(nt, "") | |
} | |
function b(t, e) { | |
return t(e) | |
} | |
function E(t, e, n) { | |
var i = 0, | |
s = t._c; | |
if (t._s === F) | |
for (t._s = e, t._v = n, e === R && (O && o( | |
n) && (n.longStack = C(n, t)), | |
rt(t)); i < s;) st(t, t[i++]); | |
return t | |
} | |
function S(t, e) { | |
if (e === t && e) return E(t, R, h(J)), t; | |
if (e !== B && (s(e) || i(e))) { | |
var n = u(T)(e); | |
if (n === tt) return E(t, R, n.e), t; | |
s(n) ? (O && _(e) && (t._next = e), _(e) ? | |
k(t, e, n) : it.nextTick(function() { | |
k(t, e, n) | |
})) : E(t, H, e) | |
} else E(t, H, e); | |
return t | |
} | |
function T(t) { | |
return t.then | |
} | |
function k(t, e, n) { | |
var i = u(n, e)(function(n) { | |
e && (e = B, S(t, n)) | |
}, function(n) { | |
e && (e = B, E(t, R, n)) | |
}); | |
i === tt && e && (E(t, R, i.e), e = B) | |
} | |
var w, L, A, B = null, | |
x = "object" == typeof self, | |
V = x ? self : e, | |
P = V.Promise, | |
I = V.process, | |
M = V.console, | |
O = !1, | |
N = Array, | |
D = Error, | |
R = 1, | |
H = 2, | |
F = 3, | |
U = "Symbol", | |
j = "iterator", | |
G = "species", | |
K = U + "(" + G + ")", | |
Z = "return", | |
z = "_uh", | |
W = "_pt", | |
q = "_st", | |
Y = "Invalid argument", | |
Q = "\nFrom previous ", | |
J = "Chaining cycle detected for promise", | |
$ = "rejectionHandled", | |
X = "unhandledRejection", | |
tt = { | |
e: B | |
}, | |
et = function() {}, | |
nt = /^.+\/node_modules\/yaku\/.+\n?/gm, | |
it = function(t) { | |
var e, n = this; | |
if (!i(n) || n._s !== w) throw h( | |
"Invalid this"); | |
if (n._s = F, O && (n[W] = v()), t !== et) { | |
if (!s(t)) throw h(Y); | |
e = u(t)(f(n, H), f(n, R)), e === tt && | |
E(n, R, e.e) | |
} | |
}; | |
it.default = it, | |
function(t, e) { | |
for (var n in e) t[n] = e[n] | |
}(it.prototype, { | |
then: function(t, e) { | |
if (void 0 === this._s) throw h(); | |
return m(this, d(it.speciesConstructor( | |
this, it)), t, e) | |
}, | |
catch: function(t) { | |
return this.then(w, t) | |
}, | |
finally: function(t) { | |
return this.then(function(e) { | |
return it.resolve(t()) | |
.then(function() { | |
return e | |
}) | |
}, function(e) { | |
return it.resolve(t()) | |
.then(function() { | |
throw e | |
}) | |
}) | |
}, | |
_c: 0, | |
_p: B | |
}), it.resolve = function(t) { | |
return _(t) ? t : S(d(this), t) | |
}, it.reject = function(t) { | |
return E(d(this), R, t) | |
}, it.race = function(t) { | |
var e = this, | |
n = d(e), | |
i = function(t) { | |
E(n, H, t) | |
}, | |
s = function(t) { | |
E(n, R, t) | |
}, | |
r = u(p)(t, function(t) { | |
e.resolve(t).then(i, s) | |
}); | |
return r === tt ? e.reject(r.e) : n | |
}, it.all = function(t) { | |
function e(t) { | |
E(s, R, t) | |
} | |
var n, i = this, | |
s = d(i), | |
r = []; | |
return (n = u(p)(t, function(t, o) { | |
i.resolve(t).then(function( | |
t) { | |
r[o] = t, --n || | |
E(s, H, r) | |
}, e) | |
})) === tt ? i.reject(n.e) : (n || E(s, | |
H, []), s) | |
}, it.Symbol = V[U] || {}, u(function() { | |
Object.defineProperty(it, n(), { | |
get: function() { | |
return this | |
} | |
}) | |
})(), it.speciesConstructor = function(t, e) { | |
var i = t.constructor; | |
return i ? i[n()] || e : e | |
}, it.unhandledRejection = function(t, e) { | |
M && M.error("Uncaught (in promise)", O ? e | |
.longStack : C(t, e)) | |
}, it.rejectionHandled = et, it.enableLongStackTrace = | |
function() { | |
O = !0 | |
}, it.nextTick = x ? function(t) { | |
P ? new P(function(t) { | |
t() | |
}).then(t) : setTimeout(t) | |
} : I.nextTick, it._s = 1; | |
var st = c(999, function(t, e) { | |
var n, i; | |
return (i = t._s !== R ? e._onFulfilled : | |
e._onRejected) === w ? void E(e, | |
t._s, t._v) : (n = u(b)(i, t._v)) === | |
tt ? void E(e, R, n.e) : void S(e, | |
n) | |
}), | |
rt = c(9, function(t) { | |
g(t) || (t[z] = 1, y(X, t)) | |
}); | |
try { | |
t.exports = it | |
} catch (t) { | |
V.Yaku = it | |
} | |
}() | |
}).call(e, n(12)) | |
}, function(t, e, n) { | |
"use strict"; | |
var i = function() { | |
function t() {} | |
return t.UUID = function() { | |
if ("undefined" != typeof window && void 0 !== | |
window.crypto && void 0 !== window.crypto.getRandomValues | |
) { | |
var t = new Uint16Array(8); | |
return window.crypto.getRandomValues(t), | |
this.pad4(t[0]) + this.pad4(t[1]) + "-" + | |
this.pad4(t[2]) + "-" + this.pad4(t[3]) + | |
"-" + this.pad4(t[4]) + "-" + this.pad4( | |
t[5]) + this.pad4(t[6]) + this.pad4( | |
t[7]) | |
} | |
return this.random4() + this.random4() + "-" + | |
this.random4() + "-" + this.random4() + "-" + | |
this.random4() + "-" + this.random4() + | |
this.random4() + this.random4() | |
}, t.pad4 = function(t) { | |
for (var e = t.toString(16); e.length < 4;) e = | |
"0" + e; | |
return e | |
}, t.random4 = function() { | |
return Math.floor(65536 * (1 + Math.random())).toString( | |
16).substring(1) | |
}, t | |
}(); | |
e.UUID = i | |
}, function(t, e, n) { | |
"use strict"; | |
t.exports = n(28) | |
}, function(t, e, n) { | |
"use strict"; | |
(function(e) { | |
var i = n(29)("unhandled-rejection"), | |
s = n(32).EventEmitter, | |
r = n(33); | |
t.exports = function() { | |
function t(t) { | |
var e = {}; | |
return null != t.detail && null != t.detail | |
.reason ? e.error = t.detail.reason : | |
null != t.reason && (e.error = t.reason), | |
null != t.detail && null != t.detail.promise ? | |
e.promise = t.detail.promise : null != | |
t.promise && (e.promise = t.promise), e | |
} | |
function n(e, n) { | |
return null != e && null != e.preventDefault && | |
"function" == typeof e.preventDefault && | |
e.preventDefault(), null == n && null != | |
e && (n = t(e)), n | |
} | |
function o(t) { | |
return !y.exists(t) | |
} | |
function a(t, e) { | |
i("Got unhandledRejection"); | |
var s = n(t, e); | |
o(s) ? (y.register(s), i( | |
"Emitting unhandledRejection..." | |
), v.emit("unhandledRejection", s.error, | |
s.promise)) : i( | |
"Ignoring unhandledRejection as duplicate" | |
) | |
} | |
function l(t, e) { | |
i("Got rejectionHandled"); | |
var s = n(t, e); | |
y.unregister(s), i( | |
"Emitting rejectionHandled..."), v.emit( | |
"rejectionHandled", s.error, s.promise | |
) | |
} | |
function u(t, e) { | |
null != e && null != e.then ? a(null, { | |
error: t, | |
promise: e | |
}) : a(t) | |
} | |
function c(t) { | |
if (null != t.then) { | |
var e = y.find(t); | |
null != e && l(null, e) | |
} else l(t) | |
} | |
function p(t) { | |
"function" == typeof t.onunhandledrejection ? | |
function() { | |
i( | |
"Wrapping previous handler for <context>.onunhandledrejection" | |
); | |
var e = t.onunhandledrejection; | |
t.onunhandledrejection = function(t, | |
n) { | |
u(t, n), e(event) | |
} | |
}() : t.onunhandledrejection = u, | |
"function" == typeof t.onrejectionhandled ? | |
function() { | |
i( | |
"Wrapping previous handler for <context>.onrejectionhandled" | |
); | |
var e = t.onrejectionhandled; | |
t.onrejectionhandled = function(t) { | |
c(t), e(t) | |
} | |
}() : t.onrejectionhandled = c | |
} | |
var h = arguments.length <= 0 || void 0 === | |
arguments[0] ? {} : arguments[0], | |
v = new s, | |
y = r(h.timeout), | |
_ = "undefined" != typeof WorkerGlobalScope, | |
d = void 0 !== e && !0 !== e.browser, | |
f = !d && !_ && "undefined" != typeof document; | |
return d ? (i("Detected environment: Node.js"), | |
e.on("unhandledRejection", function(t, | |
e) { | |
a(null, { | |
error: t, | |
promise: e | |
}) | |
}), e.on("rejectionHandled", function(t) { | |
var e = y.find(t); | |
null != e && l(null, e) | |
})) : _ ? (i( | |
"Detected environment: WebWorker"), | |
p(self), self.addEventListener( | |
"unhandledrejection", a), self.addEventListener( | |
"rejectionhandled", l), self.addEventListener( | |
"unhandledRejection", a), self.addEventListener( | |
"rejectionHandled", l)) : f && (i( | |
"Detected environment: Browser"), | |
null != window.addEventListener && (i( | |
"addEventListener is available, registering events..." | |
), window.addEventListener( | |
"unhandledrejection", a), | |
window.addEventListener( | |
"rejectionhandled", l), window.addEventListener( | |
"unhandledRejection", a), | |
window.addEventListener( | |
"rejectionHandled", l)), i( | |
"Configuring window.on* handlers..." | |
), p(window)), v | |
} | |
}).call(e, n(9)) | |
}, function(t, e, n) { | |
(function(i) { | |
function s() { | |
return !("undefined" == typeof window || !window.process || | |
"renderer" !== window.process.type) || ( | |
"undefined" != typeof document && document.documentElement && | |
document.documentElement.style && document.documentElement | |
.style.WebkitAppearance || "undefined" != | |
typeof window && window.console && (window.console | |
.firebug || window.console.exception && | |
window.console.table) || "undefined" != | |
typeof navigator && navigator.userAgent && | |
navigator.userAgent.toLowerCase().match( | |
/firefox\/(\d+)/) && parseInt(RegExp.$1, | |
10) >= 31 || "undefined" != typeof navigator && | |
navigator.userAgent && navigator.userAgent.toLowerCase() | |
.match(/applewebkit\/(\d+)/)) | |
} | |
function r(t) { | |
var n = this.useColors; | |
if (t[0] = (n ? "%c" : "") + this.namespace + (n ? | |
" %c" : " ") + t[0] + (n ? "%c " : " ") + | |
"+" + e.humanize(this.diff), n) { | |
var i = "color: " + this.color; | |
t.splice(1, 0, i, "color: inherit"); | |
var s = 0, | |
r = 0; | |
t[0].replace(/%[a-zA-Z%]/g, function(t) { | |
"%%" !== t && (s++, "%c" === t && ( | |
r = s)) | |
}), t.splice(r, 0, i) | |
} | |
} | |
function o() { | |
return "object" == typeof console && console.log && | |
Function.prototype.apply.call(console.log, | |
console, arguments) | |
} | |
function a(t) { | |
try { | |
null == t ? e.storage.removeItem("debug") : e.storage | |
.debug = t | |
} catch (t) {} | |
} | |
function l() { | |
var t; | |
try { | |
t = e.storage.debug | |
} catch (t) {} | |
return !t && void 0 !== i && "env" in i && (t = i.env | |
.DEBUG), t | |
} | |
e = t.exports = n(30), e.log = o, e.formatArgs = r, e.save = | |
a, e.load = l, e.useColors = s, e.storage = | |
"undefined" != typeof chrome && void 0 !== chrome.storage ? | |
chrome.storage.local : function() { | |
try { | |
return window.localStorage | |
} catch (t) {} | |
}(), e.colors = ["lightseagreen", "forestgreen", | |
"goldenrod", "dodgerblue", "darkorchid", | |
"crimson" | |
], e.formatters.j = function(t) { | |
try { | |
return JSON.stringify(t) | |
} catch (t) { | |
return "[UnexpectedJSONParseError]: " + t.message | |
} | |
}, e.enable(l()) | |
}).call(e, n(9)) | |
}, function(t, e, n) { | |
function i(t) { | |
var n, i = 0; | |
for (n in t) i = (i << 5) - i + t.charCodeAt(n), i |= 0; | |
return e.colors[Math.abs(i) % e.colors.length] | |
} | |
function s(t) { | |
function n() { | |
if (n.enabled) { | |
var t = n, | |
i = +new Date, | |
s = i - (u || i); | |
t.diff = s, t.prev = u, t.curr = i, u = i; | |
for (var r = new Array(arguments.length), o = 0; o < | |
r.length; o++) r[o] = arguments[o]; | |
r[0] = e.coerce(r[0]), "string" != typeof r[0] && r | |
.unshift("%O"); | |
var a = 0; | |
r[0] = r[0].replace(/%([a-zA-Z%])/g, function(n, i) { | |
if ("%%" === n) return n; | |
a++; | |
var s = e.formatters[i]; | |
if ("function" == typeof s) { | |
var o = r[a]; | |
n = s.call(t, o), r.splice(a, 1), a-- | |
} | |
return n | |
}), e.formatArgs.call(t, r); | |
(n.log || e.log || console.log.bind(console)).apply | |
(t, r) | |
} | |
} | |
return n.namespace = t, n.enabled = e.enabled(t), n.useColors = | |
e.useColors(), n.color = i(t), "function" == typeof e.init && | |
e.init(n), n | |
} | |
function r(t) { | |
e.save(t), e.names = [], e.skips = []; | |
for (var n = ("string" == typeof t ? t : "").split(/[\s,]+/), | |
i = n.length, s = 0; s < i; s++) n[s] && (t = n[s].replace( | |
/\*/g, ".*?"), "-" === t[0] ? e.skips.push(new RegExp( | |
"^" + t.substr(1) + "$")) : e.names.push(new RegExp( | |
"^" + t + "$"))) | |
} | |
function o() { | |
e.enable("") | |
} | |
function a(t) { | |
var n, i; | |
for (n = 0, i = e.skips.length; n < i; n++) | |
if (e.skips[n].test(t)) return !1; | |
for (n = 0, i = e.names.length; n < i; n++) | |
if (e.names[n].test(t)) return !0; | |
return !1 | |
} | |
function l(t) { | |
return t instanceof Error ? t.stack || t.message : t | |
} | |
e = t.exports = s.debug = s.default = s, e.coerce = l, e.disable = | |
o, e.enable = r, e.enabled = a, e.humanize = n(31), e.names = [], | |
e.skips = [], e.formatters = {}; | |
var u | |
}, function(t, e) { | |
function n(t) { | |
if (t = String(t), !(t.length > 100)) { | |
var e = | |
/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i | |
.exec(t); | |
if (e) { | |
var n = parseFloat(e[1]); | |
switch ((e[2] || "ms").toLowerCase()) { | |
case "years": | |
case "year": | |
case "yrs": | |
case "yr": | |
case "y": | |
return n * c; | |
case "days": | |
case "day": | |
case "d": | |
return n * u; | |
case "hours": | |
case "hour": | |
case "hrs": | |
case "hr": | |
case "h": | |
return n * l; | |
case "minutes": | |
case "minute": | |
case "mins": | |
case "min": | |
case "m": | |
return n * a; | |
case "seconds": | |
case "second": | |
case "secs": | |
case "sec": | |
case "s": | |
return n * o; | |
case "milliseconds": | |
case "millisecond": | |
case "msecs": | |
case "msec": | |
case "ms": | |
return n; | |
default: | |
return | |
} | |
} | |
} | |
} | |
function i(t) { | |
return t >= u ? Math.round(t / u) + "d" : t >= l ? Math.round( | |
t / l) + "h" : t >= a ? Math.round(t / a) + "m" : t >= | |
o ? Math.round(t / o) + "s" : t + "ms" | |
} | |
function s(t) { | |
return r(t, u, "day") || r(t, l, "hour") || r(t, a, | |
"minute") || r(t, o, "second") || t + " ms" | |
} | |
function r(t, e, n) { | |
if (!(t < e)) return t < 1.5 * e ? Math.floor(t / e) + " " + | |
n : Math.ceil(t / e) + " " + n + "s" | |
} | |
var o = 1e3, | |
a = 60 * o, | |
l = 60 * a, | |
u = 24 * l, | |
c = 365.25 * u; | |
t.exports = function(t, e) { | |
e = e || {}; | |
var r = typeof t; | |
if ("string" === r && t.length > 0) return n(t); | |
if ("number" === r && !1 === isNaN(t)) return e.long ? | |
s(t) : i(t); | |
throw new Error( | |
"val is not a non-empty string or a valid number. val=" + | |
JSON.stringify(t)) | |
} | |
}, function(t, e) { | |
function n() { | |
this._events = this._events || {}, this._maxListeners = | |
this._maxListeners || void 0 | |
} | |
function i(t) { | |
return "function" == typeof t | |
} | |
function s(t) { | |
return "number" == typeof t | |
} | |
function r(t) { | |
return "object" == typeof t && null !== t | |
} | |
function o(t) { | |
return void 0 === t | |
} | |
t.exports = n, n.EventEmitter = n, n.prototype._events = void 0, | |
n.prototype._maxListeners = void 0, n.defaultMaxListeners = | |
10, n.prototype.setMaxListeners = function(t) { | |
if (!s(t) || t < 0 || isNaN(t)) throw TypeError( | |
"n must be a positive number"); | |
return this._maxListeners = t, this | |
}, n.prototype.emit = function(t) { | |
var e, n, s, a, l, u; | |
if (this._events || (this._events = {}), "error" === t && | |
(!this._events.error || r(this._events.error) && ! | |
this._events.error.length)) { | |
if ((e = arguments[1]) instanceof Error) throw e; | |
var c = new Error( | |
'Uncaught, unspecified "error" event. (' + | |
e + ")"); | |
throw c.context = e, c | |
} | |
if (n = this._events[t], o(n)) return !1; | |
if (i(n)) switch (arguments.length) { | |
case 1: | |
n.call(this); | |
break; | |
case 2: | |
n.call(this, arguments[1]); | |
break; | |
case 3: | |
n.call(this, arguments[1], arguments[2]); | |
break; | |
default: | |
a = Array.prototype.slice.call(arguments, 1), | |
n.apply(this, a) | |
} else if (r(n)) | |
for (a = Array.prototype.slice.call(arguments, | |
1), u = n.slice(), s = u.length, l = 0; l < | |
s; l++) u[l].apply(this, a); | |
return !0 | |
}, n.prototype.addListener = function(t, e) { | |
var s; | |
if (!i(e)) throw TypeError( | |
"listener must be a function"); | |
return this._events || (this._events = {}), this._events | |
.newListener && this.emit("newListener", t, i(e.listener) ? | |
e.listener : e), this._events[t] ? r(this._events[ | |
t]) ? this._events[t].push(e) : this._events[t] = [ | |
this._events[t], e | |
] : this._events[t] = e, r(this._events[t]) && ! | |
this._events[t].warned && (s = o(this._maxListeners) ? | |
n.defaultMaxListeners : this._maxListeners) && | |
s > 0 && this._events[t].length > s && (this._events[ | |
t].warned = !0, console.error( | |
"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", | |
this._events[t].length), "function" == | |
typeof console.trace && console.trace()), this | |
}, n.prototype.on = n.prototype.addListener, n.prototype.once = | |
function(t, e) { | |
function n() { | |
this.removeListener(t, n), s || (s = !0, e.apply( | |
this, arguments)) | |
} | |
if (!i(e)) throw TypeError( | |
"listener must be a function"); | |
var s = !1; | |
return n.listener = e, this.on(t, n), this | |
}, n.prototype.removeListener = function(t, e) { | |
var n, s, o, a; | |
if (!i(e)) throw TypeError( | |
"listener must be a function"); | |
if (!this._events || !this._events[t]) return this; | |
if (n = this._events[t], o = n.length, s = -1, n === e || | |
i(n.listener) && n.listener === e) delete this._events[ | |
t], this._events.removeListener && this.emit( | |
"removeListener", t, e); | |
else if (r(n)) { | |
for (a = o; a-- > 0;) | |
if (n[a] === e || n[a].listener && n[a].listener === | |
e) { | |
s = a; | |
break | |
} | |
if (s < 0) return this; | |
1 === n.length ? (n.length = 0, delete this._events[ | |
t]) : n.splice(s, 1), this._events.removeListener && | |
this.emit("removeListener", t, e) | |
} | |
return this | |
}, n.prototype.removeAllListeners = function(t) { | |
var e, n; | |
if (!this._events) return this; | |
if (!this._events.removeListener) return 0 === | |
arguments.length ? this._events = {} : this._events[ | |
t] && delete this._events[t], this; | |
if (0 === arguments.length) { | |
for (e in this._events) "removeListener" !== e && | |
this.removeAllListeners(e); | |
return this.removeAllListeners("removeListener"), | |
this._events = {}, this | |
} | |
if (n = this._events[t], i(n)) this.removeListener(t, n); | |
else if (n) | |
for (; n.length;) this.removeListener(t, n[n.length - | |
1]); | |
return delete this._events[t], this | |
}, n.prototype.listeners = function(t) { | |
return this._events && this._events[t] ? i(this._events[ | |
t]) ? [this._events[t]] : this._events[t].slice() : | |
[] | |
}, n.prototype.listenerCount = function(t) { | |
if (this._events) { | |
var e = this._events[t]; | |
if (i(e)) return 1; | |
if (e) return e.length | |
} | |
return 0 | |
}, n.listenerCount = function(t, e) { | |
return t.listenerCount(e) | |
} | |
}, function(t, e, n) { | |
"use strict"; | |
t.exports = function() { | |
var t = arguments.length <= 0 || void 0 === arguments[0] ? | |
60 : arguments[0], | |
e = []; | |
return { | |
register: function(n) { | |
var i = this; | |
e.push(n), setTimeout(function() { | |
i.unregister(n) | |
}, 1e3 * t) | |
}, | |
unregister: function(t) { | |
var n = e.indexOf(t); - 1 !== n && e.splice( | |
n, 1) | |
}, | |
exists: function(t) { | |
return e.some(function(e) { | |
return e.promise === t.promise && | |
e.error === t.error | |
}) | |
}, | |
find: function(t) { | |
return e.find(function(e) { | |
return e.promise === t | |
}) | |
} | |
} | |
} | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(2), | |
s = function() { | |
function t(t, e) { | |
this.scrubBarKeyboardControlsEnabled = !0, this._vuplaySmart = | |
t, this._config = e | |
} | |
return t.prototype.setup = function(t) { | |
this._skin = t, this._setupKeyboardHandlers() | |
}, t.prototype._setupKeyboardHandlers = function() { | |
var t = this; | |
document.addEventListener("keydown", function(e) { | |
t._onKeyboardPress(e) | |
}), document.addEventListener( | |
"webkitfullscreenchange", | |
function(e) { | |
t._skin.fullScreenStateChange() | |
}), document.addEventListener( | |
"mozfullscreenchange", | |
function(e) { | |
t._skin.fullScreenStateChange() | |
}), document.addEventListener( | |
"fullscreenchange", | |
function(e) { | |
t._skin.fullScreenStateChange() | |
}), document.addEventListener( | |
"MSFullscreenChange", | |
function(e) { | |
t._skin.fullScreenStateChange() | |
}), document.addEventListener("click", | |
function(e) { | |
e.detail && t._config.container.classList | |
.remove(i.SkinClasses.vuplayProbablyKeyboardFocus) | |
}), document.addEventListener("keydown", | |
function() { | |
t._config.container.classList.add(i | |
.SkinClasses.vuplayProbablyKeyboardFocus | |
) | |
}) | |
}, t.prototype._onKeyboardPress = function(t) { | |
var e = t.target; | |
if (!e.classList.contains("vuplay-play-btn") && | |
this._config.container.contains(e)) switch ( | |
t.preventDefault(), t.keyCode) { | |
case 32: | |
case 75: | |
this._togglePlayPause(); | |
break; | |
case 37: | |
if (!this.scrubBarKeyboardControlsEnabled) | |
break; | |
this._vuplaySmart.skipTo(-10); | |
break; | |
case 39: | |
if (!this.scrubBarKeyboardControlsEnabled) | |
break; | |
this._vuplaySmart.skipTo(10); | |
break; | |
case 38: | |
var n = 100 * this._vuplaySmart.getVolume(); | |
this._volumeUp(n); | |
break; | |
case 40: | |
var n = 100 * this._vuplaySmart.getVolume(); | |
this._volumeDown(n); | |
break; | |
case 70: | |
this._skin.setFullScreen(); | |
break; | |
case 67: | |
this._skin.setTextTrack(); | |
break; | |
case 77: | |
this._skin.setMute() | |
} | |
}, t.prototype._calculatePercentage = function() { | |
var t = this._vuplaySmart.getDuration(); | |
return 100 - this._vuplaySmart.getCurrentTime() / | |
t * 100 | |
}, t.prototype._volumeUp = function(t) { | |
t > 90 ? this._skin.setVolume(100) : 0 === t ? | |
(this._skin.setMute(), this._skin.setVolume( | |
t + 10)) : this._skin.setVolume(t + 10) | |
}, t.prototype._volumeDown = function(t) { | |
t < 11 && 0 !== t ? (this._skin.setMute(), this | |
._skin.setVolume(0)) : 0 === t ? this._skin | |
.setVolume(0) : this._skin.setVolume(t - 10) | |
}, t.prototype._togglePlayPause = function() { | |
this._vuplaySmart.isPaused() ? this._vuplaySmart | |
.play() : this._vuplaySmart.pause() | |
}, t.prototype.disableScrubBarKeyboardControls = | |
function() { | |
this.scrubBarKeyboardControlsEnabled = !1 | |
}, t.prototype.enableScrubBarKeyboardControls = | |
function() { | |
this.scrubBarKeyboardControlsEnabled = !0 | |
}, t | |
}(); | |
e.KeyboardHandler = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(10), | |
s = n(36), | |
r = n(37), | |
o = n(38), | |
a = n(13), | |
l = n(0), | |
u = n(3), | |
c = n(14), | |
p = n(39), | |
h = n(40), | |
v = n(5), | |
y = n(15), | |
_ = n(16), | |
d = n(17), | |
f = function() { | |
function t(t, e) { | |
this._eventBus = t, this._cookieHandler = new d.CookieHandler, | |
this._mediaApiUrl = e, this._epgDataModifiedSince = | |
null | |
} | |
return t.prototype.getToken = function(t, e) { | |
var n = this; | |
void 0 === e && (e = !0); | |
var s = this._cookieHandler.getCookie(l.VRT_MEDIA_TOKEN_KEY); | |
return new i.Promise(function(i, r) { | |
null !== s ? i(s) : n._createTokenRequest( | |
t, e).then(function(t) { | |
i(t) | |
}).catch(function(t) { | |
r(t) | |
}) | |
}) | |
}, t.prototype._createTokenRequest = function(t, e) { | |
var n = this; | |
return new i.Promise(function(t, i) { | |
var s = [_.JsonContentTypeHeader]; | |
(new y.HttpRequest).post(n._mediaApiUrl + | |
"/tokens", null, s, e).then( | |
function(e) { | |
var i = n._setToken(e); | |
n._eventBus.publish(new p | |
.TokenEvent(u.EventName | |
.tokensuccess, { | |
token: i | |
})), t(i) | |
}).catch(function(t) { | |
var e = n._publishError( | |
t); | |
i(e) | |
}) | |
}) | |
}, t.prototype.getStreamMetadata = function(t, e, n) { | |
var s = this; | |
return new i.Promise(function(i, r) { | |
var o = [_.JsonContentTypeHeader], | |
a = n ? "&client=" + | |
encodeURIComponent(n) : "", | |
l = s._mediaApiUrl + "/videos/" + | |
encodeURIComponent(t) + | |
"?vrtPlayerToken=" + | |
encodeURIComponent(e) + a; | |
(new y.HttpRequest).get(l, o).then( | |
function(t) { | |
var e = s._setVideo(t); | |
i(e) | |
}).catch(function(t) { | |
var e = s._publishError( | |
t); | |
r(e) | |
}) | |
}) | |
}, t.prototype.getEpgMetadata = function(t) { | |
var e = this; | |
return new i.Promise(function(n, i) { | |
var s = [_.JsonContentTypeHeader]; | |
(new y.HttpRequest).get(e._mediaApiUrl + | |
"/channels/" + t, s).then( | |
function(t) { | |
if (200 === t.status) { | |
var s = e._onEpgDataReceived( | |
t.text); | |
n(s) | |
} else { | |
var r = new v.VuplayError( | |
t.rawResponse, | |
v.VuplayErrorType | |
.REQUEST, {} | |
); | |
e._eventBus.publish( | |
new c.ErrorEvent( | |
r.message | |
)), i(r) | |
} | |
}).catch(function(t) { | |
var n = e._publishError( | |
t); | |
i(n) | |
}) | |
}) | |
}, t.prototype._publishError = function(t) { | |
var e = t.message, | |
n = t.args; | |
if (t.args.xhr && t.args.xhr.response) try { | |
var i = JSON.parse(t.args.xhr.response); | |
e = i.message, n = i | |
} catch (n) { | |
e = t.message | |
} | |
return this._eventBus.publish(new c.ErrorEvent( | |
e, n)), new v.VuplayError(e, t.type, n) | |
}, t.prototype._setToken = function(t) { | |
var e = JSON.parse(t.text), | |
n = new Date(e.expirationDate).toUTCString(); | |
return this._cookieHandler.setCookie({ | |
key: l.VRT_MEDIA_TOKEN_KEY, | |
value: e.vrtPlayerToken | |
}, n), e.vrtPlayerToken | |
}, t.prototype._setVideo = function(t) { | |
for (var e = JSON.parse(t.text), n = null, i = [], | |
o = new Array, c = 0; c < e.targetUrls.length; c++) { | |
var p = e.targetUrls[c]; | |
p.type.toLowerCase() === l.MPEG_DASH && (n = | |
new a.VrtVideoUrl(p.type, p.url)) | |
} | |
if (e.hasOwnProperty("chaptering") && Array.isArray( | |
e.chaptering)) | |
for (var c = 0; c < e.chaptering.length; c++) { | |
var v = e.chaptering[c]; | |
i.push(this._generateVrtContentFromResponse( | |
v)) | |
} | |
if (e.hasOwnProperty("playlist") && "object" == | |
typeof e.playlist && e.playlist.hasOwnProperty( | |
"content") && Array.isArray(e.playlist.content) | |
) | |
for (var y = 0; y < e.playlist.content.length; y++) { | |
var _ = e.playlist.content[y], | |
d = _.eventType.toLowerCase() === | |
l.PlaylistItemTypes.promotional ? l | |
.PlaylistItemTypes.promotional : l.PlaylistItemTypes | |
.standard; | |
o.push(new r.PlaylistItem(d, _.duration, | |
_.skippable, _.skipTime)) | |
} | |
var f = new s.VrtVideo(e.duration, e.skinType, | |
e.title, e.shortDescription, e.drm, e.aspectRatio, | |
n, e.posterImageUrl, e.channelId, i, o); | |
return this._eventBus.publish(new h.AggregatorEvent( | |
u.EventName.vrtmediaapisuccess, { | |
video: f | |
})), f | |
}, t.prototype._generateVrtContentFromResponse = | |
function(t) { | |
return new o.VrtContent(t.id || null, t.title || | |
null, t.shortDescription || null, t.time || | |
null, t.imageUrl || null) | |
}, t.prototype._onEpgDataReceived = function(t) { | |
var e = new Array, | |
n = new Date, | |
i = JSON.parse(t); | |
i.schedule = i.schedule.filter(function(t) { | |
if (t.time) { | |
var e = new Date(Date.parse(t.time)); | |
if (e.getFullYear() === n.getFullYear() && | |
e.getMonth() === n.getMonth() && | |
e.getDay() === n.getDay()) | |
return t | |
} | |
}); | |
for (var s = 0; s < i.schedule.length; s++) { | |
var r = i.schedule[s]; | |
e.push(this._generateVrtContentFromResponse( | |
r)) | |
} | |
return e | |
}, t | |
}(); | |
e.VrtApiService = f | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n, i, s, r, o, a, l, u, c) { | |
this._duration = t, this._skinType = e, this._title = | |
n, this._shortDescription = i, this._drm = s, | |
this._aspectRatio = r, this._streamUrl = o, | |
this._posterImageUrl = a, this._channelId = l, | |
this._chaptering = u, this._playlist = c | |
} | |
return t.prototype.setPlaylist = function(t) { | |
this._playlist = t | |
}, t.prototype.getDuration = function() { | |
return this._duration | |
}, t.prototype.getSkinType = function() { | |
return this._skinType | |
}, t.prototype.getTitle = function() { | |
return this._title | |
}, t.prototype.getShortDescription = function() { | |
return this._shortDescription | |
}, t.prototype.getDrm = function() { | |
return this._drm || "" | |
}, t.prototype.getAspectRatio = function() { | |
return this._aspectRatio | |
}, t.prototype.getStreamUrl = function() { | |
return this._streamUrl | |
}, t.prototype.getPosterImageUrl = function() { | |
return this._posterImageUrl | |
}, t.prototype.setPosterImageUrl = function(t) { | |
this._posterImageUrl = t | |
}, t.prototype.getChannelId = function() { | |
return this._channelId | |
}, t.prototype.getChaptering = function() { | |
return this._chaptering | |
}, t.prototype.getPlaylist = function() { | |
return this._playlist | |
}, t | |
}(); | |
e.VrtVideo = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n, i) { | |
this._eventType = t, this._duration = e, this._skippable = | |
n, this._skipTime = i | |
} | |
return Object.defineProperty(t.prototype, "eventType", { | |
get: function() { | |
return this._eventType | |
}, | |
enumerable: !0, | |
configurable: !0 | |
}), Object.defineProperty(t.prototype, "duration", { | |
get: function() { | |
return this._duration | |
}, | |
enumerable: !0, | |
configurable: !0 | |
}), Object.defineProperty(t.prototype, "skippable", { | |
get: function() { | |
return this._skippable | |
}, | |
enumerable: !0, | |
configurable: !0 | |
}), Object.defineProperty(t.prototype, "skipTime", { | |
get: function() { | |
return this._skipTime | |
}, | |
enumerable: !0, | |
configurable: !0 | |
}), t | |
}(); | |
e.PlaylistItem = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n, i, s) { | |
this._id = t, this._title = e, this._shortDescription = | |
n, this._time = i, this._imageUrl = s | |
} | |
return t.prototype.getId = function() { | |
return this._id | |
}, t.prototype.setId = function(t) { | |
this._id = t | |
}, t.prototype.getTitle = function() { | |
return this._title | |
}, t.prototype.setTitle = function(t) { | |
this._title = t | |
}, t.prototype.getTime = function() { | |
return this._time | |
}, t.prototype.setTime = function(t) { | |
this._time = t | |
}, t.prototype.getImageUrl = function() { | |
return this._imageUrl | |
}, t.prototype.setImageUrl = function(t) { | |
this._imageUrl = t | |
}, t.prototype.getShortDescription = function() { | |
return this._shortDescription | |
}, t.prototype.setShortDescription = function(t) { | |
this._shortDescription = t | |
}, t | |
}(); | |
e.VrtContent = i | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(6), | |
r = n(1), | |
o = function(t) { | |
function e(e, n, i) { | |
return i || (i = new Date), t.call(this, r.EventType | |
.TOKEN, e, n, i) || this | |
} | |
return i(e, t), e | |
}(s.EventBase); | |
e.TokenEvent = o | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(6), | |
r = n(1), | |
o = function(t) { | |
function e(e, n, i) { | |
return i || (i = new Date), t.call(this, r.EventType | |
.AGGREGATOR, e, n, i) || this | |
} | |
return i(e, t), e | |
}(s.EventBase); | |
e.AggregatorEvent = o | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t) { | |
this.headers = t.getAllResponseHeaders(), this.rawResponse = | |
t.response, this.xml = t.responseXML, this.text = | |
t.responseText, this.type = t.responseType, | |
this.status = t.status, this.statusText = t.statusText, | |
this.xhr = t | |
} | |
return t | |
}(); | |
e.default = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(0), | |
s = n(7), | |
r = n(8), | |
o = n(3), | |
a = n(18), | |
l = function() { | |
function t(t, e, n) { | |
var l = this; | |
this._fetchEpgData = function() { | |
return l._vrtApiService.getEpgMetadata(l._channelId) | |
.then(function(t) { | |
l._vrtContents = t | |
}) | |
}, this._setFetchTimeout = function() { | |
clearTimeout(l._fetchTimeout), l._fetchTimeout = | |
setTimeout(l._fetchTimeoutHandler, i.POLLING_EPG_INTERVAL) | |
}, this._setRequestUpdateTimeout = function() { | |
clearTimeout(l._requestUpdateTimeout), l._requestUpdateTimeout = | |
setTimeout(l._requestUpdate, i.CHECKING_EPG_DATA_INTERVAL) | |
}, this._fetchTimeoutHandler = function() { | |
l._fetchEpgData().then(l._setFetchTimeout).catch( | |
function() { | |
l._eventBus.publish(new s.LogEvent( | |
r.LogLevel.warn, o.EventName | |
.log, { | |
message: "Unable to fetch EPG data" | |
})), l._setFetchTimeout() | |
}) | |
}, this._requestUpdate = function() { | |
l._eventBus.publish(new a.SmartEvent(o.EventName | |
.epgupdatetimer, {})), l._setRequestUpdateTimeout() | |
}, this._eventBus = t, this._vrtApiService = n, | |
this._vuplaySmart = e, this._vrtContents = [] | |
} | |
return t.prototype.start = function(t) { | |
var e = this; | |
return this._channelId = t, this.stop(), this._fetchEpgData() | |
.then(function() { | |
e._setFetchTimeout(), e._setRequestUpdateTimeout() | |
}) | |
}, t.prototype.stop = function() { | |
clearTimeout(this._fetchTimeout), clearTimeout( | |
this._requestUpdateTimeout) | |
}, t.prototype.hasContent = function() { | |
return !(!this._vrtContents || !this._vrtContents | |
.length) | |
}, t.prototype.getEpgProgramById = function(t) { | |
return this._vrtContents.find(function(e) { | |
return e.getId() === t | |
}) | |
}, t.prototype.getCurrentProgram = function() { | |
var t = this._vuplaySmart.getUtcTime() || new Date; | |
if (this._vrtContents) { | |
return this._vrtContents.filter(function(e) { | |
if (new Date(Date.parse(e.getTime())) | |
.getTime() <= t.getTime()) | |
return e | |
}).pop() | |
} | |
return null | |
}, t.prototype.getNextProgram = function(t) { | |
var e = null; | |
if (this._vrtContents) | |
if (t) { | |
var n = this._vrtContents.findIndex( | |
function(e) { | |
return e.getId() === t | |
}); | |
n > -1 && this._vrtContents[n + 1] && ( | |
e = this._vrtContents[n + 1]) | |
} else { | |
var i = this.getCurrentProgram(); | |
i && i.getId() && (e = this.getNextProgram( | |
i.getId())) | |
} | |
return e | |
}, t | |
}(); | |
e.default = l | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(0), | |
s = function() { | |
function t(t, e, n) { | |
this._vuplaySmart = e, this._skin = n, this._video = | |
t, this._checkAdvertisementStatus(), this._watchAdvertisementStatus() | |
} | |
return t.prototype._watchAdvertisementStatus = function() { | |
var t = this; | |
this._vuplaySmart.on(Vuplay.EventType.MEDIA, | |
Vuplay.Events.timeupdate, | |
function() { | |
return t._checkAdvertisementStatus() | |
}) | |
}, t.prototype._checkAdvertisementStatus = function() { | |
var t = this._video.getPlaylist(); | |
if (t) { | |
var e = this._vuplaySmart.getCurrentTime(), | |
n = this._getPlaylistSegment(t, 1e3 * e); | |
n && (n.segment._eventType === i.PlaylistItemTypes | |
.promotional ? (this._skin.enterAdvertisementsMode(), | |
this._skin.setAdvertisementCountdownLabel( | |
n.timeLeftInMs / 1e3)) : | |
this._skin.exitAdvertisementsMode() | |
) | |
} | |
}, t.prototype._getPlaylistSegment = function(t, e) { | |
for (var n = 0, i = 0; i < t.length; i++) { | |
if (e >= n && e < n + t[i]._duration) return { | |
segment: t[i], | |
timeLeftInMs: n + this._getTimeLeftInAdvertisementSet( | |
t, i) - e | |
}; | |
n += t[i]._duration | |
} | |
}, t.prototype._getTimeLeftInAdvertisementSet = | |
function(t, e) { | |
for (var n = 0, s = e; s < t.length && t[s]._eventType === | |
i.PlaylistItemTypes.promotional; s++) n += | |
t[s]._duration; | |
return n | |
}, t | |
}(); | |
e.default = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(10), | |
s = n(45), | |
r = n(4), | |
o = n(0), | |
a = n(5), | |
l = n(3), | |
u = n(7), | |
c = n(8), | |
p = n(16), | |
h = n(15), | |
v = function() { | |
function t(t, e, n, i) { | |
this._vuplaySmart = t, this._config = e, this._eventBus = | |
n, this._video = i | |
} | |
return t.prototype.getUrl = function() { | |
var t = this; | |
return new i.Promise(function(e, n) { | |
var i = ""; | |
t._getAdsConfig().then(function(s) { | |
i = t._generateUrl(), i ? | |
e(i) : n(new a.VuplayError( | |
"preroll url is empty", | |
a.VuplayErrorType | |
.UNKNOWN, {} | |
)) | |
}).catch(function(t) { | |
n(t) | |
}) | |
}) | |
}, t.prototype._generateUrl = function() { | |
var t = this._config.analytics.synd, | |
e = void 0 === this._config.analytics.ads || | |
this._config.analytics.ads; | |
if (e && t) return this._generateUrlWithSyndication( | |
t); | |
var n = this._getAllowedDomain(); | |
return e && n ? this._generateUrlWithoutSyndication( | |
n) : "" | |
}, t.prototype._getAllowedDomain = function() { | |
var t = location.hostname.split(".").reverse(), | |
e = this._adConfig.getDomains(); | |
return e[t[1]] ? t[1] : e[t[2]] ? t[2] : "" | |
}, t.prototype._generateUrlWithSyndication = | |
function(t) { | |
var e = this._adConfig.getPartners(), | |
n = e[t]; | |
if (n && n.getIsAds()) { | |
var i = this._config.analytics.category || | |
o.PREROLL_DEFAULT_CATEGORY; | |
return this._interpolatePrerollUrl(t, i) | |
} | |
return "" | |
}, t.prototype._generateUrlWithoutSyndication = | |
function(t) { | |
if (-1 !== this._adConfig.getPrograms().indexOf( | |
this._video.getTitle())) return ""; | |
var e = this._getDuration(); | |
if (Math.abs(e) < o.PREROLL_VIDEO_MIN_ALLOWED_DURATION) | |
return ""; | |
var n = this._adConfig.getDomains(), | |
i = this._config.analytics.category || n[t]; | |
return i === o.PREROLL_DEFAULT_CATEGORY ? "" : | |
this._interpolatePrerollUrl(t, i) | |
}, t.prototype._interpolatePrerollUrl = function(t, | |
e) { | |
return o.PREROLL_URL.replace("%%CONTENT%%", t).replace( | |
"%%CATEGORY%%", e).replace( | |
"%%TIMESTAMP%%", Date.now().toString()) | |
}, t.prototype._getDuration = function() { | |
return r.Util.getDuration(this._vuplaySmart, | |
this._video) | |
}, t.prototype._getAdsConfig = function() { | |
var t = this; | |
return new i.Promise(function(e, n) { | |
if (t._adConfig) e(t._adConfig); | |
else { | |
var i = new h.HttpRequest, | |
r = []; | |
r.push(p.JsonContentTypeHeader), | |
i.get(o.PREROLL_CONFIG_URL, | |
r).then(function(i) { | |
var r = JSON.parse( | |
i.text); | |
if (t._validateAdConfig( | |
r)) { | |
var o = new s.AdConfig( | |
r); | |
t._adConfig = o, | |
e(o) | |
} else n(new a.VuplayError( | |
"Could not initialise preroll config", | |
a.VuplayErrorType | |
.UNKNOWN, {} | |
)) | |
}).catch(function(t) { | |
n(t) | |
}) | |
} | |
}) | |
}, t.prototype._validateAdConfig = function(t) { | |
var e = t.domains, | |
n = t.partners, | |
i = t.programs; | |
return "object" != typeof t ? (this._eventBus.publish( | |
new u.LogEvent(c.LogLevel.warn, l.EventName | |
.log, { | |
message: "Preroll config must be a javascript object" | |
})), !1) : !("object" != typeof e || | |
"object" != typeof n || !Array.isArray( | |
i)) || (this._eventBus.publish(new u | |
.LogEvent(c.LogLevel.warn, l.EventName | |
.log, { | |
message: "Preroll config is invalid" | |
})), !1) | |
}, t | |
}(); | |
e.default = v | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(46), | |
s = n(47), | |
r = n(48), | |
o = function() { | |
function t(t) { | |
var e = t.domains, | |
n = t.partners, | |
o = t.programs, | |
a = new i.AdConfigDomains, | |
l = new s.AdConfigPartners; | |
Object.keys(e).forEach(function(t) { | |
a[t] = e[t] | |
}), Object.keys(n).forEach(function(t) { | |
var e = n[t], | |
i = e.name, | |
s = e.ads, | |
o = void 0 === s ? "true" : s; | |
l[t] = new r.AdPartner(i, "true" === o) | |
}), this._domains = a, this._partners = l, this | |
._programs = o | |
} | |
return t.prototype.getDomains = function() { | |
return this._domains | |
}, t.prototype.getPartners = function() { | |
return this._partners | |
}, t.prototype.getPrograms = function() { | |
return this._programs | |
}, t | |
}(); | |
e.AdConfig = o | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t() {} | |
return t | |
}(); | |
e.AdConfigDomains = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t() {} | |
return t | |
}(); | |
e.AdConfigPartners = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e) { | |
this._name = t, this._ads = e | |
} | |
return t.prototype.getName = function() { | |
return this._name | |
}, t.prototype.getIsAds = function() { | |
return this._ads | |
}, t | |
}(); | |
e.AdPartner = i | |
}, function(t, e, n) { | |
"use strict"; | |
var i = this && this.__extends || function() { | |
var t = Object.setPrototypeOf || { | |
__proto__: [] | |
} | |
instanceof Array && function(t, e) { | |
t.__proto__ = e | |
} || function(t, e) { | |
for (var n in e) e.hasOwnProperty(n) && (t[n] = | |
e[n]) | |
}; | |
return function(e, n) { | |
function i() { | |
this.constructor = e | |
} | |
t(e, n), e.prototype = null === n ? Object.create( | |
n) : (i.prototype = n.prototype, new i) | |
} | |
}(); | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var s = n(2), | |
r = n(19), | |
o = n(20), | |
a = n(11), | |
l = function(t) { | |
function e(e, n, i, s, r) { | |
return t.call(this, e, n, i, s, r) || this | |
} | |
return i(e, t), e.prototype._loadSkinStylesheet = | |
function() { | |
o.SkinLoaderFactory(a.SkinType.CORE).load(), o.SkinLoaderFactory( | |
a.SkinType.KETNET).load(), this._config | |
.getContainer().firstChild.classList.add(s.SkinClasses | |
.vuplaySkinKetnet) | |
}, e.prototype._setupSkinElements = function() { | |
this._svgIcons = s.KetnetSkinSvgIcons, t.prototype | |
._setupHtmlElements.call(this) | |
}, e | |
}(r.VuplaySkin); | |
e.KetnetSkin = l | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(2), | |
s = function() { | |
function t(t) { | |
this._vuplay = t | |
} | |
return t.prototype.getLiveTimeHtml = function() { | |
return this.getLiveTimeLabel(this._getLiveTimeThrough()) | |
}, t.prototype.calculateTimeLive = function() { | |
return this._getLiveTimeThrough().toLocaleTimeString() | |
}, t.prototype.getVodTimeLabel = function(t) { | |
var e = Math.floor(t / 3600), | |
n = 0, | |
i = 0; | |
e > 0 ? (n = Math.floor((t - 3600 * e) / 60), i = | |
t - 3600 * e - 60 * n) : (n = Math.floor( | |
t / 60), i = t - 60 * n); | |
var s = e < 10 ? "0" + e : String(e), | |
r = n < 10 ? "0" + n : n.toString(), | |
o = i < 10 ? "0" + i : i.toString(); | |
return e > 0 ? this._createTimeSpans(o, r, s) : | |
this._createTimeSpans(o, r) | |
}, t.prototype.getLiveTimeLabel = function(t) { | |
var e = t.getHours(), | |
n = t.getMinutes(), | |
i = t.getSeconds(), | |
s = e < 10 ? "0" + e : String(e), | |
r = n < 10 ? "0" + n : n.toString(), | |
o = i < 10 ? "0" + i : i.toString(); | |
return e > 0 ? this._createTimeSpans(o, r, s) : | |
this._createTimeSpans(o, r) | |
}, t.prototype.getAdvertisementsTimeLabel = | |
function(t) { | |
var e = t < 10 ? "0" + t : t.toString(); | |
return this._createTimeSpans(e) | |
}, t.prototype._getLiveTimeThrough = function() { | |
var t = this._vuplay.getUtcTime(); | |
if (void 0 === t || null === t) return new Date; | |
var e = this._vuplay.getDuration(), | |
n = this._vuplay.getCurrentTime(); | |
n < 0 && (n = 0); | |
var i = (e - n) / 1e3; | |
return new Date(t.getTime() - i) | |
}, t.prototype._createTimeSpans = function(t, e, n) { | |
var i = new Array; | |
if (n) { | |
var s = this._createTimSpan(n[0]); | |
i.push(s); | |
var r = this._createTimSpan(n[1]); | |
i.push(r); | |
var o = this._createColonSpan(); | |
i.push(o) | |
} | |
if (e) { | |
var a = this._createTimSpan(e[0]); | |
i.push(a); | |
var l = this._createTimSpan(e[1]); | |
i.push(l); | |
var u = this._createColonSpan(); | |
i.push(u) | |
} | |
var c = this._createTimSpan(t[0]); | |
i.push(c); | |
var p = this._createTimSpan(t[1]); | |
return i.push(p), i | |
}, t.prototype._createTimSpan = function(t) { | |
var e = document.createElement("span"); | |
return e.classList.add(i.SkinClasses.vuplayNumber), | |
e.innerText = t, e | |
}, t.prototype._createColonSpan = function() { | |
var t = document.createElement("span"); | |
return t.classList.add(i.SkinClasses.vuplayColon), | |
t.innerText = i.COLON, t | |
}, t | |
}(); | |
e.TimeCalculator = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(8), | |
s = n(7), | |
r = n(2), | |
o = n(0), | |
a = n(3), | |
l = function() { | |
function t(t, e, n, r, o, l, u, c, p, h, v, y, _) { | |
var d = this; | |
this._updateLoaded = function(t) { | |
var e = 0, | |
n = t.args.buffered; | |
if (n && n.length) try { | |
var r = n.end(0); | |
e = d._toPercent(r) | |
} catch (t) { | |
d._eventBus.publish(new s.LogEvent( | |
i.LogLevel.warn, a.EventName | |
.log, { | |
message: "Buffer information not available" | |
})) | |
} | |
d._loaded.style.width = e.toFixed(1) + "%" | |
}, this._onDragEnd = function() { | |
d._drag = !1 | |
}, this._onMove = function(t) { | |
d._drag && d._initiateJump(t) | |
}, this._progressControlContainer = t, this._progressContainer = | |
e, this._progress = n, this._loaded = r, this._nipple = | |
o, this._overlayElement = c, this._controlsContainer = | |
p, this._scrubberType = h, this._vuplay = v, | |
this._drag = !1, this._nippleOriginX = null, | |
this._nippleOriginY = null, this._nippleLastX = | |
null, this._nippleLastY = null, this._vertical = | |
u, this._onDrag = y, this._eventBus = _, this._setupEvents(), | |
this.setPercentage(l) | |
} | |
return t.prototype._setupEvents = function() { | |
var t = this; | |
this._progress.addEventListener("mousedown", | |
function(e) { | |
e.stopPropagation(), t._scrubberDragStart( | |
e), t._initiateJump(e) | |
}), this._nipple.addEventListener( | |
"mousedown", | |
function(e) { | |
e.stopPropagation(), t._scrubberDragStart( | |
e), t._initiateJump(e) | |
}), this._progressContainer.addEventListener( | |
"mousedown", | |
function(e) { | |
e.stopPropagation(), t._scrubberDragStart( | |
e), t._initiateJump(e) | |
}), this._scrubberType === o.ScrubberTypes | |
.progress && this._vuplay.on(Vuplay.EventType | |
.MEDIA, a.EventName.progress, this._updateLoaded | |
), document.addEventListener("mousemove", | |
this._onMove), document.addEventListener( | |
"mouseup", this._onDragEnd) | |
}, t.prototype._toPercent = function(t) { | |
var e = Math.abs(this._vuplay.getDuration()), | |
n = 0; | |
if (this._vuplay.isLive()) | |
if (t > 1e9) { | |
var i = this._vuplay.getUtcTime(), | |
s = new Date(1e3 * t), | |
r = (s.getTime() - i.getTime()) / | |
1e3, | |
o = e + this._vuplay.getCurrentTime(); | |
t = Math.min(o + r, e) | |
} else t < 0 && (t = e + t); | |
return n = t / e * 100, Math.max(0, Math.min(n, | |
100)) | |
}, t.prototype._scrubberDragStart = function(t) { | |
this._drag = !0, this._vertical ? (this._nippleOriginY = | |
this._progress.offsetTop, this._nippleLastY = | |
this._nipple.offsetTop) : (this._nippleOriginX = | |
this._progress.offsetLeft, this._nippleLastX = | |
this._nipple.offsetLeft) | |
}, t.prototype._calculateTouchedScrubberPosition = | |
function(t) { | |
var e, n, i = getComputedStyle(this._nipple), | |
s = parseInt(this._vertical ? i.height : i.width, | |
10) / 2, | |
o = getComputedStyle(this._progressContainer, | |
10..toString()); | |
if (this._vertical) { | |
var a = this._vuplay.isFullScreen() ? 0 : | |
this._overlayElement.offsetParent.offsetTop, | |
l = this._overlayElement.clientHeight, | |
u = this._controlsContainer.clientHeight, | |
c = this._progressControlContainer.offsetTop, | |
p = this._progressContainer.offsetTop, | |
h = parseInt(o.height, 10), | |
v = a + l - u + c + p + h; | |
n = t.clientY - v, n < -h ? n = -h : n > 0 && | |
(n = 0), this._nippleLastY = t.clientY - | |
v, e = -n / h * 100 | |
} else { | |
var y = (this._vuplay.isFullScreen() ? 0 : | |
this._overlayElement.getBoundingClientRect() | |
.left) + this._progressControlContainer | |
.offsetLeft; | |
n = t.clientX - y - s; | |
var _ = parseInt(o.width, 10); | |
t.clientX - y + s < this._progressContainer | |
.offsetLeft ? n = this._nippleOriginX : | |
t.clientX > _ + this._progress.offsetLeft + | |
y + s && (n = _), this._nippleLastX = t | |
.clientX - y - s, e = n / _ * 100 | |
} | |
return e < .1 && (e = .1), e > r.PERCENTAGE_TOGGLE_LIVE_BUTTON && | |
(e = 99.9), e | |
}, t.prototype._initiateJump = function(t) { | |
var e = this._calculateTouchedScrubberPosition( | |
t); | |
e && (this.setPercentage(e), this._onDrag(e)) | |
}, t.prototype.setPercentage = function(t) { | |
this._vuplay.isLive() ? !1 === this._vuplay.isCasting() && | |
this._setPercentage(t) : this._setPercentage( | |
t) | |
}, t.prototype._setPercentage = function(t) { | |
this._vertical ? (this._nipple.style.bottom = t + | |
"%", this._progress.style.height = t + | |
"%") : (this._nipple.style.left = t + | |
"%", this._progress.style.width = t + | |
"%") | |
}, t.prototype.getPercentage = function() { | |
return this._nippleLastX / this._progressContainer | |
.clientWidth | |
}, t | |
}(); | |
e.Scrubber = l | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(5), | |
s = function() { | |
function t() {} | |
return t.prototype.load = function() { | |
return new Promise(function(t, e) { | |
try { | |
n.e(2).then(function(e) { | |
var i = n(63); | |
t(i) | |
}.bind(null, n)).catch(n.oe) | |
} catch (t) { | |
e(new i.VuplayError( | |
"failed to load skin", | |
i.VuplayErrorType.UNKNOWN, | |
t)) | |
} | |
}) | |
}, t | |
}(); | |
e.CoreSkinLoader = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(5), | |
s = function() { | |
function t() {} | |
return t.prototype.load = function() { | |
return new Promise(function(t, e) { | |
try { | |
n.e(1).then(function(e) { | |
var i = n(64); | |
t(i) | |
}.bind(null, n)).catch(n.oe) | |
} catch (t) { | |
e(new i.VuplayError( | |
"failed to load skin", | |
i.VuplayErrorType.UNKNOWN, | |
t)) | |
} | |
}) | |
}, t | |
}(); | |
e.DefaultSkinLoader = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(5), | |
s = function() { | |
function t() {} | |
return t.prototype.load = function() { | |
return new Promise(function(t, e) { | |
try { | |
n.e(0).then(function(e) { | |
var i = n(65); | |
t(i) | |
}.bind(null, n)).catch(n.oe) | |
} catch (t) { | |
e(new i.VuplayError( | |
"failed to load skin", | |
i.VuplayErrorType.UNKNOWN, | |
t)) | |
} | |
}) | |
}, t | |
}(); | |
e.KetnetSkinLoader = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n, i, s, r, o, a, l, u, c) { | |
this._container = t, this._logo = e, this._title = | |
n || "", this._episodeTitle = i || "", this._poster = | |
s || "", this._chapters = r || [], this._showThumbnails = | |
o || !1, this._autoPlay = a || !1, this._startVolume = | |
l <= 100 && l >= 0 ? l : 100, this._skinType = | |
u, this._defaultDuration = c || 0 | |
} | |
return t.prototype.getContainer = function() { | |
return this._container | |
}, t.prototype.setContainer = function(t) { | |
this._container = t | |
}, t.prototype.getLogo = function() { | |
return this._logo | |
}, t.prototype.setLogo = function(t) { | |
this._logo = t | |
}, t.prototype.getTitle = function() { | |
return this._title | |
}, t.prototype.setTitle = function(t) { | |
this._title = t | |
}, t.prototype.getEpisodeTitle = function() { | |
return this._episodeTitle | |
}, t.prototype.setEpisodeTitle = function(t) { | |
this._episodeTitle = t | |
}, t.prototype.getPoster = function() { | |
return this._poster | |
}, t.prototype.setPoster = function(t) { | |
this._poster = t | |
}, t.prototype.getChapters = function() { | |
return this._chapters | |
}, t.prototype.setChapters = function(t) { | |
this._chapters = t | |
}, t.prototype.isShowThumbnails = function() { | |
return this._showThumbnails | |
}, t.prototype.setShowThumbnails = function(t) { | |
this._showThumbnails = t | |
}, t.prototype.isLive = function() { | |
return "live" === this._skinType.toLocaleLowerCase() | |
}, t.prototype.getAutoPlay = function() { | |
return this._autoPlay | |
}, t.prototype.setAutoPlay = function(t) { | |
this._autoPlay = t | |
}, t.prototype.getStartVolume = function() { | |
return this._startVolume | |
}, t.prototype.setStartVolume = function(t) { | |
this._startVolume = t | |
}, t.prototype.setSkinType = function(t) { | |
this._skinType = t | |
}, t.prototype.getSkinType = function() { | |
return this._skinType | |
}, t.prototype.getDefaultDuration = function() { | |
return this._defaultDuration | |
}, t | |
}(); | |
e.SkinConfig = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(57), | |
s = function() { | |
function t(t) { | |
this._errorButtonBorder = t.errorButtonBorder || "", | |
this._iconTint = t.iconTint || "", this._iconTintActive = | |
t.iconTintActive || "", this._spinnerTint = t.spinnerTint || | |
"", this._textColour = t.textColour || ""; | |
var e = t.progressScrubber.current || "", | |
n = t.progressScrubber.nipple || "", | |
s = t.progressScrubber.loaded || ""; | |
this._progressScrubber = new i.ScrubberStyle(e, n, | |
s); | |
var r = t.volumeScrubber.current || "", | |
o = t.volumeScrubber.nipple || ""; | |
this._volumeScrubber = new i.ScrubberStyle(r, o, "") | |
} | |
return t.prototype.getErrorButtonBorderColour = | |
function() { | |
return this._errorButtonBorder | |
}, t.prototype.getIconTintColour = function() { | |
return this._iconTint | |
}, t.prototype.getIconTintActive = function() { | |
return this._iconTintActive | |
}, t.prototype.getSpinnerTintColour = function() { | |
return this._spinnerTint | |
}, t.prototype.getTextColour = function() { | |
return this._textColour | |
}, t.prototype.getProgressStyles = function() { | |
return this._progressScrubber | |
}, t.prototype.getVolumeScrubberStyles = function() { | |
return this._volumeScrubber | |
}, t | |
}(); | |
e.SkinStyle = s | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t, e, n) { | |
this._current = t, this._nipple = e, this._loaded = | |
n | |
} | |
return t.prototype.getCurrentColour = function() { | |
return this._current | |
}, t.prototype.getNippleColour = function() { | |
return this._nipple | |
}, t.prototype.getLoadedColour = function() { | |
return this._loaded | |
}, t | |
}(); | |
e.ScrubberStyle = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t() { | |
this._handlers = [] | |
} | |
return t.prototype.on = function(t) { | |
this._handlers.push(t) | |
}, t.prototype.off = function(t) { | |
this._handlers = this._handlers.filter(function( | |
e, n) { | |
return e.type !== t.type || e.listener !== | |
t.listener | |
}) | |
}, t.prototype.publish = function(t) { | |
for (var e = 0; e < this._handlers.length; e++) { | |
var n = this._handlers[e]; | |
n.type === t.type && t.name === n.name && n | |
.listener.apply(this, [t]) | |
} | |
}, t | |
}(); | |
e.EventBus = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = function() { | |
function t(t) { | |
this._identifier = t.analytics.cimIdentifier, this._materialIdentifier = | |
t.analytics.program + "-" + t.analytics.episode || | |
"", this._section = t.analytics.section || "", | |
this._contentType = t.analytics.contentType || | |
"", this._sourceType = t.analytics.sourceType || | |
"", this._tvLink = t.analytics.date + "-" + t.analytics | |
.whatson || "" | |
} | |
return t.prototype.getCimConfigJson = function() { | |
return { | |
identifier: this._identifier, | |
materialIdentifier: this._materialIdentifier, | |
section: this._section, | |
contentType: this._contentType, | |
sourceType: this._sourceType, | |
tvLink: this._tvLink | |
} | |
}, t | |
}(); | |
e.CimConfig = i | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}), n(61); | |
var i = function() { | |
function t(t, e) { | |
var n = "vod"; | |
void 0 !== e && null !== e && (n = e.getSkinType()), | |
this._publisherId = t.analytics.publisherId || | |
null, this._ads = t.analytics.ads || !1, this._skinType = | |
n, this._clipNumber = t.analytics.clipNumber || | |
0, this._whatsOn = t.analytics.whatson || "", | |
this._episode = t.analytics.episode || "", this | |
._duration = e ? e.getDuration() : 0, this._program = | |
t.analytics.program || "", this._brand = t.analytics | |
.brand || "", this._date = t.analytics.date || | |
"00000000", this._siteUrl = window.location.hostname, | |
this._syndicationPartner = t.analytics.synd || | |
"", this._playlistTitle = t.analytics.playlist || | |
"", this._live = "vod" === n ? 0 : 1, this._userId = | |
t.analytics.userId || "", this._userAge = t.analytics | |
.userAge || 0, this._userGender = t.analytics.userGender || | |
"", this._publicationDate = t.analytics.publicationDate || | |
new Date, this._category = t.analytics.category || | |
"", this._playerName = t.analytics.playerName || | |
"vualto", this._client = t.client || "", this._videoReference = | |
t.videoReference || "", this._whatsOnProgram = | |
t.analytics.whatsonProgram || "", this._assetLabels = {}, | |
this._playbackLabels = {} | |
} | |
return t.prototype.getAssetLabels = function() { | |
var t = { | |
ns_st_cn: this._clipNumber, | |
ns_st_ci: this._whatsOn | |
}; | |
return this._ads && Object.assign(t, { | |
ns_st_ad: this._ads | |
}), t | |
}, t.prototype.getPlaybackLabels = function() { | |
var t = { | |
ns_st_ty: this._skinType, | |
ns_st_tp: this._clipNumber, | |
ns_st_pr: this._program, | |
ns_st_ep: this._episode, | |
ns_st_st: this._brand, | |
ns_st_pl: this._playlistTitle, | |
ns_st_mp: this._playerName, | |
ns_st_cl: this._duration, | |
vrt_vid_id: this._whatsOn, | |
vrt_dat_id: this._date, | |
vrt_ref_id: this._siteUrl, | |
vrt_synd_id: this._syndicationPartner, | |
ns_st_el: this._duration, | |
vrt_id_id: this._userId, | |
vrt_age: this._userAge, | |
vrt_gender: this._userGender, | |
vrt_pubda_id: this._publicationDate, | |
vrt_cat1_id: this._category, | |
vrt_mz_id: this._videoReference, | |
vrt_mzcl_id: this._client, | |
vrt_prog_id: this._whatsOnProgram | |
}; | |
return this._live && Object.assign(t, { | |
ns_st_li: this._live | |
}), t | |
}, t | |
}(); | |
e.ComscoreConfig = i | |
}, function(t, e) { | |
! function() { | |
"function" != typeof Object.assign && (Object.assign = | |
function(t) { | |
if (void 0 === t || null === t) throw new TypeError( | |
"Cannot convert undefined or null to object" | |
); | |
for (var e = Object(t), n = 1; n < arguments.length; n++) { | |
var i = arguments[n]; | |
if (void 0 !== i && null !== i) | |
for (var s in i) i.hasOwnProperty(s) && | |
(e[s] = i[s]) | |
} | |
return e | |
}) | |
}() | |
}, function(t, e, n) { | |
"use strict"; | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}); | |
var i = n(0), | |
s = function() { | |
function t(t, e) { | |
var n = "vod"; | |
void 0 !== e && null !== e && (n = e.getSkinType()), | |
this.player = { | |
name: t.analytics.playerName || "vualto", | |
videoId: t.analytics.whatson || "", | |
videoName: t.analytics.program || "" | |
}, this.visitor = { | |
marketingCloudOrgId: i.ADOBE_VISITOR_MARKETING_CLOUD_ORG_ID, | |
trackingServer: i.ADOBE_VISITOR_TRACKING_SERVER | |
}, this.appMeasurement = { | |
rsid: t.analytics.appMeasurementRsid || t.analytics | |
.synd || "", | |
pageName: t.analytics.appMeasurementPageName || | |
"", | |
trackingServer: i.ADOBE_APP_MEASUREMENT_TRACKING_SERVER | |
}, this.heartbeat = { | |
channel: t.analytics.synd || "", | |
trackingServer: i.ADOBE_HEARTBEAT_TRACKING_SERVER, | |
publisher: i.ADOBE_HEARTBEAT_PUBLISHER, | |
sdk: i.VRT_WRAPPER_VERSION, | |
ovp: t.analytics.heartBeatOvp || "" | |
}, this.video = { | |
name: t.analytics.program || "", | |
id: t.videoReference || "", | |
duration: e ? e.getDuration() / 1e3 : 0, | |
streamType: n, | |
initialBitrate: t.analytics.videoInitialBitrate || | |
0, | |
metadata: { | |
standard: { | |
assetId: t.analytics.whatson || "", | |
show: t.analytics.program || "", | |
streamFormat: t.analytics.videoStreamFormat, | |
episode: t.analytics.episode || "", | |
genre: t.analytics.category || "", | |
firstAirDate: t.analytics.publicationDate || | |
"00000000", | |
season: t.analytics.videoMetadataStandardSeason || | |
"", | |
firstDigitalDate: t.analytics.videoMetadataStandardFirstDigitalDate || | |
"", | |
adLoad: t.analytics.videoMetadataStandardAdLoad || | |
"" | |
}, | |
custom: t.analytics.videoMetadataCustom || | |
{} | |
} | |
}, t.analytics.brand && (this.video.metadata.custom | |
.contentBrand = t.analytics.brand), t.analytics | |
.heartBeatOvp && (this.video.metadata.custom.touchpointBrand = | |
t.analytics.heartBeatOvp), t.analytics.platform && | |
(this.video.metadata.custom.platform = t.analytics | |
.platform), this.ad = { | |
adName: t.analytics.adName || "", | |
adId: t.analytics.adId || "", | |
position: t.analytics.adPosition || 1, | |
length: t.analytics.adLength || 0, | |
standardMetadata: t.analytics.adStandardMetadata || | |
{}, | |
customMetadata: t.analytics.adCustomMetadata || | |
{} | |
}, this.adBreak = { | |
adBreakName: t.analytics.adBreakName, | |
position: t.analytics.adBreakPosition || 1 | |
} | |
} | |
return t | |
}(); | |
e.AdobeConfig = s | |
}])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment