Created
July 14, 2014 16:39
-
-
Save julescarbon/2f435cf9483b4087ed0a to your computer and use it in GitHub Desktop.
vimeo-player-2014.js
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
/* VimeoPlayer - v2.4.10 - 2014-06-30 */ | |
(function (s, w, ia) { | |
var Ba, ua, aa, ja, qa, na, Ca, fa, Ga, Pa, Ra, Sa, Na, Oa, Ha, Ua, Va, Wa, Xa, Ya, Ia, Da, ra, va, ca, wa, Za; | |
(function (c) { | |
(function () { | |
for (var b = ["webkit", "moz"], a = 0; a < b.length && !s.requestAnimationFrame; ++a) { | |
var c = b[a]; | |
s.requestAnimationFrame = s[c + "RequestAnimationFrame"]; | |
s.cancelAnimationFrame = s[c + "CancelAnimationFrame"] || s[c + "CancelRequestAnimationFrame"] | |
}!/iP(ad|hone|od).*OS 6/.test(s.navigator.userAgent) && s.requestAnimationFrame && s.cancelAnimationFrame || (s.requestAnimationFrame = function (a) { | |
return setTimeout(a, | |
0) | |
}, s.cancelAnimationFrame = clearTimeout) | |
})(); | |
!Object.defineProperty && Object.prototype.__defineGetter__ && (Object.defineProperty = function (b, a, c) { | |
"get" in c && b.__defineGetter__(a, c.get); | |
"set" in c && b.__defineSetter__(a, c.set); | |
c.get || c.set || (b[a] = c.value) | |
}); | |
!Object.defineProperties && Object.defineProperty && (Object.defineProperties = function (b, a) { | |
for (var c in a) try { | |
Object.defineProperty(b, c, a[c]) | |
} catch (d) { | |
"'enumerable' attribute on the property descriptor cannot be set to 'true' on this object" === d.message && | |
(a[c].enumerable = !1, Object.defineProperty(b, c, a[c])) | |
} | |
return b | |
}); | |
!Object.create && Object.defineProperty && (Object.create = function (b, a) { | |
function d() {} | |
if ("object" !== typeof b && "function" !== typeof b) throw new TypeError("Object prototype may only be an Object or null"); | |
d.prototype = b; | |
var g = new d; | |
g.__proto__ = b; | |
a !== c && Object.defineProperties(g, a); | |
return g | |
}); | |
Object.keys || (Object.keys = function (b) { | |
if ("object" !== typeof b && "function" !== typeof b || null === b) throw new TypeError("Object.keys called on a non-object"); | |
var a = [], | |
c; | |
for (c in b) b.hasOwnProperty(c) && a.push(c); | |
return a | |
}); | |
Array.prototype.indexOf || (Array.prototype.indexOf = function (b) { | |
for (var a = 0, c = this.length; a < c; a++) | |
if (a in this && this[a] === b) return a; | |
return -1 | |
}); | |
"classList" in w.documentElement || !Object.defineProperty || "undefined" === typeof HTMLElement || Object.defineProperty(HTMLElement.prototype, "classList", { | |
get: function () { | |
function b(b) { | |
return function (c) { | |
var d = a.className.split(/\s+/), | |
e = d.indexOf(c); | |
b(d, e, c); | |
a.className = d.join(" ") | |
} | |
} | |
var a = this, | |
c = { | |
add: b(function (a, | |
b, c) { | |
return ~b || a.push(c) | |
}), | |
remove: b(function (a, b) { | |
return ~b && a.splice(b, 1) | |
}), | |
toggle: b(function (a, b, c) { | |
return ~b ? a.splice(b, 1) : a.push(c) | |
}), | |
contains: function (b) { | |
return !!~a.className.split(/\s+/).indexOf(b) | |
}, | |
item: function (b) { | |
return a.className.split(/\s+/)[b] || null | |
} | |
}; | |
Object.defineProperty(c, "length", { | |
get: function () { | |
return a.className.split(/\s+/).length | |
} | |
}); | |
return c | |
} | |
}) | |
})(); | |
(function (c, b, a) { | |
function d(a) { | |
var b = null; | |
"VIDEO" === a.tagName ? b = a : (a = a.getElementsByTagName("video"), a[0] && (b = a[0])); | |
return b | |
} | |
function g(a) { | |
var b = | |
d(a); | |
if (b && b.webkitEnterFullscreen) { | |
try { | |
b.readyState < b.HAVE_METADATA ? (b.addEventListener("loadedmetadata", function I() { | |
b.removeEventListener("loadedmetadata", I, !1); | |
b.webkitEnterFullscreen(); | |
x = !!b.getAttribute("controls") | |
}, !1), b.load()) : (b.webkitEnterFullscreen(), x = !!b.getAttribute("controls")), B = b | |
} catch (c) { | |
return z("not_supported", a) | |
} | |
return !0 | |
} | |
return z(v.request === ia ? "not_supported" : "not_enabled", a) | |
} | |
function l() { | |
H.element || (D(), n()) | |
} | |
function n() { | |
a && "webkitfullscreenchange" === v.change && c.removeEventListener("resize", | |
l, !1) | |
} | |
var r = "undefined" !== typeof Element && "ALLOW_KEYBOARD_INPUT" in Element, | |
p = /i(Pad|Phone|Pod)/.test(navigator.userAgent) && 7 <= parseInt(navigator.userAgent.replace(/^.*OS (\d+)_(\d+).*$/, "$1.$2"), 10), | |
v = function () { | |
var a = b.createElement("video"), | |
c = { | |
request: ["requestFullscreen", "webkitRequestFullscreen", "webkitRequestFullScreen", "mozRequestFullScreen", "msRequestFullscreen"], | |
exit: ["exitFullscreen", "webkitCancelFullScreen", "webkitExitFullscreen", "mozCancelFullScreen", "msExitFullscreen"], | |
enabled: ["fullscreenEnabled", | |
"webkitFullscreenEnabled", "mozFullScreenEnabled", "msFullscreenEnabled" | |
], | |
element: ["fullscreenElement", "webkitFullscreenElement", "webkitCurrentFullScreenElement", "mozFullScreenElement", "msFullscreenElement"], | |
change: ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"], | |
error: ["fullscreenerror", "webkitfullscreenerror", "mozfullscreenerror", "MSFullscreenError"] | |
}, | |
d = {}, | |
e; | |
for (e in c) | |
for (var h = 0, g = c[e].length; h < g; h++) | |
if (c[e][h] in a || c[e][h] in b || "on" + c[e][h].toLowerCase() in | |
b) { | |
d[e] = c[e][h]; | |
break | |
} | |
return d | |
}(), | |
B = null, | |
x = null, | |
h = function () {}, | |
A = [], | |
E = !1; - 1 < navigator.userAgent.indexOf("Android") && -1 < navigator.userAgent.indexOf("Chrome") && (E = parseInt(navigator.userAgent.replace(/^.*Chrome\/(\d+).*$/, "$1"), 10) || !0); | |
var F = function (a) { | |
var b = A[A.length - 1]; | |
if (a !== b.element && a !== B || !b.hasEntered) { | |
"VIDEO" === a.tagName && (B = a); | |
if (1 === A.length) H.onenter(H.element); | |
b.enter.call(b.element, a || b.element); | |
b.hasEntered = !0 | |
} | |
}, | |
D = function () { | |
!B || x || p || (B.setAttribute("controls", "controls"), B.removeAttribute("controls")); | |
x = B = null; | |
var a = A.pop(); | |
a && (a.exit.call(a.element), H.element || (A.forEach(function (a) { | |
a.exit.call(a.element) | |
}), A = [], H.onexit())) | |
}, | |
z = function (a, b) { | |
if (0 < A.length) { | |
var c = A.pop(); | |
b = b || c.element; | |
c.error.call(b, a); | |
H.onerror(b, a) | |
} | |
}, | |
H = { | |
request: function (c, d, e, u) { | |
c = c || b.body; | |
A.push({ | |
element: c, | |
enter: d || h, | |
exit: e || h, | |
error: u || h | |
}); | |
if (v.request === ia || a && !1 === b[v.enabled] || !1 !== E && 32 > E) return g(c); | |
if (a && v.enabled === ia) v.enabled = "webkitFullscreenEnabled", c[v.request](), setTimeout(function () { | |
b[v.element] ? b[v.enabled] = !0 : (b[v.enabled] = !1, g(c)) | |
}, 250); | |
else try { | |
if (/5\.1[\.\d]* Safari/.test(navigator.userAgent)) c[v.request](); | |
else c[v.request](r && Element.ALLOW_KEYBOARD_INPUT); | |
setTimeout(function () { | |
b[v.element] || z(a ? "not_enabled" : "not_allowed", c) | |
}, 100) | |
} catch (x) { | |
z("not_enabled", c) | |
} | |
}, | |
exit: function () { | |
n(); | |
b[v.exit]() | |
}, | |
toggle: function (a, b, c, d) { | |
H.element ? H.exit() : H.request(a, b, c, d) | |
}, | |
videoEnabled: function (a) { | |
if (H.enabled) return !0; | |
a = a || b.body; | |
return (a = d(a)) && a.webkitSupportsFullscreen !== ia ? a.readyState < a.HAVE_METADATA ? "maybe" : | |
a.webkitSupportsFullscreen : !1 | |
}, | |
onenter: h, | |
onexit: h, | |
onchange: h, | |
onerror: h | |
}; | |
try { | |
Object.defineProperties(H, { | |
element: { | |
enumerable: !0, | |
get: function () { | |
return B && B.webkitDisplayingFullscreen ? B : b[v.element] || null | |
} | |
}, | |
enabled: { | |
enumerable: !0, | |
get: function () { | |
return "webkitCancelFullScreen" !== v.exit || a ? !1 !== E && 32 > E ? !1 : b[v.enabled] || !1 : !0 | |
} | |
} | |
}) | |
} catch (m) { | |
H.element = null, H.enabled = !1 | |
} | |
v.change && b.addEventListener(v.change, function (b) { | |
H.onchange(H.element); | |
H.element ? (b = A[A.length - 2]) && b.element === H.element ? D() : (F(H.element), | |
a && "webkitfullscreenchange" === v.change && c.addEventListener("resize", l, !1)) : D() | |
}, !1); | |
b.addEventListener("webkitbeginfullscreen", function (a) { | |
A.push({ | |
element: a.srcElement, | |
enter: h, | |
exit: h, | |
error: h | |
}); | |
H.onchange(a.srcElement); | |
F(a.srcElement) | |
}, !0); | |
b.addEventListener("webkitendfullscreen", function (a) { | |
H.onchange(a.srcElement); | |
D(a.srcElement) | |
}, !0); | |
v.error && b.addEventListener(v.error, function (a) { | |
z("not_allowed") | |
}, !1); | |
c.BigScreen = H | |
})(s, w, self !== top); | |
var U = function () { | |
function c() { | |
var b = arguments; | |
if (1 === b.length && | |
b[0] instanceof c) return b = b[0], this.red = b.red, this.green = b.green, this.blue = b.blue, this.alpha = b.alpha, this.hue = b.hue, this.saturation = b.saturation, this.lightness = b.lightness, this; | |
if (1 === b.length) { | |
if ("string" === typeof b[0] && 0 <= b[0].indexOf("rgb")) { | |
b = /rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*([\d\.]+))?\)/.exec(b[0]); | |
if (!b) throw Error("Invalid rgb value"); | |
this.rgba = { | |
red: parseInt(b[1], 10), | |
green: parseInt(b[2], 10), | |
blue: parseInt(b[3], 10), | |
alpha: parseFloat(b[5]) || 1 | |
} | |
} else { | |
var a = b[0] + "", | |
a = a.replace("#", | |
""); | |
if ("string" !== typeof a || 3 !== a.length && 6 !== a.length || isNaN(parseInt(a, 16))) throw Error("Invalid hex value"); | |
this.hex = b[0] | |
} | |
return this | |
} | |
if (3 === b.length || 4 === b.length) { | |
for (a = 0; 3 > a; a++) | |
if (isNaN(parseInt(b[a], 10)) || 0 > parseInt(b[a], 10) || 255 < parseInt(b[a], 10)) throw Error("Invalid rgb value"); | |
if (b[3] && 0 > parseFloat(b[3]) || 1 < parseFloat(b[3])) throw Error("Invalid alpha value"); | |
this.rgba = { | |
red: b[0], | |
green: b[1], | |
blue: b[2], | |
alpha: parseFloat(b[3]) || 1 | |
}; | |
return this | |
} | |
throw Error("Invalid color"); | |
} | |
c.prototype = { | |
get complement() { | |
var b = | |
this.clone(); | |
b.rgb = { | |
red: 255 - this.red, | |
green: 255 - this.green, | |
blue: 255 - this.blue | |
}; | |
return b | |
}, get hex() { | |
return c.rgbToHex(this.red, this.green, this.blue) | |
}, set hex(b) { | |
this.rgba = c.hexToRgb(b); | |
return this | |
}, get hsl() { | |
return "hsl(" + this.hue + "," + this.saturation + "%," + Math.round(this.lightness) + "%)" | |
}, set hsl(b) { | |
this.hue = b.hue; | |
this.saturation = b.saturation; | |
this.lightness = b.lightness; | |
b = c.hslToRgb(b.hue, b.saturation, b.lightness); | |
this.red = b.red; | |
this.green = b.green; | |
this.blue = b.blue; | |
this.alpha = b.alpha; | |
return this | |
}, get luminance() { | |
function b(a) { | |
return 0.03928 >= | |
a ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4) | |
} | |
var a = b(this.red / 255), | |
c = b(this.green / 255), | |
d = b(this.blue / 255); | |
return 0.2126 * a + 0.7152 * c + 0.0722 * d | |
}, get rgb() { | |
return "rgb(" + this.red + "," + this.green + "," + this.blue + ")" | |
}, set rgb(b) { | |
this.rgba = b; | |
return this | |
}, get rgba() { | |
return "rgba(" + this.red + "," + this.green + "," + this.blue + "," + this.alpha + ")" | |
}, set rgba(b) { | |
this.red = b.red; | |
this.green = b.green; | |
this.blue = b.blue; | |
this.alpha = b.alpha || 1; | |
b = c.rgbToHsl(b.red, b.green, b.blue); | |
this.hue = b.hue; | |
this.saturation = b.saturation; | |
this.lightness = b.lightness; | |
return this | |
}, get yiq() { | |
return (299 * this.red + 587 * this.green + 114 * this.blue) / 1E3 | |
}, clone: function () { | |
return new c(this) | |
}, lighten: function (b, a, c) { | |
this.hsl = { | |
hue: this.hue, | |
saturation: this.saturation, | |
lightness: this.lightness + b | |
}; | |
if (a && c) | |
for (b = c.contrast(this).ratio; b < a && !(this.lighten(5), b = c.contrast(this).ratio, 100 <= this.lightness);); | |
return this | |
}, darken: function (b, a, c) { | |
this.hsl = { | |
hue: this.hue, | |
saturation: this.saturation, | |
lightness: this.lightness - b | |
}; | |
if (a && c) | |
for (b = c.contrast(this).ratio; b < a && !(this.darken(5), b = c.contrast(this).ratio, | |
0 >= this.lightness);); | |
return this | |
}, overlayOn: function (b) { | |
if (1 <= this.alpha) return this; | |
var a = this.clone(); | |
a.rgba = { | |
red: a.red * this.alpha + b.red * b.alpha * (1 - this.alpha), | |
green: a.green * this.alpha + b.green * b.alpha * (1 - this.alpha), | |
blue: a.blue * this.alpha + b.blue * b.alpha * (1 - this.alpha), | |
alpha: a.alpha + b.alpha * (1 - this.alpha) | |
}; | |
return a | |
}, contrast: function (b) { | |
var a = this.alpha; | |
if (1 <= a) { | |
1 > b.alpha && (b = b.overlayOn(this)); | |
var d = this.luminance + 0.05; | |
b = b.luminance + 0.05; | |
var g = d / b; | |
b > d && (g = 1 / g); | |
g = Math.round(10 * g) / 10; | |
return { | |
ratio: g, | |
error: 0, | |
min: g, | |
max: g | |
} | |
} | |
var g = this.overlayOn(c.white).contrast(b).ratio, | |
d = this.overlayOn(c.black).contrast(b).ratio, | |
g = Math.max(g, d), | |
l = { | |
red: Math.min(Math.max(0, (b.red - this.red * a) / (1 - a)), 255), | |
green: Math.min(Math.max(0, (b.green - this.green * a) / (1 - a)), 255), | |
blue: Math.min(Math.max(0, (b.blue - this.blue * a) / (1 - a)), 255) | |
}, | |
a = this.clone(); | |
a.rgb = l; | |
b = this.overlayOn(a).contrast(b).ratio; | |
return { | |
ratio: Math.round((b + g) / 2 * 10) / 10, | |
error: Math.round((g - b) / 2 * 10) / 10, | |
min: b, | |
max: g, | |
closest: a, | |
farthest: d === g ? c.white : c.black | |
} | |
}, wcagAACompliant: function (b) { | |
return 4.5 <= | |
this.contrast(b).ratio | |
}, wcagAAACompliant: function (b) { | |
return 7 <= this.contrast(b).ratio | |
}, yiqContrastColor: function () { | |
return 120 <= this.yiq ? new c(0, 0, 0) : new c(255, 255, 255) | |
} | |
}; | |
c.hexToRgb = function (b) { | |
b += ""; | |
if (3 === b.length || 4 === b.length) { | |
if (b = /^#?([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(b)) b[1] += b[1], b[2] += b[2], b[3] += b[3] | |
} else b = /^#?([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(b); | |
return b ? { | |
red: parseInt(b[1], 16), | |
green: parseInt(b[2], 16), | |
blue: parseInt(b[3], 16), | |
alpha: 1 | |
} : null | |
}; | |
c.rgbToHex = function (b, | |
a, c) { | |
return "#" + (16777216 + (Math.round(b) << 16) + (Math.round(a) << 8) + Math.round(c)).toString(16).slice(1) | |
}; | |
c.rgbToHsl = function (b, a, c) { | |
b /= 255; | |
a /= 255; | |
c /= 255; | |
var d = Math.max(b, a, c), | |
l = Math.min(b, a, c), | |
n = (d + l) / 2, | |
r = n, | |
p = n; | |
if (d === l) return { | |
hue: 0, | |
saturation: 0, | |
lightness: 100 * p | |
}; | |
var v = d - l, | |
r = 0.5 < p ? v / (2 - d - l) : v / (d + l); | |
d === b ? n = (a - c) / v + (a < c ? 6 : 0) : d === a ? n = (c - b) / v + 2 : d === c && (n = (b - a) / v + 4); | |
return { | |
hue: Math.round(n / 6 * 360), | |
saturation: Math.round(100 * r), | |
lightness: Math.round(100 * p) | |
} | |
}; | |
c.hslToRgb = function (b, a, c) { | |
function d(a, b, c) { | |
0 > c && | |
(c += 1); | |
1 < c && (c -= 1); | |
return 1 > 6 * c ? a + 6 * (b - a) * c : 1 > 2 * c ? b : 2 > 3 * c ? a + 6 * (b - a) * (2 / 3 - c) : a | |
} | |
b /= 360; | |
a /= 100; | |
c /= 100; | |
if (0 === a) return { | |
red: Math.floor(255 * c), | |
green: Math.floor(255 * c), | |
blue: Math.floor(255 * c) | |
}; | |
a = 0.5 > c ? c * (1 + a) : c + a - a * c; | |
c = 2 * c - a; | |
return { | |
red: Math.floor(255 * d(c, a, b + 1 / 3)), | |
green: Math.floor(255 * d(c, a, b)), | |
blue: Math.floor(255 * d(c, a, b - 1 / 3)) | |
} | |
}; | |
c.hslToHex = function (b, a, d) { | |
b = c.hslToRgb(b, a, d); | |
return c.rgbToHex(b.red, b.green, b.blue) | |
}; | |
c.white = new c("fff"); | |
c.black = new c("000"); | |
return c | |
}(), | |
Ea = function () { | |
return { | |
make: function (c) { | |
c = | |
c || {}; | |
var b = {}; | |
c.on = function (a, d) { | |
a = [].concat(a); | |
for (var g = 0, l = a.length; g < l; g++) { | |
var n = a[g]; | |
n && (b[n] || (b[n] = []), b[n].push(d)) | |
} | |
return c | |
}; | |
c.once = function (a, b) { | |
function d() { | |
b.apply(c.off(a, d), arguments) | |
} | |
d.handler = b; | |
return c.on(a, d) | |
}; | |
c.off = function (a, d) { | |
a = [].concat(a); | |
for (var g = 0, l = a.length; g < l; g++) { | |
var n = a[g]; | |
if (n && n in b) { | |
var r = b[n].indexOf(d); | |
if (-1 === r) { | |
for (var p = 0, v = b[n].length; p < v; p++) | |
if (b[n][p].handler === d) { | |
r = g; | |
break | |
} | |
if (-1 === r) break | |
} | |
b[n].splice(r, 1) | |
} | |
} | |
return c | |
}; | |
c.fire = function (a) { | |
if (!a) return c; | |
if (a in b) | |
for (var d = b[a].slice(0), g = 0, l = d.length; g < l; g++) d[g].apply(c, d.slice.call(arguments, 1)); | |
return c | |
}; | |
return c | |
} | |
} | |
}(); | |
(function () { | |
function c(a, b, d) { | |
if ("_root" == b) return d; | |
if (a !== d) { | |
var e; | |
n || (a.matches && (n = a.matches), a.webkitMatchesSelector && (n = a.webkitMatchesSelector), a.mozMatchesSelector && (n = a.mozMatchesSelector), a.msMatchesSelector && (n = a.msMatchesSelector), a.oMatchesSelector && (n = a.oMatchesSelector), n || (n = l.matchesSelector)); | |
e = n; | |
if (e.call(a, b)) return a; | |
if (a.parentNode) return r++, c(a.parentNode, | |
b, d) | |
} | |
} | |
function b(a, b, c, d) { | |
v[a.id] || (v[a.id] = {}); | |
v[a.id][b] || (v[a.id][b] = {}); | |
v[a.id][b][c] || (v[a.id][b][c] = []); | |
v[a.id][b][c].push(d) | |
} | |
function a(a, b, c, d) { | |
if (v[a.id]) | |
if (!b) | |
for (var e in v[a.id]) v[a.id].hasOwnProperty(e) && (v[a.id][e] = {}); | |
else if (!d && !c) v[a.id][b] = {}; | |
else if (!d) delete v[a.id][b][c]; | |
else if (v[a.id][b][c]) | |
for (e = 0; e < v[a.id][b][c].length; e++) | |
if (v[a.id][b][c][e] === d) { | |
v[a.id][b][c].splice(e, 1); | |
break | |
} | |
} | |
function d(a, b, e) { | |
if (v[a][e]) { | |
var g = b.target || b.srcElement, | |
n, D, z = {}, | |
p = D = 0; | |
r = 0; | |
for (n in v[a][e]) v[a][e].hasOwnProperty(n) && | |
(D = c(g, n, B[a].element)) && l.matchesEvent(e, B[a].element, D, "_root" == n, b) && (r++, v[a][e][n].match = D, z[r] = v[a][e][n]); | |
b.stopPropagation = function () { | |
b.cancelBubble = !0 | |
}; | |
for (D = 0; D <= r; D++) | |
if (z[D]) | |
for (p = 0; p < z[D].length; p++) { | |
if (!1 === z[D][p].call(z[D].match, b)) { | |
l.cancel(b); | |
return | |
} | |
if (b.cancelBubble) return | |
} | |
} | |
} | |
function g(c, h, g, n) { | |
function p(a) { | |
return function (b) { | |
d(D, b, a) | |
} | |
} | |
if (this.element) { | |
c instanceof Array || (c = [c]); | |
g || "function" != typeof h || (g = h, h = "_root"); | |
var D = this.id, | |
z; | |
for (z = 0; z < c.length; z++) n ? a(this, c[z], h, g) : | |
(v[D] && v[D][c[z]] || l.addEvent(this, c[z], p(c[z])), b(this, c[z], h, g)); | |
return this | |
} | |
} | |
function l(a, b) { | |
if (!(this instanceof l)) { | |
for (var c in B) | |
if (B[c].element === a) return B[c]; | |
p++; | |
B[p] = new l(a, p); | |
return B[p] | |
} | |
this.element = a; | |
this.id = b | |
} | |
var n, r = 0, | |
p = 0, | |
v = {}, | |
B = {}; | |
l.prototype.on = function (a, b, c) { | |
return g.call(this, a, b, c) | |
}; | |
l.prototype.off = function (a, b, c) { | |
return g.call(this, a, b, c, !0) | |
}; | |
l.matchesSelector = function () {}; | |
l.cancel = function (a) { | |
a.preventDefault(); | |
a.stopPropagation() | |
}; | |
l.addEvent = function (a, b, c) { | |
a.element.addEventListener(b, | |
c, "blur" == b || "focus" == b) | |
}; | |
l.matchesEvent = function () { | |
return !0 | |
}; | |
s.Gator = l | |
})(); | |
(function (c) { | |
var b = c.addEvent, | |
a = "onmspointerenter" in w, | |
d = "onmspointerleave" in w; | |
c.addEvent = function (c, l, n) { | |
"mouseenter" === l && (l = "mouseover"); | |
"mouseleave" === l && (l = "mouseout"); | |
"MSPointerEnter" !== l || a || (l = "MSPointerOver"); | |
"MSPointerLeave" !== l || d || (l = "MSPointerOut"); | |
b(c, l, n) | |
}; | |
c.matchesEvent = function (b, c, n, r, p) { | |
return "mouseenter" === b || "mouseleave" === b || !a && "MSPointerEnter" === b || !d && "MSPointerLeave" === b ? (b = p.relatedTarget ? r && c !== | |
n ? !1 : n === p.relatedTarget ? !1 : n.contains(p.relatedTarget) ? !1 : !0 : !0, b) : !0 | |
} | |
})(Gator); | |
(function (c, b) { | |
var a = c.addEvent; | |
c.addEvent = function (b, c, d) { | |
"transitionend" === c && (a(b, "webkitTransitionEnd", d), a(b, "otransitionend", d)); | |
a(b, c, d) | |
} | |
})(Gator, w); | |
(function (c, b, a) { | |
function d(a, b, c) { | |
a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent("on" + b, c) | |
} | |
function g(a) { | |
if ("keypress" == a.type) { | |
var b = String.fromCharCode(a.which); | |
a.shiftKey || (b = b.toLowerCase()); | |
return b | |
} | |
return E[a.which] ? E[a.which] : F[a.which] ? F[a.which] : | |
String.fromCharCode(a.which).toLowerCase() | |
} | |
function l(a) { | |
a = a || {}; | |
var b = !1, | |
c; | |
for (c in q) a[c] ? b = !0 : q[c] = 0; | |
b || (G = !1) | |
} | |
function n(a, b, c, d, e, h) { | |
var g, u, k = [], | |
z = c.type; | |
if (!m[a]) return []; | |
"keyup" == z && B(a) && (b = [a]); | |
for (g = 0; g < m[a].length; ++g) | |
if (u = m[a][g], !(!d && u.seq && q[u.seq] != u.level || z != u.action || ("keypress" != z || c.metaKey || c.ctrlKey) && b.sort().join(",") !== u.modifiers.sort().join(","))) { | |
var l = d && u.seq == d && u.level == h; | |
(!d && u.combo == e || l) && m[a].splice(g, 1); | |
k.push(u) | |
} | |
return k | |
} | |
function r(a) { | |
var b = []; | |
a.shiftKey && | |
b.push("shift"); | |
a.altKey && b.push("alt"); | |
a.ctrlKey && b.push("ctrl"); | |
a.metaKey && b.push("meta"); | |
return b | |
} | |
function p(a, b, c, d) { | |
R.stopCallback(b, b.target || b.srcElement, c, d) || !1 !== a(b, c) || (b.preventDefault ? b.preventDefault() : b.returnValue = !1, b.stopPropagation ? b.stopPropagation() : b.cancelBubble = !0) | |
} | |
function v(a) { | |
"number" !== typeof a.which && (a.which = a.keyCode); | |
var b = g(a); | |
b && ("keyup" == a.type && u === b ? u = !1 : R.handleKey(b, r(a), a)) | |
} | |
function B(a) { | |
return "shift" == a || "ctrl" == a || "alt" == a || "meta" == a | |
} | |
function x(a, b, c, d) { | |
function e(b) { | |
return function () { | |
G = | |
b; | |
++q[a]; | |
clearTimeout(y); | |
y = setTimeout(l, 1E3) | |
} | |
} | |
function m(b) { | |
p(c, b, a); | |
"keyup" !== d && (u = g(b)); | |
setTimeout(l, 10) | |
} | |
for (var z = q[a] = 0; z < b.length; ++z) { | |
var R = z + 1 === b.length ? m : e(d || h(b[z + 1]).action); | |
A(b[z], R, d, a, z) | |
} | |
} | |
function h(a, b) { | |
var c, d, e, h = []; | |
c = "+" === a ? ["+"] : a.split("+"); | |
for (e = 0; e < c.length; ++e) d = c[e], z[d] && (d = z[d]), b && "keypress" != b && D[d] && (d = D[d], h.push("shift")), B(d) && h.push(d); | |
c = d; | |
e = b; | |
if (!e) { | |
if (!H) { | |
H = {}; | |
for (var g in E) 95 < g && 112 > g || E.hasOwnProperty(g) && (H[E[g]] = g) | |
} | |
e = H[c] ? "keydown" : "keypress" | |
} | |
"keypress" == | |
e && h.length && (e = "keydown"); | |
return { | |
key: d, | |
modifiers: h, | |
action: e | |
} | |
} | |
function A(a, b, c, d, e) { | |
s[a + ":" + c] = b; | |
a = a.replace(/\s+/g, " "); | |
var g = a.split(" "); | |
1 < g.length ? x(a, g, b, c) : (c = h(a, c), m[c.key] = m[c.key] || [], n(c.key, c.modifiers, { | |
type: c.action | |
}, d, a, e), m[c.key][d ? "unshift" : "push"]({ | |
callback: b, | |
modifiers: c.modifiers, | |
action: c.action, | |
seq: d, | |
level: e, | |
combo: a | |
})) | |
} | |
var E = { | |
8: "backspace", | |
9: "tab", | |
13: "enter", | |
16: "shift", | |
17: "ctrl", | |
18: "alt", | |
20: "capslock", | |
27: "esc", | |
32: "space", | |
33: "pageup", | |
34: "pagedown", | |
35: "end", | |
36: "home", | |
37: "left", | |
38: "up", | |
39: "right", | |
40: "down", | |
45: "ins", | |
46: "del", | |
91: "meta", | |
93: "meta", | |
224: "meta" | |
}, | |
F = { | |
106: "*", | |
107: "+", | |
109: "-", | |
110: ".", | |
111: "/", | |
186: ";", | |
187: "=", | |
188: ",", | |
189: "-", | |
190: ".", | |
191: "/", | |
192: "`", | |
219: "[", | |
220: "\\", | |
221: "]", | |
222: "'" | |
}, | |
D = { | |
"~": "`", | |
"!": "1", | |
"@": "2", | |
"#": "3", | |
$: "4", | |
"%": "5", | |
"^": "6", | |
"&": "7", | |
"*": "8", | |
"(": "9", | |
")": "0", | |
_: "-", | |
"+": "=", | |
":": ";", | |
'"': "'", | |
"<": ",", | |
">": ".", | |
"?": "/", | |
"|": "\\" | |
}, | |
z = { | |
option: "alt", | |
command: "meta", | |
"return": "enter", | |
escape: "esc", | |
mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl" | |
}, | |
H, m = {}, | |
s = {}, | |
q = {}, | |
y, u = !1, | |
I = !1, | |
G = !1; | |
for (a = 1; 20 > a; ++a) E[111 + a] = "f" + a; | |
for (a = 0; 9 >= a; ++a) E[a + 96] = a; | |
d(b, "keypress", v); | |
d(b, "keydown", v); | |
d(b, "keyup", v); | |
var R = { | |
bind: function (a, b, c) { | |
a = a instanceof Array ? a : [a]; | |
for (var d = 0; d < a.length; ++d) A(a[d], b, c); | |
return this | |
}, | |
unbind: function (a, b) { | |
return R.bind(a, function () {}, b) | |
}, | |
trigger: function (a, b) { | |
if (s[a + ":" + b]) s[a + ":" + b]({}, a); | |
return this | |
}, | |
reset: function () { | |
m = {}; | |
s = {}; | |
return this | |
}, | |
stopCallback: function (a, b) { | |
return -1 < (" " + b.className + " ").indexOf(" mousetrap ") ? !1 : "INPUT" == b.tagName || "SELECT" == | |
b.tagName || "TEXTAREA" == b.tagName || b.isContentEditable | |
}, | |
handleKey: function (a, b, c) { | |
var d = n(a, b, c), | |
e; | |
b = {}; | |
var h = 0, | |
g = !1; | |
for (e = 0; e < d.length; ++e) d[e].seq && (h = Math.max(h, d[e].level)); | |
for (e = 0; e < d.length; ++e) d[e].seq ? d[e].level == h && (g = !0, b[d[e].seq] = 1, p(d[e].callback, c, d[e].combo, d[e].seq)) : g || p(d[e].callback, c, d[e].combo); | |
d = "keypress" == c.type && I; | |
c.type != G || B(a) || d || l(b); | |
I = g && "keydown" == c.type | |
} | |
}; | |
c.Mousetrap = R; | |
"function" === typeof define && define.amd && define(R) | |
})(s, w); | |
Mousetrap = function (c) { | |
var b = c.stopCallback, | |
a = !0; | |
c.stopCallback = function (c, d) { | |
return a ? b(c, d) : !0 | |
}; | |
c.pause = function () { | |
a = !1 | |
}; | |
c.unpause = function () { | |
a = !0 | |
}; | |
return c | |
}(Mousetrap); | |
var q = function (c, b) { | |
return { | |
addCssRule: function (a, b, d) { | |
try { | |
d = d || c.styleSheets[0], d.addRule ? d.addRule(a, b) : d.insertRule(a + "{" + b + "}", (d.cssRules || d.rules).length) | |
} catch (l) {} | |
}, | |
attachClickHandler: function (a, d, g, l) { | |
l = "function" === typeof d ? g : l; | |
g = "function" === typeof d ? d : g; | |
var n = function (a) { | |
if ("touchend" === a.type) { | |
if (a.changedTouches) { | |
var d = c.elementFromPoint(a.changedTouches[0].pageX - | |
b.pageXOffset, a.changedTouches[0].pageY - b.pageYOffset); | |
null !== d && this.contains(d) && g.call(this, a) | |
} | |
"function" === typeof l && l.call(this, a); | |
return !1 | |
} | |
return g.call(this, a) | |
}; | |
if ("function" === typeof d) Gator(a).on(["click", "touchend"], n); | |
else Gator(a).on(["click", "touchend"], d, n) | |
}, | |
isArray: function (a) { | |
return "[object Array]" === Object.prototype.toString.call(a) | |
}, | |
limit: function (a, b, c) { | |
return a < c ? b > a ? b : a : c | |
}, | |
openWindow: function (a, c, d, l, n) { | |
var r = (b.screenY || b.screenTop || 0) + b.outerHeight / 2 - d / 2, | |
p = (b.screenX || b.screenLeft || | |
0) + b.outerWidth / 2 - c / 2; | |
t.browser.chrome && t.mac && (d += 27); | |
return b.open(a, l, n + ",width=" + c + ",height=" + d + ",left=" + p + ",top=" + r) | |
}, | |
parseTime: function (a) { | |
var b = a.match(/t=([0-9hms:]+)/); | |
null !== b && (a = b[1]); | |
var c = !1, | |
d = 0, | |
n = 0, | |
r = 0, | |
p = 0; | |
(b = a.match(/^([0-9]+)$/)) && b.length && (c = !0, p = b[1]); | |
!1 === c && (b = a.match(/^(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?/), null !== b && "" !== b[0] && (c = !0, n = b[2], r = b[4], p = b[6])); | |
!1 === c && (b = a.match(/^([0-9:]+)/), null !== b && (c = !0, a = a.split(":").reverse(), p = a[0], a[1] && (r = a[1]), a[2] && (n = a[2]))); | |
if (!c) return null; | |
n && (d += 3600 * n); | |
r && (d += 60 * r); | |
p && (d += parseInt(p, 10)); | |
return d | |
}, | |
resetFocus: function (a) { | |
a = (a || c).querySelectorAll("*[tabindex]"); | |
for (var d = [], g = 0, l, n, r = 0, p = a.length; r < p; r++) l = a[r], n = b.getComputedStyle(l, ""), 0 < l.tabIndex && "none" !== n.display && 0 < n.opacity && "hidden" !== n.visibility && (d[g++] = l); | |
if (a = d.shift()) a.focus(), a.blur() | |
}, | |
round: function (a, b) { | |
a = parseFloat(a); | |
if (isNaN(a)) return 0; | |
var c = Math.pow(10, b || 3); | |
return Math.round(a * c) / c | |
}, | |
throttle: function (a, b) { | |
var c, d, n, r, p = 0, | |
v = function () { | |
p = new Date; | |
n = null; | |
r = a.apply(c, | |
d) | |
}; | |
return function () { | |
var B = new Date, | |
x = b - (B - p); | |
c = this; | |
d = arguments; | |
0 >= x ? (clearTimeout(n), n = null, p = B, r = a.apply(c, d)) : n || (n = setTimeout(v, x)); | |
return r | |
} | |
} | |
} | |
}(w, s), | |
Ka = function (c, b) { | |
function a(a, b, c) { | |
return F ? Object.create(DOMException.prototype, { | |
code: { | |
enumerable: !0, | |
value: a | |
}, | |
message: { | |
enumerable: !0, | |
value: b | |
}, | |
name: { | |
enumerable: !0, | |
value: c | |
}, | |
toString: { | |
value: function () { | |
return "Error: " + this.message | |
} | |
} | |
}) : (b = Error(b), b.code = a, b.name = c, b) | |
} | |
function d(a) { | |
return F ? Object.create(MediaError.prototype, { | |
code: { | |
enumerable: !0, | |
value: a | |
} | |
}) : { | |
code: a, | |
MEDIA_ERR_ABORTED: 1, | |
MEDIA_ERR_DECODE: 3, | |
MEDIA_ERR_NETWORK: 2, | |
MEDIA_ERR_SRC_NOT_SUPPORTED: 4 | |
} | |
} | |
function g(b, d, e) { | |
var h = function (b, d) { | |
if (!b || b[d] === ia) throw a("DOMException" in c ? DOMException.INDEX_SIZE_ERR : 1, "INDEX_SIZE_ERR: DOM Exception 1", "INDEX_SIZE_ERR"); | |
return b[d] | |
}; | |
return F ? Object.create("object" === typeof TimeRanges ? TimeRanges.prototype : Object.prototype, { | |
length: { | |
enumerable: !0, | |
value: b | |
}, | |
start: { | |
value: function (a) { | |
return h(d, a) | |
} | |
}, | |
end: { | |
value: function (a) { | |
return h(e, a) | |
} | |
} | |
}) : { | |
length: b, | |
start: function (a) { | |
return h(d, | |
a) | |
}, | |
end: function (a) { | |
return h(e, a) | |
} | |
} | |
} | |
function l(a) { | |
return "undefined" === typeof TextTrackList ? Object.create(Object.prototype, { | |
length: { | |
enumerable: !0, | |
value: a.length | |
}, | |
item: { | |
enumerable: !0, | |
value: function (b) { | |
return a[b] | |
} | |
} | |
}) : Object.create(TextTrackList.prototype) | |
} | |
function n(a, b) { | |
return function () { | |
if (a.type === h.TYPE_FLASH && a.swf && a.swfLoaded) { | |
var c = "get" + b.charAt(0).toUpperCase() + b.slice(1); | |
return a.swf[c]() | |
} | |
return a.type === h.TYPE_HTML && a.video ? a.video[b] : b in a.propertyValues ? a.propertyValues[b] : h.properties[b].value | |
} | |
} | |
function r(a, b) { | |
return function (c) { | |
a.propertyValues[b] = c; | |
try { | |
if (a.type === h.TYPE_FLASH && a.swf && a.swfLoaded) { | |
var d = "set" + b.charAt(0).toUpperCase() + b.slice(1); | |
a.swf[d](c) | |
} else a.type === h.TYPE_HTML && a.video && (a.video[b] = c) | |
} catch (e) {} | |
} | |
} | |
function p(a, b) { | |
return function () { | |
if (a.type === h.TYPE_FLASH) return a.swfLoaded ? a.swf["_" + b]() : a.queuedMethodCalls.push({ | |
method: b, | |
args: arguments | |
}); | |
if (a.type === h.TYPE_HTML) return a.video[b]() | |
} | |
} | |
function v(a) { | |
if (!a) return null; | |
a = a.split("?")[0].split("."); | |
switch (a[a.length - 1]) { | |
case "mp4": | |
case "m3u8": | |
return "video/mp4"; | |
case "web": | |
case "webm": | |
return "video/webm"; | |
case "flv": | |
return "video/x-flv" | |
} | |
return null | |
} | |
function B(a) { | |
a.style.display = "none"; | |
a.setAttribute("hidden", ""); | |
a.pause(); | |
a.src = "" | |
} | |
function x(a) { | |
a.style.display = "none"; | |
a.setAttribute("hidden", ""); | |
try { | |
a._pause(), a.setSrc("") | |
} catch (b) {} | |
} | |
function h(a, D) { | |
if (!a) throw Error("You must pass a valid element"); | |
var m = this; | |
m.uuid = Math.round(1E3 * Math.random() + (new Date).getTime()); | |
m.global = "flideo_" + m.uuid; | |
c[m.global] = m; | |
var s = {}; | |
F || (s = b.createElement("flideo"), b.body.appendChild(s)); | |
var q = Ea.make({}); | |
m.queuedMethodCalls = []; | |
m.propertyValues = {}; | |
m.textTracks = []; | |
var y = ["webkitplaybacktargetavailabilitychanged", "webkitcurrentplaybacktargetiswirelesschanged"], | |
u = { | |
src: { | |
enumerable: !0, | |
get: n(m, "src"), | |
set: function (c) { | |
m.propertyValues.src = c; | |
var u = null; | |
switch (v(c)) { | |
case "video/mp4": | |
u = A && A.h264.baseline ? h.TYPE_HTML : h.TYPE_FLASH; | |
break; | |
case "video/webm": | |
u = A && A.webm ? h.TYPE_HTML : h.TYPE_FLASH; | |
break; | |
case "video/x-flv": | |
u = h.TYPE_FLASH | |
} | |
c = u !== h.TYPE_FLASH || t.flash.versionAtLeast(10, 1) ? u : null; | |
0; | |
m.type = | |
c; | |
if (c === h.TYPE_HTML) { | |
if (!m.video) { | |
var g = m.eventCallback, | |
l = m.textTracks, | |
u = b.createElement("video"); | |
u.setAttribute("x-webkit-airplay", "allow"); | |
for (var n = 0, f = h.events.length; n < f; n++) u.addEventListener(h.events[n], g); | |
g = 0; | |
for (n = l.length; g < n; g++) u.appendChild(l[g]); | |
m.video = u; | |
a.appendChild(m.video) | |
} | |
for (var p in m.propertyValues) "currentTime" !== p && (0, m.video[p] = m.propertyValues[p]); | |
m.swf && x(m.swf); | |
m.video.style.display = ""; | |
m.video.removeAttribute("hidden") | |
} else if (c === h.TYPE_FLASH) { | |
if (!m.swf) { | |
u = m.global; | |
g = D.swf; | |
p = b.createElement("object"); | |
p.setAttribute("type", "application/x-shockwave-flash"); | |
p.setAttribute("width", "100%"); | |
p.setAttribute("height", "100%"); | |
p.setAttribute("data", g); | |
u = { | |
flashvars: "ready=" + u + ".flashReady", | |
movie: g, | |
allowfullscreen: "true", | |
allowscriptaccess: "always", | |
bgcolor: "#000000", | |
wmode: "opaque", | |
quality: "high", | |
scalemode: "noscale" | |
}; | |
for (l in u) g = b.createElement("param"), g.setAttribute("name", l), g.setAttribute("value", u[l]), p.appendChild(g); | |
m.swf = p; | |
a.appendChild(m.swf) | |
} | |
m.video && B(m.video); | |
m.swf.style.display = ""; | |
m.swf.removeAttribute("hidden"); | |
m.swfLoaded && m.flashReady() | |
} else m.video && B(m.video), m.swf && x(m.swf); | |
m.type = c; | |
null === c && q.fire("error", { | |
type: "error", | |
target: { | |
error: d(h.MEDIA_ERR_SRC_NOT_SUPPORTED) | |
} | |
}) | |
} | |
}, | |
buffered: { | |
enumerable: !0, | |
get: function () { | |
if (m.type === h.TYPE_HTML && m.video) return m.video.buffered; | |
if (m.type === h.TYPE_FLASH && m.swf && m.swfLoaded) { | |
var a = m.swf.getBuffered(); | |
if (a) return g(a.length, a.start, a.end) | |
} | |
return g(0) | |
} | |
}, | |
seekable: { | |
enumerable: !0, | |
get: function () { | |
if (m.type === h.TYPE_HTML && | |
m.video) return m.video.seekable; | |
if (m.type === h.TYPE_FLASH && m.swf && m.swfLoaded) { | |
var a = m.swf.getSeekable(); | |
if (a) return g(a.length, a.start, a.end) | |
} | |
return g(0) | |
} | |
}, | |
error: { | |
enumerable: !0, | |
get: function () { | |
if (m.type === h.TYPE_HTML && m.video) return m.video.error; | |
if (m.type === h.TYPE_FLASH && m.swf && m.swfLoaded) { | |
var a = m.swf.getError(); | |
if (a) return d(a.code) | |
} | |
return null | |
} | |
}, | |
textTracks: { | |
enumerable: !0, | |
get: function () { | |
return m.type === h.TYPE_HTML && m.video && E ? m.video.textTracks : l([]) | |
} | |
}, | |
canvasImageSource: { | |
enumerable: !0, | |
get: function () { | |
return m.type === | |
h.TYPE_HTML ? m.video : null | |
} | |
}, | |
renderer: { | |
enumerable: !0, | |
get: function () { | |
return m.type | |
} | |
}, | |
addEventListener: { | |
enumerable: !0, | |
value: function (a, b) { | |
if (0 <= y.indexOf(a)) m.video && m.video.addEventListener(a, b); | |
else return q.on(a, b) | |
} | |
}, | |
removeEventListener: { | |
enumerable: !0, | |
value: function (a, b) { | |
if (0 <= y.indexOf(a)) m.video && m.video.removeEventListener(a, b); | |
else return q.off(a, b) | |
} | |
}, | |
appendChild: { | |
enumerable: !0, | |
value: function (a) { | |
m.type === h.TYPE_HTML && m.video ? ("TRACK" === a.nodeName && m.textTracks.push(a), m.video.appendChild(a)) : 0 | |
} | |
}, | |
removeChild: { | |
enumerable: !0, | |
value: function (a) { | |
if (m.type === h.TYPE_HTML && m.video) { | |
if ("TRACK" === a.nodeName) { | |
var b = m.textTracks.indexOf(a); | |
0 <= b && m.textTracks.splice(b, 1) | |
} | |
m.video.removeChild(a); | |
0 === m.video.children.length && m.video.removeAttribute("crossorigin") | |
} else 0 | |
} | |
}, | |
firstChild: { | |
enumerable: !0, | |
get: function () { | |
return m.type === h.TYPE_HTML && m.video ? m.video.firstChild : null | |
} | |
}, | |
children: { | |
enumerable: !1, | |
get: function () { | |
return m.type === h.TYPE_HTML && m.video ? m.video.children : [] | |
} | |
} | |
}, | |
I, G; | |
for (G in h.properties) G in u || | |
(I = { | |
enumerable: !0, | |
get: n(m, G) | |
}, h.properties[G].readOnly || (I.set = r(m, G)), u[G] = I); | |
I = 0; | |
for (G = h.methods.length; I < G; I++) u[h.methods[I]] = { | |
enumerable: !0, | |
value: p(m, h.methods[I]) | |
}; | |
"WebKitPlaybackTargetAvailabilityEvent" in c && (u.webkitShowPlaybackTargetPicker = { | |
enumerable: !0, | |
value: function () { | |
m.video && "webkitShowPlaybackTargetPicker" in m.video && m.video.webkitShowPlaybackTargetPicker() | |
} | |
}, u.webkitCurrentPlaybackTargetIsWireless = { | |
enumerable: !0, | |
get: function () { | |
return m.video && "webkitCurrentPlaybackTargetIsWireless" in | |
m.video ? m.video.webkitCurrentPlaybackTargetIsWireless : !1 | |
} | |
}); | |
Object.defineProperties(s, u); | |
m.eventCallback = function (a) { | |
m.type === h.TYPE_HTML && ("error" === a.type && a.target.error && a.target.error.code === h.MEDIA_ERR_DECODE ? (A.h264.baseline = "", A.h264.high = "", s.src = s.src) : q.fire(a.type, a)) | |
}; | |
m.flashEventCallback = function (a) { | |
m.type === h.TYPE_FLASH && ("error" === a.type && (a.target = m.node), q.fire(a.type, a)) | |
}; | |
m.flashReady = function () { | |
if (!m.swfLoaded) { | |
for (var a = 0, b = h.events.length; a < b; a++) m.swf.api_addEventListener(h.events[a], | |
m.global + ".flashEventCallback"); | |
m.swfLoaded = !0 | |
} | |
for (var c in m.propertyValues) a = "set" + c.charAt(0).toUpperCase() + c.slice(1), m.swf[a](m.propertyValues[c]); | |
for (c = m.queuedMethodCalls.shift(); c;) m.swf["_" + c.method](), c = m.queuedMethodCalls.shift() | |
}; | |
return s | |
} | |
var A = function () { | |
function a(b) { | |
return RegExp(b.toLowerCase()).test(d) | |
} | |
var d = navigator.userAgent.toLowerCase(), | |
e = a("android") ? parseFloat(d.replace(/^.* android (\d+)\.(\d+).*$/, "$1.$2")) || !0 : !1, | |
h = e && a("mobile"), | |
g = a("iphone"), | |
D = a("firefox"), | |
u = b.createElement("video"), | |
l = !1; | |
try { | |
u.canPlayType && (l = { | |
h264: { | |
baseline: u.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), | |
high: u.canPlayType('video/mp4; codecs="avc1.64001E"').replace(/^no$/, "") | |
}, | |
webm: u.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, ""), | |
flv: u.canPlayType('video/x-flv; codecs="vp6"'), | |
hls: u.canPlayType("application/vnd.apple.mpegurl") | |
}) | |
} catch (n) {} | |
e && (2.1 === e || 2.2 === e || D && !l.h264.baseline) && (l.h264.baseline = "probably"); | |
e && !h && (l.h264.high = "probably"); | |
e && (l.hls = ""); | |
g && 2 > c.devicePixelRatio && | |
(l.h264.high = ""); | |
return l | |
}(), | |
E = function () { | |
var a = b.createElement("video"); | |
return "undefined" !== typeof a.textTracks && a.textTracks instanceof TextTrackList | |
}(), | |
F; | |
a: { | |
try { | |
Object.defineProperty({}, "fakeprop", {}) | |
} catch (D) { | |
F = !1; | |
break a | |
} | |
F = !0 | |
} | |
h.TYPE_HTML = "html"; | |
h.TYPE_FLASH = "flash"; | |
h.NETWORK_EMPTY = 0; | |
h.NETWORK_IDLE = 1; | |
h.NETWORK_LOADING = 2; | |
h.NETWORK_NO_SOURCE = 3; | |
h.HAVE_NOTHING = 0; | |
h.HAVE_METADATA = 1; | |
h.HAVE_CURRENT_DATA = 2; | |
h.HAVE_FUTURE_DATA = 3; | |
h.HAVE_ENOUGH_DATA = 4; | |
h.MEDIA_ERR_ABORTED = 1; | |
h.MEDIA_ERR_DECODE = 3; | |
h.MEDIA_ERR_NETWORK = | |
2; | |
h.MEDIA_ERR_SRC_NOT_SUPPORTED = 4; | |
h.properties = { | |
error: { | |
value: null, | |
readOnly: !0 | |
}, | |
src: { | |
value: "" | |
}, | |
currentSrc: { | |
value: "", | |
readOnly: !0 | |
}, | |
networkState: { | |
value: h.NETWORK_EMPTY, | |
readOnly: !0 | |
}, | |
preload: { | |
value: "auto" | |
}, | |
buffered: { | |
value: g(0), | |
readOnly: !0 | |
}, | |
readyState: { | |
value: h.HAVE_NOTHING, | |
readOnly: !0 | |
}, | |
seeking: { | |
value: !1, | |
readOnly: !0 | |
}, | |
currentTime: { | |
value: 0 | |
}, | |
duration: { | |
value: NaN, | |
readOnly: !0 | |
}, | |
paused: { | |
value: !0, | |
readOnly: !0 | |
}, | |
defaultPlaybackRate: { | |
value: 1 | |
}, | |
playbackRate: { | |
value: 1 | |
}, | |
played: { | |
value: g(0), | |
readOnly: !0 | |
}, | |
seekable: { | |
value: g(0), | |
readOnly: !0 | |
}, | |
ended: { | |
value: !1, | |
readOnly: !0 | |
}, | |
autoplay: { | |
value: !1 | |
}, | |
loop: { | |
value: !1 | |
}, | |
controls: { | |
value: !1 | |
}, | |
volume: { | |
value: 1 | |
}, | |
muted: { | |
value: !1 | |
}, | |
defaultMuted: { | |
value: !1 | |
}, | |
textTracks: { | |
value: l([]), | |
readOnly: !0 | |
}, | |
width: { | |
value: 0 | |
}, | |
height: { | |
value: 0 | |
}, | |
videoWidth: { | |
value: 0, | |
readOnly: !0 | |
}, | |
videoHeight: { | |
value: 0, | |
readOnly: !0 | |
}, | |
poster: { | |
value: "" | |
} | |
}; | |
h.methods = ["load", "play", "pause", "canPlayType"]; | |
h.events = "abort canplay canplaythrough durationchange emptied ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "); | |
h.support = { | |
video: A, | |
textTracks: E | |
}; | |
return h | |
}(this, w); | |
(function () { | |
var c = { | |
templates: {}, | |
render: function (b, a) { | |
return c.templates[b] ? c.templates[b].call(c, a || {}) : "" | |
} | |
}; | |
c.templates.buffer = function (b) { | |
return '<svg width="110%"><defs><pattern id="buffer" patternUnits="userSpaceOnUse" x="0" y="0" width="10" height="10" viewBox="0 0 10 10"><line x1="5" y1="-1" x2="-5" y2="10" stroke-width="2" stroke="#666" stroke-linecap="butt" /><line x1="10" y1="-1" x2="0" y2="10" stroke-width="2" stroke="#666" stroke-linecap="butt" /><line x1="15" y1="-1" x2="5" y2="10" stroke-width="2" stroke="#666" stroke-linecap="butt" /></pattern></defs><rect fill="url(#buffer)" width="100%" height="100%" /></svg>' | |
}; | |
c.templates.content_rating = function (b) { | |
return '<div class="content-rating"><h1>Hold up!</h1><p class="subtitle">This video does not match your content rating preferences.</p><p>It may contain content indended for mature audiences including: nudity, strong language, and violence. <a href="">Edit your content rating preferences.</a></p><button>I still want to watch this video</button><div class="logo">' + b.logo + "</div></div>" | |
}; | |
c.templates.controls = function (b) { | |
var a = '<section class="play-button-cell"><div class="play-wrapper"><button tabindex="20" class="play rounded-box state-' + | |
b.playState + '" title="Play" data-title-play="Play" data-title-pause="Pause" aria-label="Play"><div class="tiny-bars"></div><div class="play-icon">', | |
a = a + (this.render("icon_play") || ""), | |
a = a + '</div><div class="pause-icon">' + (this.render("icon_pause") || ""), | |
a = a + '</div></button></div></section><section class="play-bar-cell"><div class="play-bar rounded-box"><div class="progress-container"><div class="progress"><div class="buffer hidden">', | |
a = a + (this.render("buffer") || ""), | |
a = a + ('</div><div class="loaded" role="progressbar" aria-label="loaded" aria-valuemin="0" aria-valuemax="' + | |
b.rawDuration + '" aria-valuenow="0"></div><div class="played" role="progressbar" aria-label="played" aria-valuemin="0" aria-valuemax="' + b.rawDuration + '" aria-valuenow="0"></div><div class="ghost-timecode invisible" role="presentation" aria-hidden="true"><div class="box">00:00</div></div><div class="timecode" role="presentation" aria-hidden="true"><div class="box">' + b.duration + "</div></div></div></div> "); | |
b.volume && (a += ' <div class="volume-container"><div class="volume" role="slider" aria-label="volume" aria-valuemin="0" aria-valuemax="1" tabindex="20"><div></div><div></div><div></div><div></div><div></div></div></div> '); | |
b.ccButton && (a += ' <div class="button-wrapper"><div class="cc-container"><button class="toggle cc ' + (b.ccOn ? "on" : "off") + '" tabindex="20" title="Choose captions"> ', a += this.render("icon_cc") || "", a += " </button></div></div> "); | |
b.hdButton && (a += ' <div class="button-wrapper"><div class="hd-container"><button class="toggle hd ' + (b.hdOn ? "on" : "off") + '" tabindex="30" title="Turn HD ' + (b.hdOn ? "off" : "on") + '" data-title-on="Turn HD off" data-title-off="Turn HD on" aria-label="HD"> ', a += this.render("icon_hd") || | |
"", a += " </button></div></div> "); | |
b.airplayButton && (a += ' <div class="button-wrapper"><div class="airplay-container hidden" hidden><button class="toggle airplay" tabindex="30" title="Choose an AirPlay device" data-title-off="Choose an AirPlay device" data-title-on="Turn off AirPlay"> ', a += this.render("icon_airplay") || "", a += " </button></div></div> "); | |
b.scalingButton && (a += ' <div class="button-wrapper only-in-fullscreen"><div class="scaling-container"><button class="scaling" tabindex="30" data-full-size="' + | |
b.fullSize + '" data-title-full-size="View actual size" data-title-actual-size="View full size"> ', a += this.render("icon_scaling") || "", a += " </button></div></div> "); | |
a += ' <div class="button-wrapper'; | |
b.fullscreenButton || (a += " only-in-fullscreen"); | |
a += '"><div class="fullscreen-container"><button class="fullscreen" tabindex="30" title="Enter full screen" data-title-fullscreen="Enter full screen" data-title-unfullscreen="Exit full screen" aria-label="Fullscreen"><div class="fullscreen-icon">'; | |
a += this.render("icon_fullscreen") || | |
""; | |
a += '</div><div class="unfullscreen-icon">'; | |
a += this.render("icon_unfullscreen") || ""; | |
a += "</div></button></div></div> "; | |
b.vimeoLogo.show && (a += ' <div class="logo-container"><div class="logo"><div> ', b.vimeoLogo.showLink && (a += ' <a href="' + b.vimeoLogo.url + '"', b.targetBlank && (a += ' target="_blank"'), a += ' tabindex="30" title="Watch on vimeo.com" aria-label="Watch on vimeo.com" data-clip-link> '), a += this.render("logo") || "", b.vimeoLogo.showLink && (a += " </a> "), a += " </div></div></div> "); | |
a += " </div></section> "; | |
b.customLogo && (a += ' <section class="custom-logo-cell', b.customLogo.sticky && (a += " sticky"), a += '"><div class="custom-logo" style="width:' + b.customLogo.width + "px;height:" + b.customLogo.height + 'px"> ', b.customLogo.showLink && (a += '<a href="' + b.customLogo.url + '" target="_blank" tabindex="30">'), a += ' <img src="' + b.customLogo.img + '" alt=""> ', b.customLogo.showLink && (a += "</a>"), a += " </div></section>"); | |
b.fullscreenButton && (a += ' <section class="tiny-fullscreen-cell rounded-box"><button class="fullscreen" tabindex="30" title="Enter full screen" data-title-fullscreen="Enter full screen" data-title-unfullscreen="Exit full screen" aria-label="Fullscreen"><div class="fullscreen-icon">', | |
a += this.render("icon_fullscreen") || "", a += "</div></button></section>"); | |
b.ccButton && (a += ' <section class="tiny-cc-cell rounded-box"><button class="toggle cc off" tabindex="20" title="Choose captions"> ', a += this.render("icon_cc") || "", a += " </button></section>"); | |
return a += ' <div class="mobile-timecode" role="presentation" aria-hidden="true">' + b.duration + "</div>" | |
}; | |
c.templates.error = function (b) { | |
var a = '<div class="window-wrapper error"><h1>' + b.title + "</h1> "; | |
b.message && (a += " <p>" + b.message + "</p> "); | |
return a + | |
"</div>" | |
}; | |
c.templates.hd_not_allowed = function (b) { | |
return '<div class="window-wrapper no-hd"><h1>' + b.title + '</h1><p class="subtitle">' + b.subtitle + '</p><a href="' + b.url + '" target="_blank" role="button" data-clip-link>' + b.button + "</button></div>" | |
}; | |
c.templates.hd_notification = function (b) { | |
return '<div class="hd-notification"><div class="hd-stroke"> ' + b.stroke + ' </div><div class="hd-fill-wrapper"><div class="hd-fill"> ' + b.fill + " </div></div></div>" | |
}; | |
c.templates.help = function (b) { | |
var a = '<div class="window-wrapper help"><h1>Keyboard Shortcuts</h1><dl><div class="volume-up secondary"><dt class="arrow">\u2191</dt><dd>Volume up</dd></div><div class="volume-down secondary"><dt class="arrow">\u2193</dt><dd>Volume down</dd></div><div class="scrub-forward secondary"><dt class="arrow">\u2192</dt><dd>Scrub forward</dd></div><div class="scrub-backwards secondary"><dt class="arrow">\u2190</dt><dd>Scrub backwards</dd></div><div class="like"><dt>L</dt><dd>Like</dd></div><div class="share"><dt>S</dt><dd>Share</dd></div><div class="watch-later"><dt>W</dt><dd>Watch Later</dd></div><div class="toggle-hd"><dt>H</dt><dd>Toggle HD</dd></div><div class="fullscreen"><dt>F</dt><dd>Fullscreen</dd></div> '; | |
b.onSite || (a += '<div class="view-on-vimeo"><dt>V</dt><dd>View on Vimeo</dd></div>'); | |
return a + ' </dl><a href="http://vimeo.com" class="off-site" role="button">View on Vimeo.com</a></div>' | |
}; | |
c.templates.icon_airplay = function (b) { | |
return '<svg class="airplay-icon" viewBox="0 0 44 36"><defs><clipPath id="triangle"><polygon points="-2,-2 -2,36 2,36 22,15 42,36 46,36 46,-2"/></clipPath></defs><rect class="stroke" stroke-width="5" width="44" height="26" x="0" y="2" clip-path="url(#triangle)"/><polygon class="fill" points="7,36 22,18 37,36"/></svg>' | |
}; | |
c.templates.icon_broken_heart = function (b) { | |
return '<svg class="unlike-icon" viewBox="0 0 110 81" preserveAspectRatio="xMidYMid"><path class="fill" d="M82.496 1c-14.594 0-23.198 10.043-25.948 14.48l-6.77 10.727 13.661 8.543-13.661 12.535 5.695 15.348-9.686-15.348 11.389-11.975-11.969-7.402s4.22-14.27 4.621-15.521c.782-2.438.782-2.438-.813-3.289-5.516-2.944-12.608-8.098-21.509-8.098-16.299 0-27.506 15.037-27.506 27.885 0 12.795 12.562 22.558 22.245 27.592 9.186 4.771 30.601 18.349 32.755 24.523 2.154-6.174 23.57-19.752 32.753-24.523 9.684-5.034 22.247-14.797 22.247-27.592 0-12.848-11.208-27.885-27.504-27.885z"/></svg>' | |
}; | |
c.templates.icon_cc = function (b) { | |
return '<svg viewBox="0 0 20 14"><path class="fill" fill-rule="evenodd" clip-rule="evenodd" d="M17 0h-14c-1.657 0-3 1.343-3 3v8c0 1.656 1.343 3 3 3h14c1.657 0 3-1.344 3-3v-8c0-1.657-1.343-3-3-3zm-7.271 8.282c-.145.923-.516 1.686-1.105 2.268-.597.591-1.369.89-2.294.89-1.138 0-2.049-.402-2.706-1.195-.647-.786-.975-1.866-.975-3.215 0-1.458.372-2.603 1.105-3.403.65-.708 1.487-1.067 2.487-1.067 1.33 0 2.321.482 2.947 1.435.34.53.526 1.072.553 1.611l.013.236h-1.984l-.044-.169c-.092-.355-.207-.622-.343-.793-.239-.298-.591-.443-1.076-.443-.483 0-.856.209-1.14.641-.298.455-.449 1.12-.449 1.977 0 .851.156 1.49.466 1.898.298.395.666.588 1.122.588.469 0 .814-.16 1.058-.491.138-.183.255-.472.351-.856l.042-.17h2.013l-.041.258zm7.582 0c-.145.923-.516 1.686-1.104 2.268-.598.591-1.369.89-2.294.89-1.139 0-2.049-.402-2.707-1.195-.646-.785-.975-1.865-.975-3.214 0-1.458.372-2.603 1.106-3.403.649-.708 1.485-1.067 2.486-1.067 1.33 0 2.32.482 2.946 1.435.34.53.526 1.072.554 1.611l.012.236h-1.9829999999999999l-.043-.169c-.092-.355-.208-.623-.344-.793-.238-.298-.591-.443-1.076-.443-.483 0-.856.209-1.139.641-.299.455-.45 1.12-.45 1.977 0 .851.157 1.49.467 1.898.299.395.666.588 1.121.588.469 0 .814-.16 1.058-.491.138-.183.256-.472.352-.856l.042-.17h2.012l-.041.257z"/></svg>' | |
}; | |
c.templates.icon_clock = function (b) { | |
return '<svg class="watch-later-icon" viewBox="0 0 20 20" preserveAspectRatio="xMidYMid"><polyline class="fill hour-hand" points="9.64,4.68 10.56,4.68 11.28,11.21 8.93,11.21 9.64,4.68" /><polyline class="fill minute-hand" points="14.19,13.65 13.7,14.14 8.58,10.4 10.44,8.5 14.19,13.65" /><circle class="stroke" cx="10" cy="10" r="8" stroke-width="2" /></svg>' | |
}; | |
c.templates.icon_fullscreen = function (b) { | |
return '<svg viewBox="0 0 12 12" preserveAspectRatio="xMidYMid"><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6)" /><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6) rotate(90)" /><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6) rotate(180)" /><polyline class="fill" points="6,6 5.9,2 4.9,3 2.9,1 1,2.9 3,4.9 2,5.9" transform="translate(6,6) rotate(270)" /></svg>' | |
}; | |
c.templates.icon_hd = function (b) { | |
var a = '<svg viewBox="', | |
a = b.notification ? a + "-1 -1 104.717 49.035" : a + "0 0 102.717 47.035", | |
a = a + '" preserveAspectRatio="xMidYMid"><path class="', | |
a = b.stroke ? a + "stroke" : a + "fill", | |
a = a + '" d="M100.014 6.758c-1.352-2.162-3.244-3.781-5.676-5.134-2.434-1.083-5.947-1.624-10.274-1.624h-21.625l-7.297 47.035h21.895c2.434 0 5.676-.274 8.92-1.352 2.434-.542 4.596-1.627 7.03-3.785 2.161-1.621 4.324-4.055 5.675-7.028 1.621-2.701 2.973-6.757 3.786-11.623.269-3.244.269-6.487.269-9.19-.54-2.704-1.352-5.138-2.703-7.299zm-12.433 16.76c-.541 3.783-1.352 6.485-2.165 8.109-1.08 1.893-2.162 2.703-3.782 3.514-1.083.541-3.515 1.082-6.217 1.082h-3.517l3.517-25.41h3.782c3.514 0 6.217.811 7.568 2.703 1.083 1.625 1.352 5.135.814 10.002z"/><path class="', | |
a = b.stroke ? a + "stroke" : a + "fill"; | |
return a + '" d="M37.572,0L35.14,16.491H19.463L21.895,0H7.027L0,47.035h14.866l2.703-18.922h15.677l-2.971,18.922h14.866L52.439,0H37.572z"/></svg>' | |
}; | |
c.templates.icon_heart = function (b) { | |
return '<svg class="like-icon" viewBox="0 0 110 81" preserveAspectRatio="xMidYMid"><path class="fill" d="M82.496 1c-14.698 0-25.969 11.785-27.496 13.457-1.526-1.672-12.798-13.457-27.494-13.457-16.299 0-27.506 15.037-27.506 27.885 0 12.795 12.562 22.558 22.245 27.592 9.186 4.771 30.601 18.349 32.755 24.523 2.154-6.174 23.57-19.752 32.755-24.523 9.684-5.034 22.245-14.797 22.245-27.592 0-12.848-11.206-27.885-27.504-27.885z"/></svg>' | |
}; | |
c.templates.icon_lock = function (b) { | |
return '<svg viewBox="0 0 46 76" preserveAspectRatio="xMidYMid"><path class="fill bolt" d="M5,42v-15C8,5 39,5 42,27v30h-7v-30C32,14 15,14 12,27v15z"/><rect class="fill" x="0" y="41" height="35" width="46" rx="4" ry="4"/></svg>' | |
}; | |
c.templates.icon_pause = function (b) { | |
return '<svg viewBox="0 0 20 20" preserveAspectRatio="xMidYMid"><rect class="fill" width="6" height="20" x="0" y="0" /><rect class="fill" width="6" height="20" x="12" y="0" /></svg>' | |
}; | |
c.templates.icon_play = | |
function (b) { | |
return '<svg viewBox="0 0 20 20" preserveAspectRatio="xMidYMid"><polygon class="fill" points="1,0 20,10 1,20" /></svg>' | |
}; | |
c.templates.icon_scaling = function (b) { | |
return '<svg viewBox="0 0 14 12" preserveAspectRatio="xMidYMid"><rect class="fill" y="6" width="8" height="6"/><polygon class="fill stroked" points="1,0 1,4 3,4 3,2 12,2 12,8 10,8 10,10 14,10 14,0"/><polygon class="fill filled" points="1,0 1,4 10,4 10,10 14,10 14,0"/></svg>' | |
}; | |
c.templates.icon_share = function (b) { | |
return '<svg class="share-icon" viewBox="0 0 20 20" preserveAspectRatio="xMidYMid"><polygon class="fill" points="20,0 0,12 5,15 17,4 7,16 7,19 9,17 14,20"/></svg>' | |
}; | |
c.templates.icon_unfullscreen = function (b) { | |
return '<svg viewBox="0 0 12 12" preserveAspectRatio="xMidYMid"><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) "/><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) rotate(90)" /><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) rotate(180)" /><polyline class="fill" points="-1,-1 -1.1,-5 -2.1,-4 -4.1,-6 -6,-4.1 -4,-2.1 -5,-1.1" transform="translate(6,6) rotate(270)" /></svg>' | |
}; | |
c.templates.icon_vod = function (b) { | |
return '<svg class="vod-icon" viewBox="0 0 21 23"><path class="fill" d="M19.602,4.716l-7.665-4.385C11.169-0.108,9.91-0.111,9.139,0.327L1.4,4.721C0.63,5.158,0,6.234,0,7.112v8.776c0,0.878,0.63,1.955,1.398,2.393l0.526,0.3l7.176,4.09c0.77,0.438,2.028,0.438,2.798,0l7.702-4.39c0.77-0.438,1.4-1.516,1.4-2.393V7.112C21,6.234,20.37,5.156,19.602,4.716z M7.336,15.761L7.337,7.24l8.008,4.26L7.336,15.761z"/></svg>' | |
}; | |
c.templates.logo = function (b) { | |
return '<svg viewBox="0 0 140 40" preserveAspectRatio="xMidYMid" role="img" aria-label="Vimeo"><title>Vimeo</title><g><path class="fill logo-v" d="M31.277 18.832c-.14 3.052-2.27 7.229-6.39 12.531-4.259 5.536-7.863 8.306-10.811 8.306-1.825 0-3.371-1.687-4.633-5.059l-2.529-9.275c-.938-3.372-1.943-5.06-3.019-5.06-.234 0-1.054.494-2.458 1.477l-1.474-1.901c1.546-1.358 3.071-2.717 4.572-4.078 2.062-1.783 3.609-2.72 4.642-2.814 2.438-.234 3.938 1.433 4.502 5.001.608 3.851 1.03 6.246 1.266 7.182.704 3.195 1.476 4.791 2.321 4.791.657 0 1.641-1.037 2.954-3.108 1.312-2.072 2.015-3.649 2.109-4.732.188-1.789-.516-2.686-2.109-2.686-.75 0-1.522.173-2.318.514 1.54-5.044 4.481-7.495 8.823-7.355 3.22.095 4.737 2.184 4.552 6.266z"/><path class="fill logo-i" d="M50.613 28.713c-1.313 2.484-3.119 4.733-5.417 6.748-3.143 2.718-6.285 4.076-9.425 4.076-1.456 0-2.57-.469-3.343-1.406-.773-.938-1.137-2.153-1.09-3.653.045-1.548.526-3.938 1.441-7.173.914-3.232 1.373-4.967 1.373-5.201 0-1.218-.423-1.828-1.266-1.828-.282 0-1.079.494-2.393 1.477l-1.618-1.901c1.501-1.358 3.001-2.717 4.502-4.078 2.017-1.783 3.518-2.72 4.504-2.814 1.546-.14 2.684.314 3.411 1.367.726 1.052.996 2.417.81 4.098-.61 2.852-1.268 6.472-1.972 10.864-.046 2.01.681 3.014 2.182 3.014.656 0 1.827-.693 3.518-2.083 1.406-1.156 2.555-2.243 3.447-3.262l1.336 1.755zm-6.12-25.016c-.047 1.168-.633 2.288-1.76 3.361-1.266 1.212-2.767 1.82-4.501 1.82-2.672 0-3.963-1.166-3.869-3.499.045-1.213.76-2.381 2.144-3.501 1.384-1.119 2.919-1.68 4.609-1.68.984 0 1.805.387 2.462 1.155.656.772.961 1.553.915 2.344z"/><path class="fill logo-m" d="M94.543 28.713c-1.314 2.484-3.117 4.733-5.416 6.748-3.145 2.718-6.285 4.076-9.426 4.076-3.051 0-4.527-1.687-4.432-5.06.045-1.501.338-3.306.877-5.415.539-2.108.832-3.748.879-4.921.049-1.779-.492-2.673-1.623-2.673-1.223 0-2.682 1.456-4.375 4.362-1.788 3.05-2.754 6.003-2.894 8.861-.095 2.02.103 3.568.592 4.645-3.272.096-5.565-.444-6.873-1.617-1.171-1.032-1.708-2.742-1.614-5.135.045-1.501.276-3.001.69-4.502.414-1.5.644-2.837.69-4.011.095-1.734-.54-2.604-1.9-2.604-1.177 0-2.444 1.339-3.806 4.011-1.361 2.673-2.113 5.465-2.253 8.371-.094 2.627.074 4.456.503 5.486-3.219.096-5.505-.582-6.857-2.035-1.122-1.214-1.634-3.06-1.539-5.54.044-1.214.258-2.911.645-5.084.386-2.175.603-3.87.647-5.087.093-.841-.119-1.263-.633-1.263-.281 0-1.079.475-2.393 1.424l-1.687-1.901c.234-.184 1.71-1.545 4.432-4.078 1.969-1.828 3.306-2.766 4.009-2.812 1.219-.095 2.204.409 2.954 1.511s1.126 2.38 1.126 3.834c0 .469-.047.915-.14 1.336.703-1.077 1.523-2.017 2.463-2.814 2.156-1.874 4.572-2.931 7.245-3.166 2.298-.187 3.938.352 4.925 1.617.795 1.033 1.17 2.511 1.125 4.433.329-.28.681-.586 1.056-.915 1.078-1.267 2.133-2.273 3.164-3.023 1.736-1.267 3.541-1.97 5.418-2.112 2.25-.187 3.867.35 4.852 1.611.844 1.028 1.219 2.5 1.127 4.415-.047 1.309-.363 3.213-.949 5.712-.588 2.501-.879 3.936-.879 4.31-.049.982.047 1.659.279 2.034.236.373.797.559 1.689.559.656 0 1.826-.693 3.518-2.083 1.406-1.156 2.555-2.243 3.447-3.262l1.337 1.757z"/><path class="fill logo-e" d="M120.922 28.642c-1.361 2.249-4.033 4.495-8.02 6.743-4.971 2.856-10.012 4.284-15.125 4.284-3.797 0-6.52-1.267-8.16-3.797-1.172-1.735-1.734-3.797-1.688-6.189.045-3.797 1.736-7.407 5.064-10.832 3.658-3.75 7.973-5.627 12.945-5.627 4.596 0 7.033 1.873 7.314 5.615.188 2.384-1.125 4.842-3.938 7.368-3.004 2.76-6.781 4.515-11.328 5.263.842 1.169 2.109 1.752 3.799 1.752 3.375 0 7.059-.855 11.045-2.574 2.859-1.207 5.111-2.461 6.754-3.76l1.338 1.754zm-15.969-7.345c.045-1.259-.469-1.89-1.547-1.89-1.406 0-2.83.969-4.283 2.906-1.451 1.936-2.201 3.789-2.248 5.562-.025 0-.025.305 0 .911 2.295-.839 4.287-2.122 5.971-3.849 1.357-1.491 2.06-2.707 2.107-3.64z"/><path class="fill logo-o" d="M140.018 23.926c-.189 4.31-1.781 8.031-4.783 11.169-3.002 3.137-6.73 4.706-11.186 4.706-3.705 0-6.52-1.195-8.441-3.585-1.404-1.777-2.182-4.001-2.32-6.668-.236-4.029 1.217-7.729 4.361-11.101 3.377-3.746 7.619-5.618 12.732-5.618 3.281 0 5.766 1.102 7.457 3.301 1.594 2.015 2.32 4.614 2.18 7.796zm-7.95-.264c.047-1.269-.129-2.434-.527-3.49-.4-1.057-.975-1.587-1.725-1.587-2.391 0-4.361 1.293-5.906 3.877-1.316 2.115-2.02 4.371-2.111 6.766-.049 1.176.164 2.21.633 3.104.514 1.032 1.242 1.549 2.182 1.549 2.109 0 3.914-1.244 5.416-3.735 1.267-2.068 1.945-4.23 2.038-6.484z"/></g></svg>' | |
}; | |
c.templates.outer = function (b) { | |
var a = '<div class="video-wrapper"><div class="video"><div class="flideo"></div></div></div><div class="target"></div><div class="captions with-controls hidden" hidden aria-live="assertive"><span></span></div><div class="outro-wrapper hidden" hidden><div class="outro-inner"><div class="outro" role="dialog" aria-live="assertive"></div></div></div><div class="controls-wrapper"><div class="title" role="contentinfo"></div><div class="sidedock'; | |
b.hideSidedock && (a += " hidden"); | |
a += '" role="toolbar"'; | |
b.hideSidedock && (a += " hidden"); | |
return a + '></div><div class="controls"></div></div><div class="overlay-wrapper hidden" hidden><div class="overlay-cell"><div class="overlay" role="dialog" aria-live="assertive"></div><div class="overlay-icon-wrapper hidden"><div class="overlay-icon"></div></div><div class="overlay-logo logo"></div></div><nav><button tabindex="100" class="back cloaked" aria-label="Back"></a><button tabindex="101" class="close" aria-label="Close overlay"></button></nav></div><div class="notification-wrapper hidden" hidden><div class="notification-cell"><div class="notification" role="dialog" aria-live="assertive"></div></div></div>' | |
}; | |
c.templates.outro_link = function (b) { | |
return '<h1><a href="' + b.url + '" target="_blank" tabindex="100">' + (b.text ? b.text : b.url) + "</a></h1>" | |
}; | |
c.templates.outro_text = function (b) { | |
return '<div class="text-wrapper"><div class="text">' + b.text + "</div></div>" | |
}; | |
c.templates.outro_videos = function (b) { | |
for (var a = "<h1>" + b.context + '</h1><ul class="videos"> ', c = 0, d = b.videos.length; c < d; c++) a += ' <li><a href="' + b.videos[c].url + '" target="_blank" title="\'' + b.videos[c].title + "'", b.videos[c].owner.id !== b.owner && (a += " from " + b.videos[c].owner.name + | |
""), a += '" tabindex="1"><div class="img-wrapper"><img src="' + b.videos[c].thumbnail + '" alt="" width="295" height="166"></div><div class="header-wrapper"><header><h1>' + b.videos[c].title + "</h1> ", b.videos[c].owner.id !== b.owner && (a += " <h2><span>from</span> " + b.videos[c].owner.name + "</h2> "), a += " </header></div></a> "; | |
return a + "</ul>" | |
}; | |
c.templates.outro_vod = function (b) { | |
var a = '<h1 class="vod-header"><a href="' + b.url + '" target="_blank">' + b.title + "</a></h1>"; | |
if (b.purchased) a += ' <a class="vod-watch-button" role="button" href="' + | |
b.url + '" target="_blank">', a = b.preorder ? a + ("Watch on " + b.preorder + "") : a + "Watch Now", a += "</a>"; | |
else { | |
for (var a = a + ' <ul class="vod"> ', c = 0, d = b.buttons.length; c < d; c++) a += ' <li><a class="vod-button ' + b.buttons[c].type + '" role="button" href="' + b.url + "#buy=" + b.buttons[c].product_id + '" target="_blank" data-product-id="' + b.buttons[c].product_id + '"><span class="icon"> ', a = "buy" === b.buttons[c].type ? a + "" : a + "", a += ' </span><span class="price"> ' + b.buttons[c].price + ' <span class="type">' + b.buttons[c].type.substr(0, | |
1).toUpperCase() + b.buttons[c].type.substr(1) + "</span></span></a></li> "; | |
a += " </ul> "; | |
b.preorder && (a += " <p>Preorder now. Watch on " + b.preorder + ".</p> "); | |
a += "" | |
} | |
return a + "" | |
}; | |
c.templates.password = function (b) { | |
return '<div class="window-wrapper password form"><h1>' + b.title + '</h1><p class="subtitle">' + b.subtitle + '</p><form action="' + b.action + '" method="post" novalidate><div class="validation-bubble hidden"><div class="validation-bubble-arrow-clipper"><div class="validation-bubble-arrow"></div></div><div class="validation-bubble-message"></div></div><input type="password" name="password" placeholder="Password" required aria-required="true" tabindex="2" aria-label="Password"><input type="submit" value="Watch Video" tabindex="3"></form></div>' | |
}; | |
c.templates.private_locked = function (b) { | |
return '<div class="window-wrapper login"><h1>' + b.title + '</h1><p class="subtitle">' + b.subtitle + '</p><a href="' + b.action + '" class="popup" target="_blank" role="button" aria-label="Log in (opens in a new window)">Log in</a></div>' | |
}; | |
c.templates.private_unlocked = function (b) { | |
return '<div class="window-wrapper form unlocked"><h1>Private Video</h1><p class="subtitle">You are logged in and have permission to watch (congrats).</p><button>Watch Video</button></div>' | |
}; | |
c.templates.share = | |
function (b) { | |
var a = '<div class="share-wrapper"><section class="share-screen' + (b.embedOnly ? " cloaked" : "") + '"><h1>Share</h1><ul class="buttons"><li><a tabindex="1" href="' + b.playerShareUrl + '/facebook" target="_blank" class="facebook" title="Share on Facebook" role="button" aria-label="Share on Facebook"></a><li><a tabindex="1" href="' + b.playerShareUrl + '/twitter" target="_blank" class="twitter" title="Share on Twitter" role="button" aria-label="Share on Twitter"></a> '; | |
b.tumblr && (a += ' <li><a tabindex="1" href="' + | |
b.playerShareUrl + '/tumblr" target="_blank" class="tumblr" title="Share on Tumblr" role="button" aria-label="Share on Tumblr"></a> '); | |
b.url && (a = a + ' <li><a tabindex="1" href="mailto:?subject=' + (encodeURIComponent("Check out \u201c" + b.title + "\u201d by " + b.owner + " on Vimeo") || ""), a += "&body=", a += encodeURIComponent("Check out \u201c" + b.title + "\u201d by " + b.owner + " on Vimeo.\n\nThe video is available for your viewing pleasure at " + b.shareUrl + "\n\nIf you like this video, make sure you share it, too!\n\nVimeo is filled with lots of amazing videos. See more at http://vimeo.com.") || | |
"", a += '" class="email" title="Share via E-mail" role="button" aria-label="Share via E-Mail"></a> '); | |
a += " </ul> "; | |
b.embed && (a += ' <ul class="buttons"><li><a tabindex="1" href="' + b.url + '#share" target="_blank" class="embed" title="Get embed code" role="button" aria-label="Get embed code"></a></li></ul> '); | |
b.url && (a += ' <p class="footnote share"><a class="clip_url" tabindex="1" href="' + b.url + '" target="_blank">' + b.shareUrl + "</a></p> "); | |
a += " </section> "; | |
b.embed && (a += ' <section class="embed-screen' + | |
(b.embedOnly ? "" : " cloaked") + '"><div class="embed-wrapper"><h1>Embed</h1><p class="subtitle">Add this video to your site with the embed code below.</p><div class="embed-code form"><div><input type="text" tabindex="1" name="embed_code" title="Embed code" value="' + b.embedCode + '" spellcheck="false" aria-readonly="true"', b.readOnly && (a += " readonly"), a += "></div> ", b.copyButton && (a += ' <button class="embed-copy" tabindex="1" id="copy-button" data-clipboard-text=\'' + b.embedCode + "'>Copy</button> "), a += " </div> ", | |
b.customizeEmbed && (a += ' <p class="footnote"><a tabindex="1" href="' + b.url + '#embed" target="_blank">Customize this embed</a> on Vimeo</p> '), a += " </div></section> "); | |
return a += "</div>" | |
}; | |
c.templates.sidedock = function (b) { | |
var a = ""; | |
b.vodButton && (a += ' <div class="box" data-vod-preorder="' + b.vodPreorder + '" data-vod-expiring="' + b.expiring + '" data-vod-purchased="' + b.purchased + '"><label class="rounded-box vod-label visible', b.expiring && (a += " expiring"), a += '" role="presentation"><span>' + b.vodLabel + '</span></label><button tabindex="50" class="vod-button rounded-box', | |
b.purchased && (a += " on"), a = a + '"> ' + (this.render("icon_vod") || ""), a += " </button></div>"); | |
b.likeButton && (a += ' <div class="box"><label class="rounded-box hidden like-label" role="presentation"><span>', a = b.liked ? a + "Unlike" : a + "Like", a += '</span></label><button tabindex="50" class="like-button rounded-box', b.liked && (a += " on"), a += '" aria-label="', a = b.liked ? a + "Unlike" : a + "Like", b.loggedIn || (a += " (opens in a new window)"), a += '" data-label-add="Like" data-label-add-logged-out="Like (opens in a new window)" data-label-remove="Unlike"> ', | |
a += this.render("icon_heart") || "", a += " </button></div>"); | |
b.watchLaterButton && (a += ' <div class="box"><label class="rounded-box hidden watch-later-label" role="presentation"><span>', a = b.addedToWatchLater ? a + "Remove from" : a + "Add to", a += ' Watch Later</span></label><button tabindex="50" class="watch-later-button rounded-box', b.addedToWatchLater && (a += " on"), a += '" aria-label="', a = b.addedToWatchLater ? a + "Remove from" : a + "Add to", a += " Watch Later", b.loggedIn || (a += " (opens in a new window)"), a += '" data-label-add="Add to Watch Later" data-label-add-logged-out="Add to Watch Later (opens in a new window)" data-label-remove="Remove from Watch Later"> ', | |
a += this.render("icon_clock") || "", a += " </button></div>"); | |
b.shareButton && (a += ' <div class="box"><label class="rounded-box hidden share-label" role="presentation"><span>' + b.shareButtonLabel + '</span></label><button tabindex="50" class="share-button rounded-box" aria-label="' + b.shareButtonLabel + '"> ', a += this.render("icon_share") || "", a += " </button></div>"); | |
return a += "" | |
}; | |
c.templates.title = function (b) { | |
var a = "<header> "; | |
b.badge && (a += ' <div class="badge"><a tabindex="10" href="' + b.badge.link + '"', b.targetBlank && | |
(a += ' target="_blank"'), a += '><img src="' + b.badge.img + '"', b.badge.offset && (a += ' style="margin-top:' + b.badge.offset.y + "px;margin-left:" + b.badge.offset.x + 'px"'), a += ' width="' + b.badge.width + '" height="' + b.badge.height + '" alt="' + b.badge.name + ' Badge"></a></div> '); | |
b.showPortrait && (a += ' <div class="portrait" aria-hidden="true"> ', b.linkToOwner && (a += '<a tabindex="-1" href="' + b.ownerLink + '"', b.targetBlank && (a += ' target="_blank"'), a += ">"), a += ' <img src="' + b.portraitImg + '" alt="Portrait image for ' + b.owner + | |
'" width="60" height="60"> ', b.linkToOwner && (a += "</a>"), a += " </div> "); | |
a += " <div> "; | |
b.showTitle && (a += " <h1> ", b.showTitleLink && (a += '<a tabindex="10" href="' + b.titleLink + '"', b.targetBlank && (a += ' target="_blank"'), a += " data-clip-link>"), a += " " + b.title + " ", b.showTitleLink && (a += "</a>"), a += " </h1> "); | |
b.showByline && (a += " <h2> from ", b.linkToOwner ? (a += '<a tabindex="10" href="' + b.ownerLink + '"', b.targetBlank && (a += ' target="_blank"'), a += ">") : a += '<span class="user">', a += "" + b.owner + "", a = b.linkToOwner ? a + "</a>" : | |
a + "</span>", b.bylineBadge && (a += " ", b.bylineBadge.link && (a += '<a tabindex="-1" href="' + b.bylineBadge.link + '"', b.targetBlank && (a += ' target="_blank"'), a += ">"), a += ' <span class="byline-badge ' + b.bylineBadge.cssClass + '">' + b.bylineBadge.cssClass + "</span> ", b.bylineBadge.link && (a += "</a>")), a += " </h2> "); | |
return a + " </div></header>" | |
}; | |
"undefined" !== typeof module && module.exports ? module.exports = c : s.Aftershave = c | |
})(); | |
ra = 1; | |
va = 2; | |
ca = 3; | |
wa = 4; | |
Za = 9; | |
Ua = { | |
will: "willLikeVideo", | |
did: "didLikeVideo" | |
}; | |
Va = { | |
will: "willUnlikeVideo", | |
did: "didUnlikeVideo" | |
}; | |
Wa = { | |
will: "willAddToWatchLater", | |
did: "didAddToWatchLater" | |
}; | |
Xa = { | |
will: "willRemoveFromWatchLater", | |
did: "didRemoveFromWatchLater" | |
}; | |
Ya = { | |
will: "willOpenVodPurchaseForm", | |
did: "didOpenVodPurchaseForm" | |
}; | |
Ia = { | |
will: "willOpenShareOverlay", | |
did: "didOpenShareOverlay" | |
}; | |
Da = { | |
will: "willOpenLoginForm", | |
did: "didOpenLoginForm" | |
}; | |
Ba = 1; | |
ua = 2; | |
aa = 3; | |
ja = 5; | |
qa = 6; | |
na = 7; | |
Ca = 10; | |
fa = 11; | |
Ga = 12; | |
Pa = 14; | |
Ra = 15; | |
Sa = 16; | |
Na = 17; | |
Oa = 18; | |
Ha = 19; | |
var d = { | |
error: 49, | |
playInitiated: 50, | |
paused: 51, | |
played: 52, | |
loadProgress: 53, | |
playProgress: 54, | |
seeked: 55, | |
ended: 56, | |
bufferStarted: 57, | |
bufferEnded: 58, | |
volumeChanged: 59, | |
qualityChanged: 60, | |
targetTimeReached: 61, | |
cueChanged: 62, | |
fullscreenButtonClicked: 100, | |
pauseButtonClicked: 101, | |
playButtonClicked: 102, | |
hdButtonClicked: 103, | |
ccButtonClicked: 104, | |
scrubbingStarted: 105, | |
scrubbingEnded: 106, | |
volumeScrubbingStarted: 107, | |
volumeScrubbingEnded: 108, | |
controlBarVisibilityChanged: 109, | |
sidedockVisibilityChanged: 110, | |
menuVisibilityChanged: 111, | |
captionsChanged: 112, | |
willEnterFullscreen: 150, | |
didEnterFullscreen: 151, | |
willExitFullscreen: 152, | |
didExitFullscreen: 153, | |
likeButtonClicked: 200, | |
watchLaterButtonClicked: 201, | |
shareButtonClicked: 202, | |
embedButtonClicked: 203, | |
scalingButtonClicked: 204, | |
vodButtonPressed: 205, | |
overlayOpened: 250, | |
overlayClosed: 251, | |
overlayCleared: 252, | |
overlayCloseButtonClicked: 253, | |
facebookButtonClicked: 254, | |
twitterButtonClicked: 255, | |
tumblrButtonClicked: 256, | |
emailButtonClicked: 257, | |
embedCodeCopied: 258, | |
popupOpened: 259, | |
mousedOut: 300, | |
mousedOver: 301, | |
mouseTimeout: 302, | |
liked: 303, | |
unliked: 304, | |
addedToWatchLater: 305, | |
removedFromWatchLater: 306, | |
userLogIn: 307, | |
userLoggedIn: 308, | |
userLoggedOut: 309, | |
loginFailure: 310, | |
colorChanged: 311, | |
configChanged: 312, | |
passwordUnlocked: 313, | |
privateUnlocked: 314, | |
enteredTinyMode: 315, | |
enteredMiniMode: 320, | |
enteredNormalMode: 316, | |
signatureExpired: 317, | |
requestConfigReloaded: 318, | |
embedSettingChanged: 319, | |
titleModuleReady: 350, | |
sidedockModuleReady: 351, | |
controlBarModuleReady: 352, | |
videoModuleReady: 353, | |
overlayModuleReady: 354, | |
notificationModuleReady: 355, | |
statsModuleReady: 356, | |
apiModuleReady: 357, | |
analyticsModuleReady: 358, | |
ready: 359, | |
notificationHidden: 400, | |
airPlayAvailable: 500, | |
airPlayNotAvailable: 501, | |
airPlayActivated: 502, | |
airPlayDeactivated: 503, | |
airPlayButtonPressed: 504 | |
}, | |
ab = function () { | |
return function (c, b, a, e) { | |
function g(a) { | |
if (a && 0 < a.clientX && 0 < a.clientY) try { | |
w.activeElement.blur() | |
} catch (b) {} | |
} | |
function l(a) { | |
a && (f.config = a, f.storageModule.reset(f.config), k.fire(fa, f.config.embed.color), k.fire(d.configChanged, f.config)); | |
f.videoModule || f.config.view === wa || f.config.view === va ? K.style.backgroundImage = "none" : (x(f.config.video.thumbs), f.videoModule = new $a(f.config, k, aa)) | |
} | |
function n() { | |
switch (f.config.view) { | |
case wa: | |
0; | |
O = ["password"]; | |
L = !0; | |
r(); | |
break; | |
case va: | |
0; | |
M = !0; | |
O = f.config.user.logged_in ? ["error", { | |
title: "Private Video", | |
message: "Sorry, you don’t have permission to watch.", | |
modal: !0, | |
logo: !!f.config.embed.settings.branding, | |
icon: "lock" | |
}] : ["private-locked"]; | |
L = !0; | |
r(); | |
return; | |
case ca: | |
0; | |
0; | |
l(); | |
f.config.embed.autoplay || M || (O = ["private-unlocked"]); | |
r(); | |
break; | |
case Za: | |
K.classList.add("invisible"), k.fire(ja, "content-rating"), k.once(d.overlayClosed, function () { | |
K.classList.remove("invisible") | |
}) | |
} | |
M = null | |
} | |
function r() { | |
L && V && S && | |
(O ? (O.unshift(ja), k.fire.apply(null, O), O = null, s.requestAnimationFrame(function () { | |
f.element.classList.remove("loading") | |
})) : f.element.classList.remove("loading")) | |
} | |
function p(a, b) { | |
0; | |
var c = (new Date).getTime(), | |
d = f.config && f.config.video.id, | |
e = f.config && f.config.request.session, | |
h = f.config && f.config.request.referrer, | |
u = a; | |
isNaN(a) || (u = (f.config ? "//" + f.config.player_url : "") + "/video/" + a + "/config" + s.location.search); | |
var g = new XMLHttpRequest; | |
g.open("GET", u, !0); | |
g.withCredentials = !0; | |
g.onload = function () { | |
f.config = | |
JSON.parse(g.responseText); | |
Z = (new Date).getTime() + 1E3 * f.config.request.expires; | |
f.config.video.id === d && (f.config.request.session = e); | |
h && (f.config.request.referrer = h); | |
var a = (new Date).getTime() - c; | |
s._gaq && s._gaq.push(["player._trackTiming", "Player", "Config Load", a]); | |
0; | |
f.storageModule && f.storageModule.reset(f.config); | |
k.fire(fa, f.config.embed.color); | |
n(); | |
f.config.embed.on_site || (w.title = f.config.view === ra || f.config.view === ca ? f.config.video.title + " from " + f.config.video.owner.name + " on Vimeo" : "Private Video on Vimeo"); | |
b.call(g) | |
}; | |
g.send() | |
} | |
function v(a) { | |
0; | |
var b = (new Date).getTime(), | |
c = f.config && f.config.request.referrer, | |
d = new XMLHttpRequest; | |
d.open("GET", "//" + f.config.player_url + "/video/" + f.config.video.id + "/config/request?session=" + f.config.request.session + "&signature=" + f.config.request.signature + "&time=" + f.config.request.timestamp + "&expires=" + f.config.request.expires, !0); | |
d.withCredentials = !0; | |
d.onload = function () { | |
f.config.request = JSON.parse(d.responseText); | |
c && (f.config.request.referrer = c); | |
Z = (new Date).getTime() + 1E3 * | |
f.config.request.expires; | |
0; | |
var e = (new Date).getTime() - b; | |
s._gaq && s._gaq.push(["player._trackTiming", "Player", "Config.Request Load", e]); | |
0; | |
a.call(d) | |
}; | |
d.send() | |
} | |
function B(a, b) { | |
f.element.classList.add("loading"); | |
S = L = T = !1; | |
p(a, function () { | |
0; | |
k.fire(fa, f.config.embed.color); | |
history && history.replaceState && history.replaceState({ | |
id: f.config.video.id | |
}, "", "/video/" + f.config.video.id); | |
k.fire(d.configChanged, f.config, !0); | |
k.fire(na, !0); | |
S = !0; | |
D(); | |
s.requestAnimationFrame(r); | |
b && b() | |
}) | |
} | |
function x(a) { | |
if (0 !== f.element.clientWidth) { | |
var b = | |
f.element.clientWidth * t.devicePixelRatio, | |
c = a["640"]; | |
900 <= b && a["960"] && (c = a["960"]); | |
1E3 <= b && a["1280"] && (c = a["1280"]); | |
K.setAttribute("data-thumb", c); | |
T = !0; | |
f.config.embed.autoplay && "beginning" !== f.config.embed.outro ? h() : (a = new Image, a.src = c, f.config.embed.autoplay ? h() : (a.onload = function () { | |
"none" !== K.style.backgroundImage && (K.style.backgroundImage = "url(" + c + ")"); | |
h() | |
}, a.onerror = h, setTimeout(h, 2E3))) | |
} | |
} | |
function h() { | |
L = !0; | |
r() | |
} | |
function A() { | |
var a = f.element.clientWidth, | |
b = f.element.clientHeight, | |
c = f.config.video.width / | |
f.config.video.height, | |
d = a - b * c, | |
e = b - a / c, | |
c = K.querySelector(".flideo"); | |
0 < d && 10 > d || 0 < e && 10 > e ? (0, a = Math.max(a / (a - d), b / (b - e)), K.classList.add("cover"), c.style.webkitTransform = "scale(" + a + ")", c.style.transform = "scale(" + a + ")") : (K.classList.remove("cover"), c.style.webkitTransform = "", c.style.transform = "") | |
} | |
function E(a, b, c) { | |
if (e && e[a.will] && !1 === e[a.will].apply(null, [f.config.video.id].concat(c))) 0; | |
else if (b.apply(null, [f.config.video.id].concat(c)), e && e[a.did]) e[a.did]() | |
} | |
function F() { | |
f.config.view === ra && f.config.embed.settings && | |
!f.config.embed.settings.playbar ? f.element.classList.add("no-playbar") : f.element.classList.remove("no-playbar"); | |
f.config.embed.settings.fullscreen ? f.element.classList.add("with-fullscreen") : f.element.classList.remove("with-fullscreen"); | |
f.config.embed.settings.custom_logo ? f.element.classList.add("with-custom-logo") : f.element.classList.remove("with-custom-logo") | |
} | |
function D() { | |
f.config.video.thumbs && x(f.config.video.thumbs); | |
k.on([d.playInitiated, d.playButtonClicked], function () { | |
K.style.backgroundImage = | |
"none" | |
}); | |
A(); | |
Gator(s).on("resize", A); | |
k.on(d.didEnterFullscreen, function () { | |
"none" !== K.style.backgroundImage && x(f.config.video.thumbs) | |
}); | |
Gator(s).on("resize", function () { | |
T || x(f.config.video.thumbs) | |
}) | |
} | |
function z() { | |
f.apiModule = new bb(f.config, k); | |
Object.keys(f.apiModule).forEach(function (a) { | |
if ("function" === typeof f.apiModule[a]) Object.defineProperty(Q, a, { | |
enumerable: !0, | |
value: f.apiModule[a] | |
}); | |
else { | |
var b = { | |
enumerable: !0, | |
get: f.apiModule[a].get | |
}; | |
f.apiModule[a].set && (b.set = f.apiModule[a].set); | |
Object.defineProperty(Q, | |
a, b) | |
} | |
}); | |
f.colorModule = new cb(f.config, k, f.uuid, f.element.id, Y); | |
f.overlayModule = new db(f.config, k, Fa); | |
f.statsModule = new eb(f.config, k); | |
f.analyticsModule = new fb(f.config, k); | |
f.controlsModule = new gb(f.config, k, f.element); | |
f.titleModule = new hb(f.config, k, ea); | |
f.controlBarModule = new ib(f.config, k, oa); | |
f.sidedockModule = new jb(f.config, k, ha); | |
f.notificationModule = new kb(f.config, k, La); | |
f.outroModule = new lb(f.config, k, ba); | |
f.popupModule = new mb(f.config, k); | |
f.captionsModule = new nb(f.config, k, U, f.element); | |
f.keyboardModule = | |
new ob(f.config, k, f.element); | |
Object.defineProperties(Q, { | |
pauseKeyboard: { | |
enumerable: !0, | |
value: f.keyboardModule.pause | |
}, | |
unpauseKeyboard: { | |
enumerable: !0, | |
value: f.keyboardModule.unpause | |
} | |
}); | |
f.config.view !== wa && f.config.view !== va && (f.videoModule = new $a(f.config, k, aa)); | |
S = !0; | |
r() | |
} | |
function H() { | |
f.config.embed.fullscreen = !0; | |
if (!BigScreen.enabled || t.browser.bb10) f.element.classList.add("no-fullscreen-api-support"), BigScreen.videoEnabled(f.element) || (f.element.classList.add("no-fullscreen-support"), f.config.embed.fullscreen = !1); | |
var a = !1, | |
b = !1; | |
k.on(Sa, function () { | |
BigScreen.enabled || BigScreen.videoEnabled(f.element) ? (k.fire(d.willEnterFullscreen), b = !1, BigScreen.request(f.element)) : k.fire(Ha, !0) | |
}); | |
k.on(d.fullscreenButtonClicked, function () { | |
BigScreen.element ? (k.fire(d.willExitFullscreen), BigScreen.exit()) : (k.fire(d.willEnterFullscreen), b = !0, BigScreen.request(f.element)) | |
}); | |
var c = BigScreen.onenter, | |
e = BigScreen.onexit; | |
BigScreen.onenter = function (e) { | |
a || (f.element.contains(e) ? a || (a = !0, k.fire(d.didEnterFullscreen, f.element === e, b)) : | |
"function" === typeof c && c(e)) | |
}; | |
BigScreen.onexit = function () { | |
a ? a && (a = !1, k.fire(d.didExitFullscreen, b), b || k.fire(Ha, !1), b = !1) : "function" === typeof e && c() | |
}; | |
Gator(f.element).on("click", "a", function (a) { | |
BigScreen.element === f.element && BigScreen.exit() | |
}); | |
Gator(f.element).on("gestureend", function (a) { | |
1 < a.scale && k.fire(d.fullscreenButtonClicked) | |
}); | |
if ("undefined" !== typeof MSGesture) { | |
var h = 1, | |
u = new MSGesture; | |
u.target = f.element; | |
Gator(f.element).on("pointerdown", function (a) { | |
u.addPointer(a.pointerId) | |
}).on(["MSGestureChange"], | |
function (a) { | |
h *= a.scale | |
}).on(["MSGestureEnd"], function () { | |
(!a && 2 <= h || a && 1 > h) && k.fire(d.fullscreenButtonClicked); | |
h = 1 | |
}) | |
} | |
} | |
function m() { | |
k.on([d.scrubbingStarted, d.volumeScrubbingStarted], function () { | |
f.element.classList.add("scrubbing") | |
}); | |
k.on([d.scrubbingEnded, d.volumeScrubbingEnded], function () { | |
f.element.classList.remove("scrubbing") | |
}) | |
} | |
function J() { | |
function a(b) { | |
var c = f.config.video.url; | |
if (!(!c || b && b.metaKey)) | |
if (0 < f.config._video.currentTime && f.config._video.currentTime < f.config.video.duration - 30 && !f.config._video.paused && | |
(c += "#at=" + Math.floor(f.config._video.currentTime)), f.config.embed.on_site) s.location = c; | |
else return s.open(c), g(b), k.fire(d.pauseButtonClicked), !1 | |
} | |
Gator(f.element).on("click", "a[data-clip-link]", a); | |
k.on(Ca, a) | |
} | |
function C(a, b) { | |
k.fire(Ga); | |
if (null === Z) P.push([a, b]); | |
else { | |
var c = new XMLHttpRequest; | |
c.open(b, "//" + f.config.player_url + "/video/" + f.config.video.id + "/" + a + "?signature=" + f.config.request.signature + "&session=" + f.config.request.session + "&time=" + f.config.request.timestamp + "&expires=" + f.config.request.expires, !0); | |
c.withCredentials = !0; | |
c.send() | |
} | |
} | |
function y() { | |
k.on(d.vodButtonPressed, function (a) { | |
if (f.config.user.purchased) { | |
if (!f.config.video.vod.is_feature && f.config.video.vod.feature_id) return B(f.config.video.vod.feature_id, function () { | |
k.fire(d.playButtonClicked) | |
}); | |
k.fire(d.playButtonClicked) | |
} else E(Ya, function () { | |
k.fire(qa, "purchase", { | |
productId: a | |
}) | |
}, a) | |
}) | |
} | |
function u() { | |
k.on(d.likeButtonClicked, function () { | |
f.config.user.logged_in ? f.config.user.liked ? E(Va, function () { | |
C("like", "DELETE"); | |
f.config.user.liked = !1; | |
k.fire(d.unliked) | |
}) : | |
E(Ua, function () { | |
C("like", "PUT"); | |
f.config.user.liked = !0; | |
k.fire(d.liked) | |
}) : E(Da, function () { | |
k.fire(qa, "login-like") | |
}, "like") | |
}) | |
} | |
function I() { | |
k.on(d.watchLaterButtonClicked, function () { | |
f.config.video.url && (f.config.user.logged_in ? f.config.user.watch_later ? E(Xa, function () { | |
C("watch-later", "DELETE"); | |
f.config.user.watch_later = !1; | |
k.fire(d.removedFromWatchLater) | |
}) : E(Wa, function () { | |
C("watch-later", "PUT"); | |
f.config.user.watch_later = !0; | |
k.fire(d.addedToWatchLater) | |
}) : E(Da, function () { | |
k.fire(qa, "login-watch-later") | |
}, | |
"watch-later")) | |
}) | |
} | |
function G() { | |
k.on(d.shareButtonClicked, function () { | |
E(Ia, function () { | |
k.fire(ja, "share", f.config.embed.settings.share && f.config.embed.settings.share.embed_only) | |
}) | |
}); | |
k.on(d.embedButtonClicked, function () { | |
f.config.embed.settings.share.embed_only && E(Ia, function () { | |
k.fire(ja, "share", !0) | |
}) | |
}); | |
k.on(d.overlayClosed, function () { | |
q.resetFocus(f.element) | |
}) | |
} | |
function R() { | |
k.on(ua, B); | |
k.on(d.configChanged, function () { | |
F() | |
}); | |
k.on(d.userLoggedOut, function () { | |
p(f.config.video.id, function () { | |
k.fire(d.configChanged, | |
f.config) | |
}) | |
}); | |
k.on(d.userLogIn, function (a) { | |
p(f.config.video.id, function () { | |
0; | |
k.fire(d.configChanged, f.config); | |
if (f.config.user.logged_in) switch (k.fire(d.userLoggedIn, a), a) { | |
case "like": | |
f.config.user.liked && k.fire(d.liked); | |
break; | |
case "watch-later": | |
f.config.user.watch_later && k.fire(d.addedToWatchLater); | |
break; | |
case "private": | |
k.fire(d.privateUnlocked) | |
} else k.fire(d.loginFailure) | |
}) | |
}) | |
} | |
function N() { | |
function a() { | |
var d = b; | |
b = s.getComputedStyle(f.element, ":after").getPropertyValue("content"); | |
d !== b && k.fire(c[b]) | |
} | |
var b = null, | |
c = { | |
tiny: d.enteredTinyMode, | |
mini: d.enteredMiniMode, | |
normal: d.enteredNormalMode | |
}; | |
a(); | |
Gator(s).on("resize", a) | |
} | |
function sa() { | |
var a = !1; | |
k.on(Ga, function () { | |
Z && Z - 1E3 <= (new Date).getTime() && (k.fire(d.signatureExpired), Z = null) | |
}); | |
k.on(d.signatureExpired, function () { | |
a || (a = !0, v(function () { | |
a = !1; | |
k.fire(d.requestConfigReloaded, f.config.request) | |
})) | |
}); | |
k.on(d.requestConfigReloaded, function () { | |
if (0 < P.length) | |
for (var a = P.shift(); a;) C.apply(null, a), a = P.shift() | |
}) | |
} | |
function X() { | |
function a() { | |
if (0 === s.innerWidth) 0, setTimeout(a, | |
250); | |
else { | |
var b, c = 90 === Math.abs(s.orientation) ? screen.height : screen.width; | |
t.mobileAndroid && !t.browser.chrome && !t.browser.opera && 4 <= t.android && (c /= s.devicePixelRatio); | |
b = c / s.innerWidth; | |
c = Math.round(10 * Math.pow(b, -1.2)); | |
c = Math.max(c, 10) + "px"; | |
b = Math.round(10 * Math.pow(b, -0.7)); | |
b = Math.max(b, 10) + "px"; | |
oa.style.fontSize = c; | |
ha.style.fontSize = b; | |
ea.style.fontSize = b | |
} | |
} | |
k.on(d.didEnterFullscreen, function () { | |
oa.style.fontSize = ""; | |
ha.style.fontSize = ""; | |
ea.style.fontSize = "" | |
}).on(d.didExitFullscreen, a); | |
t.touch && f.element.classList.add("touch-support"); | |
Y && (f.element.classList.add("mobile"), a()) | |
} | |
function Ja() { | |
if (!f.config) return p(b, Ja); | |
Z = (new Date).getTime() + 1E3 * f.config.request.expires; | |
0; | |
f.config._video = {}; | |
if (Y || t.iPad) f.config.embed.autoplay = 0; | |
f.storageModule = new pb(f.config, k); | |
var a = q.parseTime(w.location.hash); | |
null !== a && (f.config.embed.time = q.limit(a, 0, f.config.video.duration), t.touch || (f.config.embed.autoplay = 1), -1 < w.location.hash.indexOf("at=") && history && history.replaceState && history.replaceState("", w.title, s.location.pathname)); | |
f.element.innerHTML += | |
Aftershave.render("outer", { | |
hideSidedock: !f.config.embed.settings.instant_sidedock | |
}); | |
K = f.element.querySelector(".video"); | |
aa = f.element.querySelector(".video-wrapper"); | |
f.element.querySelector(".target"); | |
ea = f.element.querySelector(".title"); | |
ha = f.element.querySelector(".sidedock"); | |
oa = f.element.querySelector(".controls"); | |
Fa = f.element.querySelector(".overlay-wrapper"); | |
La = f.element.querySelector(".notification-wrapper"); | |
ba = f.element.querySelector(".outro-wrapper"); | |
U = f.element.querySelector(".captions"); | |
F(); | |
D(); | |
z(); | |
H(); | |
m(); | |
J(); | |
y(); | |
u(); | |
I(); | |
G(); | |
R(); | |
k.on([d.passwordUnlocked, d.privateUnlocked], l); | |
N(); | |
sa(); | |
X(); | |
Gator(f.element).on("click", ["a[tabindex]", "button[tabindex]"], g); | |
n(); | |
Object.preventExtensions && Object.preventExtensions(Q); | |
for (k.fire(d.ready); pa.length;) pa.shift().call(Q) | |
} | |
var f = this; | |
f.element = c; | |
f.uuid = Math.round(1E3 * Math.random() + (new Date).getTime()); | |
c.classList.add("player-" + f.uuid); | |
c.id || (c.id = "player" + f.uuid); | |
f.config = null; | |
isNaN(b) && "string" !== typeof b && (f.config = b); | |
e = e || null; | |
var Y = t.mobileAndroid || | |
t.iPhone || t.windowsPhone || t.browser.bb10, | |
Z = null, | |
P = [], | |
k = Ea.make(), | |
T = !1, | |
L = !1, | |
S = !1, | |
O, M = null, | |
K = null, | |
aa = null, | |
ea = null, | |
ha = null, | |
oa = null, | |
Fa = null, | |
La = null, | |
ba = null, | |
U = null, | |
Q = {}, | |
pa = []; | |
Object.defineProperties(Q, { | |
config: { | |
enumerable: !0, | |
get: function () { | |
return f.config | |
}, | |
set: function (a) { | |
f.config = a; | |
k.fire(d.configChanged, f.config) | |
} | |
}, | |
delegate: { | |
enumerable: !0, | |
set: function (a) { | |
e = a | |
} | |
}, | |
ready: { | |
enumerable: !0, | |
value: function (a) { | |
if ("function" !== typeof a) throw new TypeError("You can only pass a function to ready()."); | |
pa.push(a) | |
} | |
} | |
}); | |
var V = !0 === a; | |
if (!0 !== a) { | |
var ma = function () { | |
if (!V) { | |
V = !0; | |
setTimeout(r, 100); | |
var b = (new Date).getTime() - a.startTime; | |
s._gaq && s._gaq.push(["player._trackTiming", "Player", "CSS Load", b]); | |
0 | |
} | |
}; | |
a.link.addEventListener("load", ma, !1); | |
var W = function () { | |
var b = !1; | |
try { | |
var c = a.link.sheet, | |
d; | |
c && (d = c.cssRules, b = null === d, !b && d && (c.insertRule("-curl-css-test {}", 0), c.deleteRule(0), b = !0)) | |
} catch (e) { | |
b = "[object Opera]" !== Object.prototype.toString.call(s.opera) && /security|denied/i.test(e.message) | |
} | |
if (!b) return setTimeout(W, 50); | |
ma() | |
}; | |
W() | |
} | |
Ja(); | |
return Q | |
} | |
}(), | |
fb = function () { | |
return function (c, b) { | |
function a() { | |
switch (c._video && c._video.currentRenderer) { | |
case "html": | |
return "HTML5"; | |
case "flash": | |
return "Flideo"; | |
case "moogaloop": | |
return "Moogaloop"; | |
default: | |
return "Player" | |
} | |
} | |
function e(b, d) { | |
d || (d = c.video.id, c.video.title && c.video.owner && c.video.owner.name && (d += " - " + c.video.title + " from " + c.video.owner.name)); | |
0; | |
s._gaq && s._gaq.push(["player._trackEvent", a(), b, d]) | |
} | |
function g(a, b) { | |
0; | |
s._gaq && s._gaq.push(["player._trackSocial", a, b, c.video.share_url]) | |
} | |
var l = c.request.session, | |
n = !1, | |
r = !1, | |
p = !0; | |
(function () { | |
b.on(d.playInitiated, function () { | |
r || (e("Play"), r = !0) | |
}); | |
b.on(d.didEnterFullscreen, function (a) { | |
e("Entered Fullscreen" + (a ? "" : " (native)")) | |
}); | |
b.on(d.didExitFullscreen, function () { | |
e("Exited Fullscreen") | |
}); | |
b.on(9, function (a) { | |
"hd" === a ? e("HD Turned On") : e("HD Turned Off") | |
}); | |
b.on(ja, function (a) { | |
"hd-not-allowed" === a && e("HD Attempt") | |
}); | |
b.on(d.liked, function () { | |
e("Liked") | |
}); | |
b.on(d.unliked, function () { | |
e("Unliked") | |
}); | |
b.on(d.addedToWatchLater, function () { | |
e("Added to Watch Later") | |
}); | |
b.on(d.removedFromWatchLater, function () { | |
e("Removed from Watch Later") | |
}); | |
b.on(d.shareButtonClicked, function () { | |
e("Share Button Clicked") | |
}); | |
b.on(d.embedButtonClicked, function () { | |
e("Embed Button Clicked") | |
}); | |
b.on(d.embedCodeCopied, function () { | |
n || (n = !0, e("Embed Code Copied")) | |
}); | |
b.on(d.overlayClosed, function () { | |
n = !1 | |
}); | |
b.on(d.scalingButtonClicked, function (a) { | |
a ? e("Scaling Turned On") : e("Scaling Turned Off") | |
}); | |
b.on(d.userLogIn, function () { | |
e("Logged In") | |
}) | |
})(); | |
(function () { | |
b.on(d.facebookButtonClicked, function () { | |
g("Facebook", | |
"share") | |
}); | |
b.on(d.twitterButtonClicked, function () { | |
g("Twitter", "tweet") | |
}); | |
b.on(d.emailButtonClicked, function () { | |
g("Email", "email") | |
}) | |
})(); | |
(function () { | |
var e; | |
b.on([d.bufferStarted, d.scrubbingStarted], function (a) { | |
e || (e = a || (new Date).getTime()) | |
}); | |
b.on(d.bufferEnded, function () { | |
if (0 < e) { | |
var b = c._video.currentFile.quality, | |
d = "Buffer Time"; | |
p && (p = !1, d = "Start Time"); | |
var h = e, | |
h = (new Date).getTime() - h; | |
0; | |
s._gaq && s._gaq.push(["player._trackTiming", a(), d, h, b]); | |
e = null | |
} | |
}) | |
})(); | |
(function () { | |
b.on(d.configChanged, function (a) { | |
c = | |
a; | |
l !== a.request.session && (s._gaq && s._gaq.push(["player._trackPageview", "/video/" + c.video.id]), p = !0, r = !1) | |
}) | |
})(); | |
b.fire(d.analyticsModuleReady); | |
return {} | |
} | |
}(), | |
bb = function (c) { | |
return function (b, a) { | |
function e(a, b) { | |
this.message = b; | |
try { | |
n({ | |
event: "error", | |
data: { | |
message: b, | |
code: a | |
} | |
}) | |
} catch (c) {} | |
} | |
function g() { | |
if (b.view === va) throw new e("private_video", "The video is private."); | |
if (b.view === wa) throw new e("password_video", "The video is password-protected. The viewer must enter the password first."); | |
} | |
function l(a) { | |
if (a && | |
"" !== a) { | |
if ("object" === typeof a) return a; | |
try { | |
return JSON.parse(a) | |
} catch (b) { | |
var c = {}; | |
a.split("&").forEach(function (a) { | |
try { | |
var b = a.split("="), | |
d = decodeURIComponent(b[0]), | |
e = decodeURIComponent(b[1]); | |
"id" !== d && ("params" === d && (d = "value"), e = e.split(",")[0], c[d] = e) | |
} catch (h) {} | |
}); | |
return c | |
} | |
} | |
} | |
function n(a) { | |
if (a.event && (h.fire(a.event, a.data), !x[a.event])) return; | |
if (A) { | |
var d = ""; | |
b.embed.player_id && (a.player_id = b.embed.player_id); | |
if (1 === b.embed.api) { | |
d = a.event; | |
if (1 === b.embed.api) { | |
for (var e in C) | |
if (C[e] === a.event) { | |
d = | |
e; | |
break | |
} | |
switch (d) { | |
case "onSeek": | |
case "onProgress": | |
delete a.data.percent; | |
delete a.data.duration; | |
break; | |
case "onLoading": | |
delete a.data.seconds, delete a.data.duration | |
} | |
} | |
e = "method=" + encodeURIComponent(d || a.method); | |
e += "¶ms="; | |
d = []; | |
if (a.value !== ia) d.push(encodeURIComponent(a.value)); | |
else if ("object" === typeof a.data) | |
for (var g in a.data) d.push(encodeURIComponent(a.data[g])); | |
else a.data !== ia && d.push(encodeURIComponent(a.data)); | |
a.player_id && d.push(a.player_id); | |
d = e += d.join(",") | |
} else try { | |
d = JSON.stringify(a) | |
} catch (m) {} | |
0; | |
if (c.parent != c) try { | |
c.parent.postMessage(d, B) | |
} catch (l) {} | |
} | |
} | |
function r(a) { | |
if (a && "_" !== a.substr(0, 1)) { | |
1 === b.embed.api && (a = a.replace("api_", "")); | |
switch (a) { | |
case "changeColor": | |
return y.color.set; | |
case "paused": | |
return y.paused.get; | |
case "seekTo": | |
return y.currentTime.set | |
} | |
if ("function" === typeof y[a]) return y[a]; | |
var c = a.substr(0, 3); | |
a = a.substr(3, 1).toLowerCase() + a.substr(4); | |
return y[a] && y[a][c] ? y[a][c] : !1 | |
} | |
} | |
function p(a) { | |
if (0 === (w.referrer || c.location.origin || c.location.href).indexOf(a.origin)) { | |
var b = l(a.data); | |
a = b.method; | |
var b = b.value, | |
d = r(a); | |
d && (0, b = d.call(null, b), b !== ia && "" !== b && n({ | |
method: a, | |
value: b | |
})) | |
} | |
} | |
function v() { | |
if (F && z) { | |
try { | |
switch (z) { | |
case "not-supported": | |
throw new e("not_supported", "This video is not supported in this browser."); | |
case "no-files": | |
throw new e("file_error", "There was an error loading the files for this video."); | |
default: | |
throw new e("playback", "An error occurred during playback."); | |
} | |
} catch (a) {} | |
z = null | |
} | |
} | |
var B = decodeURIComponent(w.referrer || b.request.referrer), | |
x = { | |
ready: !0, | |
error: !0 | |
}, | |
h = Ea.make({}), | |
A = !(!c.postMessage || !c.parent.postMessage), | |
E = null, | |
F = !1, | |
D = !1, | |
z = null, | |
s = !1, | |
m, J = "play pause finish playProgress loadProgress seek cuechange".split(" "), | |
C = { | |
onFinish: "finish", | |
onLoading: "loadProgress", | |
onLoad: "ready", | |
onProgress: "playProgress", | |
onPlay: "play", | |
onPause: "pause", | |
onSeek: "seek" | |
}; | |
e.prototype = Error(); | |
var y = { | |
addEventListener: function (a, b) { | |
a in C && (a = C[a]); | |
if (0 > J.indexOf(a)) throw new e("invalid_event", '"' + a + '" is not a valid event. Valid events are: ' + J.join(", ") + "."); | |
if (b) h.on(a, b); | |
else x[a] = !0; | |
0 | |
}, | |
removeEventListener: function (a, b) { | |
b ? h.off(a, b) : x[a] = !1; | |
0 | |
}, | |
play: function () { | |
g(); | |
if ("undefined" !== typeof t && (t.iPhone || t.iPad) && !s) throw new e("play", "The viewer must initiate playback first."); | |
a.fire(d.playButtonClicked, !0) | |
}, | |
pause: function () { | |
g(); | |
a.fire(d.pauseButtonClicked) | |
}, | |
loadVideo: function (c) { | |
if (!b.embed.on_site && isNaN(c)) throw new e("invalid_video", "The video id must be a number."); | |
a.fire(ua, c) | |
}, | |
unload: function () { | |
b.view !== ra && b.view !== ca || a.fire(na) | |
}, | |
_setEmbedSetting: function (c, e) { | |
b.embed.on_site && | |
(c in b.embed.settings || "custom_logo" === c) && (e = "object" === typeof e ? e : Number(e), "badge" === c && (e ? e = m : m = b.embed.settings.badge), b.embed.settings[c] = e, a.fire(d.embedSettingChanged, c, e), a.fire(d.configChanged, b)) | |
}, | |
color: { | |
get: function () { | |
return b.embed.color.replace("#", "") | |
}, | |
set: function (c) { | |
if (b.embed.settings.color && !b.embed.on_site) throw new e("color_locked", "The creator of the video has chosen to always use " + (new U(b.embed.color)).hex + "."); | |
c = (c + "").replace("#", ""); | |
if ("string" !== typeof c || 3 !== c.length && | |
6 !== c.length || isNaN(parseInt(c, 16))) throw new e("invalid_color", "The color should be 3- or 6-digit hex value."); | |
if ("undefined" === typeof U || "implement" in U) a.fire(fa, c); | |
else try { | |
var d = new U(c); | |
a.fire(fa, d); | |
if (3 > (new U(23, 35, 34, 0.75)).contrast(d).ratio) throw new e("color_contrast", "Specified color does not meet minimum contrast ratio. We recommend using brighter colors. See WCAG 2.0 guidelines: http://www.w3.org/TR/WCAG/#visual-audio-contrast"); | |
} catch (h) {} | |
} | |
}, | |
currentTime: { | |
get: function () { | |
return b._video && | |
0.1 < b._video.currentTime ? q.round(b._video.currentTime) : 0 | |
}, | |
set: function (c) { | |
c = parseFloat(c); | |
if (isNaN(c) || 0 > c || c > b._video.duration) throw new e("invalid_time", "Seconds must be a positive float less than the duration of the video (" + b._video.duration + ")."); | |
a.fire(Ba, null, c); | |
a.fire(d.mousedOver) | |
} | |
}, | |
duration: { | |
get: function () { | |
return q.round(b.video.duration) | |
} | |
}, | |
loop: { | |
get: function () { | |
return !!b.embed.loop | |
}, | |
set: function (b) { | |
a.fire(8, b) | |
} | |
}, | |
paused: { | |
get: function () { | |
return b._video && "paused" in b._video ? !!b._video.paused : | |
!0 | |
} | |
}, | |
videoEmbedCode: { | |
get: function () { | |
return b.video.embed_code | |
} | |
}, | |
videoHeight: { | |
get: function () { | |
return b.video.video_height || b.video.height | |
} | |
}, | |
videoId: { | |
get: function () { | |
return b.video.id | |
} | |
}, | |
videoTitle: { | |
get: function () { | |
return b.video.title | |
} | |
}, | |
videoWidth: { | |
get: function () { | |
return b.video.video_width || b.video.width | |
} | |
}, | |
videoUrl: { | |
get: function () { | |
return b.video.url | |
} | |
}, | |
volume: { | |
get: function () { | |
var a = q.round(b.request.cookie.volume); | |
return 1 === b.embed.api ? Math.round(100 * a) : a | |
}, | |
set: function (c) { | |
c = parseFloat(c); | |
1 === b.embed.api && | |
(c /= 100); | |
if (isNaN(c) || 0 > c || 1 < c) throw new e("invalid_volume", "Volume should be a float between 0 and 1."); | |
E = c; | |
a.fire(aa, c, !0) | |
} | |
} | |
}; | |
a.on(d.playInitiated, function () { | |
s = !0 | |
}); | |
c.addEventListener ? c.addEventListener("message", p, !1) : c.attachEvent("onmessage", p); | |
(function () { | |
a.on(d.played, function () { | |
D || (D = !0, n({ | |
event: "play" | |
})) | |
}); | |
a.on(d.paused, function () { | |
D = !1; | |
n({ | |
event: "pause" | |
}) | |
}); | |
a.on(d.ended, function () { | |
D = !1; | |
n({ | |
event: "finish" | |
}) | |
}); | |
a.on(d.playProgress, function (a, b, c) { | |
n({ | |
event: "playProgress", | |
data: { | |
seconds: q.round(a), | |
percent: q.round(c), | |
duration: q.round(b) | |
} | |
}) | |
}); | |
a.on(d.loadProgress, function (a, b, c) { | |
n({ | |
event: "loadProgress", | |
data: { | |
bytesLoaded: -1, | |
bytesTotal: -1, | |
percent: q.round(c), | |
duration: q.round(b), | |
seconds: q.round(a) | |
} | |
}) | |
}); | |
a.on(d.seeked, function (a, b, c) { | |
n({ | |
event: "seek", | |
data: { | |
seconds: q.round(a), | |
percent: q.round(c), | |
duration: q.round(b) | |
} | |
}) | |
}); | |
a.on(d.error, function (a) { | |
z = a; | |
v() | |
}); | |
a.on(d.cueChanged, function (a, b) { | |
var c = null, | |
d = null; | |
a && (d = a.split("."), c = d[0], d = d[1]); | |
n({ | |
event: "cuechange", | |
data: { | |
language: c, | |
kind: d, | |
cues: b | |
} | |
}) | |
}) | |
})(); | |
(function () { | |
a.on(na, | |
function () { | |
z = null; | |
s = !1 | |
}) | |
})(); | |
(function () { | |
a.on(d.configChanged, function (c) { | |
b = c; | |
E && setTimeout(function () { | |
0; | |
a.fire(aa, E, !0) | |
}, 0) | |
}) | |
})(); | |
a.fire(d.apiModuleReady); | |
a.on(d.ready, function () { | |
F = !0; | |
n({ | |
event: "ready" | |
}); | |
v() | |
}); | |
return y | |
} | |
}(this), | |
nb = function () { | |
return function (c, b, a, e) { | |
function g() { | |
a.style.fontSize = Math.max(10, Math.round(0.045 * e.clientHeight)) + "px" | |
} | |
function l() { | |
a.classList.remove("hidden"); | |
a.removeAttribute("hidden") | |
} | |
var n = !1, | |
r = !1; | |
(function () { | |
b.on(d.cueChanged, function (b, c) { | |
for (; a.firstChild;) a.removeChild(a.firstChild); | |
if (c.length) { | |
var d = w.createDocumentFragment(); | |
c.forEach(function (a) { | |
var b = w.createElement("span"); | |
b.innerHTML = a.html; | |
d.appendChild(b) | |
}); | |
a.appendChild(d); | |
n ? l() : r = !0 | |
} else a.classList.add("hidden"), a.setAttribute("hidden", "") | |
}); | |
b.on(d.playInitiated, function () { | |
n = !0; | |
r && (r = !1, l()) | |
}).on(na, function () { | |
n = !1 | |
}) | |
})(); | |
g(); | |
s.addEventListener("resize", g, !1); | |
b.on([d.didEnterFullscreen, d.didExitFullscreen], g); | |
(function () { | |
b.on(d.controlBarVisibilityChanged, function (b) { | |
b ? a.classList.add("with-controls") : a.classList.remove("with-controls") | |
}) | |
})(); | |
(function () { | |
b.on(d.overlayOpened, function () { | |
a.classList.add("invisible") | |
}).on(d.overlayClosed, function () { | |
a.classList.remove("invisible") | |
}) | |
})(); | |
(function () { | |
b.on(d.ended, function () { | |
"nothing" !== c.embed.outro && a.classList.add("invisible") | |
}).on([d.played, d.scrubbingStarted], function () { | |
a.classList.remove("invisible") | |
}) | |
})(); | |
return {} | |
} | |
}(), | |
cb = function () { | |
var c = [".title a"], | |
b = [".title a:hover"], | |
a = "a;.overlay-wrapper .footnote.share a:hover;.title h1;.title span.user;.outro .videos h1;.outro .videos h2;.menu li:hover;.menu li.active".split(";"), | |
e = ["a:hover", ".overlay-wrapper .close:hover", ".overlay-wrapper .back:hover", ".outro .videos li h1:hover"], | |
g = [".play-bar .on .fill", ".play-bar a:hover .fill", ".play-bar button:not(.toggle):hover .fill", ".tiny-cc-cell .on .fill", ".sidedock .on .fill"], | |
l = [".sidedock .on:hover .fill"], | |
n = [".play-bar .on .stroke", ".sidedock .on .stroke"], | |
r = [".sidedock .on:hover .stroke"], | |
p = '.sidedock button:hover;.player.touch-support .sidedock button:active;.controls .play:hover;.controls .play-bar .played;.controls .tiny-fullscreen-cell:hover;.controls .volume div;.overlay .buttons li;.overlay .window-wrapper button;.overlay .window-wrapper input[type="submit"];.overlay .window-wrapper a[role="button"];.overlay .embed-copy;.outro a[role="button"];.outro .videos li:hover img;.outro .videos li a:focus img;.outro .vod li;.menu li.active:before'.split(";"), | |
s = [".outro .videos li:hover img", ".outro .videos li a:focus img", ".menu li:hover:before", ".menu li.active:before"], | |
B = '.overlay-wrapper .overlay .buttons li a;.overlay-wrapper .overlay button.embed-copy;.overlay-wrapper .footnote.share a:hover;.overlay .window-wrapper button;.overlay .window-wrapper input[type="submit"];.overlay .window-wrapper a[role="button"];.outro-wrapper .outro-inner a[role="button"];.sidedock button:hover'.split(";"), | |
x = ".controls .play:hover .fill;.sidedock button:hover .fill;.play-bar a:hover .fill;.play-bar button:not(.toggle):hover .fill;.controls .tiny-fullscreen-cell:hover .fill;.sidedock .on .fill".split(";"), | |
h = [".controls .play:hover .stroke", ".sidedock button:hover .stroke", ".sidedock .on .stroke"], | |
A = ['.overlay-wrapper .overlay a[role="button"]', ".overlay-wrapper .overlay button.embed-copy", ".sidedock button:hover"], | |
E = [".controls .play:hover .fill", ".sidedock button:hover .fill", ".controls .tiny-fullscreen-cell:hover .fill"], | |
F = [".sidedock button:hover .stroke"], | |
D = ['.overlay .window-wrapper input[type="submit"]:active', ".overlay .embed-copy.zeroclipboard-is-active", ".outro .vod-watch-button:active", ".sidedock button:active"]; | |
return function (z, H, m, t, C) { | |
function y(a, b) { | |
var c = ".player-" + m + " ", | |
c = c + a.join("," + c); | |
if (b) var d = "#" + t + " ", | |
c = c + ("," + d + a.join("," + d)); | |
C && (c = c.replace(/:hover/g, ":active")); | |
return c | |
} | |
var u = null; | |
(function () { | |
H.on(fa, function (t) { | |
var G; | |
try { | |
G = new U(t) | |
} catch (R) { | |
G = new U("00adef") | |
} | |
var N; | |
t = G; | |
if (u) | |
for (; 0 < u.cssRules.length;) u.deleteRule(0); | |
else G = w.createElement("style"), G.setAttribute("data-player", m), w.querySelector("head").appendChild(G), u = G.sheet; | |
G = t.complement; | |
var C = new U(23, 35, 34, 0.75); | |
C.contrast(t); | |
var X = | |
(new U(0, 0, 0, 0.15)).overlayOn(t); | |
3 > C.contrast(G).ratio && G.lighten(5, 3, C); | |
C = 40 > t.lightness ? t.clone().lighten(15, 3, t) : t.clone().darken(15, 3, t); | |
q.addCssRule(y(c, !0), "color:" + t.hex + " !important", u); | |
q.addCssRule(y(b, !0), "color:" + G.hex + " !important", u); | |
q.addCssRule(y(a), "color:" + t.hex, u); | |
q.addCssRule(y(g), "fill:" + t.hex, u); | |
q.addCssRule(y(n), "stroke:" + t.hex, u); | |
q.addCssRule(y(p), "background-color:" + t.hex, u); | |
q.addCssRule(y(s), "border-color:" + t.hex, u); | |
q.addCssRule(y(e), "color:" + G.hex, u); | |
q.addCssRule(y(l), "fill:" + | |
C.hex, u); | |
q.addCssRule(y(r), "stroke:" + C.hex, u); | |
q.addCssRule(y(D), "background-color:" + X.hex, u); | |
0.95 < t.luminance && (G = t.clone().darken(15, 3, t), q.addCssRule(y(B), "color:" + G.hex, u), q.addCssRule(y(x), "fill:" + G.hex, u), q.addCssRule(y(h), "stroke:" + G.hex, u), C = G.clone().darken(15, 3, G), q.addCssRule(y(l), "fill:" + C.hex, u), q.addCssRule(y(r), "stroke:" + C.hex, u)); | |
175 < t.yiq && 0.95 > t.luminance && (N = C.clone().darken(15, 3, C), q.addCssRule(y(l), "fill:" + N.hex, u), q.addCssRule(y(r), "stroke:" + N.hex, u), q.addCssRule(y(A), "color:" + | |
C.hex, u), q.addCssRule(y(E), "fill:" + C.hex, u), q.addCssRule(y(F), "stroke:" + C.hex, u)); | |
N = { | |
main: t.hex, | |
selected: C.hex, | |
sidedockHover: N ? C.hex : 0.95 < t.luminance ? G.hex : U.white.hex, | |
sidedockSelected: 0.95 < t.luminance ? G.hex : t.hex, | |
sidedockSelectedHover: N ? N.hex : C.hex | |
}; | |
z._colors = N; | |
z.embed.color = N.main.replace("#", ""); | |
H.fire(d.colorChanged, z.embed.color) | |
}); | |
H.fire(fa, z.embed.color) | |
})(); | |
return {} | |
} | |
}(), | |
gb = function () { | |
return function (c, b, a) { | |
function e() { | |
z && (clearTimeout(B), B = setTimeout(l, x)) | |
} | |
function g() { | |
BigScreen.element && | |
BigScreen.element === a && !E && (a.style.cursor = "none", E = A = !0) | |
} | |
function l(a) { | |
if (D || F) clearTimeout(B), B = null, w.activeElement && (J.contains(w.activeElement) || C.contains(w.activeElement)) || (b.fire(a ? d.mousedOut : d.mouseTimeout), A = !0, m.classList.add("hidden"), m.setAttribute("hidden", ""), h = !0, g()) | |
} | |
function n() { | |
D && F || (b.fire(d.mousedOver), m.classList.remove("hidden"), m.removeAttribute("hidden")); | |
e() | |
} | |
function r() { | |
b.on([d.playProgress, d.seeked], function I(a) { | |
a >= q && null === B && (b.fire(d.targetTimeReached), b.off([d.playProgress, | |
d.seeked | |
], I)) | |
}) | |
} | |
var p = 2E3, | |
v = 4500, | |
B = null, | |
x = t.touch ? v : p, | |
h = !0, | |
A = !0, | |
E = !1, | |
F = !0, | |
D = !1, | |
z = !1, | |
q = 1.75, | |
m = a.querySelector(".target"), | |
J = a.querySelector(".sidedock"), | |
C = a.querySelector(".controls"), | |
y = a.querySelector(".title"); | |
(function () { | |
function c() { | |
b.fire(Ga); | |
n() | |
} | |
function d(b) { | |
x = p; | |
A ? A = !1 : (E && (a.style.cursor = "default", E = !1), 0 === b.screenX || b.screenX === screen.width - 1 || 0 === b.screenY || b.screenY === screen.height - 1 ? (clearTimeout(B), B = null, g(), f && (l(!0), f = !1)) : (f = !0, h && n(), e())) | |
} | |
function m() { | |
x = v; | |
e() | |
} | |
function z() { | |
l(!0) | |
} | |
function r(a) { | |
a = C.contains(a.target) || J.contains(a.target); | |
D && F ? a || !D && !F || l(!0) : n(); | |
return !1 | |
} | |
function s(a) { | |
if ("mouse" === a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) return x = p, c(a); | |
x = v; | |
r(a) | |
} | |
function X(a) { | |
if ("mouse" === a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) return d(a) | |
} | |
function q(a) { | |
if ("mouse" === a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) return z(a) | |
} | |
var f = !0; | |
if (t.pointerEvents) Gator(a).on(["pointerenter", "MSPointerEnter"], s).on(["pointermove", "MSPointerMove"], X).on(["pointerleave", | |
"MSPointerLeave" | |
], q); | |
else Gator(a).on("touchmove", m).on("touchend", r).on("mouseenter", c).on("mousemove", d).on("mouseleave", z) | |
})(); | |
(function () { | |
b.on([d.ended, d.played, d.paused], n).on([d.bufferEnded, d.scrubbingEnded, d.volumeChanged], e).on(d.playInitiated, function () { | |
z = !0 | |
}); | |
b.on(d.controlBarVisibilityChanged, function (a) { | |
F = a | |
}).on(d.sidedockVisibilityChanged, function (a) { | |
D = a | |
}) | |
})(); | |
(function () { | |
function e(a) { | |
return a.classList.contains("title") || a.classList.contains("sidedock") || a.classList.contains("target") || | |
y.contains(a.parentNode) && "HEADER" === a.parentNode.tagName | |
} | |
var h = !1, | |
g = !1, | |
l = 0; | |
b.on(d.menuVisibilityChanged, function (a) { | |
g = a | |
}); | |
Gator(a).on(t.pointerEvents ? ["pointerup", "MSPointerUp"] : "click", function (a) { | |
!g && 2 !== a.button && a.target.classList && e(a.target) && ("pointerup" !== a.type && "MSPointerUp" !== a.type || "mouse" === a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) && e(a.target) && (l++, 1 === l && setTimeout(function () { | |
1 === l ? b.fire(c._video.paused ? d.playButtonClicked : d.pauseButtonClicked) : b.fire(d.fullscreenButtonClicked); | |
l = 0 | |
}, 200)) | |
}); | |
Gator(a).on("mousedown", ".video-wrapper", function (a) { | |
if (!h) return m.classList.remove("hidden"), m.removeAttribute("hidden"), 2 !== a.button && w.createEvent && (a = w.createEvent("MouseEvents"), a.initMouseEvent("click", !0, !0, s, 1, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), m.dispatchEvent(a)), !1 | |
}).on("contextmenu", ".video", function (a) { | |
m.classList.remove("hidden"); | |
m.removeAttribute("hidden"); | |
return !1 | |
}); | |
b.on(Ha, function (a) { | |
a ? (h = !0, m.classList.add("hidden")) : (h = !1, m.classList.remove("hidden")) | |
}) | |
})(); | |
(function () { | |
if (!t.touch) { | |
var b; | |
Gator(a).on("focus", "*[tabindex]", function () { | |
clearTimeout(b); | |
b = null; | |
w.activeElement === this && n() | |
}); | |
Gator(a).on("blur", "*[tabindex]", function () { | |
w.activeElement === this && (b = setTimeout(l, 50)) | |
}) | |
} | |
})(); | |
(function () { | |
b.on(d.didEnterFullscreen, g).on(d.didExitFullscreen, function (a) { | |
h = !0; | |
a && l() | |
}) | |
})(); | |
r(); | |
(function () { | |
b.on(na, function () { | |
F = A = h = !0; | |
z = D = !1; | |
r(); | |
clearTimeout(B); | |
B = null | |
}) | |
})(); | |
return {} | |
} | |
}(), | |
ib = function () { | |
function c(a, b, c) { | |
a += ""; | |
return Array(b - a.length + 1).join(c || "0") + a | |
} | |
function b(a, b) { | |
var d = Math.floor(a / 3600 % | |
60), | |
l = Math.floor(a / 60 % 60); | |
a = Math.floor(a % 60); | |
if (b) { | |
var n = a + " second" + (1 === a ? "" : "s"); | |
0 < l && (n = l + " minute" + (1 === l ? "" : "s") + ", " + n); | |
0 < d && (n = d + " hour" + (1 === d ? "" : "s") + ", " + n); | |
return n | |
} | |
return (0 < d ? d + ":" : "") + c(l, 2) + ":" + c(a, 2) | |
} | |
return function (a, c, g) { | |
function l() { | |
if (!T) { | |
var a = K.getBoundingClientRect().right, | |
b = parseInt(s.getComputedStyle(K, "").borderRightWidth, 10); | |
T = a - b | |
} | |
return T | |
} | |
function n(a) { | |
var b; | |
if (!L) { | |
b = K.getBoundingClientRect().left; | |
var c = parseInt(s.getComputedStyle(K, "").borderLeftWidth, 10); | |
L = b + c | |
} | |
b = L; | |
c = | |
l() - b; | |
return q.limit((a - b) / c, 0, 1) | |
} | |
function r() { | |
if (Y && !Z && P && (a._video.loadProgress || a._video.currentTime)) { | |
var b = 'data:image/svg+xml,<svg width="65" height="40" xmlns="http://www.w3.org/2000/svg"><rect height="3" width="' + (a._video.loadProgress || 0) / a.video.duration * 65 + '" x="0" y="37" fill="#666"/><rect height="3" width="' + (a._video.currentTime || 0) / a.video.duration * 65 + '" x="0" y="37" fill="#' + a.embed.color + '"/></svg>'; | |
s.requestAnimationFrame(function () { | |
oa.style.backgroundImage = 'url("' + b.replace(/"/g, | |
"'") + '")' | |
}) | |
} | |
} | |
function p(c, d) { | |
y && !f && (d = d || a.video.duration * c || 0, s.requestAnimationFrame(function () { | |
var a = d; | |
Fa.style.left = q.round(100 * c) + "%"; | |
La.innerHTML = b(a); | |
v(c, d) | |
})) | |
} | |
function v(a, c) { | |
ha.style.width = q.round(100 * a) + "%"; | |
ha.setAttribute("aria-valuenow", q.round(c)); | |
ha.setAttribute("aria-valuetext", b(Math.round(c), !0) + " played") | |
} | |
function B(a, c) { | |
ea.style.width = q.round(100 * a) + "%"; | |
ea.setAttribute("aria-valuenow", q.round(c)); | |
ea.setAttribute("aria-valuetext", b(c, !0) + " loaded") | |
} | |
function x() { | |
y = !0; | |
O.classList.contains("state-playing") ? | |
(c.fire(d.pauseButtonClicked), h()) : (c.fire(d.playButtonClicked), A()) | |
} | |
function h() { | |
k = !1; | |
O.classList.remove("state-playing"); | |
O.classList.add("state-paused"); | |
var a = O.getAttribute("data-title-play"); | |
O.setAttribute("title", a); | |
O.setAttribute("aria-label", a) | |
} | |
function A() { | |
k = !0; | |
O.classList.add("state-playing"); | |
O.classList.remove("state-paused"); | |
var a = O.getAttribute("data-title-pause"); | |
O.setAttribute("title", a); | |
O.setAttribute("aria-label", a) | |
} | |
function E() { | |
!P || !(y && Ja || I) || u || xa && !I || I && a.view === ca || N || G || (P = !1, c.fire(d.controlBarVisibilityChanged, P), g.classList.add("invisible")) | |
} | |
function F() { | |
P || I || !S || (g.classList.remove("hidden"), g.removeAttribute("hidden"), S.classList.add("hidden"), S.setAttribute("hidden", ""), r(), setTimeout(function () { | |
P = !0; | |
c.fire(d.controlBarVisibilityChanged, P); | |
g.classList.remove("invisible") | |
}, 0)) | |
} | |
function D(b, d) { | |
var h = []; | |
"text_tracks" in a.request && (a.request.text_tracks.forEach(function (a) { | |
var b = a.lang + "." + a.kind, | |
c = "CC" === a.label.substring(a.label.length - 2); | |
h.push({ | |
label: a.label + | |
("captions" !== a.kind || c ? "" : " CC"), | |
id: b, | |
active: da === b | |
}) | |
}), h.push({ | |
label: "None", | |
id: "off", | |
active: null === da | |
})); | |
var f = new qb(h, b, d, c); | |
f.on("selected", function (a) { | |
"off" === a ? c.fire(Oa) : c.fire(Na, a) | |
}); | |
return f | |
} | |
function z() { | |
s.requestAnimationFrame(function () { | |
var c = a.video.duration; | |
Fa.style.left = q.round(0) + "%"; | |
La.innerHTML = b(c); | |
v(0, 0); | |
B(0, 0); | |
oa.style.backgroundImage = "" | |
}) | |
} | |
function H() { | |
if (a.view === ra || a.view === ca) { | |
var c = a.embed.settings, | |
d = "text_tracks" in a.request && a.request.text_tracks.length, | |
d = { | |
targetBlank: 0 === | |
a.embed.on_site, | |
playState: k ? "playing" : "paused", | |
volume: J && c.volume, | |
ccButton: Ka.support.textTracks && d, | |
ccOn: null !== da, | |
hdButton: a.video.hd, | |
hdOn: a.video.allow_hd && (null === a.request.cookie.hd ? a.video.default_to_hd : a.request.cookie.hd), | |
airplayButton: t.airPlay, | |
scalingButton: c.scaling, | |
fullSize: a.request.cookie.scaling ? 1 : 0, | |
fullscreenButton: c.fullscreen, | |
vimeoLogo: { | |
show: c.logo, | |
showLink: !!a.video.url, | |
url: a.video.url | |
}, | |
duration: b(a.video.duration), | |
rawDuration: a.video.duration | |
}; | |
c.custom_logo && (c = c.custom_logo, d.customLogo = { | |
showLink: null !== c.url, | |
url: c.url, | |
img: c.img, | |
sticky: c.sticky, | |
width: c.width, | |
height: c.height | |
}); | |
g.innerHTML = Aftershave.render("controls", d); | |
O = g.querySelector(".play"); | |
M = g.querySelector(".play-bar"); | |
K = g.querySelector(".progress"); | |
U = M.querySelector(".buffer"); | |
ea = M.querySelector(".loaded"); | |
ha = M.querySelector(".played"); | |
oa = O.querySelector(".tiny-bars"); | |
Fa = g.querySelector(".timecode"); | |
La = Fa.querySelector(".box"); | |
ba = g.querySelector(".ghost-timecode"); | |
ia = ba.querySelector(".box"); | |
(Q = g.querySelector(".volume")) && | |
(pa = [].slice.call(Q.querySelectorAll("div"), 0)); | |
V = g.querySelector(".hd"); | |
ma = g.querySelector(".play-bar .cc"); | |
ga = g.querySelector(".tiny-cc-cell .cc"); | |
t.airPlay && (ta = g.querySelector(".airplay-container"), ka = g.querySelector(".airplay")); | |
ya = g.querySelector(".scaling"); | |
la = g.querySelector(".fullscreen"); | |
S || (S = w.createElement("button"), S.className = "focus-dummy hidden", S.setAttribute("tabindex", "2"), S.setAttribute("hidden", ""), S.setAttribute("aria-hidden", "true"), S.setAttribute("title", "Focus dummy (focuses the play button when the controls are hidden)"), | |
g.parentElement.insertBefore(S, g)) | |
} | |
} | |
function m() { | |
c.on(d.loadProgress, function (a, b, c) { | |
C || s.requestAnimationFrame(function () { | |
B(c, a); | |
fa() | |
}) | |
}) | |
} | |
var J = !0, | |
C = !1, | |
y = !1, | |
u = !1, | |
I = !1, | |
G = !1, | |
R = !1, | |
N = !1, | |
sa = !1, | |
X = !1, | |
Ja = !1, | |
f = !1, | |
Y, Z = !1, | |
P = !0, | |
k = !1, | |
T = null, | |
L = null, | |
S, O, M, K, U, ea, ha, oa, Fa, La, ba, ia, Q, pa, V, ma, W, ga, $, da = null, | |
ta, ka, xa = !1, | |
ya, la, fa = q.throttle(r, 1E3); | |
H(); | |
(function () { | |
q.attachClickHandler(g, ".play", x); | |
c.on([d.playInitiated, d.playButtonClicked], A); | |
c.on([d.pauseButtonClicked, d.paused, d.error], h); | |
c.on(d.played, function () { | |
A() | |
}); | |
c.on(d.ended, function () { | |
f = !1; | |
h(); | |
p(1) | |
}); | |
c.on(d.overlayOpened, function (a) { | |
"notsupported" === a && h() | |
}) | |
})(); | |
(function () { | |
function b(a) { | |
if (k === a.pointerId && !1 !== a.isPrimary) { | |
var d = a.clientX; | |
a.targetTouches && 0 < a.targetTouches.length && (d = a.targetTouches[0].clientX, a.preventDefault()); | |
a = n(d); | |
p(a); | |
c.fire(Ba, a) | |
} | |
} | |
function h(a) { | |
var f = a.type; | |
"pointerup" === f || "MSPointerUp" === f ? Gator(g).off(["pointermove", "MSPointerMove"], ".progress", b).off(["pointerup", "MSPointerUp"], ".progress", h) : "touchend" === a.type ? Gator(g).off("touchmove", | |
b).off("touchend", h) : Gator(w).off("mousemove", b).off("mouseup", h); | |
c.fire(d.scrubbingEnded) | |
} | |
c.on(d.playProgress, function (b, c, d) { | |
f && (0 === a.embed.time || 0 < a.embed.time && b >= a.embed.time) && (f = !1); | |
G || (p(d, b), fa()) | |
}); | |
c.on(d.scrubbingStarted, function (a) { | |
G = !0; | |
R = a | |
}); | |
c.on(d.scrubbingEnded, function () { | |
R = G = !1 | |
}); | |
var k; | |
c.on(d.seeked, function (a, b, c) { | |
R && p(c) | |
}); | |
Gator(g).on(["pointerdown", "MSPointerDown", "touchstart", "mousedown"], ".progress", function (a) { | |
if (!a.button || 2 !== a.button) { | |
c.fire(d.scrubbingStarted); | |
var f = a.type; | |
if ("pointerdown" === f || "MSPointerDown" === f) { | |
k = a.pointerId; | |
try { | |
a.target.msSetPointerCapture ? a.target.msSetPointerCapture(k) : a.target.setPointerCapture(k) | |
} catch (m) {} | |
Gator(g).on(["pointermove", "MSPointerMove"], ".progress", b).on(["pointerup", "MSPointerUp"], ".progress", h) | |
} else if ("touchstart" === f) Gator(g).on("touchmove", b).on("touchend", h); | |
else Gator(w).on("mousemove", b).on("mouseup", h); | |
f = a.clientX; | |
a.targetTouches && 0 < a.targetTouches.length && (f = a.targetTouches[0].clientX, a.preventDefault()); | |
a = n(f); | |
p(a); | |
c.fire(Ba, a, null); | |
return !1 | |
} | |
}) | |
})(); | |
(function () { | |
c.on(d.bufferStarted, function () { | |
U.classList.remove("hidden"); | |
N = !0; | |
F() | |
}); | |
c.on(d.bufferEnded, function () { | |
U.classList.add("hidden"); | |
N = !1 | |
}) | |
})(); | |
(function () { | |
function h(a) { | |
a.target === M && (a = n(a.clientX), p(a), c.fire(Ba, a)) | |
} | |
function f() { | |
ba && ba.classList.add("invisible"); | |
X = !1; | |
Gator(M).off("click", h) | |
} | |
Gator(g).on("mouseenter", ".progress", function (a) { | |
X || (s.requestAnimationFrame(function () { | |
ba.classList.remove("invisible"); | |
X = !0 | |
}), Gator(M).on("click", h)) | |
}).on("mousemove", | |
".play-bar", function (c) { | |
if (X) { | |
var d = n(c.clientX), | |
h = (100 * d).toFixed(3); | |
s.requestAnimationFrame(function () { | |
ba.style.left = h + "%"; | |
ia.innerHTML = b(a.video.duration * d); | |
c.clientX > l() + 10 && f() | |
}) | |
} | |
}).on("mouseleave", ".play-bar", f); | |
Gator(g).on("transitionend", ".ghost-timecode", function (a) { | |
"opacity" === a.propertyName && "0" === s.getComputedStyle(this, "").opacity && (ba.style.left = 0) | |
}, !1); | |
c.on(d.mousedOut, f) | |
})(); | |
(function () { | |
function a(b) { | |
var d = b.clientX; | |
b.targetTouches && (d = b.targetTouches[0].clientX, b.preventDefault()); | |
b = f(d); | |
c.fire(aa, b); | |
h(b) | |
} | |
function b(h) { | |
sa = !1; | |
c.fire(d.volumeScrubbingEnded); | |
var f = h.type; | |
"pointerup" === f || "MSPointerUp" === f ? Gator(g).off(["pointermove", "MSPointerMove"], ".volume", a).off(["pointerup", "MSPointerUp"], ".volume", b) : "touchend" === h.type ? Gator(w).off("touchmove", a).off("touchend", b) : Gator(w).off("mousemove", a).off("mouseup", b); | |
Q.setAttribute("tabindex", Q.getAttribute("data-tabindex")); | |
Q.removeAttribute("data-tabindex") | |
} | |
function h(a) { | |
if (Q) { | |
var b = a / (1 / pa.length), | |
c = Math.ceil(b), | |
d = b % 1, | |
f; | |
0.33 >= | |
d && (f = "fill1"); | |
0.33 < d && 0.66 >= d && (f = "fill2"); | |
pa.forEach(function (a, b) { | |
a.classList.remove("fill0"); | |
a.classList.remove("fill1"); | |
a.classList.remove("fill2"); | |
b === c - 1 && d && 0.66 >= d ? a.classList.add(f) : b > c - 1 && a.classList.add("fill0") | |
}); | |
Q.setAttribute("aria-valuenow", a.toFixed(3)); | |
Q.setAttribute("aria-valuetext", Math.round(100 * a) + "%") | |
} | |
} | |
function f(a) { | |
var b = Q.getBoundingClientRect().left, | |
c = Q.getBoundingClientRect().right - b; | |
return q.limit((a - b) / c, 0, 1) | |
} | |
Gator(g).on("mouseover", ".volume div", function () { | |
var a = this; | |
a.classList.add("hover"); | |
s.requestAnimationFrame(function () { | |
a.classList.remove("hover"); | |
a.classList.add("animate") | |
}) | |
}); | |
Gator(g).on("transitionend", ".volume div", function (a) { | |
"height" === a.propertyName && 12 === this.clientHeight && this.classList.remove("animate") | |
}); | |
Gator(w).on("contextmenu", ".volume", function () { | |
this.blur() | |
}); | |
var k; | |
Gator(g).on(["pointerdown", "MSPointerDown", "touchstart", "mousedown"], ".volume", function (m) { | |
if (1 === m.which) { | |
Q.setAttribute("data-tabindex", Q.getAttribute("tabindex")); | |
Q.removeAttribute("tabindex"); | |
sa = !0; | |
c.fire(d.volumeScrubbingStarted); | |
var l = m.type; | |
if ("pointerdown" === l || "MSPointerDown" === l) { | |
k = m.pointerId; | |
try { | |
m.target.msSetPointerCapture ? m.target.msSetPointerCapture(k) : m.target.setPointerCapture(k) | |
} catch (D) {} | |
Gator(g).on(["pointermove", "MSPointerMove"], ".volume", a).on(["pointerup", "MSPointerUp"], ".volume", b) | |
} else if ("touchstart" === l) Gator(w).on("touchmove", a).on("touchend", b); | |
else Gator(w).on("mousemove", a).on("mouseup", b); | |
l = m.clientX; | |
m.targetTouches && (l = m.targetTouches[0].clientX); | |
m = f(l); | |
c.fire(aa, | |
m); | |
h(m) | |
} | |
}); | |
c.on(d.volumeChanged, function (a) { | |
!sa && pa && h(a) | |
}) | |
})(); | |
(function () { | |
function a(b) { | |
da = b; | |
W && (W.setActiveItem(b), setTimeout(function () { | |
W.hide() | |
}, 100)); | |
$ && ($.setActiveItem(b), setTimeout(function () { | |
$.hide() | |
}, 100)); | |
ma && (ma.classList.add("on"), ma.classList.remove("off")); | |
ga && (ga.classList.add("on"), ga.classList.remove("off")) | |
} | |
function b() { | |
da = null; | |
W && (W.setActiveItem("off"), setTimeout(function () { | |
W.hide() | |
}, 100)); | |
$ && ($.setActiveItem("off"), setTimeout(function () { | |
$.hide() | |
}, 100)); | |
ma.classList.add("off"); | |
ma.classList.remove("on"); | |
ga.classList.add("off"); | |
ga.classList.remove("on") | |
} | |
q.attachClickHandler(g, ".cc", function () { | |
ma.contains(this) && !W ? (0, W = D(ma, M), W.show()) : ga.contains(this) && !$ && (0, $ = D(ga, g), $.show()); | |
c.fire(d.ccButtonClicked) | |
}); | |
c.on(d.captionsChanged, function (c) { | |
if (c) return a(c); | |
b() | |
}).on(d.controlBarVisibilityChanged, function (a) { | |
a || (W && W.hide(), $ && $.hide()) | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(g, ".hd", function () { | |
c.fire(d.hdButtonClicked) | |
}); | |
c.on(d.hdButtonClicked, function () { | |
if (!a.video.allow_hd) return c.fire(ja, | |
"hd-not-allowed"); | |
var b = V.classList.contains("on") ? "sd" : "hd"; | |
c.fire(9, b) | |
}); | |
c.on(9, function (a) { | |
"hd" === a ? (V.classList.add("on"), V.classList.remove("off"), V.setAttribute("title", V.getAttribute("data-title-on"))) : (V.classList.add("off"), V.classList.remove("on"), V.setAttribute("title", V.getAttribute("data-title-off"))) | |
}); | |
c.on(Pa, function () { | |
H() | |
}).on(Ra, function () { | |
J = !1; | |
H() | |
}) | |
})(); | |
(function () { | |
t.airPlay && (q.attachClickHandler(g, ".airplay", function () { | |
c.fire(d.airPlayButtonPressed) | |
}), c.on(d.airPlayAvailable, | |
function () { | |
ta.classList.remove("hidden"); | |
ta.hidden = !1 | |
}).on(d.airPlayNotAvailable, function () { | |
ta.classList.add("hidden"); | |
ta.hidden = !0 | |
}).on(d.airPlayActivated, function () { | |
xa = !0; | |
ka.classList.add("on"); | |
ka.setAttribute("title", ka.getAttribute("data-title-on")); | |
F() | |
}).on(d.airPlayDeactivated, function () { | |
xa = !1; | |
ka.classList.remove("on"); | |
ka.setAttribute("title", ka.getAttribute("data-title-off")) | |
})) | |
})(); | |
(function () { | |
function b(a) { | |
ya && (ya.setAttribute("data-full-size", a ? "1" : "0"), ya.setAttribute("title", ya.getAttribute(a ? | |
"data-title-full-size" : "data-title-actual-size"))) | |
} | |
q.attachClickHandler(g, ".scaling", function () { | |
c.fire(d.scalingButtonClicked); | |
c.fire(4, !a.request.cookie.scaling) | |
}); | |
c.on(4, b); | |
b(a.request.cookie.scaling) | |
})(); | |
(function () { | |
q.attachClickHandler(g, ".fullscreen", function () { | |
c.fire(d.fullscreenButtonClicked) | |
}); | |
c.on(d.didEnterFullscreen, function () { | |
Z = !0; | |
la.setAttribute("title", la.getAttribute("data-title-unfullscreen")) | |
}); | |
c.on(d.didExitFullscreen, function (a) { | |
Z = !1; | |
la.setAttribute("title", la.getAttribute("data-title-fullscreen")); | |
r(); | |
a || (C = !0, z()) | |
}) | |
})(); | |
(function () { | |
c.on([d.mousedOver, d.bufferStarted, d.scrubbingStarted, aa], F).on([d.mousedOut, d.mouseTimeout], E).on(d.willEnterFullscreen, function () { | |
u = !1; | |
E() | |
}).on(d.willExitFullscreen, function () { | |
u = !1 | |
}).on(d.targetTimeReached, function () { | |
Ja = !0; | |
E() | |
}).on(aa, function (a, b) { | |
b || F() | |
}); | |
Gator(g).on(["MSPointerEnter", "MSPointerLeave", "mouseenter", "mouseleave"], ".play .play-bar-cell .custom-logo-cell .tiny-fullscreen-cell .tiny-cc-cell .menu".split(" "), function (a) { | |
if ("pointerType" in a) { | |
if ("mouse" === | |
a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) u = "MSPointerEnter" === a.type | |
} else u = "mouseover" === a.type | |
}); | |
Gator(g).on("transitionend", function (b) { | |
this === g && "opacity" === b.propertyName && g.classList.contains("invisible") && (a.embed.settings.custom_logo && a.embed.settings.custom_logo.sticky || (g.classList.add("hidden"), g.setAttribute("hidden", "")), !I && S && (S.classList.remove("hidden"), S.removeAttribute("hidden"))) | |
}); | |
Gator(g.parentElement).on("focus", ".focus-dummy", function () { | |
var a = [].slice.call(g.querySelectorAll('[tabindex="' + | |
this.getAttribute("tabindex") + '"]'), 0), | |
b = a.indexOf(this); | |
s.requestAnimationFrame(function () { | |
a[b + 1].focus() | |
}) | |
}) | |
})(); | |
(function () { | |
c.on(d.overlayOpened, function (a) { | |
"notsupported" !== a && "private-unlocked" !== a && "help" !== a && (I = !0, E()) | |
}).on(d.overlayClosed, function () { | |
I = !1; | |
F() | |
}) | |
})(); | |
(function () { | |
c.on(d.configChanged, function (b) { | |
a = b; | |
H(); | |
a.view === ca && F(); | |
L = T = null | |
}) | |
})(); | |
(function () { | |
c.on(na, function () { | |
z(); | |
F(); | |
Ja = C = f = sa = G = u = y = !1; | |
W && (W.destroy(), W = null); | |
$ && ($.destroy(), $ = null) | |
}); | |
Gator(s).on("resize", function () { | |
L = | |
T = null | |
}) | |
})(); | |
(function () { | |
c.on(d.enteredTinyMode, function () { | |
Y = !0 | |
}).on(d.enteredMiniMode, function () { | |
Y = !1 | |
}).on(d.enteredNormalMode, function () { | |
Y = !1 | |
}) | |
})(); | |
c.on(d.playInitiated, function () { | |
m(); | |
y = !0; | |
var b = a.embed.time || a._video.currentTime; | |
p(b / a.video.duration, b); | |
f = !0 | |
}); | |
c.fire(d.controlBarModuleReady); | |
return {} | |
} | |
}(), | |
ob = function () { | |
var c = 0.05; | |
return function (b, a, e) { | |
function g() { | |
return b.view === ra || b.view === ca | |
} | |
function l() { | |
F && "help" === D && a.fire(d.overlayCloseButtonClicked) | |
} | |
function n(b) { | |
b = q.isArray(b) ? b : [b]; | |
return function () { | |
if (g()) { | |
if (F && | |
"help" === D) { | |
a.fire(d.overlayCloseButtonClicked); | |
if (b[0] === ja && "help" === b[1]) return !1; | |
if (b[0] !== Ca) return setTimeout(function () { | |
a.fire.apply(null, b) | |
}, 250), !1 | |
} | |
a.fire.apply(null, b); | |
return !1 | |
} | |
} | |
} | |
function r(c, h) { | |
u || (h && !b._video.paused && a.fire(d.pauseButtonClicked), a.fire(d.scrubbingStarted, !0), u = !0); | |
var e = y, | |
g = Math.ceil(t), | |
l = Math.ceil(m - t), | |
e = e / J; | |
e--; | |
C = l * (e * e * e + 1) + g; | |
y++; | |
1 === y && (C = b.video.fps); | |
g = h ? 1 : C; | |
g = "right" === c ? g : -g; | |
g = (Math["right" === c ? "ceil" : "floor"](b._video.currentTime * b.video.fps) + g) / b.video.fps; | |
a.fire(Ba, | |
null, g) | |
} | |
function p(b) { | |
C = t; | |
y = 0; | |
a.fire(d.scrubbingEnded, b.shiftKey); | |
u = !1 | |
} | |
function s() { | |
if (g()) { | |
if (z) return !1; | |
if (!w.activeElement || w.activeElement === w.body) return a.fire(d[b._video.paused ? "playButtonClicked" : "pauseButtonClicked"]), l(), !1 | |
} | |
} | |
function B() { | |
if (g()) { | |
if (w.activeElement && e.contains(w.activeElement)) return w.activeElement.blur(), !1; | |
if (F) return a.fire(d.overlayCloseButtonClicked), !1; | |
if (z) return z.hide(), z = !1 | |
} | |
} | |
function x() { | |
if (g()) { | |
if (z) return !1; | |
l(); | |
a.fire(aa, c, !1, !0); | |
return !1 | |
} | |
} | |
function h() { | |
if (g()) { | |
if (z) return !1; | |
l(); | |
a.fire(aa, -c, !1, !0); | |
return !1 | |
} | |
} | |
function A(b, d) { | |
if (g()) { | |
l(); | |
var h = -1 < d.indexOf("shift"); | |
h && (d = d.replace("shift+", "")); | |
if (w.activeElement && w.activeElement === E) return a.fire(aa, "left" === d ? -c : c, !1, !0), !1; | |
h || 0 === y ? r(d, h) : I(d, h) | |
} | |
} | |
e.querySelector(".controls_wrapper"); | |
var E = e.querySelector(".volume"), | |
F = !1, | |
D, z = !1, | |
t = b.video.fps / 5, | |
m = Math.max(t, 0.618 * b.video.duration), | |
J = 100, | |
C = t, | |
y = 0, | |
u = !1, | |
I = q.throttle(r, 80); | |
(function () { | |
a.on(d.overlayOpened, function (a) { | |
F = !0; | |
D = a; | |
"notsupported" === a && Mousetrap.pause() | |
}); | |
a.on(d.overlayClosed, | |
function () { | |
F = !1; | |
D = null | |
}) | |
})(); | |
(function () { | |
a.on(d.menuVisibilityChanged, function (a, b) { | |
z = a ? b : !1 | |
}) | |
})(); | |
(function () { | |
a.on(d.configChanged, function (a, c) { | |
b = a; | |
c && Mousetrap.unpause() | |
}) | |
})(); | |
(function () { | |
var a = { | |
l: d.likeButtonClicked, | |
w: d.watchLaterButtonClicked, | |
s: d.shareButtonClicked, | |
c: d.ccButtonClicked, | |
h: d.hdButtonClicked, | |
f: d.fullscreenButtonClicked, | |
space: s, | |
up: x, | |
down: h, | |
left: A, | |
right: A, | |
"shift+left": A, | |
"shift+right": A, | |
esc: B, | |
"?": [ja, "help"] | |
}; | |
b.embed.on_site || (a.v = Ca); | |
for (var c in a) "function" === typeof a[c] ? Mousetrap.bind(c, | |
a[c]) : Mousetrap.bind(c, n(a[c])); | |
Mousetrap.bind(["shift+left", "shift+right", "left", "right"], p, "keyup") | |
})(); | |
return { | |
pause: Mousetrap.pause, | |
unpause: Mousetrap.unpause | |
} | |
} | |
}(), | |
qb = function () { | |
return function (c, b, a, e) { | |
function g() { | |
var c = b.getBoundingClientRect(), | |
d = a.getBoundingClientRect(), | |
h = x.getBoundingClientRect(), | |
e = c.left + c.width / 2 - h.width / 2 - d.left, | |
g = a.classList.contains("play-bar") ? d.height : d.height - c.top, | |
h = d.left + e + h.width, | |
l = a.classList.contains("play-bar") ? d.right : d.width - parseInt(s.getComputedStyle(a).paddingRight, | |
10); | |
h > l && (e -= h - l, c = c.left - (d.left + e) + c.width / 2, c !== E && (q.addCssRule(".player .menu::after", "left:" + c + "px", w.styleSheets[w.styleSheets.length - 1]), E = c)); | |
x.style.left = e + "px"; | |
x.style.bottom = g + "px" | |
} | |
function l(a) { | |
var b = w.createElement("ul"); | |
b.classList.add("menu"); | |
b.classList.add("rounded-box"); | |
b.classList.add("hidden"); | |
b.classList.add("invisible"); | |
b.setAttribute("hidden", ""); | |
var c = w.createDocumentFragment(); | |
a.forEach(function (a) { | |
var b = w.createElement("li"); | |
b.setAttribute("data-id", a.id); | |
b.innerHTML = '<span tabindex="' + | |
F + '">' + a.label + "</span>"; | |
a.active && (b.classList.add("active"), h = b); | |
c.appendChild(b) | |
}); | |
b.appendChild(c); | |
return b | |
} | |
function n() { | |
x.classList.remove("hidden"); | |
x.removeAttribute("hidden"); | |
g(); | |
A = !0; | |
e.fire(d.menuVisibilityChanged, A, v); | |
s.requestAnimationFrame(function () { | |
x.classList.remove("invisible"); | |
x.classList.add("open") | |
}) | |
} | |
function r() { | |
A = !1; | |
e.fire(d.menuVisibilityChanged, A, v); | |
x.classList.add("invisible") | |
} | |
function p() { | |
A ? r() : n() | |
} | |
var v, B = Ea.make(), | |
x = null, | |
h = null, | |
A = !1, | |
E, F = b.getAttribute("tabindex") || "0"; | |
(function () { | |
x = | |
l(c); | |
q.attachClickHandler(x, ["li", "span"], function () { | |
B.fire("selected", ("SPAN" === this.tagName ? this.parentElement : this).getAttribute("data-id")); | |
q.resetFocus(x) | |
}); | |
q.attachClickHandler(b, function () { | |
p() | |
}); | |
Gator(s).on("focus", function () { | |
x.contains(w.activeElement) || w.activeElement === b || r() | |
}); | |
Gator(b).on("keyup", function (a) { | |
if (38 === a.which && A) { | |
var b = [].slice.call(x.querySelectorAll("[tabindex]"), 0); | |
b[b.length - 1].focus(); | |
a.preventDefault(); | |
a.stopPropagation(); | |
return !1 | |
} | |
}); | |
Gator(x).on("keyup", function (a) { | |
if (A) { | |
var c = | |
w.activeElement; | |
switch (a.which) { | |
case 13: | |
case 32: | |
if (x.contains(c)) return B.fire("selected", ("SPAN" === c.tagName ? c.parentElement : c).getAttribute("data-id")), a.preventDefault(), a.stopPropagation(), !1; | |
break; | |
case 38: | |
case 40: | |
var d = 38 === a.which ? "up" : "down", | |
h = [].slice.call(x.querySelectorAll("[tabindex]"), 0), | |
c = h.indexOf(c), | |
d = "up" === d ? c - 1 : c + 1; | |
if (d >= h.length) return b.focus(), a.preventDefault(), a.stopPropagation(), !1; | |
if (-1 < d && d < h.length) return h[d].focus(), a.preventDefault(), a.stopPropagation(), !1 | |
} | |
} | |
}); | |
a.parentElement.appendChild(x) | |
})(); | |
(function () { | |
Gator(w).on("click", function (a) { | |
A && !b.contains(a.target) && r() | |
}); | |
Gator(x).on("transitionend", function (a) { | |
this === x && "opacity" === a.propertyName && x.classList.contains("invisible") && (x.classList.add("hidden"), x.setAttribute("hidden", ""), x.classList.remove("open")) | |
}); | |
s.addEventListener("blur", r, !1); | |
e.on(d.didExitFullscreen, r).on(d.controlBarVisibilityChanged, function (a) { | |
a || r() | |
}) | |
})(); | |
return v = { | |
show: n, | |
hide: r, | |
toggle: p, | |
setActiveItem: function (a) { | |
h && h.classList.remove("active"); | |
if (a = x.querySelector('[data-id="' + | |
a + '"]')) a.classList.add("active"), h = a | |
}, | |
on: B.on, | |
off: B.off, | |
destroy: function () { | |
x.parentElement.removeChild(x) | |
} | |
} | |
} | |
}(), | |
kb = function () { | |
return function (c, b, a) { | |
function e(b) { | |
b = "watchlater" === b || "unwatchlater" === b ? 0.5 : 0.4; | |
var c = a.clientHeight; | |
a.clientHeight > a.clientWidth && (c = a.clientWidth); | |
return { | |
height: Math.round(c * b), | |
width: Math.round(c * b * 1.6) | |
} | |
} | |
function g(a, b) { | |
var c = a.querySelector(".hour-hand"), | |
d = a.querySelector(".minute-hand"); | |
if (c && d) { | |
var e = b ? 1 : -1, | |
g = new Date, | |
l = Math.abs(g.getHours() - 12), | |
n = g.getMinutes(), | |
g = n / 60 * 360 - 135, | |
l = l / 12 * 360 + n / 60 * 5, | |
p = l + 45 * e, | |
m = g + 540 * e; | |
if (t.browser.firefox || t.browser.opera) { | |
c.setAttribute("transform", "rotate(" + l + ",10 10)"); | |
d.setAttribute("transform", "rotate(" + g + ",10 10)"); | |
n = w.createElementNS("http://www.w3.org/2000/svg", "animateTransform"); | |
n.setAttribute("attributeName", "transform"); | |
n.setAttribute("type", "rotate"); | |
n.setAttribute("begin", "0.1s"); | |
n.setAttribute("repeatCount", "indefinite"); | |
var r = n.cloneNode(!1); | |
r.setAttribute("from", l + " 10 10"); | |
r.setAttribute("to", l + 360 * e + " 10 10"); | |
r.setAttribute("dur", "0.8s"); | |
c.appendChild(r); | |
l = n.cloneNode(!1); | |
l.setAttribute("from", g + " 10 10"); | |
l.setAttribute("to", g + 360 * e + " 10 10"); | |
l.setAttribute("dur", "9.6s"); | |
d.appendChild(l) | |
} else c.style[t.transformProperty + "Origin"] = "46% 81.5%", d.style[t.transformProperty + "Origin"] = "25.5% 26.5%", c.style[t.transformProperty] = "rotate(" + l + "deg)", d.style[t.transformProperty] = "rotate(" + g + "deg)"; | |
s.requestAnimationFrame(function () { | |
a.classList.add("animate"); | |
t.browser.firefox || t.browser.opera || s.requestAnimationFrame(function () { | |
c.style[t.transformProperty] = | |
"rotate(" + p + "deg)"; | |
d.style[t.transformProperty] = "rotate(" + m + "deg)" | |
}) | |
}) | |
} | |
} | |
function l(b, c) { | |
a.classList.remove("hidden"); | |
a.removeAttribute("hidden"); | |
a.setAttribute("data-name", b); | |
var d = e(b), | |
d = "width:" + d.width + "px;height:" + d.height + "px"; | |
p.style.cssText = d; | |
p.innerHTML = c; | |
"watchlater" !== b && "unwatchlater" !== b || g(p, "watchlater" === b); | |
"hd" === b && (p.querySelector(".hd-notification").style.cssText = d, p.querySelector(".hd-fill").style.cssText = d); | |
clearTimeout(v); | |
a.classList.remove("animate"); | |
s.requestAnimationFrame(function () { | |
a.classList.remove("invisible"); | |
"hd" !== b && (v = setTimeout(n, 750)) | |
}) | |
} | |
function n() { | |
a.classList.add("animate"); | |
a.classList.add("invisible") | |
} | |
function r() { | |
a.classList.remove("animate"); | |
a.classList.remove("invisible"); | |
a.classList.add("hidden"); | |
a.setAttribute("hidden", ""); | |
a.removeAttribute("data-name"); | |
p.innerHTML = ""; | |
p.classList.remove("filled"); | |
p.classList.remove("animate"); | |
b.fire(d.notificationHidden) | |
} | |
var p = a.querySelector(".notification"), | |
v; | |
(function () { | |
Gator(a).on("transitionend", function (b) { | |
p.contains(b.target) && "height" === b.propertyName ? | |
setTimeout(n, 100) : b.target === a && "opacity" === b.propertyName && s.requestAnimationFrame(r) | |
}) | |
})(); | |
(function () { | |
b.on(d.liked, function (a) { | |
a || l("like", Aftershave.render("icon_heart")) | |
}); | |
b.on(d.unliked, function (a) { | |
a || l("unlike", Aftershave.render("icon_broken_heart")) | |
}) | |
})(); | |
(function () { | |
b.on(d.addedToWatchLater, function (a) { | |
a || l("watchlater", Aftershave.render("icon_clock")) | |
}); | |
b.on(d.removedFromWatchLater, function (a) { | |
a || l("unwatchlater", Aftershave.render("icon_clock")) | |
}) | |
})(); | |
(function () { | |
b.on(9, function (a, b) { | |
0; | |
b || ("sd" === a && p.classList.add("filled"), s.requestAnimationFrame(function () { | |
l("hd", Aftershave.render("hd_notification", { | |
stroke: Aftershave.render("icon_hd", { | |
stroke: !0, | |
notification: !0 | |
}), | |
fill: Aftershave.render("icon_hd", { | |
notification: !0 | |
}) | |
}), !0); | |
s.requestAnimationFrame(function () { | |
"sd" === a ? p.classList.remove("filled") : p.classList.add("filled") | |
}) | |
})) | |
}) | |
})(); | |
(function () { | |
b.on(d.configChanged, function (a) {}) | |
})(); | |
b.fire(d.notificationModuleReady); | |
return {} | |
} | |
}(), | |
lb = function () { | |
return function (c, b, a) { | |
function e() { | |
if ("vod" === | |
c.embed.outro) p = { | |
purchased: c.user.purchased, | |
title: c.video.vod.feature_title, | |
url: c.video.vod.url, | |
buttons: c.video.vod.purchase_options, | |
preorder: c.video.vod.date_available | |
}, !0 === v && l(); | |
else { | |
0; | |
t = !0; | |
var a = new XMLHttpRequest; | |
a.open("GET", "//" + c.player_url + "/video/" + c.video.id + "/outro", !0); | |
a.withCredentials = !0; | |
a.onload = function () { | |
try { | |
var b = JSON.parse(a.response); | |
0; | |
p = b.data; | |
if ("videos" === b.type) { | |
p.owner = c.video.owner.id; | |
for (var b = 0, d = p.videos.length; b < d; b++)(new Image).src = p.videos[b].thumbnail | |
}!0 === v && l() | |
} catch (e) {} | |
}; | |
a.send() | |
} | |
} | |
function g() { | |
var a = s.getComputedStyle(r.querySelector("header h1"), null), | |
b = a.getPropertyValue("-webkit-line-clamp"), | |
a = a.textOverflow; | |
if (!b) | |
for (var b = r.querySelectorAll("header h1"), c = 0, d = b.length; c < d; c++) | |
if ("clip" === a) | |
for (var e = b[c], g = e.innerHTML; e.scrollHeight > e.offsetHeight;) g = g.substring(0, g.length - 1), e.innerHTML = g + "…"; | |
else b[c].style.display = "inherit" | |
} | |
function l() { | |
if ("beginning" === c.embed.outro) return b.fire(na); | |
!p || "videos" === c.embed.outro && 0 === p.videos.length || (r.innerHTML = | |
Aftershave.render("outro_" + c.embed.outro, p), a.classList.remove("hidden"), a.removeAttribute("hidden"), "videos" === c.embed.outro && g(), s.requestAnimationFrame(function () { | |
a.classList.add("in") | |
})) | |
} | |
function n() { | |
s.requestAnimationFrame(function () { | |
a.classList.remove("in") | |
}) | |
} | |
var r = a.querySelector(".outro"), | |
p = null, | |
v = !1, | |
t = !1; | |
(function () { | |
b.on(d.playProgress, function (a, b, c) { | |
v = !1; | |
!t && null === p && a >= b - 10 && e() | |
}) | |
})(); | |
(function () { | |
b.on(d.playInitiated, function () { | |
if ("nothing" === c.embed.outro || "beginning" === c.embed.outro) p = !1 | |
}); | |
b.on(d.ended, function () { | |
v = !0; | |
null !== p || t ? l() : e() | |
}); | |
Gator(a).on("transitionend", function (b) { | |
a.classList.contains("in") || (a.classList.add("hidden"), a.setAttribute("hidden", "")) | |
}, !1); | |
b.on([d.played, d.seeked, d.scrubbingStarted], n) | |
})(); | |
(function () { | |
b.on(ja, function () { | |
setTimeout(function () { | |
a.classList.add("hidden") | |
}, 150) | |
}); | |
b.on(d.overlayClosed, function () { | |
a.classList.contains("in") && a.classList.remove("hidden") | |
}) | |
})(); | |
(function () { | |
b.on(na, function () { | |
p = null; | |
t = !1 | |
}) | |
})(); | |
(function () { | |
b.on(d.configChanged, function (a) { | |
c = | |
a | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(a, ".vod-button", function () { | |
var a = this.getAttribute("data-product-id"); | |
b.fire(d.vodButtonPressed, a); | |
return !1 | |
}); | |
q.attachClickHandler(a, ".vod-watch-button", function () { | |
if (!("date_available" in c.video.vod)) return n(), b.fire(d.vodButtonPressed), !1 | |
}) | |
})(); | |
return {} | |
} | |
}(), | |
db = function () { | |
var c = "Uh Oh!{D’Oh!{Aw fiddlesticks!{Jeepers!{Oh dear!{Ouch!{Zoinks!{Awww, snap!{Blast!{Curses!{ACK!{Aw shucks.{Major bummer.{Dag-nab-it!{Aargh!{Boo-hoo!{¡Ay caramba!".split("{"); | |
return function (b, a, e) { | |
function g() { | |
var a = e.getBoundingClientRect(), | |
b = J.getBoundingClientRect(), | |
c = u.getBoundingClientRect(); | |
return a.height - (b.bottom + (a.height - b.bottom) / 2) - c.height / 2 + "px" | |
} | |
function l() { | |
var a = e.getBoundingClientRect(), | |
b = J.getBoundingClientRect(), | |
c = C.getBoundingClientRect(); | |
0; | |
0; | |
0; | |
var d = a.height / 2, | |
a = b.bottom + (a.height - b.bottom) / 2; | |
0; | |
0; | |
return { | |
top: d - c.height / 2 + "px", | |
transform: "translateY(" + (a - d) + "px)" | |
} | |
} | |
function n(b, c) { | |
0; | |
e.setAttribute("data-name", b); | |
J.innerHTML = c.template; | |
c.modal && (e.classList.add("modal"), | |
e.setAttribute("data-modal", "true")); | |
c.wrapperClass && e.classList.add(c.wrapperClass); | |
c.icon.type && (c.logo && (u.classList.remove("hidden"), C.classList.add("cloaked"), s.requestAnimationFrame(function () { | |
u.innerHTML = Aftershave.render("logo"); | |
u.style.bottom = g() | |
})), C.classList.remove("hidden"), y.innerHTML = c.icon.html, s.requestAnimationFrame(function () { | |
var a = l(); | |
C.style.top = a.top; | |
C.style[t.transformProperty] = a.transform | |
}), e.setAttribute("data-icon", c.icon.type), C.setAttribute("data-icon", c.icon.type), y.setAttribute("data-icon", | |
c.icon.type), "private-unlocked" === b && y.classList.add("open")); | |
e.classList.add("invisible"); | |
e.classList.remove("hidden"); | |
e.removeAttribute("hidden"); | |
e.classList.add("in"); | |
sa = c; | |
N = b; | |
R = !0; | |
a.fire(d.overlayOpened, b); - 1 < ["share", "hd-not-allowed"].indexOf(b) && q.resetFocus(e); | |
s.requestAnimationFrame(function () { | |
e.classList.remove("invisible"); | |
s.requestAnimationFrame(function () { | |
J.classList.add("in"); | |
m.classList.add("in") | |
}) | |
}) | |
} | |
function r() { | |
J.classList.remove("in"); | |
J.classList.add("out") | |
} | |
function p(b) { | |
"true" !== | |
e.getAttribute("data-modal") && R && (m.classList.remove("in"), m.classList.add("out"), r(), e.classList.remove("in"), e.classList.add("out"), clearTimeout(I), I = setTimeout(v, 200), b && b.preventDefault && b.preventDefault(), (b = e.querySelector(".back")) && b.classList.add("cloaked"), a.fire(d.overlayClosed), R = !1, sa = N = null) | |
} | |
function v() { | |
e.setAttribute("hidden", ""); | |
e.removeAttribute("data-name"); | |
e.removeAttribute("data-icon"); | |
e.classList.add("hidden"); | |
e.classList.remove("out"); | |
e.classList.remove("embed-active"); | |
e.classList.remove("modal"); | |
e.classList.remove("embed-only"); | |
m.classList.remove("out"); | |
m.classList.remove("in"); | |
C.removeAttribute("data-icon"); | |
C.classList.add("hidden"); | |
C.classList.remove("animate"); | |
y.removeAttribute("data-icon"); | |
y.innerHTML = ""; | |
u.classList.add("hidden"); | |
J.classList.remove("out"); | |
J.innerHTML = ""; | |
a.fire(d.overlayCleared) | |
} | |
function B() { | |
e.setAttribute("data-modal", "false") | |
} | |
function x(a) { | |
if ("yes" === a.form.getAttribute("data-bubble")) { | |
a.form.setAttribute("data-bubble", "no"); | |
var b = e.querySelector(".validation-bubble"); | |
b.querySelector(".validation-bubble-message").innerHTML = a.validationMessage || "There is an error with this input."; | |
var c = a.getBoundingClientRect(), | |
d = a.form.getBoundingClientRect(); | |
b.style.left = c.left - d.left + "px"; | |
b.style.top = c.height + 1 + "px"; | |
b.classList.remove("hidden"); | |
a.focus(); | |
s.requestAnimationFrame(function () { | |
b.classList.add("animate") | |
}); | |
h() | |
} | |
} | |
function h(a) { | |
var b = e.querySelector(".validation-bubble"); | |
if (b) { | |
if (a) return clearTimeout(G), b.classList.remove("animate"); | |
clearTimeout(G); | |
G = setTimeout(function () { | |
b.classList.remove("animate") | |
}, | |
5E3) | |
} | |
} | |
function A(a) { | |
var b = e.querySelector("input[type=password]"); | |
if (b.form.classList.contains("submitted")) { | |
b.setAttribute("aria-invalid", "false"); | |
b.setCustomValidity(""); | |
if (b.checkValidity && !b.checkValidity()) return b.setAttribute("aria-invalid", "true"), b.validity.valueMissing && b.setCustomValidity("Please enter the password."), a || x(b), !1; | |
h(!0); | |
return !0 | |
} | |
} | |
function E(a, b, c) { | |
q.resetFocus(e); | |
var d = Array.prototype.slice.call(a.querySelectorAll("input"), 0).map(function (a) { | |
if (a.name) return encodeURIComponent(a.name) + | |
"=" + encodeURIComponent(a.value) | |
}).join("&"), | |
h = new XMLHttpRequest; | |
h.open(a.method, a.action + s.location.search); | |
h.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); | |
h.withCredentials = !0; | |
h.timeout = 3E3; | |
h.onload = function () { | |
var a; | |
try { | |
a = JSON.parse(h.responseText) | |
} catch (c) {} | |
b(a, h) | |
}; | |
h.onerror = function (a) { | |
c(a) | |
}; | |
h.send(d) | |
} | |
function F() { | |
C.classList.remove("cloaked"); | |
C.classList.add("animate"); | |
s.requestAnimationFrame(function () { | |
C.style[t.transformProperty] = "translateY(-10px)" | |
}) | |
} | |
function D() { | |
y.classList.add("open") | |
} | |
function z() { | |
return { | |
modal: !1, | |
template: null, | |
logo: !1, | |
icon: { | |
type: null, | |
html: null | |
} | |
} | |
} | |
function H(a, c) { | |
a.template = Aftershave.render("share", { | |
url: b.video.url, | |
shareUrl: b.video.share_url, | |
playerShareUrl: "//" + b.player_url + "/video/" + b.video.id + "/share", | |
title: b.video.title, | |
owner: b.video.owner.name, | |
embed: "public" === b.video.embed_permission && b.embed.settings.embed, | |
embedOnly: b.embed.settings.share && b.embed.settings.share.embed_only, | |
embedCode: b.video.embed_code.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, | |
">").replace(/"/g, """), | |
copyButton: t.flash.installed, | |
customizeEmbed: !!b.video.url, | |
readOnly: !t.touch | |
}); | |
b.embed.settings.share && b.embed.settings.share.embed_only && (a.wrapperClass = "embed-only"); | |
return a | |
} | |
var m = e.querySelector(".overlay-cell"), | |
J = e.querySelector(".overlay"), | |
C = e.querySelector(".overlay-icon-wrapper"), | |
y = C.querySelector(".overlay-icon"), | |
u = e.querySelector(".overlay-logo"), | |
I, G, R = !1, | |
N = null, | |
sa = null; | |
(function () { | |
a.on(ja, function (c, e) { | |
0; | |
var h = function () { | |
var a = z(); | |
switch (c) { | |
case "share": | |
return n(c, | |
H(a, e)); | |
case "private-locked": | |
return a.icon = { | |
type: "lock", | |
html: Aftershave.render("icon_lock") | |
}, a.modal = !0, a.logo = !0, a.template = Aftershave.render("private_locked", { | |
title: "Private Video", | |
subtitle: "Log in to watch (if you have permission).", | |
action: ("dev" === b.build.rpc ? "http" : "https") + "://" + b.vimeo_url + "/log_in" | |
}), n(c, a); | |
case "hd-not-allowed": | |
return a.icon = { | |
type: "hd", | |
html: Aftershave.render("icon_hd") | |
}, a.template = Aftershave.render("hd_not_allowed", { | |
title: "Sorry, HD not available here", | |
subtitle: "Watch this video in HD on Vimeo.com", | |
button: "Watch in HD now", | |
url: b.video.url | |
}), n(c, a); | |
case "password": | |
return a.icon = { | |
type: "lock", | |
html: Aftershave.render("icon_lock") | |
}, a.template = Aftershave.render("password", { | |
title: "Password Required", | |
subtitle: "If you’ve got it, enter it below.", | |
action: "//" + b.player_url + "/video/" + b.video.id + "/check-password" | |
}), a.modal = !0, a.logo = !!b.embed.settings.branding, n(c, a); | |
case "private-unlocked": | |
return a.icon = { | |
type: "lock", | |
html: Aftershave.render("icon_lock") | |
}, a.template = Aftershave.render("private_unlocked"), | |
n(c, a); | |
case "error": | |
return a.template = Aftershave.render("error", { | |
title: e.title, | |
message: e.message | |
}), a.modal = !!e.modal, a.logo = !!e.logo, e.icon && "lock" === e.icon && (a.icon = { | |
type: "lock", | |
html: Aftershave.render("icon_lock") | |
}), n(c, a); | |
case "help": | |
return a.template = Aftershave.render("help", { | |
onSite: b.embed.on_site | |
}), n(c, a); | |
case "content-rating": | |
return a.template = Aftershave.render("content_rating", { | |
logo: Aftershave.render("logo") | |
}), a.modal = !0, n(c, a) | |
} | |
}; | |
if (R) { | |
if ("share" !== N && "help" !== N && "hd-not-allowed" !== N || N !== | |
c) a.once(d.overlayCleared, h), B(); | |
p() | |
} else h() | |
}); | |
Gator(e).on("input", "input", function () { | |
this.form.classList.add("interacted") | |
}).on(["focus", "blur"], "input", function () { | |
h(!0) | |
}).on("transitionend", ".validation-bubble", function (a) { | |
"opacity" === a.propertyName && "0" === s.getComputedStyle(this, "").opacity && this.classList.add("hidden") | |
}); | |
a.on([d.overlayCloseButtonClicked, d.played], p); | |
a.on(d.privateUnlocked, function () { | |
"private-locked" === N && (B(), p()) | |
}); | |
a.on(d.configChanged, function (a) { | |
"share" === N && (sa = H(z(), a.embed.settings.share.embed_only), | |
J.innerHTML = sa.template) | |
}); | |
Gator(s).on("resize", function () { | |
if (R) { | |
u.style.bottom = g(); | |
var a = l(); | |
C.style.top = a.top; | |
C.style[t.transformProperty] = a.transform | |
} | |
}) | |
})(); | |
(function () { | |
Gator(e).on("transitionend", ".overlay-logo", function (a) { | |
"opacity" === a.propertyName && this.classList.contains("animate") && (u.classList.add("hidden"), u.classList.remove("animate")) | |
}); | |
Gator(e).on("transitionend", ".overlay-icon-wrapper", function (a) { | |
-1 < a.propertyName.indexOf("transform") && ("" === this.style[t.transformProperty] ? (this.classList.remove("centered"), | |
"lock" !== this.getAttribute("data-icon") || y.classList.contains("open") || y.querySelector("canvas") ? y.classList.add("pulled-back") : setTimeout(D, 100)) : "translateY(-10px)" === this.style[t.transformProperty] && (C.classList.add("centered"), C.style[t.transformProperty] = "")) | |
}); | |
Gator(e).on("transitionend", ".overlay-icon", function (a) { | |
-1 < a.propertyName.indexOf("transform") && (this.classList.contains("out") ? (B(), p()) : this.classList.contains("pulled-back") ? (y.classList.add("out"), y.classList.remove("pulled-back")) : | |
this.classList.contains("open") && y.classList.add("pulled-back")) | |
}) | |
})(); | |
(function () { | |
Gator(e).on("transitionend", ".share-screen", function (a) { | |
"opacity" === a.propertyName && "0" === s.getComputedStyle(this, "").opacity && this.classList.add("cloaked") | |
}).on("transitionend", ".embed-screen", function (a) { | |
"opacity" === a.propertyName && "0" === s.getComputedStyle(this, "").opacity && (e.querySelector(".back").classList.add("cloaked"), this.classList.add("cloaked"), q.resetFocus(e)) | |
}).on("copy", "input[name=embed_code]", function () { | |
a.fire(d.embedCodeCopied) | |
}); | |
q.attachClickHandler(e, ".back", function () { | |
e.querySelector(".share-screen").classList.remove("cloaked"); | |
e.classList.remove("embed-active"); | |
return !1 | |
}); | |
q.attachClickHandler(e, ".facebook", function () { | |
a.fire(d.facebookButtonClicked, this.href); | |
w.activeElement.blur(); | |
return !1 | |
}); | |
q.attachClickHandler(e, ".twitter", function () { | |
a.fire(d.twitterButtonClicked, this.href); | |
w.activeElement.blur(); | |
return !1 | |
}); | |
q.attachClickHandler(e, ".email", function () { | |
a.fire(d.emailButtonClicked) | |
}); | |
q.attachClickHandler(e, ".embed", function () { | |
a.fire(d.embedButtonClicked); | |
w.activeElement.blur(); | |
return !1 | |
}); | |
if (t.touch) Gator(J).on("focus", "input[name=embed_code]", function () { | |
0; | |
var a = this; | |
setTimeout(function () { | |
a.setSelectionRange(0, 9999); | |
a.setAttribute("readonly", "readonly") | |
}, 0) | |
}).on("blur", "input", function () { | |
this.removeAttribute("readonly") | |
}); | |
else Gator(J).on("click", "input[name=embed_code]", function () { | |
this.setSelectionRange(0, 9999) | |
}); | |
a.on(d.facebookButtonClicked, function (a) { | |
q.openWindow(a, 580, 400, "facebook", "scrollbars=yes,resizable=yes,toolbar=no") | |
}).on(d.twitterButtonClicked, | |
function (a) { | |
q.openWindow(a, 550, 420, "twitter", "scrollbars=yes,resizable=yes,toolbar=no") | |
}).on(d.embedButtonClicked, function () { | |
function a() { | |
var d = w.getElementById("copy-button"); | |
(new ZeroClipboard(d, { | |
moviePath: b.request.urls.zeroclip_swf, | |
trustedDomains: ["*"], | |
allowScriptAccess: "always" | |
})).on("complete", function (a, b) { | |
var d = w.getElementById("copy-button"); | |
d.innerHTML = "Copied!"; | |
clearTimeout(c); | |
c = setTimeout(function () { | |
d.innerHTML = "Copy" | |
}, 2E3); | |
q.resetFocus(e) | |
}) | |
} | |
b.embed.settings.share.embed_only || (e.querySelector(".back").classList.remove("cloaked"), | |
e.querySelector(".embed-screen").classList.remove("cloaked"), e.classList.add("embed-active")); | |
var c; | |
if (t.flash.installed) | |
if (w.getElementById("zc_script_loaded")) a(); | |
else { | |
var d = w.createElement("script"), | |
h; | |
d.setAttribute("id", "zc_script_loaded"); | |
d.setAttribute("src", b.request.urls.zeroclip_js); | |
d.onreadystatechange = d.onload = function () { | |
h || (0, a()); | |
h = !0 | |
}; | |
w.getElementsByTagName("head")[0].appendChild(d) | |
} | |
}) | |
})(); | |
(function () { | |
Gator(J).on("click", ".popup", function () { | |
a.fire(qa, "login-private-locked"); | |
return !1 | |
}) | |
})(); | |
(function () { | |
function b(c) { | |
function e(a) { | |
g.classList.remove("loading"); | |
h.setCustomValidity("Uh oh. There was a problem. Please try again."); | |
h.setAttribute("aria-invalid", "true"); | |
x(h) | |
} | |
if (!A()) return !1; | |
var h = c.querySelector("input[type=password]"), | |
g = c.querySelector("input[type=submit]"); | |
g.classList.add("loading"); | |
E(c, function (b, c) { | |
if (!1 === b) return e(c.status, c); | |
a.fire(d.passwordUnlocked, b); | |
"icon-hidden" === s.getComputedStyle(m, ":after").content ? (B(), p()) : (u.classList.add("animate"), F(), B(), r()) | |
}, e) | |
} | |
Gator(J).on("click", | |
".password input[type=submit]", function () { | |
this.form.classList.add("submitted"); | |
this.form.setAttribute("data-bubble", "yes"); | |
A(!0) | |
}).on("submit", ".password form", function () { | |
b(this); | |
return !1 | |
}).on(["focus", "input"], [".password input[type=email]", ".password input[type=password]"], function () { | |
A() | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(J, ".unlocked button", function () { | |
u.classList.add("animate"); | |
F(); | |
B(); | |
r(); | |
if (!t.iPad && !t.iPhone) a.once(d.overlayCleared, function () { | |
a.fire(d.playButtonClicked) | |
}) | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(J, | |
".content-rating button", function () { | |
B(); | |
p() | |
}) | |
})(); | |
(function () { | |
a.on(d.error, function (e, h) { | |
var f = e, | |
g = h && h.title || "Sorry", | |
l = h && h.message || "There was an issue with playback.", | |
m = -1 < s.location.search.indexOf("partypooper=1") || -1 < s.location.search.indexOf("fun=0"); | |
switch (e) { | |
case "no-files": | |
f = "notsupported"; | |
g = m ? "Sorry" : c[Math.floor(Math.random() * c.length)]; | |
l = "There was an error loading the files for this video."; | |
break; | |
case "not-supported": | |
f = "notsupported"; | |
g = m ? "Sorry" : c[Math.floor(Math.random() * c.length)]; | |
l = "This video can’t be played with your current setup."; | |
0.5 < b._video.currentTime && (l = "There was an issue playing this video."); | |
break; | |
case "decode": | |
f = "decode", g = "Oops!", l = "There was a problem with this video." | |
} | |
var k = z(); | |
k.modal = h && h.modal || !0; | |
k.template = Aftershave.render("error", { | |
title: g, | |
message: l | |
}); | |
R ? (p(), a.once(d.overlayClosed, function () { | |
n(f, k) | |
})) : n(f, k) | |
}) | |
})(); | |
(function () { | |
a.on(d.configChanged, function (a) { | |
b = a; | |
s.requestAnimationFrame(function () { | |
B(); | |
p() | |
}) | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(e, | |
".close", function () { | |
a.fire(d.overlayCloseButtonClicked) | |
}); | |
Gator(e).on(["click", "touchend"], [".window-wrapper", ".share-wrapper", ".overlay-logo"], function (a) { | |
a.stopPropagation() | |
}).on(["click", "touchend"], [".overlay-cell", "nav"], function () { | |
a.fire(d.overlayCloseButtonClicked); | |
return !1 | |
}) | |
})(); | |
a.fire(d.overlayModuleReady); | |
return {} | |
} | |
}(), | |
jb = function () { | |
return function (c, b, a) { | |
function e() { | |
!v || !(B && G || h) || x || A && !h || (v = !1, b.fire(d.sidedockVisibilityChanged, v), a.classList.add("invisible")) | |
} | |
function g() { | |
v || h || (a.classList.add("invisible"), | |
a.classList.remove("hidden"), a.removeAttribute("hidden"), a.classList.contains("vod") && (a.classList.remove("vod"), a.setAttribute("data-vod-highlight", "no"), E.classList.remove("bouncing")), setTimeout(function () { | |
v = !0; | |
b.fire(d.sidedockVisibilityChanged, v); | |
a.classList.remove("invisible") | |
}, 0)) | |
} | |
function l(a, b, d) { | |
var e = "data-label-" + d; | |
a.setAttribute("aria-label", a.getAttribute("add" !== d || c.user.logged_in ? e : "data-label-add-logged-out")); | |
b.classList.add("hidden"); | |
b.setAttribute("hidden", ""); | |
b.firstChild.innerHTML = | |
a.getAttribute(e) | |
} | |
function n() { | |
var a = y.indexOf(this); | |
u.forEach(function (b, c) { | |
c !== a && b && b.classList.add("invisible") | |
}); | |
0 <= a && (u[a].classList.add("invisible"), u[a].classList.remove("hidden"), u[a].removeAttribute("hidden", ""), I = s.requestAnimationFrame(function () { | |
u[a].classList.remove("invisible"); | |
u[a].classList.add("visible") | |
})) | |
} | |
function r() { | |
var a = "BUTTON" === this.tagName ? this : this.querySelector("button"), | |
a = y.indexOf(a); | |
0 <= a && (I && (s.cancelAnimationFrame(I), I = null), u[a].classList.add("invisible")) | |
} | |
function p() { | |
if (c.view === | |
ra || c.view === ca) { | |
c.video.vod && "purchase_options" in c.video.vod && c.video.vod.purchase_options.length && "no" !== a.getAttribute("data-vod-highlight") ? a.classList.add("vod") : t.touch && (v = !0, b.fire(d.sidedockVisibilityChanged, v), a.classList.remove("hidden"), a.removeAttribute("hidden"), a.classList.remove("invisible")); | |
var e = c.embed.settings, | |
h = c.video.vod && "purchase_options" in c.video.vod && c.video.vod.purchase_options.length; | |
a.innerHTML = Aftershave.render("sidedock", { | |
loggedIn: !!c.user.logged_in, | |
vodButton: h && | |
e.vod, | |
purchased: c.video.vod && c.user.purchased ? 1 : 0, | |
vodLabel: h && c.video.vod.purchase_options[0].label, | |
vodPreorder: h && "date_available" in c.video.vod ? 1 : 0, | |
expiring: h && c.video.vod.purchase_options[0].expiring ? 1 : 0, | |
likeButton: e.like, | |
liked: c.user.liked, | |
watchLaterButton: e.watch_later, | |
addedToWatchLater: c.user.watch_later, | |
shareButton: e.share, | |
shareButtonLabel: e.share && e.share.embed_only ? "Embed" : "Share" | |
}); | |
E = a.querySelector(".vod-button"); | |
F = a.querySelector(".vod-label"); | |
D = a.querySelector(".like-button"); | |
z = a.querySelector(".like-label"); | |
w = a.querySelector(".watch-later-button"); | |
m = a.querySelector(".watch-later-label"); | |
J = a.querySelector(".share-button"); | |
C = a.querySelector(".share-label"); | |
y = [E, D, w, J]; | |
u = [F, z, m, C] | |
} | |
} | |
var v = !1, | |
B = !1, | |
x = !1, | |
h = !1, | |
A = !1, | |
E, F, D, z, w, m, J, C, y = [], | |
u = [], | |
I = null, | |
G = !1; | |
p(); | |
(function () { | |
q.attachClickHandler(a, ".vod-button", function () { | |
b.fire(d.vodButtonPressed); | |
F.classList.add("hidden"); | |
F.setAttribute("hidden", "") | |
}, r) | |
})(); | |
(function () { | |
q.attachClickHandler(a, ".like-button", function () { | |
b.fire(d.likeButtonClicked) | |
}, r); | |
b.on(d.liked, | |
function () { | |
D && (D.classList.add("on"), l(D, z, "remove")) | |
}); | |
b.on(d.unliked, function () { | |
D && (D.classList.remove("on"), l(D, z, "add")) | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(a, ".watch-later-button", function () { | |
b.fire(d.watchLaterButtonClicked) | |
}, r); | |
b.on(d.addedToWatchLater, function () { | |
w && (w.classList.add("on"), l(w, m, "remove")) | |
}); | |
b.on(d.removedFromWatchLater, function () { | |
w && (w.classList.remove("on"), l(w, m, "add")) | |
}) | |
})(); | |
(function () { | |
q.attachClickHandler(a, ".share-button", function () { | |
b.fire(c.embed.settings.share.embed_only ? | |
d.embedButtonClicked : d.shareButtonClicked) | |
}, r) | |
})(); | |
(function () { | |
Gator(a).on("blur", "button", r).on("mouseleave", ".box", r).on(["focus", "pointerdown", "MSPointerDown", "touchstart", "mouseenter"], "button", n).on("transitionend", "label", function (a) { | |
"opacity" === a.propertyName && a.target.classList.contains("invisible") && (a.target.classList.add("hidden"), a.target.setAttribute("hidden", ""), a.target.classList.remove("visible")) | |
}).on(["MSPointerEnter", "MSPointerLeave", "mouseenter", "mouseleave"], ".vod-label", function (a) {}); | |
q.attachClickHandler(a, "label", function () { | |
var a = u.indexOf(this); | |
0 <= a && y[a].click() | |
}) | |
})(); | |
(function () { | |
b.on([d.mousedOut, d.mouseTimeout], e).on(d.mousedOver, g).on(d.targetTimeReached, function () { | |
G = !0; | |
e() | |
}).on(d.played, function () { | |
B = !0 | |
}); | |
Gator(a).on(["MSPointerEnter", "MSPointerLeave", "mouseenter", "mouseleave"], function (a) { | |
if ("pointerType" in a) { | |
if ("mouse" === a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) x = "MSPointerEnter" === a.type | |
} else x = "mouseover" === a.type | |
}); | |
Gator(a).on("transitionend", function (b) { | |
"opacity" === | |
b.propertyName && a.classList.contains("invisible") && (a.classList.add("hidden"), a.setAttribute("hidden", "")) | |
}) | |
})(); | |
(function () { | |
b.on(d.willEnterFullscreen, function () { | |
x = !1; | |
e() | |
}).on(d.didExitFullscreen, function (a) {}) | |
})(); | |
(function () { | |
b.on(d.airPlayActivated, function () { | |
A = !0; | |
g() | |
}).on(d.airPlayDeactivated, function () { | |
A = !1 | |
}) | |
})(); | |
(function () { | |
b.on(d.overlayOpened, function () { | |
h = !0; | |
x = !1; | |
e() | |
}).on(d.overlayClosed, function () { | |
h = !1; | |
g() | |
}) | |
})(); | |
(function () { | |
b.on(d.configChanged, function (b, d) { | |
c = b; | |
d && a.removeAttribute("data-vod-highlight"); | |
p() | |
}) | |
})(); | |
(function () { | |
b.on(na, function () { | |
G = x = !1; | |
e(); | |
x = B = !1 | |
}) | |
})(); | |
b.fire(d.sidedockModuleReady); | |
return {} | |
} | |
}(), | |
eb = function () { | |
return function (c, b) { | |
function a(a) { | |
return Object.keys(a).map(function (b) { | |
return encodeURIComponent(b) + "=" + encodeURIComponent(a[b]) | |
}).join("&") | |
} | |
function e(d, e, h, g) { | |
b.fire(Ga); | |
if (r) A.push([d, e, h, 0]); | |
else { | |
e.signature = c.request.signature; | |
e.session = c.request.session; | |
e.time = c.request.timestamp; | |
e.expires = c.request.expires; | |
var l = a(e), | |
m = new XMLHttpRequest; | |
m.open("POST", "//" + c.player_url + | |
d, !h); | |
m.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); | |
m.onload = function () { | |
200 !== m.status && 2 > g && A.push([d, e, h, g + 1]) | |
}; | |
m.send(l) | |
} | |
} | |
function g(a, b, d) { | |
e(a, { | |
referrer: c.request.referrer, | |
embed: !c.embed.on_site, | |
context: c.embed.context, | |
id: c.video.id, | |
vodId: c.video.vod && c.video.vod.id ? c.video.vod.id : null, | |
userId: c.user.id, | |
userAccountType: c.user.account_type, | |
ownerId: c.video.owner.id, | |
ownerAccountType: c.video.owner.account_type, | |
privacy: c.video.privacy, | |
rating: c.video.rating ? c.video.rating.id : null, | |
type: c._video.currentRenderer, | |
videoFileId: c._video.currentFile.id || 0, | |
delivery: c._video.currentFile.hls ? "hls" : "progressive", | |
quality: c._video.currentFile.quality, | |
duration: q.round(c.video.duration), | |
seconds: q.round(b) | |
}, d) | |
} | |
function l(a, b) { | |
c.request.flags.partials && c.request.flags.plays && (a = Math.round(1E3 * a) / 1E3 || 0, a > p && !v && (0, p = a, g("/log/partial", a, b))) | |
} | |
function n(a, b) { | |
e("/log/" + a, { | |
referrer: c.request.referrer, | |
embed: !c.embed.on_site, | |
context: c.embed.context, | |
id: c.video.id, | |
vodId: c.video.vod && c.video.vod.id ? | |
c.video.vod.id : null, | |
userId: c.user.id, | |
userAccountType: c.user.account_type, | |
ownerId: c.video.owner ? c.video.owner.id : 0, | |
duration: q.round(c.video.duration), | |
seconds: q.round(c._video.currentTime), | |
add: b | |
}) | |
} | |
var r = !1, | |
p = 0, | |
v = !1, | |
t = 0, | |
x = !1, | |
h, A = []; | |
h = {}; | |
(function () { | |
b.on(d.playProgress, function (a, b, c) { | |
b = Math.floor(a); | |
0 !== b % 30 || h[b] || (l(a), h[b] = !0) | |
}); | |
b.on(d.playInitiated, function () { | |
!x && c.request.flags.plays && (x = !0, g("/log/play", 0)) | |
}); | |
b.on(d.paused, function (a) { | |
l(a) | |
}); | |
b.on(d.seeked, function (a, b, c) { | |
t = a; | |
v || l(t) | |
}); | |
b.on(d.scrubbingStarted, | |
function () { | |
v = !0 | |
}); | |
b.on(d.scrubbingEnded, function () { | |
v = !1; | |
l(t) | |
}); | |
b.on(d.hdButtonClicked, function () { | |
l(c._video.currentTime) | |
}); | |
b.on(d.ended, function () { | |
l(c.video.duration) | |
}); | |
s.addEventListener("beforeunload", function () { | |
0 < c._video.currentTime && l(c._video.currentTime, !0) | |
}) | |
})(); | |
(function () { | |
function a(b) { | |
return function () { | |
n(b) | |
} | |
}[{ | |
type: "share_press", | |
event: d.shareButtonClicked | |
}, { | |
type: "facebook_press", | |
event: d.facebookButtonClicked | |
}, { | |
type: "twitter_press", | |
event: d.twitterButtonClicked | |
}, { | |
type: "email_press", | |
event: d.emailButtonClicked | |
}, { | |
type: "embed_press", | |
event: d.embedButtonClicked | |
}, { | |
type: "login_success", | |
event: d.userLoggedIn | |
}, { | |
type: "airplay", | |
event: d.airPlayActivated | |
}, { | |
type: "vod_press", | |
event: d.vodButtonPressed | |
}].forEach(function (c) { | |
b.on(c.event, a(c.type)) | |
}); | |
b.on(d.likeButtonClicked, function () { | |
n("like_press", !c.user.liked) | |
}).on(d.watchLaterButtonClicked, function () { | |
n("watch_later_press", !c.user.watch_later) | |
}).on(d.popupOpened, function (a) { | |
0 === a.indexOf("login-") && n("login_attempt") | |
}) | |
})(); | |
(function () { | |
b.on(d.signatureExpired, function () { | |
r = !0 | |
}); | |
b.on(d.requestConfigReloaded, function (a) { | |
c.request = a; | |
r = !1; | |
if (0 < A.length) | |
for (a = A.shift(); a;) e.apply(null, a), a = A.shift() | |
}); | |
b.on(d.configChanged, function (a, b) { | |
c = a; | |
b && (p = 0, v = x = !1, h = {}) | |
}) | |
})(); | |
(function () { | |
var a = ["not-supported", "decode", "network", "aborted", "unknown"]; | |
b.on(d.error, function (b, d) { | |
0 <= a.indexOf(b) && e("/log/" + b.replace("-", "") + "_error", { | |
id: c.video.id, | |
context: c.embed.context | |
}) | |
}) | |
})(); | |
b.fire(d.statsModuleReady); | |
return {} | |
} | |
}(), | |
pb = function (c) { | |
var b = ["hd", "scaling", "volume", "captions"]; | |
return function (a, | |
e) { | |
function g(a) { | |
if (q.loaded) try { | |
q.frame.contentWindow.postMessage(a, q.origin) | |
} catch (b) {} else q.queue.push(a) | |
} | |
function l(a) { | |
return !0 === a || !1 === a ? +a : "null" === a ? null : a | |
} | |
function n(a) { | |
var b = w.cookie; | |
return b && "" !== b ? b.split(";").reduce(function (b, c) { | |
c = c.trim(); | |
return 0 === c.indexOf(a + "=") ? decodeURIComponent(c.substr(a.length + 1)) : b | |
}, null) : null | |
} | |
function r(c, d) { | |
d = l(d); | |
0 <= b.indexOf(c) && (a.request.cookie[c] = d); | |
g({ | |
method: "set", | |
key: "sync_" + c, | |
val: d, | |
session: a.request.session | |
}); | |
var e = [c + "=" + d], | |
n = p(b), | |
r; | |
for (r in n) r in | |
n && null !== n[r] && r !== c && e.push(r + "=" + n[r]); | |
e = '"' + e.join("&") + '"'; | |
n = new Date; | |
n.setFullYear(n.getFullYear() + 1); | |
n = n.toGMTString(); | |
e = l(e); | |
e = "player=" + e + ";" + ("expires=" + n + ";"); | |
e += "path=/;"; | |
e += "domain=" + a.request.cookie_domain + ";"; | |
w.cookie = e | |
} | |
function p(a) { | |
var b = n("player"); | |
if (!b) return null; | |
var b = b.substring(1, b.length - 1), | |
c = {}; | |
b.split("&").forEach(function (a) { | |
a = a.split("="); | |
c[a[0]] = decodeURIComponent(a[1] || "") | |
}); | |
var b = [].concat(a), | |
d = b.reduce(function (a, b) { | |
if (b in c) { | |
var d = parseFloat(c[b]); | |
a[b] = isNaN(d) ? | |
c[b] : d; | |
return a | |
} | |
a[b] = null; | |
return a | |
}, {}); | |
return 1 === b.length ? d[a] : d | |
} | |
function v(b) { | |
b && (a = b); | |
r("login", !!a.user.logged_in) | |
} | |
if (!c.localStorageProxy) { | |
var t = w.createElement("a"); | |
t.href = a.request.urls.proxy; | |
c.localStorageProxy = { | |
src: t.href, | |
origin: t.origin || t.protocol.replace(":", "") + "://" + t.host, | |
loaded: !1, | |
queue: [], | |
frame: null, | |
loadTimeout: null, | |
pingTimeout: null | |
} | |
} | |
var q = c.localStorageProxy; | |
v(); | |
(function () { | |
e.on(d.qualityChanged, function (b, c) { | |
a.request.cookie.hd = "hd" === b ? 1 : 0; | |
c || r("hd", "hd" === b) | |
}) | |
})(); | |
(function () { | |
e.on(4, | |
function (a) { | |
r("scaling", !!a) | |
}) | |
})(); | |
(function () { | |
e.on(d.volumeChanged, function (b, c) { | |
a.request.cookie.volume = l(b); | |
c || r("volume", b) | |
}) | |
})(); | |
(function () { | |
e.on(d.captionsChanged, function (b, c) { | |
a.request.cookie.captions = l(b); | |
c || r("captions", b) | |
}) | |
})(); | |
(function () { | |
e.on(d.playButtonClicked, function (b) { | |
b || r("active", a.request.session) | |
}); | |
e.on([d.pauseButtonClicked, d.ended], function () { | |
p("active") === a.request.session && r("active", null) | |
}) | |
})(); | |
(function () { | |
e.on(d.userLoggedIn, function () { | |
r("login", !0) | |
}) | |
})(); | |
(function () { | |
if (!q.frame) { | |
var a = | |
w.createElement("iframe"); | |
a.src = q.src; | |
a.setAttribute("title", "Vimeo LocalStorage Proxy"); | |
a.setAttribute("aria-hidden", "true"); | |
a.setAttribute("hidden", ""); | |
a.onload = function (b) { | |
q.loaded || (a.contentWindow.postMessage({ | |
method: "ping" | |
}, q.origin), q.pingTimeout = setTimeout(function () { | |
0 | |
}, 500)); | |
q.loadTimeout && (clearTimeout(q.loadTimeout), q.loadTimeout = null) | |
}; | |
q.loadTimeout = setTimeout(function () { | |
0 | |
}, 1E4); | |
w.body.appendChild(a); | |
q.frame = a | |
} | |
})(); | |
(function () { | |
s.addEventListener("message", function (b) { | |
if (b.origin === q.origin) | |
if ("ready" === | |
b.data || "ping" === b.data) { | |
if (!q.loaded) | |
for (clearTimeout(q.pingTimeout), q.pingTimeout = null, q.loaded = !0; q.queue.length;) b = q.queue.shift(), g(b) | |
} else if ("object" === typeof b.data && "key" in b.data) { | |
var c = b.data.newValue; | |
switch (b.data.key) { | |
case "sync_hd": | |
a.video.allow_hd && e.fire(9, 1 === c ? "hd" : "sd", !0); | |
break; | |
case "sync_scaling": | |
e.fire(4, !!c); | |
break; | |
case "sync_volume": | |
e.fire(aa, c, !0); | |
break; | |
case "sync_captions": | |
if (null === c) { | |
e.fire(Oa, !0); | |
break | |
} | |
e.fire(Na, c, !0); | |
break; | |
case "sync_login": | |
if (c) { | |
e.fire(d.userLogIn); | |
break | |
} | |
e.fire(d.userLoggedOut); | |
break; | |
case "sync_active": | |
null !== c && c !== a.request.session && !a._video.paused && 0 > s.location.search.indexOf("autopause=0") && e.fire(d.pauseButtonClicked) | |
} | |
} | |
}, !1) | |
})(); | |
(function () { | |
b.concat("login", "active").forEach(function (a) { | |
try { | |
s.localStorage.removeItem(a) | |
} catch (b) {} | |
}) | |
})(); | |
return { | |
reset: v | |
} | |
} | |
}(ab), | |
mb = function () { | |
return function (c, b) { | |
(function () { | |
b.on(qa, function (a, e) { | |
var g = "//" + c.player_url, | |
l = g + "/video/" + c.video.id; | |
switch (a) { | |
case "login-like": | |
q.openWindow(l + "/login/like", 670, 545, "login"); | |
b.fire(d.popupOpened, | |
a); | |
break; | |
case "login-watch-later": | |
q.openWindow(l + "/login/watch-later", 670, 545, "login"); | |
b.fire(d.popupOpened, a); | |
break; | |
case "login-private-locked": | |
q.openWindow(l + "/login/private", 670, 545, "login"); | |
b.fire(d.popupOpened, a); | |
break; | |
case "purchase": | |
g = g + "/video/" + (c.video.vod.feature_id || c.video.id) + "/purchase/vod", e && e.productId && (g += "/" + e.productId), g += "?referrer=" + encodeURIComponent(c.request.referrer), q.openWindow(g, 670, 545, "purchase"), b.fire(d.popupOpened, a) | |
} | |
}) | |
})(); | |
(function () { | |
c.embed.on_site || (s.confirmPurchase = | |
function (a, c, g) { | |
if (c) return b.fire(ua, a); | |
g && b.fire(d.playButtonClicked) | |
}) | |
})(); | |
(function () { | |
c.embed.on_site || (s.confirmLoginAction = function (a, c) { | |
b.fire(d.userLogIn, c) | |
}) | |
})(); | |
return {} | |
} | |
}(), | |
t = function () { | |
function c(a) { | |
return RegExp(a.toLowerCase()).test(b) | |
} | |
var b = navigator.userAgent.toLowerCase(), | |
a = c("android") ? parseFloat(b.replace(/^.* android (\d+)\.(\d+).*$/, "$1.$2")) || !0 : !1, | |
d = s.devicePixelRatio || 1, | |
g = c("windows phone") || c("iemobile") ? parseFloat(b.replace(/^.* windows phone (os )?(\d+)\.(\d+).*$/, "$2.$3")) || | |
!0 : !1; | |
return { | |
airPlay: "WebKitPlaybackTargetAvailabilityEvent" in s, | |
android: a, | |
mobileAndroid: a && c("mobile"), | |
browser: { | |
bb10: c("bb10"), | |
chrome: c("chrome"), | |
firefox: c("firefox"), | |
opera: c("opera"), | |
safari: c("safari") && c("apple") && !c("chrome") && !c("android") | |
}, | |
devicePixelRatio: d, | |
flash: function () { | |
var a = navigator, | |
b = !1, | |
c = [0, 0, 0], | |
d = null; | |
if ("undefined" !== typeof a.plugins && "object" === typeof a.plugins["Shockwave Flash"])!(d = a.plugins["Shockwave Flash"].description) || "undefined" !== typeof a.mimeTypes && a.mimeTypes["application/x-shockwave-flash"] && | |
!a.mimeTypes["application/x-shockwave-flash"].enabledPlugin || (b = !0, d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"), c[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10), c[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10), c[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0); | |
else if ("undefined" !== typeof s.ActiveXObject) try { | |
var e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); | |
e && (d = e.GetVariable("$version")) && (b = !0, d = d.split(" ")[1].split(","), c = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], | |
10)]) | |
} catch (g) {} | |
return { | |
installed: b, | |
version: c.join("."), | |
major: c[0], | |
minor: c[1], | |
revision: c[2], | |
versionAtLeast: function (a, b, d) { | |
a = a || 10; | |
b = b || 1; | |
d = d || 0; | |
for (var e = c, g = arguments, l = Math.min(e.length, g.length), n = 0; n < l; n++) { | |
if (e[n] >= g[n]) { | |
if (n + 1 < l && e[n] === g[n]) continue; | |
return !0 | |
} | |
return !1 | |
} | |
} | |
} | |
}(), | |
iPhone: c("iphone;") || c("ipod touch;"), | |
iPad: c("ipad;"), | |
iPadNonRetina: c("ipad;") && 2 > d, | |
mac: c("mac os"), | |
pointerEvents: s.navigator.pointerEnabled || s.navigator.msPointerEnabled || !1, | |
svg: !!w.createElementNS && !!w.createElementNS("http://www.w3.org/2000/svg", | |
"svg").createSVGRect, | |
touch: "ontouchstart" in s || s.DocumentTouch && w instanceof DocumentTouch || c("windows phone") || 1 < s.navigator.maxTouchPoints || s.navigator.msMaxTouchPoints || !1, | |
transformProperty: function (a) { | |
var b = w.createElement("div"), | |
c = a.charAt(0).toUpperCase() + a.slice(1); | |
a = (a + " " + ["Webkit", "Moz", "O", "ms"].join(c + " ") + c).split(" "); | |
for (var d in a) | |
if (c = a[d], b.style[c] !== ia) return c | |
}("transform"), | |
windowsPhone: g | |
} | |
}(), | |
hb = function () { | |
return function (c, b, a) { | |
function e() { | |
a.classList.remove("hidden"); | |
a.removeAttribute("hidden"); | |
setTimeout(function () { | |
r = !0; | |
a.classList.remove("invisible") | |
}, 0) | |
} | |
function g() { | |
r && (q || A || !(s || !w || h && p)) && (r = !1, a.classList.add("invisible")) | |
} | |
function l() { | |
if (!r && h && !E && !A && (s || !w && !q || c.embed.settings.info_on_pause && h && !q)) return e() | |
} | |
function n() { | |
if (c.view === ra || c.view === ca) { | |
var b = { | |
targetBlank: 0 === c.embed.on_site, | |
linkToOwner: null !== c.video.owner.url, | |
ownerLink: c.video.owner.url, | |
showPortrait: !!c.embed.settings.portrait, | |
portraitImg: c.video.owner[1 < t.devicePixelRatio ? "img_2x" : "img"], | |
showTitle: !!c.embed.settings.title, | |
showTitleLink: null !== c.video.url, | |
titleLink: c.video.url, | |
title: c.video.title, | |
showByline: !!c.embed.settings.byline, | |
owner: c.video.owner.name | |
}; | |
c.embed.settings.byline_badge && (b.bylineBadge = { | |
cssClass: c.embed.settings.byline_badge.type, | |
link: c.embed.settings.byline_badge.url || !1 | |
}); | |
var d = c.embed.settings.badge; | |
if (d) { | |
var e = 1 < t.devicePixelRatio ? "img_2x" : "img"; | |
t.svg && d.svg && (e = "svg"); | |
b.showPortrait = !1; | |
b.badge = { | |
link: d.link, | |
img: d[e], | |
offset: d.offset || !1, | |
width: d.width, | |
height: d.height, | |
name: d.name | |
} | |
} | |
c.embed.autoplay && | |
(a.classList.add("hidden"), a.setAttribute("hidden", "")); | |
a.innerHTML = Aftershave.render("title", b) | |
} | |
} | |
var r = !0, | |
p = !1, | |
q = !1, | |
s = !1, | |
w = !1, | |
h = !0, | |
A = !1, | |
E = !1, | |
F = !1; | |
n(); | |
(function () { | |
b.on([d.mousedOut, d.mouseTimeout], g).on(d.mousedOver, l).on(d.playInitiated, function () { | |
w = !0; | |
h = !1; | |
g() | |
}).on([d.playButtonClicked, d.played], function () { | |
E = h = !1; | |
g() | |
}).on(d.paused, function (a, b) { | |
b || (h = !0, l()) | |
}).on(d.ended, function () { | |
A = !0; | |
g() | |
}).on(d.scrubbingStarted, function () { | |
F = h; | |
E = !0 | |
}).on(d.scrubbingEnded, function () { | |
F && (E = !1) | |
}).on(d.willEnterFullscreen, | |
function () { | |
g() | |
}).on(d.didExitFullscreen, function (a) { | |
a || l() | |
}); | |
Gator(a).on(["MSPointerEnter", "MSPointerLeave", "mouseenter", "mouseleave"], function (a) { | |
if ("pointerType" in a) { | |
if ("mouse" === a.pointerType || a.pointerType === a.MSPOINTER_TYPE_MOUSE) p = "MSPointerEnter" === a.type | |
} else p = "mouseover" === a.type | |
}); | |
Gator(a).on("transitionend", function (b) { | |
"opacity" === b.propertyName && a.classList.contains("invisible") && (a.classList.add("hidden"), a.setAttribute("hidden", "")) | |
}, !1) | |
})(); | |
(function () { | |
b.on(d.ended, function (a) { | |
g() | |
}) | |
})(); | |
(function () { | |
b.on(d.airPlayActivated, function () { | |
s = !0; | |
l() | |
}).on(d.airPlayDeactivated, function () { | |
s = !1; | |
g() | |
}) | |
})(); | |
(function () { | |
b.on(d.overlayOpened, function (a) { | |
"notsupported" !== a && "private-unlocked" !== a && "help" !== a && (q = !0, p = !1, g()) | |
}).on(d.overlayClosed, function () { | |
p = q = !1; | |
setTimeout(l, 0) | |
}) | |
})(); | |
(function () { | |
b.on(d.configChanged, function (a) { | |
c = a; | |
n(); | |
c.view === ca && l() | |
}) | |
})(); | |
(function () { | |
b.on(na, function () { | |
w = !1; | |
h = !0; | |
E = A = !1; | |
l() | |
}) | |
})(); | |
b.fire(d.titleModuleReady); | |
return {} | |
} | |
}(), | |
$a = function () { | |
return function (c, b, a) { | |
function e(a) { | |
var b = {}, | |
c, d; | |
for (d in a.codecs) | |
if (c = a.codecs[d], a[c]) | |
for (var e in a[c]) { | |
var f; | |
if (f = a[c].hasOwnProperty(e)) f = X ? "h264" === c ? 2 <= U ? "" !== X.h264.high : "" === ("mobile" === e ? X.h264.baseline : X.h264.high) || 2 > U && "1080p" === e && ia ? !1 : !0 : "vp8" === c ? "" !== X.webm : void 0 : !1, f = f && !(t.iPadNonRetina && 921600 < a[c][e].width * a[c][e].height); | |
f && (b[e] = a[c][e], b[e].quality = e) | |
} | |
0; | |
return b | |
} | |
function g(a) { | |
var b = {}, | |
c, d; | |
for (d in a.codecs) | |
if (c = a.codecs[d], a[c]) | |
for (var e in a[c]) a[c].hasOwnProperty(e) && (b[e] = a[c][e], b[e].quality = e); | |
0; | |
return b | |
} | |
function l() { | |
b.fire(d.bufferStarted); | |
ea = ha = !0; | |
S || c._video.currentFile.hls || k.pause() | |
} | |
function n() { | |
k.preload = ""; | |
L || C(); | |
P.classList.remove("cloaked"); | |
xa ? (b.fire(d.error, xa), m(), y()) : (b.fire(Ga), K || (0, ta || k.load(), b.fire(d.playInitiated), l(), K = !0, t.android && !t.browser.chrome && k.play()), M = O = !0, S && (za = !0, b.fire(Sa)), ta && r()) | |
} | |
function r() { | |
ba || wa || ($ = ha = !1, M && k.paused && (0, da && v(da, function () { | |
da = null | |
}), k.play())) | |
} | |
function p(a) { | |
var b = k.duration; | |
b && a > b && (a = b); | |
if (0 < k.seekable.length) | |
for (var b = 0, c = k.seekable.length; b < c; b++) | |
if (k.seekable.start(b) <= | |
a && k.seekable.end(b) >= a) return !0; | |
return !1 | |
} | |
function v(a, b) { | |
p(a) ? (a = q.limit(a, 0, (k.duration || c.duration) - 0.01), k.currentTime = a, c._video.currentTime = a, b && b()) : (la = a, qa = b, va || (Ka.events.forEach(function (a) { | |
k.addEventListener(a, B, !1) | |
}), va = !0)) | |
} | |
function B() { | |
la && p(la) && (Ka.events.forEach(function (a) { | |
k.removeEventListener(a, B, !1) | |
}), va = !1, la = q.limit(la, 0, (k.duration || c.duration) - 0.01), k.currentTime = la, c._video.currentTime = la, qa && qa(), r(), qa = la = null) | |
} | |
function x(a, b, c, d) { | |
return a + b | |
} | |
function h() { | |
if (k.buffered.length) { | |
var a = | |
(new Date).getTime(), | |
b = k.buffered.end(k.buffered.length - 1); | |
pa || (pa = a); | |
V.push(b - W); | |
V = V.slice(-10); | |
ma = V.reduce(x) / V.length; | |
Q = null; | |
pa = a; | |
W = b; | |
Q = !0; | |
Math.round(b) !== Math.round(k.duration) ? Q = setTimeout(h, 1E3) : 0 | |
} | |
} | |
function A(a, b) { | |
var c = a.length - 1; | |
if (1 < a.length) | |
for (var d = 0, e = a.length; d < e; d++) | |
if (a.start(d) <= b && a.end(d) >= b) { | |
c = d; | |
break | |
} | |
return c | |
} | |
function E(a) { | |
K && (ra || (ra = (new Date).getTime()), Q || h()); | |
if (!ka && k.buffered && 0 < k.buffered.length) { | |
a = a || k.currentTime; | |
a = A(k.buffered, a); | |
a = k.buffered.end(a); | |
var e = a / k.duration; | |
c._video.loadProgress = a; | |
b.fire(d.loadProgress, a, k.duration, e); | |
ea && (M && a === k.duration ? r() : (k.duration - k.buffered.end(k.buffered.length - 1)) / ma + 2 <= k.duration - k.currentTime && (0, r())) | |
} | |
} | |
function F(a) { | |
var b = ["hd", "sd", "mobile"]; | |
for (a = b.indexOf(a); 3 > a; a++) { | |
var c = b[a]; | |
if (f[c]) return f[c]; | |
if (Y[c]) return Y[c] | |
} | |
return null | |
} | |
function D(a, b, c) { | |
var d = 0, | |
e = 0, | |
f = 0, | |
g = 0, | |
f = a.clientWidth; | |
a = a.clientHeight; | |
b /= c; | |
f / a >= b ? (e = a, d = (b * a).toFixed(2)) : (d = f, e = (f / b).toFixed(2)); | |
f = Math.max((f - d) / 2, 0); | |
g = Math.max((a - e) / 2, 0); | |
return { | |
width: d, | |
height: e, | |
left: f, | |
top: g | |
} | |
} | |
function z(a, c) { | |
!K || k.ended ? (J(F(a)), b.fire(d.qualityChanged, a, c)) : (ka = !0, da || (da = k.currentTime), M = !k.paused, $ = !0, k.pause(), l(), b.once(d.notificationHidden, function () { | |
H(a, c) | |
})) | |
} | |
function H(e, f) { | |
T || (P.insertAdjacentHTML("beforebegin", '<canvas class="snapshot"></canvas>'), T = a.querySelector(".snapshot")); | |
var g = T.getContext("2d"); | |
if (g && k.canvasImageSource) { | |
T.setAttribute("width", k.videoWidth + "px"); | |
T.setAttribute("height", k.videoHeight + "px"); | |
var h = D(Z, c.video.width, c.video.height); | |
T.style.cssText = "width:" + h.width + "px;height:" + h.height + "px;left:" + h.left + "px;top:" + h.top + "px"; | |
g.drawImage(k.canvasImageSource, 0, 0, T.width, T.height); | |
T.classList.remove("hidden") | |
} | |
J(F(e)); | |
k.load(); | |
b.fire(d.qualityChanged, e, f); | |
v(da, function () { | |
ka = !1 | |
}) | |
} | |
function m() { | |
Z.style.backgroundImage = "url(" + Z.getAttribute("data-thumb") + ")" | |
} | |
function J(a) { | |
if (a && (ta = !1, c._video.currentFile = a, k.src = c._video.currentFile.url, c._video.currentRenderer = k.renderer, 0 < a.bitrate && L && L.setCurrentBitrate(a.bitrate), !Ca)) { | |
a = k.volume; | |
k.volume = 0.999; | |
if (0.999 !== q.round(k.volume) || t.android) 0, b.fire(Ra); | |
k.volume = a; | |
Ca = !0 | |
} | |
} | |
function C() { | |
if ("undefined" === typeof Conviva) 0, ya = !0; | |
else { | |
ya = !1; | |
var a = Conviva.ConvivaContentInfo.createInfoForLightSession("[" + c.video.id + "] " + c.video.title + " from " + c.video.owner.name); | |
a.cdnName = Conviva.ConvivaContentInfo.CDN_NAME_AKAMAI; | |
a.streamUrl = c._video.currentFile.url; | |
a.isLive = !!c._video.currentFile.hls; | |
a.playerName = "HTML"; | |
a.tags = { | |
location: c.embed.on_site ? "on_site" : "embed", | |
context: c.embed.context, | |
player_type: "html", | |
player_sub_type: k.renderer, | |
player_version: c.request.build.js, | |
build_num: c.build.player, | |
profile_id: c._video.currentFile.profile, | |
availability_id: c._video.currentFile.availability, | |
video_quality: c._video.currentFile.quality, | |
delivery_method: c._video.currentFile.hls ? "hls" : "progressive", | |
user_account_type: c.user.account_type, | |
owner_account_type: c.video.owner.account_type, | |
auto_play: c.embed.autoplay, | |
is_vod: c.video.vod ? c.video.vod.is_feature : 0, | |
purchased_status: c.user.purchased || 0, | |
origin: c._video.currentFile.origin || | |
"unknown", | |
secure: "https:" === w.location.protocol ? 1 : 0 | |
}; | |
L = Conviva.LivePass.createSession(k, a); | |
0 < c._video.currentFile.bitrate && L.setCurrentBitrate(c._video.currentFile.bitrate); | |
L.setContentLength(c.video.duration) | |
} | |
} | |
function y() { | |
L && (Conviva.LivePass.cleanupMonitoringSession(k), L = null) | |
} | |
function u(a) { | |
a = a.target; | |
if (a.mode !== Ta || za) { | |
var c = a.activeCues, | |
e = [], | |
f; | |
if (c && 0 < c.length) | |
for (var g = 0, h = a.activeCues.length; g < h; g++) "" !== c[g].text.replace(/^\s+|\s+$/gm, "") && (f = w.createElement("span"), f.appendChild(c[g].getCueAsHTML()), | |
e.push({ | |
html: f.innerHTML.replace("\n", "<br>"), | |
text: c[g].text | |
})); | |
b.fire(d.cueChanged, a.id, e) | |
} else { | |
a: { | |
c = 0; | |
for (e = k.children.length; c < e; c++) | |
if (k.children[c].track === a) { | |
c = k.children[c]; | |
break a | |
} | |
c = null | |
} | |
c && c.id !== Aa && (a.mode = Da) | |
} | |
} | |
function I() { | |
if (0 === Object.keys(f).length && 0 === Object.keys(Y).length) b.fire(d.error, "no-files"); | |
else { | |
var a = c.video.hd && c.video.allow_hd, | |
e = a && (null === c.request.cookie.hd ? c.video.default_to_hd : c.request.cookie.hd); | |
if (t.touch && 2E3 > screen.width) { | |
if (X.hls && c.request.files.hls) return c.video.hd = !1, b.fire(Pa), J({ | |
url: c.request.files.hls.all, | |
quality: "sd", | |
hls: !0 | |
}); | |
a && (t.windowsPhone || t.android && t.mobileAndroid || t.browser.bb10 ? 0 : X.h264.high) ? a = F(e ? "hd" : "sd") : (c.video.hd = !1, b.fire(Pa), a = F("sd")) | |
} else a = F(e ? "hd" : "sd"); if (!a) return b.fire(d.error, "not-supported"); | |
J(a) | |
} | |
} | |
function G() { | |
if ("text_tracks" in c.request && 0 < c.request.text_tracks.length) c.request.text_tracks.forEach(function (a) { | |
var b = w.createElement("track"); | |
b.setAttribute("data-id", a.id); | |
b.setAttribute("src", a.url); | |
b.setAttribute("kind", a.kind); | |
b.setAttribute("srclang", a.lang); | |
b.setAttribute("label", a.label); | |
k.appendChild(b); | |
b.track.addEventListener("cuechange", u) | |
}); | |
else { | |
for (; k.firstChild;) k.removeChild(k.firstChild); | |
b.fire(d.cueChanged, null, []) | |
} | |
} | |
function R() { | |
"Conviva" in s ? Conviva.LivePass.init(c.request.urls.conviva_service, c.request.conviva_account, function (a) { | |
0 === a.code ? (0, ya && (0, C()), Array.prototype.slice.call(w.querySelectorAll("iframe")).forEach(function (a) { | |
a.getAttribute("id") && 0 === a.getAttribute("id").indexOf("_convivaRemoteFrame") && | |
(a.setAttribute("title", "Conviva Communication Proxy"), a.setAttribute("aria-hidden", "true"), a.setAttribute("hidden", "")) | |
})) : 0 | |
}) : 0 | |
} | |
var N = !1, | |
U = t.devicePixelRatio, | |
X = Ka.support.video, | |
ia = t.touch, | |
f, Y, Z = a.querySelector(".video"), | |
P = a.querySelector(".flideo"), | |
k = null, | |
T = null, | |
L = null, | |
S = t.mobileAndroid || t.android && !t.browser.chrome && !t.browser.firefox && !t.browser.opera || t.windowsPhone, | |
O = !1, | |
M = !1, | |
K = !1, | |
ja = !1, | |
ea = !1, | |
ha = !1, | |
oa = !1, | |
fa = !1, | |
ca = !1, | |
ba = !1, | |
ra, Q, pa, V = [], | |
ma = 0, | |
W = 0, | |
ga, $ = !1, | |
da, ta = !1, | |
ka = !0, | |
xa = null, | |
ya = !1, | |
la = null, | |
qa = | |
null, | |
va = !1, | |
wa = !1, | |
za = !1, | |
ua = !1, | |
Ca = !1, | |
Aa = null, | |
Ea = 0, | |
Ia = 0; | |
c._video = {}; | |
c._video.paused = !0; | |
c._video.ended = !1; | |
c._video.currentTime = 0; | |
c._video.loadProgress = 0; | |
c._video.currentFile = {}; | |
var Ma = "undefined" !== typeof TextTrack ? TextTrack : {}, | |
Da = "DISABLED" in Ma ? Ma.DISABLED : "disabled", | |
Qa = "HIDDEN" in Ma ? Ma.HIDDEN : "hidden", | |
Ta = "SHOWING" in Ma ? Ma.SHOWING : "showing"; | |
P.classList.add("cloaked"); | |
f = e(c.request.files); | |
Y = g(c.request.files); | |
(function () { | |
if (c.request.flags.conviva && !("Conviva" in s)) { | |
var a = w.getElementsByTagName("script")[0], | |
b = w.createElement("script"), | |
d = !1; | |
b.src = c.request.urls.conviva; | |
b.async = !0; | |
a.parentNode.insertBefore(b, a); | |
b["onreadystatechange" in b ? "onreadystatechange" : "onload"] = function () { | |
d || this.readyState && "loaded" !== this.readyState && "complete" !== this.readyState || (d = !0, Conviva && Conviva.LivePass.toggleTraces(!1), R()) | |
} | |
} | |
})(); | |
k = new Ka(P, { | |
swf: c.request.urls.flideo | |
}); | |
k.preload = "none"; | |
t.mobileAndroid && t.browser.chrome && (k.preload = "metadata"); | |
(function () { | |
b.on(d.mousedOver, function () { | |
N || !c.request.flags.preload_video || | |
ta || "metadata" === k.preload || (k.preload = "metadata") | |
}) | |
})(); | |
(function () { | |
k.addEventListener("loadedmetadata", function (a) { | |
ta = !0; | |
a = k.duration; | |
isFinite(a) && 0 < a && (c.video.duration = a); | |
c.video.video_width = k.videoWidth; | |
c.video.video_height = k.videoHeight; | |
M && (k.preload = "") | |
}); | |
k.addEventListener("durationchange", function (a) { | |
a = k.duration; | |
isFinite(a) && 0 < a && (c.video.duration = a); | |
L && L.setContentLength(c.video.duration) | |
}); | |
k.addEventListener("waiting", function () { | |
fa || t.browser.firefox || l() | |
}, !1); | |
k.addEventListener("canplay", | |
function () { | |
ja = !0; | |
if (c.embed.autoplay || M || O && !K) 0, r() | |
}, !1); | |
k.addEventListener("canplaythrough", function () { | |
(ha || M && k.paused) && r() | |
}, !1); | |
k.addEventListener("progress", function (a) { | |
E() | |
}, !1) | |
})(); | |
(function () { | |
b.on(d.playInitiated, function () { | |
P.classList.remove("cloaked"); | |
a.classList.remove("invisible") | |
}); | |
b.on(d.playButtonClicked, n); | |
b.on(d.pauseButtonClicked, function () { | |
M = !1; | |
k.pause() | |
}); | |
k.addEventListener("play", function (a) { | |
ka = !1; | |
K || ja ? (P.classList.remove("invisible"), b.fire(d.played, k.currentTime), c._video.paused = !1, c._video.ended = !1) : (b.fire(d.playInitiated), M = O = K = !0) | |
}, !1); | |
k.addEventListener("pause", function (a) { | |
c._video.paused = !0; | |
!K || ha || ba || $ || b.fire(d.paused, k.currentTime, k.ended); | |
ga && (clearTimeout(ga), ga = null) | |
}, !1); | |
k.addEventListener("playing", function (a) { | |
K || (b.fire(d.playInitiated), K = !0); | |
E(); | |
oa = !0 | |
}, !1); | |
k.addEventListener("timeupdate", function (a) { | |
a = k.currentTime; | |
c._video.currentRenderer = k.renderer; | |
K && 0 < a && !ca && !za && (clearTimeout(ga), ga = setTimeout(function () { | |
!1 !== k.paused || ca || za || (0, l()) | |
}, 2E3)); | |
oa && ea && | |
0 < a && (0, oa = !1, ea && (b.fire(d.bufferEnded), ea = ha = !1)); | |
if (0 < k.buffered.length && !ea) { | |
var e = A(k.buffered, a), | |
e = k.buffered.end(e); | |
if (!za && 0 < a && a < k.duration && e === a) { | |
0; | |
l(); | |
return | |
} | |
} | |
ka || (e = k.duration, b.fire(d.playProgress, a, e, a / e), c._video.currentTime = a, da && a > da && (da = null)); | |
T && (T.classList.add("hidden"), T = null) | |
}, !1); | |
k.addEventListener("ended", function (a) { | |
ba || (c.embed.loop ? k.play() : (b.fire(d.ended), M = !1, c._video.paused = !0, c._video.ended = !0)) | |
}, !1) | |
})(); | |
(function () { | |
var a = !1; | |
s.addEventListener("beforeunload", function () { | |
a = !0 | |
}); | |
k.addEventListener("error", function (e) { | |
if (!a && e.target.error) { | |
var g = c._video.currentFile ? c._video.currentFile.quality : null; | |
if (null !== k.currentSrc && g) switch (L || C(), e.target.error.code) { | |
case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED: | |
0; | |
e = g; | |
f[g] && Y[g] && f[g].url !== Y[g].url || (delete Y[g], e = "hd" === g ? "sd" : "sd" === g ? "mobile" : null); | |
delete f[g]; | |
c._video.currentFile = F(e); | |
0; | |
if (c._video.currentFile) { | |
J(c._video.currentFile); | |
break | |
} | |
O && L && L.reportError(Conviva.ConvivaLightSession.ERROR_STREAMING_FAILURE); | |
if ("metadata" === | |
k.preload) { | |
0; | |
xa = "not-supported"; | |
break | |
} | |
b.fire(d.error, "not-supported"); | |
xa = "not-supported"; | |
y(); | |
break; | |
case e.target.error.MEDIA_ERR_DECODE: | |
0; | |
b.fire(d.error, "decode"); | |
L && (L.reportError(Conviva.ConvivaLightSession.ERROR_STREAMING_FAILURE), y()); | |
break; | |
case e.target.error.MEDIA_ERR_NETWORK: | |
0; | |
b.fire(d.error, "network"); | |
L && (L.reportError(Conviva.ConvivaLightSession.ERROR_CONNECTION_FAILURE), y()); | |
break; | |
case e.target.error.MEDIA_ERR_ABORTED: | |
0; | |
break; | |
default: | |
0, b.fire(d.error, "unknown"), L && (L.reportError(Conviva.ConvivaLightSession.ERROR_STREAMING_FAILURE), | |
y()) | |
} else 0 | |
} | |
}) | |
})(); | |
(function () { | |
function a() { | |
var b = w.createElement("style"); | |
w.querySelector("head").appendChild(b); | |
g = b.sheet | |
} | |
function d() { | |
var b = Math.min(k.videoWidth || c.video.width, screen.width), | |
e = Math.min(k.videoHeight || c.video.height, screen.height); | |
if (Ia !== b || Ea !== e) { | |
var f = "width:" + b + "px;", | |
f = f + ("height:" + e + "px;"), | |
f = f + ("margin-left:-" + (b / 2).toFixed(2) + "px;"), | |
f = f + ("margin-top:-" + (e / 2).toFixed(2) + "px;"), | |
f = f + "top:50%;", | |
f = f + "left:50%;"; | |
g || a(); | |
[".player:-webkit-full-screen .video-wrapper .video.native-size", | |
".player:-moz-full-screen .video-wrapper .video.native-size", ".player:-ms-full-screen .video-wrapper .video.native-size", ".player:fullscreen .video-wrapper .video.native-size" | |
].forEach(function (a) { | |
q.addCssRule(a, f, g) | |
}); | |
Ea = e; | |
for (Ia = b; 1 < g.cssRules.length;) g.deleteRule(0) | |
} | |
} | |
function e(a) { | |
a ? Z.classList.remove("native-size") : (d(), Z.classList.add("native-size")) | |
} | |
var g; | |
k.addEventListener("loadedmetadata", function () { | |
d() | |
}); | |
b.on(4, e); | |
e(c.request.cookie.scaling) | |
})(); | |
(function () { | |
b.on(8, function (a) { | |
c.embed.loop = !!a; | |
k.loop = !!a | |
}); | |
b.fire(8, c.embed.loop) | |
})(); | |
(function () { | |
b.on(d.scrubbingStarted, function () { | |
M = !k.paused; | |
ba = ca = !0; | |
k.pause(); | |
clearTimeout(ga) | |
}); | |
b.on(d.scrubbingEnded, function (a) { | |
ba = !1; | |
a || r() | |
}); | |
b.on(Ba, function (a, e) { | |
e || (e = (k.duration || c.video.duration) * q.limit(a, 0, 1)); | |
e = q.limit(e, 0, k.duration || c.video.duration); | |
K || (b.fire(d.playButtonClicked), M = O = K = !0); | |
v(e, function () { | |
b.fire(d.seeked, k.currentTime, k.duration, k.currentTime / k.duration) | |
}) | |
}); | |
k.addEventListener("seeking", function () { | |
fa = !0 | |
}, !1); | |
k.addEventListener("seeked", | |
function () { | |
E(); | |
ca = fa = !1; | |
k.readyState !== HTMLMediaElement.HAVE_ENOUGH_DATA || ba || r() | |
}, !1) | |
})(); | |
(function () { | |
b.on(aa, function (a, c, e) { | |
e && (a += k.volume); | |
k.volume = q.limit(a, 0, 1); | |
b.fire(d.volumeChanged, q.limit(a, 0, 1), c) | |
}); | |
b.fire(aa, c.request.cookie.volume, !0) | |
})(); | |
(function () { | |
b.on(9, function (a, b) { | |
"hd" === a ? (0, z("hd", b)) : (0, z("sd", b)) | |
}) | |
})(); | |
(function () { | |
b.on(d.overlayOpened, function () { | |
wa = !0; | |
K && !ua && (M = !k.paused, k.pause()) | |
}); | |
b.on(d.overlayClosed, function () { | |
wa = !1; | |
M && !ua && r() | |
}) | |
})(); | |
(function () { | |
b.on(d.didEnterFullscreen, | |
function (a, c) { | |
a || (P.classList.remove("cloaked"), K || t.browser.safari || (k.poster = Z.getAttribute("data-thumb")), za = !0); | |
!c && t.windowsPhone && b.fire(Ha, !0) | |
}); | |
b.on(d.didExitFullscreen, function (a) { | |
k.poster = ""; | |
K || P.classList.add("cloaked"); | |
za = !1; | |
a || (m(), P.classList.add("cloaked")); | |
S && k.pause() | |
}); | |
b.on(d.playInitiated, function () { | |
k.poster = "" | |
}) | |
})(); | |
(function () { | |
b.on(Ha, function (b) { | |
b ? (k.controls = !0, a.classList.add("native-controls")) : (k.controls = !1, a.classList.remove("native-controls")) | |
}) | |
})(); | |
(function () { | |
b.on(d.signatureExpired, | |
function () { | |
N = !0; | |
da = k.currentTime | |
}); | |
b.on(d.requestConfigReloaded, function (a) { | |
c.request = a; | |
N = !1; | |
f = e(c.request.files); | |
Y = g(c.request.files); | |
1 === k.buffered.length && k.buffered.end(0) === k.duration || I(); | |
M && k.paused && r() | |
}); | |
b.on(d.configChanged, function (a, b) { | |
var d = c._video.currentFile; | |
c = a; | |
f = e(c.request.files); | |
Y = g(c.request.files); | |
c._video = { | |
paused: k.paused, | |
ended: k.ended, | |
currentTime: k.currentTime, | |
currentFile: d, | |
currentRenderer: k.renderer | |
}; | |
E() | |
}) | |
})(); | |
(function () { | |
Gator(P).on("transitionend", function (a) { | |
"opacity" === | |
a.propertyName && "0" === s.getComputedStyle(this, "").opacity && P.classList.remove("transition") | |
}, !1); | |
b.on(na, function (a) { | |
0; | |
ka = !0; | |
k.paused || (k.pause(), b.fire(d.paused, k.currentTime)); | |
m(); | |
P.classList.add("transition"); | |
P.classList.add("invisible"); | |
M = K = !1; | |
xa = null; | |
c._video.paused = !0; | |
c._video.ended = !1; | |
c._video.currentTime = 0; | |
c._video.loadProgress = 0; | |
setTimeout(function () { | |
k.currentTime = 0 | |
}, 300); | |
a && (k.preload = "none", I(), y(), G()) | |
}) | |
})(); | |
I(); | |
(function () { | |
0 < c.embed.time && v(c.embed.time, function () { | |
c.embed.time = 0 | |
}) | |
})(); | |
(function () { | |
t.airPlay && (0, k.addEventListener("webkitplaybacktargetavailabilitychanged", function (a) { | |
switch (a.availability) { | |
case "available": | |
0; | |
b.fire(d.airPlayAvailable); | |
break; | |
case "not-available": | |
0, b.fire(d.airPlayNotAvailable) | |
} | |
}), k.addEventListener("webkitcurrentplaybacktargetiswirelesschanged", function (a) { | |
if (k.webkitCurrentPlaybackTargetIsWireless) return ua = !0, b.fire(d.airPlayActivated); | |
ua = !1; | |
b.fire(d.airPlayDeactivated) | |
}), b.on(d.airPlayButtonPressed, function () { | |
k.webkitShowPlaybackTargetPicker() | |
})) | |
})(); | |
(function () { | |
Ka.support.textTracks && (b.on(d.didEnterFullscreen, function (a) { | |
var b = k.textTracks; | |
za = !a; | |
if (!a && 0 < b.length) { | |
a = 0; | |
for (var c = b.length; a < c; a++) b[a].mode === Qa && (b[a].mode = Ta) | |
} | |
}).on(d.didExitFullscreen, function () { | |
var a = k.textTracks; | |
za = !1; | |
if (0 < a.length) | |
for (var c = 0, e = a.length; c < e; c++) | |
if (a[c].mode === Ta) { | |
a[c].mode = Qa; | |
var f = a[c].language + "." + a[c].kind; | |
f !== Aa && (Aa = f, b.fire(d.captionsChanged, Aa)) | |
} | |
}).on(Na, function (a) { | |
for (var c = !1, e = null, f = a.split(".")[0], g = f.substr(0, 2), h = null, l = k.textTracks, m = 0, n = l.length; m < | |
n; m++) { | |
var p = l[m].language + "." + l[m].kind; | |
if (p === a) c = !0, e = p, l[m].mode = Qa; | |
else if (l[m].mode = Da, !c) { | |
var q = l[m].language === g; | |
if (l[m].language === f || !e && q) e = p, h = l[m] | |
} | |
}!c && h && (h.mode = Qa); | |
Aa = e; | |
b.fire(d.cueChanged, null, []); | |
c = !1; | |
Aa !== a && (c = !0); | |
b.fire(d.captionsChanged, Aa, c) | |
}).on(Oa, function () { | |
for (var a = k.textTracks, c = 0, e = a.length; c < e; c++) a[c].mode = Da; | |
Aa = null; | |
b.fire(d.cueChanged, null, []); | |
b.fire(d.captionsChanged, null) | |
}), G(), "text_tracks" in c.request && 0 < c.request.text_tracks.length && (null !== c.request.cookie.captions ? | |
b.fire(Na, c.request.cookie.captions, !0) : b.fire(Oa, !0))) | |
})(); | |
c.embed.autoplay && (k.preload = "", O = !0, b.fire(d.playButtonClicked)); | |
b.fire(d.videoModuleReady) | |
} | |
}(); | |
s.VimeoPlayer = ab | |
})(window, document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a module called Aftershave #brogramming
the wcag stuff was unexpected