@wistia/wistia-player-react 0.3.19 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -476,11 +476,11 @@ function _generateUniqueId(mediaId) {
|
|
|
476
476
|
return (0, _utilities_seqid_js__WEBPACK_IMPORTED_MODULE_22__.h)(prefix);
|
|
477
477
|
}
|
|
478
478
|
function _getSyncedEmbedOption(key) {
|
|
479
|
-
var
|
|
479
|
+
var _ref19, _ref20;
|
|
480
480
|
if (_classPrivateFieldGet(_impl, this) && key in _classPrivateFieldGet(_impl, this)._attrs) {
|
|
481
481
|
return _classPrivateFieldGet(_impl, this)._attrs[key];
|
|
482
482
|
}
|
|
483
|
-
return (
|
|
483
|
+
return (_ref19 = (_ref20 = this.embedOptions[key]) !== null && _ref20 !== void 0 ? _ref20 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_35__.$)(key))) !== null && _ref19 !== void 0 ? _ref19 : defaultEmbedOptions[key];
|
|
484
484
|
}
|
|
485
485
|
function _getValueFromAttribute(name) {
|
|
486
486
|
if (!this.hasAttribute(name)) {
|
|
@@ -498,8 +498,8 @@ function _getValueFromAttribute(name) {
|
|
|
498
498
|
return this.getAttribute(name);
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
function _initPlayerEmbed(
|
|
502
|
-
var container =
|
|
501
|
+
function _initPlayerEmbed(_ref21) {
|
|
502
|
+
var container = _ref21.container, mediaData = _ref21.mediaData;
|
|
503
503
|
if (!_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
|
|
504
504
|
return;
|
|
505
505
|
}
|
|
@@ -524,17 +524,17 @@ function _initPublicApi(_x21, _x22) {
|
|
|
524
524
|
return _initPublicApi2.apply(this, arguments);
|
|
525
525
|
}
|
|
526
526
|
function _initPublicApi2() {
|
|
527
|
-
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
527
|
+
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee27(mediaId, options) {
|
|
528
528
|
var _this19 = this;
|
|
529
529
|
var embeddedCallback;
|
|
530
|
-
return _regenerator().w(function(
|
|
531
|
-
while (1) switch (
|
|
530
|
+
return _regenerator().w(function(_context27) {
|
|
531
|
+
while (1) switch (_context27.n) {
|
|
532
532
|
case 0:
|
|
533
|
-
|
|
533
|
+
_context27.n = 1;
|
|
534
534
|
return _classPrivateFieldGet(_publicApiScript, this);
|
|
535
535
|
case 1:
|
|
536
536
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__.s.PublicApi) {
|
|
537
|
-
|
|
537
|
+
_context27.n = 2;
|
|
538
538
|
break;
|
|
539
539
|
}
|
|
540
540
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_24__.WO)("player/failure/init-failed");
|
|
@@ -577,17 +577,17 @@ function _initPublicApi2() {
|
|
|
577
577
|
}));
|
|
578
578
|
_assertClassBrand(_WistiaPlayer_brand, _this19, _maybeSetupLLMOptimizedEmbed).call(_this19);
|
|
579
579
|
if (_classPrivateFieldGet(_impl, _this19)) {
|
|
580
|
-
Object.entries(_classPrivateFieldGet(_impl, _this19)._attrs).forEach(function(
|
|
581
|
-
var
|
|
580
|
+
Object.entries(_classPrivateFieldGet(_impl, _this19)._attrs).forEach(function(_ref26) {
|
|
581
|
+
var _ref27 = _slicedToArray(_ref26, 2), key = _ref27[0], value = _ref27[1];
|
|
582
582
|
_classPrivateFieldGet(_playerData, _this19).updateEmbedOptionOverrides(_defineProperty({}, key, value));
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
585
|
_assertClassBrand(_WistiaPlayer_brand, _this19, _renderPreloadThumbnail).call(_this19);
|
|
586
586
|
});
|
|
587
587
|
case 3:
|
|
588
|
-
return
|
|
588
|
+
return _context27.a(2);
|
|
589
589
|
}
|
|
590
|
-
},
|
|
590
|
+
}, _callee27, this);
|
|
591
591
|
}));
|
|
592
592
|
return _initPublicApi2.apply(this, arguments);
|
|
593
593
|
}
|
|
@@ -598,29 +598,29 @@ function _maybeInitializeMux() {
|
|
|
598
598
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
599
599
|
}
|
|
600
600
|
function _maybeInitializeMux2() {
|
|
601
|
-
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
601
|
+
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee28() {
|
|
602
602
|
var _this20 = this;
|
|
603
603
|
var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
|
|
604
|
-
return _regenerator().w(function(
|
|
605
|
-
while (1) switch (
|
|
604
|
+
return _regenerator().w(function(_context28) {
|
|
605
|
+
while (1) switch (_context28.n) {
|
|
606
606
|
case 0:
|
|
607
607
|
if (_classPrivateFieldGet(_api, this)) {
|
|
608
|
-
|
|
608
|
+
_context28.n = 1;
|
|
609
609
|
break;
|
|
610
610
|
}
|
|
611
|
-
return
|
|
611
|
+
return _context28.a(2);
|
|
612
612
|
case 1:
|
|
613
613
|
shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_10__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_23__._);
|
|
614
614
|
shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_23__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_25__.D5)();
|
|
615
615
|
embedType = this.useWebComponent ? "translated-web-component" : "web-component";
|
|
616
616
|
if (!shouldEnableMuxForPlayer) {
|
|
617
|
-
|
|
617
|
+
_context28.n = 3;
|
|
618
618
|
break;
|
|
619
619
|
}
|
|
620
|
-
|
|
620
|
+
_context28.n = 2;
|
|
621
621
|
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_12__.$)("assets/external/wistia-mux.js");
|
|
622
622
|
case 2:
|
|
623
|
-
mux =
|
|
623
|
+
mux = _context28.v;
|
|
624
624
|
mux.init(_classPrivateFieldGet(_api, this), {
|
|
625
625
|
embedType
|
|
626
626
|
});
|
|
@@ -632,9 +632,9 @@ function _maybeInitializeMux2() {
|
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
634
|
case 3:
|
|
635
|
-
return
|
|
635
|
+
return _context28.a(2);
|
|
636
636
|
}
|
|
637
|
-
},
|
|
637
|
+
}, _callee28, this);
|
|
638
638
|
}));
|
|
639
639
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
640
640
|
}
|
|
@@ -722,8 +722,8 @@ function _renderEmbedTemplate() {
|
|
|
722
722
|
alt: "",
|
|
723
723
|
"aria-hidden": "true"
|
|
724
724
|
})))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
725
|
-
ref: function ref(
|
|
726
|
-
_classPrivateFieldSet(_preloadThumbnailRoot, _this13,
|
|
725
|
+
ref: function ref(_ref22) {
|
|
726
|
+
_classPrivateFieldSet(_preloadThumbnailRoot, _this13, _ref22);
|
|
727
727
|
}
|
|
728
728
|
})), _classPrivateFieldGet(_preactRoot, this));
|
|
729
729
|
}
|
|
@@ -758,9 +758,9 @@ function _runMethodsFromAttributes() {
|
|
|
758
758
|
var _this14 = this;
|
|
759
759
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
|
|
760
760
|
this.whenApiReady().then(function() {
|
|
761
|
-
var
|
|
761
|
+
var _ref23, _classPrivateFieldGet113, _classPrivateFieldGet114;
|
|
762
762
|
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this14, _getValueFromAttribute).call(_this14, "current-time"));
|
|
763
|
-
var isClosedPopover = (
|
|
763
|
+
var isClosedPopover = (_ref23 = ((_classPrivateFieldGet113 = _classPrivateFieldGet(_api, _this14)) === null || _classPrivateFieldGet113 === void 0 ? void 0 : _classPrivateFieldGet113.popover) && !_classPrivateFieldGet(_api, _this14).popover.isVisible()) !== null && _ref23 !== void 0 ? _ref23 : false;
|
|
764
764
|
var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_11__.GS)();
|
|
765
765
|
var shouldDelayUntilPlay = _this14.state !== "playing" && (isMobile || isClosedPopover);
|
|
766
766
|
void ((_classPrivateFieldGet114 = _classPrivateFieldGet(_impl, _this14)) === null || _classPrivateFieldGet114 === void 0 ? void 0 : _classPrivateFieldGet114.time(newTime, {
|
|
@@ -785,8 +785,8 @@ function _runMethodsFromAttributes() {
|
|
|
785
785
|
}
|
|
786
786
|
function _saveInitialAttributesFromDomOptions() {
|
|
787
787
|
var _this15 = this;
|
|
788
|
-
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(
|
|
789
|
-
var
|
|
788
|
+
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref24) {
|
|
789
|
+
var _ref25 = _slicedToArray(_ref24, 2), value = _ref25[1];
|
|
790
790
|
return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_35__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this15, _getValueFromAttribute).call(_this15, value.name)];
|
|
791
791
|
}));
|
|
792
792
|
_classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
|
|
@@ -3363,17 +3363,17 @@ var init_wistia_player = __esm({
|
|
|
3363
3363
|
return t && t.__a && t.__a(n);
|
|
3364
3364
|
}
|
|
3365
3365
|
function z(n) {
|
|
3366
|
-
var e, r, u;
|
|
3367
|
-
function
|
|
3366
|
+
var e, r, u, o = null;
|
|
3367
|
+
function i2(i3) {
|
|
3368
3368
|
if (e || (e = n()).then(function(n2) {
|
|
3369
|
-
|
|
3369
|
+
n2 && (o = n2.default || n2), u = true;
|
|
3370
3370
|
}, function(n2) {
|
|
3371
|
-
u =
|
|
3372
|
-
}),
|
|
3373
|
-
if (!
|
|
3374
|
-
return (0, preact__WEBPACK_IMPORTED_MODULE_0__2.createElement)(
|
|
3371
|
+
r = n2, u = true;
|
|
3372
|
+
}), r) throw r;
|
|
3373
|
+
if (!u) throw e;
|
|
3374
|
+
return o ? (0, preact__WEBPACK_IMPORTED_MODULE_0__2.createElement)(o, i3) : null;
|
|
3375
3375
|
}
|
|
3376
|
-
return
|
|
3376
|
+
return i2.displayName = "Lazy", i2.__f = true, i2;
|
|
3377
3377
|
}
|
|
3378
3378
|
function B() {
|
|
3379
3379
|
this.i = null, this.l = null;
|
|
@@ -7378,7 +7378,7 @@ var init_wistia_player = __esm({
|
|
|
7378
7378
|
}
|
|
7379
7379
|
function P(n2, l2, u2, t2, i3) {
|
|
7380
7380
|
var r2, o2, e2, f2, c2, s2 = u2.length, a2 = s2, h2 = 0;
|
|
7381
|
-
for (n2.__k = new Array(i3), r2 = 0; r2 < i3; r2++) null != (o2 = l2[r2]) && "boolean" != typeof o2 && "function" != typeof o2 ? (
|
|
7381
|
+
for (n2.__k = new Array(i3), r2 = 0; r2 < i3; r2++) null != (o2 = l2[r2]) && "boolean" != typeof o2 && "function" != typeof o2 ? ("string" == typeof o2 || "number" == typeof o2 || "bigint" == typeof o2 || o2.constructor == String ? o2 = n2.__k[r2] = m(null, o2, null, null, null) : w(o2) ? o2 = n2.__k[r2] = m(k, { children: o2 }, null, null, null) : null == o2.constructor && o2.__b > 0 ? o2 = n2.__k[r2] = m(o2.type, o2.props, o2.key, o2.ref ? o2.ref : null, o2.__v) : n2.__k[r2] = o2, f2 = r2 + h2, o2.__ = n2, o2.__b = n2.__b + 1, e2 = null, -1 != (c2 = o2.__i = L(o2, u2, f2, a2)) && (a2--, (e2 = u2[c2]) && (e2.__u |= 2)), null == e2 || null == e2.__v ? (-1 == c2 && (i3 > s2 ? h2-- : i3 < s2 && h2++), "function" != typeof o2.type && (o2.__u |= 4)) : c2 != f2 && (c2 == f2 - 1 ? h2-- : c2 == f2 + 1 ? h2++ : (c2 > f2 ? h2-- : h2++, o2.__u |= 4))) : n2.__k[r2] = null;
|
|
7382
7382
|
if (a2) for (r2 = 0; r2 < s2; r2++) null != (e2 = u2[r2]) && 0 == (2 & e2.__u) && (e2.__e == t2 && (t2 = S(e2)), D(e2, e2));
|
|
7383
7383
|
return t2;
|
|
7384
7384
|
}
|
|
@@ -7401,7 +7401,7 @@ var init_wistia_player = __esm({
|
|
|
7401
7401
|
}
|
|
7402
7402
|
function L(n2, l2, u2, t2) {
|
|
7403
7403
|
var i3, r2, o2, e2 = n2.key, f2 = n2.type, c2 = l2[u2], s2 = null != c2 && 0 == (2 & c2.__u);
|
|
7404
|
-
if (null === c2 && null ==
|
|
7404
|
+
if (null === c2 && null == e2 || s2 && e2 == c2.key && f2 == c2.type) return u2;
|
|
7405
7405
|
if (t2 > (s2 ? 1 : 0)) {
|
|
7406
7406
|
for (i3 = u2 - 1, r2 = u2 + 1; i3 >= 0 || r2 < l2.length; ) if (null != (c2 = l2[o2 = i3 >= 0 ? i3-- : r2++]) && 0 == (2 & c2.__u) && e2 == c2.key && f2 == c2.type) return o2;
|
|
7407
7407
|
}
|
|
@@ -7443,9 +7443,9 @@ var init_wistia_player = __esm({
|
|
|
7443
7443
|
if (null != u2.constructor) return null;
|
|
7444
7444
|
128 & t2.__u && (c2 = !!(32 & t2.__u), o2 = [f2 = u2.__e = t2.__e]), (a2 = l.__b) && a2(u2);
|
|
7445
7445
|
n: if ("function" == typeof j2) try {
|
|
7446
|
-
if (b2 = u2.props, S2 = "prototype" in j2 && j2.prototype.render, C2 = (a2 = j2.contextType) && i3[a2.__c], M2 = a2 ? C2 ? C2.props.value : a2.__ : i3, t2.__c ? m2 = (h2 = u2.__c = t2.__c).__ = h2.__E : (S2 ? u2.__c = h2 = new j2(b2, M2) : (u2.__c = h2 = new x(b2, M2), h2.constructor = j2, h2.render = E), C2 && C2.sub(h2), h2.
|
|
7446
|
+
if (b2 = u2.props, S2 = "prototype" in j2 && j2.prototype.render, C2 = (a2 = j2.contextType) && i3[a2.__c], M2 = a2 ? C2 ? C2.props.value : a2.__ : i3, t2.__c ? m2 = (h2 = u2.__c = t2.__c).__ = h2.__E : (S2 ? u2.__c = h2 = new j2(b2, M2) : (u2.__c = h2 = new x(b2, M2), h2.constructor = j2, h2.render = E), C2 && C2.sub(h2), h2.state || (h2.state = {}), h2.__n = i3, p2 = h2.__d = true, h2.__h = [], h2._sb = []), S2 && null == h2.__s && (h2.__s = h2.state), S2 && null != j2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = d({}, h2.__s)), d(h2.__s, j2.getDerivedStateFromProps(b2, h2.__s))), v2 = h2.props, y2 = h2.state, h2.__v = u2, p2) S2 && null == j2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), S2 && null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
|
|
7447
7447
|
else {
|
|
7448
|
-
if (S2 && null == j2.getDerivedStateFromProps && b2 !== v2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(b2, M2), !h2.__e && null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(b2, h2.__s, M2)
|
|
7448
|
+
if (S2 && null == j2.getDerivedStateFromProps && b2 !== v2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(b2, M2), u2.__v == t2.__v || !h2.__e && null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(b2, h2.__s, M2)) {
|
|
7449
7449
|
for (u2.__v != t2.__v && (h2.props = b2, h2.state = h2.__s, h2.__d = false), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.some(function(n3) {
|
|
7450
7450
|
n3 && (n3.__ = u2);
|
|
7451
7451
|
}), $2 = 0; $2 < h2._sb.length; $2++) h2.__h.push(h2._sb[$2]);
|
|
@@ -7496,7 +7496,7 @@ var init_wistia_player = __esm({
|
|
|
7496
7496
|
return "object" != typeof n2 || null == n2 || n2.__b && n2.__b > 0 ? n2 : w(n2) ? n2.map(V) : d({}, n2);
|
|
7497
7497
|
}
|
|
7498
7498
|
function q(u2, t2, i3, r2, o2, e2, f2, c2, s2) {
|
|
7499
|
-
var a2, h2, v2, y2, d2, _2, m2, b2 = i3.props, k2 = t2.props, x2 = t2.type;
|
|
7499
|
+
var a2, h2, v2, y2, d2, _2, m2, b2 = i3.props || p, k2 = t2.props, x2 = t2.type;
|
|
7500
7500
|
if ("svg" == x2 ? o2 = "http://www.w3.org/2000/svg" : "math" == x2 ? o2 = "http://www.w3.org/1998/Math/MathML" : o2 || (o2 = "http://www.w3.org/1999/xhtml"), null != e2) {
|
|
7501
7501
|
for (a2 = 0; a2 < e2.length; a2++) if ((d2 = e2[a2]) && "setAttribute" in d2 == !!x2 && (x2 ? d2.localName == x2 : 3 == d2.nodeType)) {
|
|
7502
7502
|
u2 = d2, e2[a2] = null;
|
|
@@ -7509,7 +7509,7 @@ var init_wistia_player = __esm({
|
|
|
7509
7509
|
}
|
|
7510
7510
|
if (null == x2) b2 === k2 || c2 && u2.data == k2 || (u2.data = k2);
|
|
7511
7511
|
else {
|
|
7512
|
-
if (e2 = e2 && n.call(u2.childNodes),
|
|
7512
|
+
if (e2 = e2 && n.call(u2.childNodes), !c2 && null != e2) for (b2 = {}, a2 = 0; a2 < u2.attributes.length; a2++) b2[(d2 = u2.attributes[a2]).name] = d2.value;
|
|
7513
7513
|
for (a2 in b2) if (d2 = b2[a2], "children" == a2) ;
|
|
7514
7514
|
else if ("dangerouslySetInnerHTML" == a2) v2 = d2;
|
|
7515
7515
|
else if (!(a2 in k2)) {
|
|
@@ -8892,14 +8892,14 @@ var init_wistia_player = __esm({
|
|
|
8892
8892
|
};
|
|
8893
8893
|
})();
|
|
8894
8894
|
var getJsScript = /* @__PURE__ */ (function() {
|
|
8895
|
-
var _ref2 = _asyncToGenerator2(/* @__PURE__ */ _regenerator2().m(function
|
|
8896
|
-
var options, url,
|
|
8897
|
-
return _regenerator2().w(function(
|
|
8898
|
-
while (1) switch (
|
|
8895
|
+
var _ref2 = _asyncToGenerator2(/* @__PURE__ */ _regenerator2().m(function _callee3(mediaId) {
|
|
8896
|
+
var options, url, _args3 = arguments;
|
|
8897
|
+
return _regenerator2().w(function(_context3) {
|
|
8898
|
+
while (1) switch (_context3.n) {
|
|
8899
8899
|
case 0:
|
|
8900
|
-
options =
|
|
8900
|
+
options = _args3.length > 1 && _args3[1] !== void 0 ? _args3[1] : {};
|
|
8901
8901
|
url = jsScriptUrl(mediaId, options);
|
|
8902
|
-
return
|
|
8902
|
+
return _context3.a(2, new Promise(function(resolve, reject) {
|
|
8903
8903
|
setTimeout(function() {
|
|
8904
8904
|
reject(new Error("Timeout loading js media data"));
|
|
8905
8905
|
}, JS_LOAD_TIMEOUT);
|
|
@@ -8909,15 +8909,19 @@ var init_wistia_player = __esm({
|
|
|
8909
8909
|
).then(function(module2) {
|
|
8910
8910
|
var mediaData = module2.mediaData;
|
|
8911
8911
|
(0, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_5__.ry)(mediaId, mediaData);
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8912
|
+
}).then(/* @__PURE__ */ _asyncToGenerator2(/* @__PURE__ */ _regenerator2().m(function _callee2() {
|
|
8913
|
+
return _regenerator2().w(function(_context2) {
|
|
8914
|
+
while (1) switch (_context2.n) {
|
|
8915
|
+
case 0:
|
|
8916
|
+
return _context2.a(2, (0, _utilities_fetchMediaData_ts__WEBPACK_IMPORTED_MODULE_8__.j)(mediaId, options));
|
|
8917
|
+
}
|
|
8918
|
+
}, _callee2);
|
|
8919
|
+
}))).then(resolve).catch(function(err) {
|
|
8920
|
+
reject(err instanceof Error ? err : new Error(String(err)));
|
|
8917
8921
|
});
|
|
8918
8922
|
}));
|
|
8919
8923
|
}
|
|
8920
|
-
},
|
|
8924
|
+
}, _callee3);
|
|
8921
8925
|
}));
|
|
8922
8926
|
return function getJsScript2(_x3) {
|
|
8923
8927
|
return _ref2.apply(this, arguments);
|
|
@@ -8938,29 +8942,29 @@ var init_wistia_player = __esm({
|
|
|
8938
8942
|
return [promise, timeoutRef];
|
|
8939
8943
|
};
|
|
8940
8944
|
var getInitialMediaData = /* @__PURE__ */ (function() {
|
|
8941
|
-
var
|
|
8945
|
+
var _ref4 = _asyncToGenerator2(/* @__PURE__ */ _regenerator2().m(function _callee4(mediaId) {
|
|
8942
8946
|
var _Wistia$_inlineMediaD;
|
|
8943
|
-
var options, mediaDataFromCache, inlineMediaData, clonedInlineMediaData, speedDemonPromises, mediaData, _fetchMediaDataDelaye, _fetchMediaDataDelaye2, delayedMediaDataPromise, delayedFetchTimeoutRef,
|
|
8944
|
-
return _regenerator2().w(function(
|
|
8945
|
-
while (1) switch (
|
|
8947
|
+
var options, mediaDataFromCache, inlineMediaData, clonedInlineMediaData, speedDemonPromises, mediaData, _fetchMediaDataDelaye, _fetchMediaDataDelaye2, delayedMediaDataPromise, delayedFetchTimeoutRef, _args4 = arguments;
|
|
8948
|
+
return _regenerator2().w(function(_context4) {
|
|
8949
|
+
while (1) switch (_context4.n) {
|
|
8946
8950
|
case 0:
|
|
8947
|
-
options =
|
|
8951
|
+
options = _args4.length > 1 && _args4[1] !== void 0 ? _args4[1] : {};
|
|
8948
8952
|
mediaDataFromCache = (0, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_5__.F2)(mediaId);
|
|
8949
8953
|
if (!(mediaDataFromCache != null && options.skipCache !== true)) {
|
|
8950
|
-
|
|
8954
|
+
_context4.n = 1;
|
|
8951
8955
|
break;
|
|
8952
8956
|
}
|
|
8953
|
-
return
|
|
8957
|
+
return _context4.a(2, (0, _utilities_fetchMediaData_ts__WEBPACK_IMPORTED_MODULE_8__.j)(mediaId, options));
|
|
8954
8958
|
case 1:
|
|
8955
8959
|
inlineMediaData = (_Wistia$_inlineMediaD = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__.s._inlineMediaData) === null || _Wistia$_inlineMediaD === void 0 ? void 0 : _Wistia$_inlineMediaD[mediaId];
|
|
8956
8960
|
if (!(inlineMediaData != null)) {
|
|
8957
|
-
|
|
8961
|
+
_context4.n = 2;
|
|
8958
8962
|
break;
|
|
8959
8963
|
}
|
|
8960
8964
|
clonedInlineMediaData = (0, _utilities_obj_js__WEBPACK_IMPORTED_MODULE_7__.o8)(inlineMediaData);
|
|
8961
8965
|
(0, _utilities_media_data_transforms_js__WEBPACK_IMPORTED_MODULE_4__.M)(clonedInlineMediaData, options);
|
|
8962
8966
|
(0, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_5__.ry)(mediaId, clonedInlineMediaData);
|
|
8963
|
-
return
|
|
8967
|
+
return _context4.a(2, (0, _utilities_fetchMediaData_ts__WEBPACK_IMPORTED_MODULE_8__.j)(mediaId, options));
|
|
8964
8968
|
case 2:
|
|
8965
8969
|
speedDemonPromises = [];
|
|
8966
8970
|
if (doesJsonpExist(mediaId, options)) {
|
|
@@ -8970,29 +8974,29 @@ var init_wistia_player = __esm({
|
|
|
8970
8974
|
speedDemonPromises.push(getJsScript(mediaId, options));
|
|
8971
8975
|
}
|
|
8972
8976
|
if (!(speedDemonPromises.length === 0)) {
|
|
8973
|
-
|
|
8977
|
+
_context4.n = 4;
|
|
8974
8978
|
break;
|
|
8975
8979
|
}
|
|
8976
|
-
|
|
8980
|
+
_context4.n = 3;
|
|
8977
8981
|
return (0, _utilities_fetchMediaData_ts__WEBPACK_IMPORTED_MODULE_8__.j)(mediaId, options);
|
|
8978
8982
|
case 3:
|
|
8979
|
-
mediaData =
|
|
8980
|
-
|
|
8983
|
+
mediaData = _context4.v;
|
|
8984
|
+
_context4.n = 6;
|
|
8981
8985
|
break;
|
|
8982
8986
|
case 4:
|
|
8983
8987
|
_fetchMediaDataDelaye = fetchMediaDataDelayed(mediaId, options), _fetchMediaDataDelaye2 = _slicedToArray2(_fetchMediaDataDelaye, 2), delayedMediaDataPromise = _fetchMediaDataDelaye2[0], delayedFetchTimeoutRef = _fetchMediaDataDelaye2[1];
|
|
8984
|
-
|
|
8988
|
+
_context4.n = 5;
|
|
8985
8989
|
return Promise.any([].concat(speedDemonPromises, [delayedMediaDataPromise]));
|
|
8986
8990
|
case 5:
|
|
8987
|
-
mediaData =
|
|
8991
|
+
mediaData = _context4.v;
|
|
8988
8992
|
clearTimeout(delayedFetchTimeoutRef.current);
|
|
8989
8993
|
case 6:
|
|
8990
|
-
return
|
|
8994
|
+
return _context4.a(2, mediaData);
|
|
8991
8995
|
}
|
|
8992
|
-
},
|
|
8996
|
+
}, _callee4);
|
|
8993
8997
|
}));
|
|
8994
8998
|
return function getInitialMediaData2(_x4) {
|
|
8995
|
-
return
|
|
8999
|
+
return _ref4.apply(this, arguments);
|
|
8996
9000
|
};
|
|
8997
9001
|
})();
|
|
8998
9002
|
})
|
|
@@ -9093,7 +9097,7 @@ var init_wistia_player = __esm({
|
|
|
9093
9097
|
var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
9094
9098
|
var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
9095
9099
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
9096
|
-
var TAGGED_VERSION2 = "0.
|
|
9100
|
+
var TAGGED_VERSION2 = "0.4.0";
|
|
9097
9101
|
var CURRENT_SHA2 = (
|
|
9098
9102
|
/* unused pure expression or super */
|
|
9099
9103
|
null
|
|
@@ -15913,11 +15917,11 @@ var init_wistia_player = __esm({
|
|
|
15913
15917
|
}, {
|
|
15914
15918
|
key: "definePlugin",
|
|
15915
15919
|
value: (function() {
|
|
15916
|
-
var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
15920
|
+
var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee5(name, options) {
|
|
15917
15921
|
var _this4 = this;
|
|
15918
15922
|
var addPlugin;
|
|
15919
|
-
return _regenerator().w(function(
|
|
15920
|
-
while (1) switch (
|
|
15923
|
+
return _regenerator().w(function(_context5) {
|
|
15924
|
+
while (1) switch (_context5.n) {
|
|
15921
15925
|
case 0:
|
|
15922
15926
|
addPlugin = /* @__PURE__ */ (function() {
|
|
15923
15927
|
var _ref11 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee3() {
|
|
@@ -15934,27 +15938,32 @@ var init_wistia_player = __esm({
|
|
|
15934
15938
|
};
|
|
15935
15939
|
})();
|
|
15936
15940
|
if (!_classPrivateFieldGet(_api, this)) {
|
|
15937
|
-
|
|
15941
|
+
_context5.n = 1;
|
|
15938
15942
|
break;
|
|
15939
15943
|
}
|
|
15940
|
-
return
|
|
15944
|
+
return _context5.a(2, addPlugin());
|
|
15941
15945
|
case 1:
|
|
15942
|
-
return
|
|
15943
|
-
_this4.whenApiReady().then(function() {
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
reject(err);
|
|
15949
|
-
} else {
|
|
15950
|
-
reject(new Error("Promise rejected with non-Error value"));
|
|
15946
|
+
return _context5.a(2, new Promise(function(resolve, reject) {
|
|
15947
|
+
_this4.whenApiReady().then(/* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee4() {
|
|
15948
|
+
return _regenerator().w(function(_context4) {
|
|
15949
|
+
while (1) switch (_context4.n) {
|
|
15950
|
+
case 0:
|
|
15951
|
+
return _context4.a(2, addPlugin());
|
|
15951
15952
|
}
|
|
15952
|
-
});
|
|
15953
|
+
}, _callee4);
|
|
15954
|
+
}))).then(function(plugin) {
|
|
15955
|
+
return resolve(plugin);
|
|
15956
|
+
}).catch(function(err) {
|
|
15957
|
+
if (err instanceof Error) {
|
|
15958
|
+
reject(err);
|
|
15959
|
+
} else {
|
|
15960
|
+
reject(new Error("Promise rejected with non-Error value"));
|
|
15961
|
+
}
|
|
15953
15962
|
}).catch(function(_error) {
|
|
15954
15963
|
});
|
|
15955
15964
|
}));
|
|
15956
15965
|
}
|
|
15957
|
-
},
|
|
15966
|
+
}, _callee5, this);
|
|
15958
15967
|
}));
|
|
15959
15968
|
function definePlugin(_x3, _x4) {
|
|
15960
15969
|
return _definePlugin.apply(this, arguments);
|
|
@@ -15964,20 +15973,20 @@ var init_wistia_player = __esm({
|
|
|
15964
15973
|
}, {
|
|
15965
15974
|
key: "deleteOverlay",
|
|
15966
15975
|
value: (function() {
|
|
15967
|
-
var _deleteOverlay = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
15976
|
+
var _deleteOverlay = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee6(name) {
|
|
15968
15977
|
var _classPrivateFieldGet89;
|
|
15969
|
-
return _regenerator().w(function(
|
|
15970
|
-
while (1) switch (
|
|
15978
|
+
return _regenerator().w(function(_context6) {
|
|
15979
|
+
while (1) switch (_context6.n) {
|
|
15971
15980
|
case 0:
|
|
15972
15981
|
if (!((_classPrivateFieldGet89 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet89 !== void 0 && _classPrivateFieldGet89.undefineOverlay)) {
|
|
15973
|
-
|
|
15982
|
+
_context6.n = 1;
|
|
15974
15983
|
break;
|
|
15975
15984
|
}
|
|
15976
|
-
return
|
|
15985
|
+
return _context6.a(2, _classPrivateFieldGet(_impl, this).undefineOverlay(name));
|
|
15977
15986
|
case 1:
|
|
15978
|
-
return
|
|
15987
|
+
return _context6.a(2, Promise.reject(new Error("overlay ".concat(name, " cannot be deleted at this time"))));
|
|
15979
15988
|
}
|
|
15980
|
-
},
|
|
15989
|
+
}, _callee6, this);
|
|
15981
15990
|
}));
|
|
15982
15991
|
function deleteOverlay(_x5) {
|
|
15983
15992
|
return _deleteOverlay.apply(this, arguments);
|
|
@@ -15987,20 +15996,20 @@ var init_wistia_player = __esm({
|
|
|
15987
15996
|
}, {
|
|
15988
15997
|
key: "disableControl",
|
|
15989
15998
|
value: (function() {
|
|
15990
|
-
var _disableControl = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
15999
|
+
var _disableControl = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee7(name) {
|
|
15991
16000
|
var _classPrivateFieldGet90;
|
|
15992
|
-
return _regenerator().w(function(
|
|
15993
|
-
while (1) switch (
|
|
16001
|
+
return _regenerator().w(function(_context7) {
|
|
16002
|
+
while (1) switch (_context7.n) {
|
|
15994
16003
|
case 0:
|
|
15995
16004
|
if (!((_classPrivateFieldGet90 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet90 !== void 0 && _classPrivateFieldGet90.setControlEnabled)) {
|
|
15996
|
-
|
|
16005
|
+
_context7.n = 1;
|
|
15997
16006
|
break;
|
|
15998
16007
|
}
|
|
15999
|
-
return
|
|
16008
|
+
return _context7.a(2, _classPrivateFieldGet(_impl, this).setControlEnabled(name, false));
|
|
16000
16009
|
case 1:
|
|
16001
|
-
return
|
|
16010
|
+
return _context7.a(2, Promise.reject(new Error('control "'.concat(name, '" cannot be disabled at this time'))));
|
|
16002
16011
|
}
|
|
16003
|
-
},
|
|
16012
|
+
}, _callee7, this);
|
|
16004
16013
|
}));
|
|
16005
16014
|
function disableControl(_x6) {
|
|
16006
16015
|
return _disableControl.apply(this, arguments);
|
|
@@ -16010,20 +16019,20 @@ var init_wistia_player = __esm({
|
|
|
16010
16019
|
}, {
|
|
16011
16020
|
key: "enableControl",
|
|
16012
16021
|
value: (function() {
|
|
16013
|
-
var _enableControl = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16022
|
+
var _enableControl = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee8(name) {
|
|
16014
16023
|
var _classPrivateFieldGet91;
|
|
16015
|
-
return _regenerator().w(function(
|
|
16016
|
-
while (1) switch (
|
|
16024
|
+
return _regenerator().w(function(_context8) {
|
|
16025
|
+
while (1) switch (_context8.n) {
|
|
16017
16026
|
case 0:
|
|
16018
16027
|
if (!((_classPrivateFieldGet91 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet91 !== void 0 && _classPrivateFieldGet91.setControlEnabled)) {
|
|
16019
|
-
|
|
16028
|
+
_context8.n = 1;
|
|
16020
16029
|
break;
|
|
16021
16030
|
}
|
|
16022
|
-
return
|
|
16031
|
+
return _context8.a(2, _classPrivateFieldGet(_impl, this).setControlEnabled(name, true));
|
|
16023
16032
|
case 1:
|
|
16024
|
-
return
|
|
16033
|
+
return _context8.a(2, Promise.reject(new Error('control "'.concat(name, '" cannot be enabled at this time'))));
|
|
16025
16034
|
}
|
|
16026
|
-
},
|
|
16035
|
+
}, _callee8, this);
|
|
16027
16036
|
}));
|
|
16028
16037
|
function enableControl(_x7) {
|
|
16029
16038
|
return _enableControl.apply(this, arguments);
|
|
@@ -16033,16 +16042,16 @@ var init_wistia_player = __esm({
|
|
|
16033
16042
|
}, {
|
|
16034
16043
|
key: "enterInputContext",
|
|
16035
16044
|
value: (function() {
|
|
16036
|
-
var _enterInputContext = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16045
|
+
var _enterInputContext = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee9(context) {
|
|
16037
16046
|
var _classPrivateFieldGet92, _this5 = this;
|
|
16038
|
-
return _regenerator().w(function(
|
|
16039
|
-
while (1) switch (
|
|
16047
|
+
return _regenerator().w(function(_context9) {
|
|
16048
|
+
while (1) switch (_context9.n) {
|
|
16040
16049
|
case 0:
|
|
16041
16050
|
if (!((_classPrivateFieldGet92 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet92 !== void 0 && _classPrivateFieldGet92.enterInputContext)) {
|
|
16042
|
-
|
|
16051
|
+
_context9.n = 1;
|
|
16043
16052
|
break;
|
|
16044
16053
|
}
|
|
16045
|
-
return
|
|
16054
|
+
return _context9.a(2, new Promise(function(resolve) {
|
|
16046
16055
|
var _classPrivateFieldGet93;
|
|
16047
16056
|
var _handler = function handler(event) {
|
|
16048
16057
|
var detail = event.detail;
|
|
@@ -16055,9 +16064,9 @@ var init_wistia_player = __esm({
|
|
|
16055
16064
|
(_classPrivateFieldGet93 = _classPrivateFieldGet(_impl, _this5)) === null || _classPrivateFieldGet93 === void 0 ? void 0 : _classPrivateFieldGet93.enterInputContext(context);
|
|
16056
16065
|
}));
|
|
16057
16066
|
case 1:
|
|
16058
|
-
return
|
|
16067
|
+
return _context9.a(2, Promise.reject(new Error('input context of name "'.concat(context, '" cannot be enabled at this time'))));
|
|
16059
16068
|
}
|
|
16060
|
-
},
|
|
16069
|
+
}, _callee9, this);
|
|
16061
16070
|
}));
|
|
16062
16071
|
function enterInputContext(_x8) {
|
|
16063
16072
|
return _enterInputContext.apply(this, arguments);
|
|
@@ -16067,20 +16076,20 @@ var init_wistia_player = __esm({
|
|
|
16067
16076
|
}, {
|
|
16068
16077
|
key: "exitInputContext",
|
|
16069
16078
|
value: (function() {
|
|
16070
|
-
var _exitInputContext = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16079
|
+
var _exitInputContext = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee0(context) {
|
|
16071
16080
|
var _classPrivateFieldGet94;
|
|
16072
|
-
return _regenerator().w(function(
|
|
16073
|
-
while (1) switch (
|
|
16081
|
+
return _regenerator().w(function(_context0) {
|
|
16082
|
+
while (1) switch (_context0.n) {
|
|
16074
16083
|
case 0:
|
|
16075
16084
|
if (!((_classPrivateFieldGet94 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet94 !== void 0 && _classPrivateFieldGet94.exitInputContext)) {
|
|
16076
|
-
|
|
16085
|
+
_context0.n = 1;
|
|
16077
16086
|
break;
|
|
16078
16087
|
}
|
|
16079
|
-
return
|
|
16088
|
+
return _context0.a(2, Promise.resolve(_classPrivateFieldGet(_impl, this).exitInputContext(context)));
|
|
16080
16089
|
case 1:
|
|
16081
|
-
return
|
|
16090
|
+
return _context0.a(2, Promise.reject(new Error('control "'.concat(context, '" cannot be enabled at this time'))));
|
|
16082
16091
|
}
|
|
16083
|
-
},
|
|
16092
|
+
}, _callee0, this);
|
|
16084
16093
|
}));
|
|
16085
16094
|
function exitInputContext(_x9) {
|
|
16086
16095
|
return _exitInputContext.apply(this, arguments);
|
|
@@ -16097,13 +16106,13 @@ var init_wistia_player = __esm({
|
|
|
16097
16106
|
}, {
|
|
16098
16107
|
key: "getInitialMediaData",
|
|
16099
16108
|
value: (function() {
|
|
16100
|
-
var _getInitialMediaData2 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16101
|
-
return _regenerator().w(function(
|
|
16102
|
-
while (1) switch (
|
|
16109
|
+
var _getInitialMediaData2 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee1(mediaId, options) {
|
|
16110
|
+
return _regenerator().w(function(_context1) {
|
|
16111
|
+
while (1) switch (_context1.n) {
|
|
16103
16112
|
case 0:
|
|
16104
|
-
return
|
|
16113
|
+
return _context1.a(2, (0, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_32__.n)(mediaId, options));
|
|
16105
16114
|
}
|
|
16106
|
-
},
|
|
16115
|
+
}, _callee1);
|
|
16107
16116
|
}));
|
|
16108
16117
|
function getInitialMediaData(_x0, _x1) {
|
|
16109
16118
|
return _getInitialMediaData2.apply(this, arguments);
|
|
@@ -16113,12 +16122,12 @@ var init_wistia_player = __esm({
|
|
|
16113
16122
|
}, {
|
|
16114
16123
|
key: "getPlugin",
|
|
16115
16124
|
value: (function() {
|
|
16116
|
-
var _getPlugin = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16125
|
+
var _getPlugin = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee10(name) {
|
|
16117
16126
|
var _this6 = this;
|
|
16118
|
-
return _regenerator().w(function(
|
|
16119
|
-
while (1) switch (
|
|
16127
|
+
return _regenerator().w(function(_context10) {
|
|
16128
|
+
while (1) switch (_context10.n) {
|
|
16120
16129
|
case 0:
|
|
16121
|
-
return
|
|
16130
|
+
return _context10.a(2, new Promise(function(resolve, reject) {
|
|
16122
16131
|
var _classPrivateFieldGet95;
|
|
16123
16132
|
if ((_classPrivateFieldGet95 = _classPrivateFieldGet(_api, _this6)) !== null && _classPrivateFieldGet95 !== void 0 && _classPrivateFieldGet95.plugin && name in _classPrivateFieldGet(_api, _this6).plugin) {
|
|
16124
16133
|
resolve(_classPrivateFieldGet(_api, _this6).plugin[name]);
|
|
@@ -16126,7 +16135,7 @@ var init_wistia_player = __esm({
|
|
|
16126
16135
|
reject(new Error("plugin ".concat(name, " is not defined")));
|
|
16127
16136
|
}));
|
|
16128
16137
|
}
|
|
16129
|
-
},
|
|
16138
|
+
}, _callee10);
|
|
16130
16139
|
}));
|
|
16131
16140
|
function getPlugin(_x10) {
|
|
16132
16141
|
return _getPlugin.apply(this, arguments);
|
|
@@ -16136,41 +16145,41 @@ var init_wistia_player = __esm({
|
|
|
16136
16145
|
}, {
|
|
16137
16146
|
key: "getRemapTime",
|
|
16138
16147
|
value: (function() {
|
|
16139
|
-
var _getRemapTime = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16148
|
+
var _getRemapTime = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee11() {
|
|
16140
16149
|
var _classPrivateFieldGet96, _this7 = this;
|
|
16141
16150
|
var _t, _t2, _t3;
|
|
16142
|
-
return _regenerator().w(function(
|
|
16143
|
-
while (1) switch (
|
|
16151
|
+
return _regenerator().w(function(_context11) {
|
|
16152
|
+
while (1) switch (_context11.n) {
|
|
16144
16153
|
case 0:
|
|
16145
16154
|
if (!(_classPrivateFieldGet(_cachedRemapTime, this) != null)) {
|
|
16146
|
-
|
|
16155
|
+
_context11.n = 1;
|
|
16147
16156
|
break;
|
|
16148
16157
|
}
|
|
16149
|
-
return
|
|
16158
|
+
return _context11.a(2, _classPrivateFieldGet(_cachedRemapTime, this));
|
|
16150
16159
|
case 1:
|
|
16151
16160
|
if (!(this.languages.length <= 1)) {
|
|
16152
|
-
|
|
16161
|
+
_context11.n = 2;
|
|
16153
16162
|
break;
|
|
16154
16163
|
}
|
|
16155
16164
|
_classPrivateFieldSet(_cachedRemapTime, this, function(_fromLanguage, _toLanguage, fromTime) {
|
|
16156
16165
|
return fromTime;
|
|
16157
16166
|
});
|
|
16158
|
-
return
|
|
16167
|
+
return _context11.a(2, _classPrivateFieldGet(_cachedRemapTime, this));
|
|
16159
16168
|
case 2:
|
|
16160
16169
|
if (!((_classPrivateFieldGet96 = _classPrivateFieldGet(_cachedRemapTime, this)) !== null && _classPrivateFieldGet96 !== void 0)) {
|
|
16161
|
-
|
|
16170
|
+
_context11.n = 3;
|
|
16162
16171
|
break;
|
|
16163
16172
|
}
|
|
16164
16173
|
_classPrivateFieldGet96;
|
|
16165
|
-
|
|
16174
|
+
_context11.n = 5;
|
|
16166
16175
|
break;
|
|
16167
16176
|
case 3:
|
|
16168
16177
|
_t = _classPrivateFieldSet;
|
|
16169
16178
|
_t2 = _cachedRemapTime;
|
|
16170
16179
|
_t3 = this;
|
|
16171
|
-
|
|
16172
|
-
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_12__.$)("assets/external/timeMapping.js").then(function(
|
|
16173
|
-
var remapTime =
|
|
16180
|
+
_context11.n = 4;
|
|
16181
|
+
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_12__.$)("assets/external/timeMapping.js").then(function(_ref13) {
|
|
16182
|
+
var remapTime = _ref13.remapTime;
|
|
16174
16183
|
return function(fromLanguage, toLanguage, fromTime) {
|
|
16175
16184
|
var fromTimeInMilliseconds = fromTime * 1e3;
|
|
16176
16185
|
var fromLocalization = _assertClassBrand(_WistiaPlayer_brand, _this7, _findLocalizationByLanguage).call(_this7, fromLanguage);
|
|
@@ -16183,11 +16192,11 @@ var init_wistia_player = __esm({
|
|
|
16183
16192
|
};
|
|
16184
16193
|
});
|
|
16185
16194
|
case 4:
|
|
16186
|
-
_t(_t2, _t3,
|
|
16195
|
+
_t(_t2, _t3, _context11.v);
|
|
16187
16196
|
case 5:
|
|
16188
|
-
return
|
|
16197
|
+
return _context11.a(2, _classPrivateFieldGet(_cachedRemapTime, this));
|
|
16189
16198
|
}
|
|
16190
|
-
},
|
|
16199
|
+
}, _callee11, this);
|
|
16191
16200
|
}));
|
|
16192
16201
|
function getRemapTime() {
|
|
16193
16202
|
return _getRemapTime.apply(this, arguments);
|
|
@@ -16197,20 +16206,20 @@ var init_wistia_player = __esm({
|
|
|
16197
16206
|
}, {
|
|
16198
16207
|
key: "hideOverlay",
|
|
16199
16208
|
value: (function() {
|
|
16200
|
-
var _hideOverlay = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16209
|
+
var _hideOverlay = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee12(name) {
|
|
16201
16210
|
var _classPrivateFieldGet97;
|
|
16202
|
-
return _regenerator().w(function(
|
|
16203
|
-
while (1) switch (
|
|
16211
|
+
return _regenerator().w(function(_context12) {
|
|
16212
|
+
while (1) switch (_context12.n) {
|
|
16204
16213
|
case 0:
|
|
16205
16214
|
if (!((_classPrivateFieldGet97 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet97 !== void 0 && _classPrivateFieldGet97.cancelOverlay)) {
|
|
16206
|
-
|
|
16215
|
+
_context12.n = 1;
|
|
16207
16216
|
break;
|
|
16208
16217
|
}
|
|
16209
|
-
return
|
|
16218
|
+
return _context12.a(2, _classPrivateFieldGet(_impl, this).cancelOverlay(name));
|
|
16210
16219
|
case 1:
|
|
16211
|
-
return
|
|
16220
|
+
return _context12.a(2, Promise.reject(new Error("overlay ".concat(name, " cannot be cancelled at this time"))));
|
|
16212
16221
|
}
|
|
16213
|
-
},
|
|
16222
|
+
}, _callee12, this);
|
|
16214
16223
|
}));
|
|
16215
16224
|
function hideOverlay(_x11) {
|
|
16216
16225
|
return _hideOverlay.apply(this, arguments);
|
|
@@ -16220,12 +16229,12 @@ var init_wistia_player = __esm({
|
|
|
16220
16229
|
}, {
|
|
16221
16230
|
key: "hidePopover",
|
|
16222
16231
|
value: (function() {
|
|
16223
|
-
var _hidePopover = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16232
|
+
var _hidePopover = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee13() {
|
|
16224
16233
|
var _this8 = this;
|
|
16225
|
-
return _regenerator().w(function(
|
|
16226
|
-
while (1) switch (
|
|
16234
|
+
return _regenerator().w(function(_context13) {
|
|
16235
|
+
while (1) switch (_context13.n) {
|
|
16227
16236
|
case 0:
|
|
16228
|
-
return
|
|
16237
|
+
return _context13.a(2, new Promise(function(resolve, reject) {
|
|
16229
16238
|
var _classPrivateFieldGet98;
|
|
16230
16239
|
if ((_classPrivateFieldGet98 = _classPrivateFieldGet(_api, _this8)) !== null && _classPrivateFieldGet98 !== void 0 && _classPrivateFieldGet98.popover) {
|
|
16231
16240
|
_classPrivateFieldGet(_api, _this8).popover.hide();
|
|
@@ -16234,7 +16243,7 @@ var init_wistia_player = __esm({
|
|
|
16234
16243
|
reject(new Error("Popover cannot be accessed"));
|
|
16235
16244
|
}));
|
|
16236
16245
|
}
|
|
16237
|
-
},
|
|
16246
|
+
}, _callee13);
|
|
16238
16247
|
}));
|
|
16239
16248
|
function hidePopover() {
|
|
16240
16249
|
return _hidePopover.apply(this, arguments);
|
|
@@ -16244,14 +16253,14 @@ var init_wistia_player = __esm({
|
|
|
16244
16253
|
}, {
|
|
16245
16254
|
key: "pause",
|
|
16246
16255
|
value: (function() {
|
|
16247
|
-
var _pause = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16256
|
+
var _pause = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee14() {
|
|
16248
16257
|
var _classPrivateFieldGet99;
|
|
16249
|
-
return _regenerator().w(function(
|
|
16250
|
-
while (1) switch (
|
|
16258
|
+
return _regenerator().w(function(_context14) {
|
|
16259
|
+
while (1) switch (_context14.n) {
|
|
16251
16260
|
case 0:
|
|
16252
|
-
return
|
|
16261
|
+
return _context14.a(2, (_classPrivateFieldGet99 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet99 === void 0 ? void 0 : _classPrivateFieldGet99.pause());
|
|
16253
16262
|
}
|
|
16254
|
-
},
|
|
16263
|
+
}, _callee14, this);
|
|
16255
16264
|
}));
|
|
16256
16265
|
function pause() {
|
|
16257
16266
|
return _pause.apply(this, arguments);
|
|
@@ -16261,14 +16270,14 @@ var init_wistia_player = __esm({
|
|
|
16261
16270
|
}, {
|
|
16262
16271
|
key: "play",
|
|
16263
16272
|
value: (function() {
|
|
16264
|
-
var _play = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16273
|
+
var _play = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee15() {
|
|
16265
16274
|
var _classPrivateFieldGet100;
|
|
16266
|
-
return _regenerator().w(function(
|
|
16267
|
-
while (1) switch (
|
|
16275
|
+
return _regenerator().w(function(_context15) {
|
|
16276
|
+
while (1) switch (_context15.n) {
|
|
16268
16277
|
case 0:
|
|
16269
|
-
return
|
|
16278
|
+
return _context15.a(2, (_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.play());
|
|
16270
16279
|
}
|
|
16271
|
-
},
|
|
16280
|
+
}, _callee15, this);
|
|
16272
16281
|
}));
|
|
16273
16282
|
function play() {
|
|
16274
16283
|
return _play.apply(this, arguments);
|
|
@@ -16278,14 +16287,14 @@ var init_wistia_player = __esm({
|
|
|
16278
16287
|
}, {
|
|
16279
16288
|
key: "releaseControls",
|
|
16280
16289
|
value: (function() {
|
|
16281
|
-
var _releaseControls = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16290
|
+
var _releaseControls = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee16(name) {
|
|
16282
16291
|
var _classPrivateFieldGet101;
|
|
16283
|
-
return _regenerator().w(function(
|
|
16284
|
-
while (1) switch (
|
|
16292
|
+
return _regenerator().w(function(_context16) {
|
|
16293
|
+
while (1) switch (_context16.n) {
|
|
16285
16294
|
case 0:
|
|
16286
|
-
return
|
|
16295
|
+
return _context16.a(2, (_classPrivateFieldGet101 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet101 === void 0 ? void 0 : _classPrivateFieldGet101.releaseControls(name));
|
|
16287
16296
|
}
|
|
16288
|
-
},
|
|
16297
|
+
}, _callee16, this);
|
|
16289
16298
|
}));
|
|
16290
16299
|
function releaseControls(_x12) {
|
|
16291
16300
|
return _releaseControls.apply(this, arguments);
|
|
@@ -16296,10 +16305,10 @@ var init_wistia_player = __esm({
|
|
|
16296
16305
|
key: "removeAllEventListeners",
|
|
16297
16306
|
value: function removeAllEventListeners() {
|
|
16298
16307
|
var _this9 = this;
|
|
16299
|
-
Object.entries(_classPrivateFieldGet(_eventListeners, this)).forEach(function(
|
|
16300
|
-
var
|
|
16301
|
-
listeners.forEach(function(
|
|
16302
|
-
var listener =
|
|
16308
|
+
Object.entries(_classPrivateFieldGet(_eventListeners, this)).forEach(function(_ref14) {
|
|
16309
|
+
var _ref15 = _slicedToArray(_ref14, 2), type = _ref15[0], listeners = _ref15[1];
|
|
16310
|
+
listeners.forEach(function(_ref16) {
|
|
16311
|
+
var listener = _ref16.listener, options = _ref16.options;
|
|
16303
16312
|
_this9.removeEventListener(type, listener, options);
|
|
16304
16313
|
});
|
|
16305
16314
|
});
|
|
@@ -16336,14 +16345,14 @@ var init_wistia_player = __esm({
|
|
|
16336
16345
|
}, {
|
|
16337
16346
|
key: "replaceWithMedia",
|
|
16338
16347
|
value: (function() {
|
|
16339
|
-
var _replaceWithMedia = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16348
|
+
var _replaceWithMedia = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee17(mediaId) {
|
|
16340
16349
|
var _this0 = this;
|
|
16341
|
-
var options,
|
|
16342
|
-
return _regenerator().w(function(
|
|
16343
|
-
while (1) switch (
|
|
16350
|
+
var options, _args17 = arguments;
|
|
16351
|
+
return _regenerator().w(function(_context17) {
|
|
16352
|
+
while (1) switch (_context17.n) {
|
|
16344
16353
|
case 0:
|
|
16345
|
-
options =
|
|
16346
|
-
return
|
|
16354
|
+
options = _args17.length > 1 && _args17[1] !== void 0 ? _args17[1] : {};
|
|
16355
|
+
return _context17.a(2, new Promise(function(resolve, reject) {
|
|
16347
16356
|
var _classPrivateFieldGet102;
|
|
16348
16357
|
if (!_classPrivateFieldGet(_api, _this0)) {
|
|
16349
16358
|
reject(new Error("api not ready to replace"));
|
|
@@ -16357,7 +16366,7 @@ var init_wistia_player = __esm({
|
|
|
16357
16366
|
(_classPrivateFieldGet102 = _classPrivateFieldGet(_api, _this0)) === null || _classPrivateFieldGet102 === void 0 ? void 0 : _classPrivateFieldGet102.replaceWith(mediaId, options);
|
|
16358
16367
|
}));
|
|
16359
16368
|
}
|
|
16360
|
-
},
|
|
16369
|
+
}, _callee17);
|
|
16361
16370
|
}));
|
|
16362
16371
|
function replaceWithMedia(_x13) {
|
|
16363
16372
|
return _replaceWithMedia.apply(this, arguments);
|
|
@@ -16367,14 +16376,14 @@ var init_wistia_player = __esm({
|
|
|
16367
16376
|
}, {
|
|
16368
16377
|
key: "requestControls",
|
|
16369
16378
|
value: (function() {
|
|
16370
|
-
var _requestControls = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16379
|
+
var _requestControls = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee18(name) {
|
|
16371
16380
|
var _classPrivateFieldGet103;
|
|
16372
|
-
return _regenerator().w(function(
|
|
16373
|
-
while (1) switch (
|
|
16381
|
+
return _regenerator().w(function(_context18) {
|
|
16382
|
+
while (1) switch (_context18.n) {
|
|
16374
16383
|
case 0:
|
|
16375
|
-
return
|
|
16384
|
+
return _context18.a(2, (_classPrivateFieldGet103 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet103 === void 0 ? void 0 : _classPrivateFieldGet103.requestControls(name));
|
|
16376
16385
|
}
|
|
16377
|
-
},
|
|
16386
|
+
}, _callee18, this);
|
|
16378
16387
|
}));
|
|
16379
16388
|
function requestControls(_x14) {
|
|
16380
16389
|
return _requestControls.apply(this, arguments);
|
|
@@ -16384,20 +16393,20 @@ var init_wistia_player = __esm({
|
|
|
16384
16393
|
}, {
|
|
16385
16394
|
key: "requestFullscreen",
|
|
16386
16395
|
value: (function() {
|
|
16387
|
-
var _requestFullscreen = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16396
|
+
var _requestFullscreen = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee19() {
|
|
16388
16397
|
var _classPrivateFieldGet104;
|
|
16389
|
-
return _regenerator().w(function(
|
|
16390
|
-
while (1) switch (
|
|
16398
|
+
return _regenerator().w(function(_context19) {
|
|
16399
|
+
while (1) switch (_context19.n) {
|
|
16391
16400
|
case 0:
|
|
16392
16401
|
if (!((_classPrivateFieldGet104 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet104 !== void 0 && _classPrivateFieldGet104.requestFullscreen)) {
|
|
16393
|
-
|
|
16402
|
+
_context19.n = 1;
|
|
16394
16403
|
break;
|
|
16395
16404
|
}
|
|
16396
|
-
return
|
|
16405
|
+
return _context19.a(2, _classPrivateFieldGet(_impl, this).requestFullscreen());
|
|
16397
16406
|
case 1:
|
|
16398
|
-
return
|
|
16407
|
+
return _context19.a(2, Promise.reject(new Error("Fullscreen cannot be accessed")));
|
|
16399
16408
|
}
|
|
16400
|
-
},
|
|
16409
|
+
}, _callee19, this);
|
|
16401
16410
|
}));
|
|
16402
16411
|
function requestFullscreen() {
|
|
16403
16412
|
return _requestFullscreen.apply(this, arguments);
|
|
@@ -16407,20 +16416,20 @@ var init_wistia_player = __esm({
|
|
|
16407
16416
|
}, {
|
|
16408
16417
|
key: "showOverlay",
|
|
16409
16418
|
value: (function() {
|
|
16410
|
-
var _showOverlay = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16419
|
+
var _showOverlay = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee20(name) {
|
|
16411
16420
|
var _classPrivateFieldGet105;
|
|
16412
|
-
return _regenerator().w(function(
|
|
16413
|
-
while (1) switch (
|
|
16421
|
+
return _regenerator().w(function(_context20) {
|
|
16422
|
+
while (1) switch (_context20.n) {
|
|
16414
16423
|
case 0:
|
|
16415
16424
|
if (!((_classPrivateFieldGet105 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet105 !== void 0 && _classPrivateFieldGet105.requestOverlay)) {
|
|
16416
|
-
|
|
16425
|
+
_context20.n = 1;
|
|
16417
16426
|
break;
|
|
16418
16427
|
}
|
|
16419
|
-
return
|
|
16428
|
+
return _context20.a(2, _classPrivateFieldGet(_impl, this).requestOverlay(name));
|
|
16420
16429
|
case 1:
|
|
16421
|
-
return
|
|
16430
|
+
return _context20.a(2, Promise.reject(new Error("overlay ".concat(name, " cannot be requested at this time"))));
|
|
16422
16431
|
}
|
|
16423
|
-
},
|
|
16432
|
+
}, _callee20, this);
|
|
16424
16433
|
}));
|
|
16425
16434
|
function showOverlay(_x15) {
|
|
16426
16435
|
return _showOverlay.apply(this, arguments);
|
|
@@ -16430,12 +16439,12 @@ var init_wistia_player = __esm({
|
|
|
16430
16439
|
}, {
|
|
16431
16440
|
key: "showPopover",
|
|
16432
16441
|
value: (function() {
|
|
16433
|
-
var _showPopover = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16442
|
+
var _showPopover = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee21() {
|
|
16434
16443
|
var _this1 = this;
|
|
16435
|
-
return _regenerator().w(function(
|
|
16436
|
-
while (1) switch (
|
|
16444
|
+
return _regenerator().w(function(_context21) {
|
|
16445
|
+
while (1) switch (_context21.n) {
|
|
16437
16446
|
case 0:
|
|
16438
|
-
return
|
|
16447
|
+
return _context21.a(2, new Promise(function(resolve, reject) {
|
|
16439
16448
|
var _classPrivateFieldGet106;
|
|
16440
16449
|
if ((_classPrivateFieldGet106 = _classPrivateFieldGet(_api, _this1)) !== null && _classPrivateFieldGet106 !== void 0 && _classPrivateFieldGet106.popover) {
|
|
16441
16450
|
_classPrivateFieldGet(_api, _this1).popover.show();
|
|
@@ -16444,7 +16453,7 @@ var init_wistia_player = __esm({
|
|
|
16444
16453
|
reject(new Error("Popover cannot be accessed"));
|
|
16445
16454
|
}));
|
|
16446
16455
|
}
|
|
16447
|
-
},
|
|
16456
|
+
}, _callee21);
|
|
16448
16457
|
}));
|
|
16449
16458
|
function showPopover() {
|
|
16450
16459
|
return _showPopover.apply(this, arguments);
|
|
@@ -16454,17 +16463,17 @@ var init_wistia_player = __esm({
|
|
|
16454
16463
|
}, {
|
|
16455
16464
|
key: "updateEmbedOptions",
|
|
16456
16465
|
value: (function() {
|
|
16457
|
-
var _updateEmbedOptions = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16466
|
+
var _updateEmbedOptions = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee22(options) {
|
|
16458
16467
|
var _this10 = this;
|
|
16459
|
-
return _regenerator().w(function(
|
|
16460
|
-
while (1) switch (
|
|
16468
|
+
return _regenerator().w(function(_context22) {
|
|
16469
|
+
while (1) switch (_context22.n) {
|
|
16461
16470
|
case 0:
|
|
16462
|
-
return
|
|
16471
|
+
return _context22.a(2, new Promise(function(resolve) {
|
|
16463
16472
|
_assertClassBrand(_WistiaPlayer_brand, _this10, _setMultipleSyncedEmbedOptions).call(_this10, options);
|
|
16464
16473
|
resolve(_this10.embedOptions);
|
|
16465
16474
|
}));
|
|
16466
16475
|
}
|
|
16467
|
-
},
|
|
16476
|
+
}, _callee22);
|
|
16468
16477
|
}));
|
|
16469
16478
|
function updateEmbedOptions(_x16) {
|
|
16470
16479
|
return _updateEmbedOptions.apply(this, arguments);
|
|
@@ -16474,12 +16483,12 @@ var init_wistia_player = __esm({
|
|
|
16474
16483
|
}, {
|
|
16475
16484
|
key: "whenApiReady",
|
|
16476
16485
|
value: (function() {
|
|
16477
|
-
var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16486
|
+
var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee23() {
|
|
16478
16487
|
var _this11 = this;
|
|
16479
|
-
return _regenerator().w(function(
|
|
16480
|
-
while (1) switch (
|
|
16488
|
+
return _regenerator().w(function(_context23) {
|
|
16489
|
+
while (1) switch (_context23.n) {
|
|
16481
16490
|
case 0:
|
|
16482
|
-
return
|
|
16491
|
+
return _context23.a(2, new Promise(function(resolve) {
|
|
16483
16492
|
if (_classPrivateFieldGet(_api, _this11)) {
|
|
16484
16493
|
_classPrivateFieldGet(_api, _this11).ready(function() {
|
|
16485
16494
|
resolve();
|
|
@@ -16492,7 +16501,7 @@ var init_wistia_player = __esm({
|
|
|
16492
16501
|
_this11.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.c5, _handler2);
|
|
16493
16502
|
}));
|
|
16494
16503
|
}
|
|
16495
|
-
},
|
|
16504
|
+
}, _callee23);
|
|
16496
16505
|
}));
|
|
16497
16506
|
function whenApiReady() {
|
|
16498
16507
|
return _whenApiReady.apply(this, arguments);
|
|
@@ -16502,33 +16511,33 @@ var init_wistia_player = __esm({
|
|
|
16502
16511
|
}, {
|
|
16503
16512
|
key: "whenControlMounted",
|
|
16504
16513
|
value: (function() {
|
|
16505
|
-
var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function
|
|
16514
|
+
var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee24(handle) {
|
|
16506
16515
|
var control;
|
|
16507
|
-
return _regenerator().w(function(
|
|
16508
|
-
while (1) switch (
|
|
16516
|
+
return _regenerator().w(function(_context24) {
|
|
16517
|
+
while (1) switch (_context24.n) {
|
|
16509
16518
|
case 0:
|
|
16510
|
-
|
|
16519
|
+
_context24.n = 1;
|
|
16511
16520
|
return this.whenApiReady();
|
|
16512
16521
|
case 1:
|
|
16513
16522
|
if (!(_classPrivateFieldGet(_api, this) === null)) {
|
|
16514
|
-
|
|
16523
|
+
_context24.n = 2;
|
|
16515
16524
|
break;
|
|
16516
16525
|
}
|
|
16517
16526
|
throw new Error("Control API not available");
|
|
16518
16527
|
case 2:
|
|
16519
|
-
|
|
16528
|
+
_context24.n = 3;
|
|
16520
16529
|
return _classPrivateFieldGet(_api, this).whenControlMounted(handle);
|
|
16521
16530
|
case 3:
|
|
16522
|
-
control =
|
|
16531
|
+
control = _context24.v;
|
|
16523
16532
|
if (!(control === null || control === void 0)) {
|
|
16524
|
-
|
|
16533
|
+
_context24.n = 4;
|
|
16525
16534
|
break;
|
|
16526
16535
|
}
|
|
16527
16536
|
throw new Error("Control not found");
|
|
16528
16537
|
case 4:
|
|
16529
|
-
return
|
|
16538
|
+
return _context24.a(2, control);
|
|
16530
16539
|
}
|
|
16531
|
-
},
|
|
16540
|
+
}, _callee24, this);
|
|
16532
16541
|
}));
|
|
16533
16542
|
function whenControlMounted(_x17) {
|
|
16534
16543
|
return _whenControlMounted.apply(this, arguments);
|
|
@@ -16678,45 +16687,45 @@ var init_wistia_player = __esm({
|
|
|
16678
16687
|
})(/* @__PURE__ */ _wrapNativeSuper(HTMLElement));
|
|
16679
16688
|
_WistiaPlayer = WistiaPlayer;
|
|
16680
16689
|
getSwatchMetaData2 = /* @__PURE__ */ (function() {
|
|
16681
|
-
var
|
|
16690
|
+
var _ref17 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee25(url) {
|
|
16682
16691
|
var swatch;
|
|
16683
|
-
return _regenerator().w(function(
|
|
16684
|
-
while (1) switch (
|
|
16692
|
+
return _regenerator().w(function(_context25) {
|
|
16693
|
+
while (1) switch (_context25.n) {
|
|
16685
16694
|
case 0:
|
|
16686
16695
|
swatch = new Image();
|
|
16687
16696
|
swatch.src = url;
|
|
16688
|
-
|
|
16697
|
+
_context25.n = 1;
|
|
16689
16698
|
return swatch.decode();
|
|
16690
16699
|
case 1:
|
|
16691
|
-
return
|
|
16700
|
+
return _context25.a(2, swatch);
|
|
16692
16701
|
}
|
|
16693
|
-
},
|
|
16702
|
+
}, _callee25);
|
|
16694
16703
|
}));
|
|
16695
16704
|
return function getSwatchMetaData3(_x18) {
|
|
16696
|
-
return
|
|
16705
|
+
return _ref17.apply(this, arguments);
|
|
16697
16706
|
};
|
|
16698
16707
|
})();
|
|
16699
16708
|
wistiaSwatchElement = /* @__PURE__ */ (function() {
|
|
16700
|
-
var
|
|
16709
|
+
var _ref18 = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee26(mediaId, embedHost) {
|
|
16701
16710
|
var swatchUrl2, swatchImg, naturalHeight, naturalWidth, ratio, style;
|
|
16702
|
-
return _regenerator().w(function(
|
|
16703
|
-
while (1) switch (
|
|
16711
|
+
return _regenerator().w(function(_context26) {
|
|
16712
|
+
while (1) switch (_context26.n) {
|
|
16704
16713
|
case 0:
|
|
16705
16714
|
swatchUrl2 = getSwatchUrl(mediaId, embedHost);
|
|
16706
|
-
|
|
16715
|
+
_context26.n = 1;
|
|
16707
16716
|
return getSwatchMetaData2(swatchUrl2);
|
|
16708
16717
|
case 1:
|
|
16709
|
-
swatchImg =
|
|
16718
|
+
swatchImg = _context26.v;
|
|
16710
16719
|
naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
|
|
16711
16720
|
ratio = naturalHeight / naturalWidth * 100;
|
|
16712
16721
|
style = document.createElement("style");
|
|
16713
16722
|
style.innerHTML = "\n wistia-player[media-id='".concat(mediaId, "']:not(:defined) {\n padding: ").concat(ratio, "% 0 0 0;\n background: url(").concat(swatchUrl2, ");\n background-size: contain;\n filter: blur(5px);\n display: block;\n }\n ");
|
|
16714
|
-
return
|
|
16723
|
+
return _context26.a(2, style);
|
|
16715
16724
|
}
|
|
16716
|
-
},
|
|
16725
|
+
}, _callee26);
|
|
16717
16726
|
}));
|
|
16718
16727
|
return function wistiaSwatchElement2(_x19, _x20) {
|
|
16719
|
-
return
|
|
16728
|
+
return _ref18.apply(this, arguments);
|
|
16720
16729
|
};
|
|
16721
16730
|
})();
|
|
16722
16731
|
if (customElements.get("wistia-player") === void 0) {
|