@wistia/wistia-player-react 0.0.53 → 0.0.55
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.
|
@@ -567,7 +567,7 @@ function _assertClassBrand(e, t, n) {
|
|
|
567
567
|
}
|
|
568
568
|
function _get_pageUrl(_this) {
|
|
569
569
|
var _this$getAttribute3;
|
|
570
|
-
return (_this$getAttribute3 = _this.getAttribute("page-url")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : (0,
|
|
570
|
+
return (_this$getAttribute3 = _this.getAttribute("page-url")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : (0, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_28__.H)();
|
|
571
571
|
}
|
|
572
572
|
function _generateUniqueId(mediaId) {
|
|
573
573
|
var index = 1;
|
|
@@ -584,7 +584,7 @@ function _getSyncedEmbedOption(key) {
|
|
|
584
584
|
if ((_classPrivateFieldGet137 = _classPrivateFieldGet(_api, this)) !== null && _classPrivateFieldGet137 !== void 0 && _classPrivateFieldGet137._impl && key in _classPrivateFieldGet(_api, this)._impl._attrs) {
|
|
585
585
|
return _classPrivateFieldGet(_api, this)._impl._attrs[key];
|
|
586
586
|
}
|
|
587
|
-
return (_ref17 = (_ref18 = this.embedOptions[key]) !== null && _ref18 !== void 0 ? _ref18 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0,
|
|
587
|
+
return (_ref17 = (_ref18 = this.embedOptions[key]) !== null && _ref18 !== void 0 ? _ref18 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__.$)(key))) !== null && _ref17 !== void 0 ? _ref17 : defaultEmbedOptions[key];
|
|
588
588
|
}
|
|
589
589
|
function _getValueFromAttribute(name) {
|
|
590
590
|
if (!this.hasAttribute(name)) {
|
|
@@ -606,7 +606,7 @@ function _initPlayerEmbed(_ref19) {
|
|
|
606
606
|
_classPrivateFieldGet(_playerData, this).updateEmbedOptionOverrides({
|
|
607
607
|
videoFoam: true
|
|
608
608
|
});
|
|
609
|
-
if (mediaData && !(0,
|
|
609
|
+
if (mediaData && !(0, _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_29__.V)(mediaData)) {
|
|
610
610
|
_classPrivateFieldSet(_playerType, this, (0, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__.$F)(_classPrivateFieldGet(_judyContext, this), _classPrivateFieldGet(_playerData, this).mediaData, _classPrivateFieldGet(_playerData, this).embedOptions));
|
|
611
611
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
612
612
|
_assertClassBrand(_WistiaPlayer_brand, this, _maybeInjectJsonLd).call(this);
|
|
@@ -624,17 +624,17 @@ function _initPublicApi(_x17, _x18) {
|
|
|
624
624
|
return _initPublicApi2.apply(this, arguments);
|
|
625
625
|
}
|
|
626
626
|
function _initPublicApi2() {
|
|
627
|
-
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
628
|
-
var
|
|
627
|
+
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee22(mediaId, options) {
|
|
628
|
+
var _this15 = this;
|
|
629
629
|
var embeddedCallback;
|
|
630
|
-
return _regeneratorRuntime().wrap(function
|
|
631
|
-
while (1) switch (
|
|
630
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
631
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
632
632
|
case 0:
|
|
633
|
-
|
|
633
|
+
_context22.next = 2;
|
|
634
634
|
return _classPrivateFieldGet(_publicApiScript, this);
|
|
635
635
|
case 2:
|
|
636
636
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.PublicApi) {
|
|
637
|
-
|
|
637
|
+
_context22.next = 5;
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
640
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__.WO)("player/failure/init-failed");
|
|
@@ -642,47 +642,47 @@ function _initPublicApi2() {
|
|
|
642
642
|
case 5:
|
|
643
643
|
embeddedCallback = function embeddedCallback2() {
|
|
644
644
|
var _classPrivateFieldGet148, _classPrivateFieldGet149;
|
|
645
|
-
void _assertClassBrand(_WistiaPlayer_brand,
|
|
646
|
-
_classPrivateFieldSet(_preloadAspectRatio,
|
|
647
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
648
|
-
(_classPrivateFieldGet148 = _classPrivateFieldGet(_preloadThumbnailRoot,
|
|
649
|
-
(_classPrivateFieldGet149 = _classPrivateFieldGet(_resizeObserver,
|
|
650
|
-
_classPrivateFieldSet(_resizeObserver,
|
|
651
|
-
if (_classPrivateFieldGet(_playPending,
|
|
652
|
-
void
|
|
645
|
+
void _assertClassBrand(_WistiaPlayer_brand, _this15, _maybeInitializeMux).call(_this15);
|
|
646
|
+
_classPrivateFieldSet(_preloadAspectRatio, _this15, void 0);
|
|
647
|
+
_assertClassBrand(_WistiaPlayer_brand, _this15, _renderEmbedTemplate).call(_this15);
|
|
648
|
+
(_classPrivateFieldGet148 = _classPrivateFieldGet(_preloadThumbnailRoot, _this15)) === null || _classPrivateFieldGet148 === void 0 ? void 0 : _classPrivateFieldGet148.remove();
|
|
649
|
+
(_classPrivateFieldGet149 = _classPrivateFieldGet(_resizeObserver, _this15)) === null || _classPrivateFieldGet149 === void 0 ? void 0 : _classPrivateFieldGet149.disconnect();
|
|
650
|
+
_classPrivateFieldSet(_resizeObserver, _this15, null);
|
|
651
|
+
if (_classPrivateFieldGet(_playPending, _this15)) {
|
|
652
|
+
void _this15.play();
|
|
653
653
|
}
|
|
654
654
|
};
|
|
655
655
|
this.addEventListener("embedded", embeddedCallback);
|
|
656
656
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
657
|
-
|
|
657
|
+
_this15.removeEventListener("embedded", embeddedCallback);
|
|
658
658
|
});
|
|
659
659
|
_classPrivateFieldSet(_api, this, new _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.PublicApi(mediaId, options));
|
|
660
660
|
_classPrivateFieldGet(_api, this).ready(function() {
|
|
661
661
|
var _classPrivateFieldGet150;
|
|
662
|
-
|
|
662
|
+
_this15.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.c5, {
|
|
663
663
|
detail: {
|
|
664
664
|
mediaId
|
|
665
665
|
}
|
|
666
666
|
}));
|
|
667
|
-
|
|
667
|
+
_this15.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.iP, {
|
|
668
668
|
detail: {
|
|
669
669
|
mediaId,
|
|
670
|
-
api: _classPrivateFieldGet(_api,
|
|
670
|
+
api: _classPrivateFieldGet(_api, _this15)
|
|
671
671
|
}
|
|
672
672
|
}));
|
|
673
|
-
if ((_classPrivateFieldGet150 = _classPrivateFieldGet(_api,
|
|
674
|
-
Object.entries(_classPrivateFieldGet(_api,
|
|
673
|
+
if ((_classPrivateFieldGet150 = _classPrivateFieldGet(_api, _this15)) !== null && _classPrivateFieldGet150 !== void 0 && _classPrivateFieldGet150._impl) {
|
|
674
|
+
Object.entries(_classPrivateFieldGet(_api, _this15)._impl._attrs).forEach(function(_ref25) {
|
|
675
675
|
var _ref26 = _slicedToArray(_ref25, 2), key = _ref26[0], value = _ref26[1];
|
|
676
|
-
_classPrivateFieldGet(_playerData,
|
|
676
|
+
_classPrivateFieldGet(_playerData, _this15).updateEmbedOptionOverrides(_defineProperty({}, key, value));
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
679
|
+
_assertClassBrand(_WistiaPlayer_brand, _this15, _renderPreloadThumbnail).call(_this15);
|
|
680
680
|
});
|
|
681
681
|
case 10:
|
|
682
682
|
case "end":
|
|
683
|
-
return
|
|
683
|
+
return _context22.stop();
|
|
684
684
|
}
|
|
685
|
-
},
|
|
685
|
+
}, _callee22, this);
|
|
686
686
|
}));
|
|
687
687
|
return _initPublicApi2.apply(this, arguments);
|
|
688
688
|
}
|
|
@@ -693,29 +693,29 @@ function _maybeInitializeMux() {
|
|
|
693
693
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
694
694
|
}
|
|
695
695
|
function _maybeInitializeMux2() {
|
|
696
|
-
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
697
|
-
var
|
|
696
|
+
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee23() {
|
|
697
|
+
var _this16 = this;
|
|
698
698
|
var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
|
|
699
|
-
return _regeneratorRuntime().wrap(function
|
|
700
|
-
while (1) switch (
|
|
699
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
700
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
701
701
|
case 0:
|
|
702
702
|
if (_classPrivateFieldGet(_api, this)) {
|
|
703
|
-
|
|
703
|
+
_context23.next = 2;
|
|
704
704
|
break;
|
|
705
705
|
}
|
|
706
|
-
return
|
|
706
|
+
return _context23.abrupt("return");
|
|
707
707
|
case 2:
|
|
708
|
-
shouldRandomEnableMux = (0,
|
|
709
|
-
shouldEnableMuxForPlayer = (0,
|
|
708
|
+
shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_30__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__._);
|
|
709
|
+
shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_15__.D5)();
|
|
710
710
|
embedType = this.useWebComponent ? "translated-web-component" : "web-component";
|
|
711
711
|
if (!shouldEnableMuxForPlayer) {
|
|
712
|
-
|
|
712
|
+
_context23.next = 11;
|
|
713
713
|
break;
|
|
714
714
|
}
|
|
715
|
-
|
|
715
|
+
_context23.next = 8;
|
|
716
716
|
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_7__.$)("assets/external/wistia-mux.js");
|
|
717
717
|
case 8:
|
|
718
|
-
mux =
|
|
718
|
+
mux = _context23.sent;
|
|
719
719
|
mux.init(_classPrivateFieldGet(_api, this), {
|
|
720
720
|
embedType
|
|
721
721
|
});
|
|
@@ -723,14 +723,14 @@ function _maybeInitializeMux2() {
|
|
|
723
723
|
var isTrackingEnabled = event.detail.isTrackingEnabled;
|
|
724
724
|
if (!isTrackingEnabled) {
|
|
725
725
|
var _classPrivateFieldGet152, _classPrivateFieldGet153;
|
|
726
|
-
(_classPrivateFieldGet152 = _classPrivateFieldGet(_api,
|
|
726
|
+
(_classPrivateFieldGet152 = _classPrivateFieldGet(_api, _this16)) === null || _classPrivateFieldGet152 === void 0 ? void 0 : (_classPrivateFieldGet153 = _classPrivateFieldGet152.mux) === null || _classPrivateFieldGet153 === void 0 ? void 0 : _classPrivateFieldGet153.destroy();
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
729
|
case 11:
|
|
730
730
|
case "end":
|
|
731
|
-
return
|
|
731
|
+
return _context23.stop();
|
|
732
732
|
}
|
|
733
|
-
},
|
|
733
|
+
}, _callee23, this);
|
|
734
734
|
}));
|
|
735
735
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
736
736
|
}
|
|
@@ -756,7 +756,7 @@ function _maybeSetupEmbedOptionsFromIframe() {
|
|
|
756
756
|
_classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeEmbedOptions);
|
|
757
757
|
}
|
|
758
758
|
function _renderEmbedTemplate() {
|
|
759
|
-
var _this$embedHost2,
|
|
759
|
+
var _this$embedHost2, _this10 = this;
|
|
760
760
|
if (!_classPrivateFieldGet(_preactRoot, this)) {
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
@@ -765,7 +765,7 @@ function _renderEmbedTemplate() {
|
|
|
765
765
|
if (parseFloat(_classPrivateFieldGet(_paddingTop, this)) !== 0 && _classPrivateFieldGet(_paddingTop, this) !== "") {
|
|
766
766
|
swatchHeight = "".concat(parseFloat(_classPrivateFieldGet(_paddingTop, this)), "px");
|
|
767
767
|
}
|
|
768
|
-
var playerBorderRadius = (0,
|
|
768
|
+
var playerBorderRadius = (0, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_32__.JA)({
|
|
769
769
|
playerBorderRadius: this.playerBorderRadius,
|
|
770
770
|
roundedPlayer: this.roundedPlayer
|
|
771
771
|
});
|
|
@@ -806,7 +806,7 @@ function _renderEmbedTemplate() {
|
|
|
806
806
|
"aria-hidden": "true"
|
|
807
807
|
})))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
808
808
|
ref: function ref(_ref20) {
|
|
809
|
-
_classPrivateFieldSet(_preloadThumbnailRoot,
|
|
809
|
+
_classPrivateFieldSet(_preloadThumbnailRoot, _this10, _ref20);
|
|
810
810
|
}
|
|
811
811
|
})), _classPrivateFieldGet(_preactRoot, this));
|
|
812
812
|
}
|
|
@@ -835,41 +835,39 @@ function _renderPreloadThumbnail() {
|
|
|
835
835
|
})), _classPrivateFieldGet(_preloadThumbnailRoot, this));
|
|
836
836
|
}
|
|
837
837
|
function _runMethodsFromAttributes() {
|
|
838
|
-
var
|
|
838
|
+
var _this11 = this;
|
|
839
839
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
|
|
840
|
-
|
|
840
|
+
this.whenApiReady().then(function() {
|
|
841
841
|
var _ref21, _classPrivateFieldGet141, _classPrivateFieldGet142, _classPrivateFieldGet143;
|
|
842
|
-
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand,
|
|
843
|
-
var isClosedPopover = (_ref21 = ((_classPrivateFieldGet141 = _classPrivateFieldGet(_api,
|
|
842
|
+
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this11, _getValueFromAttribute).call(_this11, "current-time"));
|
|
843
|
+
var isClosedPopover = (_ref21 = ((_classPrivateFieldGet141 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet141 === void 0 ? void 0 : _classPrivateFieldGet141.popover) && !_classPrivateFieldGet(_api, _this11).popover.isVisible()) !== null && _ref21 !== void 0 ? _ref21 : false;
|
|
844
844
|
var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_6__.GS)();
|
|
845
|
-
var shouldDelayUntilPlay =
|
|
846
|
-
void ((_classPrivateFieldGet142 = _classPrivateFieldGet(_api,
|
|
845
|
+
var shouldDelayUntilPlay = _this11.state !== "playing" && (isMobile || isClosedPopover);
|
|
846
|
+
void ((_classPrivateFieldGet142 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet142 === void 0 ? void 0 : (_classPrivateFieldGet143 = _classPrivateFieldGet142._impl) === null || _classPrivateFieldGet143 === void 0 ? void 0 : _classPrivateFieldGet143.time(newTime, {
|
|
847
847
|
lazy: shouldDelayUntilPlay
|
|
848
848
|
}));
|
|
849
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
850
|
-
|
|
851
|
-
};
|
|
852
|
-
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setInitialCurrentTime);
|
|
849
|
+
_assertClassBrand(_WistiaPlayer_brand, _this11, _setSyncedEmbedOption).call(_this11, "currentTime", newTime);
|
|
850
|
+
}).catch(function(_error) {
|
|
851
|
+
});
|
|
853
852
|
}
|
|
854
853
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "email") !== null) {
|
|
855
854
|
_assertClassBrand(_WistiaPlayer_brand, this, _updateEmail).call(this, _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "email"));
|
|
856
855
|
}
|
|
857
856
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "video-quality") !== null) {
|
|
858
|
-
|
|
857
|
+
this.whenApiReady().then(function() {
|
|
859
858
|
var _classPrivateFieldGet144, _classPrivateFieldGet145;
|
|
860
|
-
var newQuality = _assertClassBrand(_WistiaPlayer_brand,
|
|
861
|
-
(_classPrivateFieldGet144 = _classPrivateFieldGet(_api,
|
|
862
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
863
|
-
|
|
864
|
-
};
|
|
865
|
-
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setVideoQualityFromAttribute);
|
|
859
|
+
var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this11, _getValueFromAttribute).call(_this11, "video-quality");
|
|
860
|
+
(_classPrivateFieldGet144 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet144 === void 0 ? void 0 : (_classPrivateFieldGet145 = _classPrivateFieldGet144._impl) === null || _classPrivateFieldGet145 === void 0 ? void 0 : _classPrivateFieldGet145.setVideoQuality(newQuality);
|
|
861
|
+
_assertClassBrand(_WistiaPlayer_brand, _this11, _setSyncedEmbedOption).call(_this11, "videoQuality", newQuality);
|
|
862
|
+
}).catch(function(_error) {
|
|
863
|
+
});
|
|
866
864
|
}
|
|
867
865
|
}
|
|
868
866
|
function _saveInitialAttributesFromDomOptions() {
|
|
869
|
-
var
|
|
867
|
+
var _this12 = this;
|
|
870
868
|
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref22) {
|
|
871
869
|
var _ref23 = _slicedToArray(_ref22, 2), value = _ref23[1];
|
|
872
|
-
return [(0,
|
|
870
|
+
return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this12, _getValueFromAttribute).call(_this12, value.name)];
|
|
873
871
|
}));
|
|
874
872
|
_classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
|
|
875
873
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(this.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, this).embedOptions);
|
|
@@ -884,18 +882,18 @@ function _setSyncedEmbedOption(key, value) {
|
|
|
884
882
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
885
883
|
}
|
|
886
884
|
function _setupEventListeners() {
|
|
887
|
-
var
|
|
885
|
+
var _this13 = this;
|
|
888
886
|
var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
|
|
889
887
|
var _ref24 = event.detail, mediaData = _ref24.mediaData;
|
|
890
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
888
|
+
_assertClassBrand(_WistiaPlayer_brand, _this13, _updateMediaData).call(_this13, mediaData);
|
|
891
889
|
};
|
|
892
|
-
this.addEventListener(
|
|
890
|
+
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.Wg, loadedMediaDataCallback);
|
|
893
891
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
894
|
-
|
|
892
|
+
_this13.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.Wg, loadedMediaDataCallback);
|
|
895
893
|
});
|
|
896
894
|
this.addEventListener("click", function() {
|
|
897
|
-
_classPrivateFieldSet(_playPending,
|
|
898
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
895
|
+
_classPrivateFieldSet(_playPending, _this13, true);
|
|
896
|
+
_assertClassBrand(_WistiaPlayer_brand, _this13, _renderPreloadThumbnail).call(_this13);
|
|
899
897
|
}, {
|
|
900
898
|
once: true
|
|
901
899
|
});
|
|
@@ -904,9 +902,9 @@ function _shouldDisplaySwatch() {
|
|
|
904
902
|
return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
|
|
905
903
|
}
|
|
906
904
|
function _updateEmail(email) {
|
|
907
|
-
var
|
|
905
|
+
var _this14 = this;
|
|
908
906
|
(0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_17__.$B)(function(localStorage2) {
|
|
909
|
-
localStorage2[_classPrivateGetter(_WistiaPlayer_brand,
|
|
907
|
+
localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this14, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this14, _get_pageUrl)]), {}, {
|
|
910
908
|
trackEmail: email
|
|
911
909
|
});
|
|
912
910
|
});
|
|
@@ -921,7 +919,7 @@ function _updateMediaData(mediaData) {
|
|
|
921
919
|
_classPrivateFieldSet(_playerType, this, (0, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__.$F)(_classPrivateFieldGet(_judyContext, this), _classPrivateFieldGet(_playerData, this).mediaData, _classPrivateFieldGet(_playerData, this).embedOptions));
|
|
922
920
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
923
921
|
}
|
|
924
|
-
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__,
|
|
922
|
+
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__, _components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_2__, _hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_3__, _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_25__, _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_4__, _appHostname_js__WEBPACK_IMPORTED_MODULE_24__, _utilities_assets_js__WEBPACK_IMPORTED_MODULE_5__, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_30__, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_6__, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_7__, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__, _utilities_elem_js__WEBPACK_IMPORTED_MODULE_9__, _utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__, _utilities_extractEmailFromParams_ts__WEBPACK_IMPORTED_MODULE_10__, _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_11__, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_28__, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_32__, _utilities_runScript_js__WEBPACK_IMPORTED_MODULE_13__, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_15__, _utilities_url_js__WEBPACK_IMPORTED_MODULE_16__, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_17__, _utilities_wistiaOptions_ts__WEBPACK_IMPORTED_MODULE_18__, _utilities_wistiaQueue_ts__WEBPACK_IMPORTED_MODULE_19__, _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_20__, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_22__, _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_29__, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_23__, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__, _WistiaPlayer, requiredAttributes, optionalPublicAttributes, optionalPrivateAttributes, defaultEmbedOptions, getSwatchUrl, _api, _fullscreenState, _internals, _jsonLdId, _judyContext, _logger, _oldEngine, _playerData, _playerType, _removeEventListeners, _hasElementConnectedToDOM, _paddingTop, _playPending, _preactRoot, _preloadAspectRatio, _preloadThumbnailRoot, _publicApiScript, _resizeObserver, _WistiaPlayer_brand, WistiaPlayer, getSwatchMetaData2, wistiaSwatchElement, __webpack_exports__WistiaPlayer, __webpack_exports__wistiaSwatchElement;
|
|
925
923
|
var init_wistia_player = __esm({
|
|
926
924
|
"../wistia-player/dist/wistia-player.js"() {
|
|
927
925
|
__webpack_modules__ = {
|
|
@@ -9620,7 +9618,7 @@ var init_wistia_player = __esm({
|
|
|
9620
9618
|
var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
9621
9619
|
var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
9622
9620
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
9623
|
-
var TAGGED_VERSION = "0.0.
|
|
9621
|
+
var TAGGED_VERSION = "0.0.55";
|
|
9624
9622
|
var DEFAULT_PROTOCOL = function() {
|
|
9625
9623
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
9626
9624
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
|
|
@@ -13188,7 +13186,6 @@ var init_wistia_player = __esm({
|
|
|
13188
13186
|
/* harmony export */
|
|
13189
13187
|
});
|
|
13190
13188
|
preact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__2(5181);
|
|
13191
|
-
_wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__2(4586);
|
|
13192
13189
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__2(5509);
|
|
13193
13190
|
_components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__2(9804);
|
|
13194
13191
|
_hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__2(2721);
|
|
@@ -13196,19 +13193,19 @@ var init_wistia_player = __esm({
|
|
|
13196
13193
|
_utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__2(6462);
|
|
13197
13194
|
_appHostname_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__2(787);
|
|
13198
13195
|
_utilities_assets_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__2(7209);
|
|
13199
|
-
|
|
13196
|
+
_utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__2(7323);
|
|
13200
13197
|
_utilities_detect_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__2(7231);
|
|
13201
13198
|
_utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__2(7157);
|
|
13202
13199
|
_utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__2(3280);
|
|
13203
13200
|
_utilities_elem_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__2(7715);
|
|
13204
|
-
|
|
13201
|
+
_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__2(2760);
|
|
13205
13202
|
_utilities_extractEmailFromParams_ts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__2(3832);
|
|
13206
13203
|
_utilities_hosts_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__2(5857);
|
|
13207
|
-
|
|
13204
|
+
_utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__2(5393);
|
|
13208
13205
|
_utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__2(438);
|
|
13209
|
-
|
|
13206
|
+
_utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__2(3123);
|
|
13210
13207
|
_utilities_runScript_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__2(1248);
|
|
13211
|
-
|
|
13208
|
+
_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__2(7211);
|
|
13212
13209
|
_utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__2(1161);
|
|
13213
13210
|
_utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__2(4755);
|
|
13214
13211
|
_utilities_url_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__2(2671);
|
|
@@ -13218,9 +13215,9 @@ var init_wistia_player = __esm({
|
|
|
13218
13215
|
_utilities_wlog_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__2(6637);
|
|
13219
13216
|
_utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__2(2147);
|
|
13220
13217
|
_utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__2(5833);
|
|
13221
|
-
|
|
13218
|
+
_utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__2(959);
|
|
13222
13219
|
_utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__2(3411);
|
|
13223
|
-
|
|
13220
|
+
_utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__2(4989);
|
|
13224
13221
|
requiredAttributes = ["media-id"];
|
|
13225
13222
|
optionalPublicAttributes = ["aspect", "audio-description-control", "autoplay", "big-play-button", "controls-visible-on-load", "copy-link-and-thumbnail", "current-time", "do-not-track", "email", "end-video-behavior", "fullscreen-control", "muted", "playback-rate-control", "play-bar-control", "player-color", "playlist-links", "playlist-loop", "play-pause-control", "play-pause-notifier", "popover-animate-thumbnail", "popover-animation", "popover-border-color", "popover-border-radius", "popover-border-width", "popover-box-shadow", "popover-caption", "popover-caption-container", "popover-content", "popover-disable-autoplay", "popover-overlay-color", "popover-overlay-opacity", "popover-prevent-scroll", "popover-show-on-load", "poster", "preload", "quality-control", "quality-max", "quality-min", "resumable", "rounded-player", "seo", "settings-control", "silent-autoplay", "transparent-letterbox", "video-quality", "volume", "volume-control", "wistia-popover"];
|
|
13226
13223
|
optionalPrivateAttributes = ["big-play-button-border-radius", "control-bar-border-radius", "embed-host", "hls", "page-url", "player-border-radius", "player-force", "stats-url", "swatch", "unique-id", "use-web-component"];
|
|
@@ -14454,17 +14451,11 @@ var init_wistia_player = __esm({
|
|
|
14454
14451
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14455
14452
|
while (1) switch (_context.prev = _context.next) {
|
|
14456
14453
|
case 0:
|
|
14457
|
-
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.widthBeforeFullscreen)) {
|
|
14458
|
-
this.style.width = this._fullscreenState.widthBeforeFullscreen;
|
|
14459
|
-
}
|
|
14460
|
-
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.heightBeforeFullscreen)) {
|
|
14461
|
-
this.style.height = this._fullscreenState.heightBeforeFullscreen;
|
|
14462
|
-
}
|
|
14463
14454
|
return _context.abrupt("return", (_classPrivateFieldGet107 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet107 === void 0 ? void 0 : (_classPrivateFieldGet108 = _classPrivateFieldGet107._impl) === null || _classPrivateFieldGet108 === void 0 ? void 0 : _classPrivateFieldGet108.cancelFullscreen().then(function() {
|
|
14464
14455
|
_this3._fullscreenState.heightBeforeFullscreen = void 0;
|
|
14465
14456
|
_this3._fullscreenState.widthBeforeFullscreen = void 0;
|
|
14466
14457
|
}));
|
|
14467
|
-
case
|
|
14458
|
+
case 1:
|
|
14468
14459
|
case "end":
|
|
14469
14460
|
return _context.stop();
|
|
14470
14461
|
}
|
|
@@ -14541,8 +14532,7 @@ var init_wistia_player = __esm({
|
|
|
14541
14532
|
return _context4.abrupt("return", addPlugin());
|
|
14542
14533
|
case 3:
|
|
14543
14534
|
return _context4.abrupt("return", new Promise(function(resolve, reject) {
|
|
14544
|
-
|
|
14545
|
-
_this4.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _handler);
|
|
14535
|
+
_this4.whenApiReady().then(function() {
|
|
14546
14536
|
addPlugin().then(function(plugin) {
|
|
14547
14537
|
return resolve(plugin);
|
|
14548
14538
|
}).catch(function(err) {
|
|
@@ -14552,8 +14542,8 @@ var init_wistia_player = __esm({
|
|
|
14552
14542
|
reject(new Error("Promise rejected with non-Error value"));
|
|
14553
14543
|
}
|
|
14554
14544
|
});
|
|
14555
|
-
}
|
|
14556
|
-
|
|
14545
|
+
}).catch(function(_error) {
|
|
14546
|
+
});
|
|
14557
14547
|
}));
|
|
14558
14548
|
case 4:
|
|
14559
14549
|
case "end":
|
|
@@ -14797,15 +14787,15 @@ var init_wistia_player = __esm({
|
|
|
14797
14787
|
if (!_classPrivateFieldGet(_api, _this6)) {
|
|
14798
14788
|
reject(new Error("api not ready to replace"));
|
|
14799
14789
|
}
|
|
14800
|
-
var
|
|
14801
|
-
_this6.removeEventListener(
|
|
14790
|
+
var _handler = function handler() {
|
|
14791
|
+
_this6.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.$1, _handler);
|
|
14802
14792
|
_this6.mediaId = mediaId;
|
|
14803
14793
|
_this6.uniqueId = _assertClassBrand(_WistiaPlayer_brand, _this6, _generateUniqueId).call(_this6, mediaId);
|
|
14804
14794
|
_assertClassBrand(_WistiaPlayer_brand, _this6, _maybeInjectJsonLd).call(_this6);
|
|
14805
14795
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(_this6.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, _this6).embedOptions);
|
|
14806
14796
|
resolve();
|
|
14807
14797
|
};
|
|
14808
|
-
_this6.addEventListener(
|
|
14798
|
+
_this6.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.$1, _handler);
|
|
14809
14799
|
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__.Z)(_classPrivateFieldGet(_jsonLdId, _this6));
|
|
14810
14800
|
(_classPrivateFieldGet128 = _classPrivateFieldGet(_api, _this6)) === null || _classPrivateFieldGet128 === void 0 ? void 0 : _classPrivateFieldGet128.replaceWith(mediaId, options);
|
|
14811
14801
|
}));
|
|
@@ -14919,6 +14909,49 @@ var init_wistia_player = __esm({
|
|
|
14919
14909
|
}
|
|
14920
14910
|
return showPopover;
|
|
14921
14911
|
}()
|
|
14912
|
+
}, {
|
|
14913
|
+
key: "whenApiReady",
|
|
14914
|
+
value: function() {
|
|
14915
|
+
var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee19() {
|
|
14916
|
+
var _this8 = this;
|
|
14917
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
14918
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
14919
|
+
case 0:
|
|
14920
|
+
return _context19.abrupt("return", new Promise(function(resolve) {
|
|
14921
|
+
if (_classPrivateFieldGet(_api, _this8)) {
|
|
14922
|
+
_classPrivateFieldGet(_api, _this8).ready(function() {
|
|
14923
|
+
resolve();
|
|
14924
|
+
});
|
|
14925
|
+
}
|
|
14926
|
+
var _handler2 = function handler() {
|
|
14927
|
+
_this8.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.c5, _handler2);
|
|
14928
|
+
resolve();
|
|
14929
|
+
};
|
|
14930
|
+
_this8.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.c5, _handler2);
|
|
14931
|
+
}));
|
|
14932
|
+
case 1:
|
|
14933
|
+
case "end":
|
|
14934
|
+
return _context19.stop();
|
|
14935
|
+
}
|
|
14936
|
+
}, _callee19);
|
|
14937
|
+
}));
|
|
14938
|
+
function whenApiReady() {
|
|
14939
|
+
return _whenApiReady.apply(this, arguments);
|
|
14940
|
+
}
|
|
14941
|
+
return whenApiReady;
|
|
14942
|
+
}()
|
|
14943
|
+
// --------------------------------------------------
|
|
14944
|
+
// Custom element lifecycle methods
|
|
14945
|
+
// --------------------------------------------------
|
|
14946
|
+
/**
|
|
14947
|
+
* Called when an observed attribute has been added, removed, updated, or replaced.
|
|
14948
|
+
* Also called for initial values when an element is created by the parser, or upgraded.
|
|
14949
|
+
* Note: only attributes listed in the observedAttributes property will receive this callback.
|
|
14950
|
+
* @param {string} name - The name of the attribute that changed.
|
|
14951
|
+
* @param {string} oldValue - The previous value of the attribute, or null if it was added for the first time.
|
|
14952
|
+
* @param {string} newValue - The new value of the attribute, or null if it was removed.
|
|
14953
|
+
* @returns {void}
|
|
14954
|
+
*/
|
|
14922
14955
|
}, {
|
|
14923
14956
|
key: "attributeChangedCallback",
|
|
14924
14957
|
value: function attributeChangedCallback(name, oldValue, newValue) {
|
|
@@ -14942,12 +14975,12 @@ var init_wistia_player = __esm({
|
|
|
14942
14975
|
default:
|
|
14943
14976
|
break;
|
|
14944
14977
|
}
|
|
14945
|
-
this[(0,
|
|
14978
|
+
this[(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__.b)(name)] = finalValue;
|
|
14946
14979
|
}
|
|
14947
14980
|
}, {
|
|
14948
14981
|
key: "connectedCallback",
|
|
14949
14982
|
value: function connectedCallback() {
|
|
14950
|
-
var _window$wistiaOptions,
|
|
14983
|
+
var _window$wistiaOptions, _this9 = this, _this$embedHost;
|
|
14951
14984
|
if (_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
|
|
14952
14985
|
return;
|
|
14953
14986
|
}
|
|
@@ -14972,17 +15005,17 @@ var init_wistia_player = __esm({
|
|
|
14972
15005
|
_assertClassBrand(_WistiaPlayer_brand, this, _runMethodsFromAttributes).call(this);
|
|
14973
15006
|
_assertClassBrand(_WistiaPlayer_brand, this, _saveInitialAttributesFromDomOptions).call(this);
|
|
14974
15007
|
var resizeCallback = function resizeCallback2() {
|
|
14975
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
15008
|
+
_assertClassBrand(_WistiaPlayer_brand, _this9, _renderPreloadThumbnail).call(_this9);
|
|
14976
15009
|
};
|
|
14977
15010
|
_classPrivateFieldSet(_resizeObserver, this, new ResizeObserver(resizeCallback));
|
|
14978
15011
|
_classPrivateFieldGet(_resizeObserver, this).observe(this);
|
|
14979
15012
|
(0, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_22__.n)(mediaId, {
|
|
14980
15013
|
embedHost: (_this$embedHost = this.embedHost) !== null && _this$embedHost !== void 0 ? _this$embedHost : ""
|
|
14981
15014
|
}).then(function(mediaData) {
|
|
14982
|
-
_classPrivateFieldGet(_playerData,
|
|
14983
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14984
|
-
container:
|
|
14985
|
-
mediaData: _classPrivateFieldGet(_playerData,
|
|
15015
|
+
_classPrivateFieldGet(_playerData, _this9).setMediaDataSource(mediaData);
|
|
15016
|
+
_assertClassBrand(_WistiaPlayer_brand, _this9, _initPlayerEmbed).call(_this9, {
|
|
15017
|
+
container: _this9.uniqueId,
|
|
15018
|
+
mediaData: _classPrivateFieldGet(_playerData, _this9).mediaData
|
|
14986
15019
|
});
|
|
14987
15020
|
}).catch(function(error) {
|
|
14988
15021
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__.WO)("player/failure/init-failed");
|
|
@@ -15027,48 +15060,48 @@ var init_wistia_player = __esm({
|
|
|
15027
15060
|
}(/* @__PURE__ */ _wrapNativeSuper(HTMLElement));
|
|
15028
15061
|
_WistiaPlayer = WistiaPlayer;
|
|
15029
15062
|
getSwatchMetaData2 = /* @__PURE__ */ function() {
|
|
15030
|
-
var _ref15 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15063
|
+
var _ref15 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee20(url) {
|
|
15031
15064
|
var swatch;
|
|
15032
|
-
return _regeneratorRuntime().wrap(function
|
|
15033
|
-
while (1) switch (
|
|
15065
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
15066
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
15034
15067
|
case 0:
|
|
15035
15068
|
swatch = new Image();
|
|
15036
15069
|
swatch.src = url;
|
|
15037
|
-
|
|
15070
|
+
_context20.next = 4;
|
|
15038
15071
|
return swatch.decode();
|
|
15039
15072
|
case 4:
|
|
15040
|
-
return
|
|
15073
|
+
return _context20.abrupt("return", swatch);
|
|
15041
15074
|
case 5:
|
|
15042
15075
|
case "end":
|
|
15043
|
-
return
|
|
15076
|
+
return _context20.stop();
|
|
15044
15077
|
}
|
|
15045
|
-
},
|
|
15078
|
+
}, _callee20);
|
|
15046
15079
|
}));
|
|
15047
15080
|
return function getSwatchMetaData3(_x14) {
|
|
15048
15081
|
return _ref15.apply(this, arguments);
|
|
15049
15082
|
};
|
|
15050
15083
|
}();
|
|
15051
15084
|
wistiaSwatchElement = /* @__PURE__ */ function() {
|
|
15052
|
-
var _ref16 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15085
|
+
var _ref16 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee21(mediaId, embedHost) {
|
|
15053
15086
|
var swatchUrl2, swatchImg, naturalHeight, naturalWidth, ratio, style;
|
|
15054
|
-
return _regeneratorRuntime().wrap(function
|
|
15055
|
-
while (1) switch (
|
|
15087
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
15088
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
15056
15089
|
case 0:
|
|
15057
15090
|
swatchUrl2 = getSwatchUrl(mediaId, embedHost);
|
|
15058
|
-
|
|
15091
|
+
_context21.next = 3;
|
|
15059
15092
|
return getSwatchMetaData2(swatchUrl2);
|
|
15060
15093
|
case 3:
|
|
15061
|
-
swatchImg =
|
|
15094
|
+
swatchImg = _context21.sent;
|
|
15062
15095
|
naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
|
|
15063
15096
|
ratio = naturalHeight / naturalWidth * 100;
|
|
15064
15097
|
style = document.createElement("style");
|
|
15065
15098
|
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 ");
|
|
15066
|
-
return
|
|
15099
|
+
return _context21.abrupt("return", style);
|
|
15067
15100
|
case 9:
|
|
15068
15101
|
case "end":
|
|
15069
|
-
return
|
|
15102
|
+
return _context21.stop();
|
|
15070
15103
|
}
|
|
15071
|
-
},
|
|
15104
|
+
}, _callee21);
|
|
15072
15105
|
}));
|
|
15073
15106
|
return function wistiaSwatchElement2(_x15, _x16) {
|
|
15074
15107
|
return _ref16.apply(this, arguments);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import { forwardRef, Suspense, lazy } from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
var WistiaPlayerWrapper = lazy(
|
|
10
|
-
async () => import("./WistiaPlayerWrapper-
|
|
10
|
+
async () => import("./WistiaPlayerWrapper-KTN7WFE2.mjs").then((module) => ({
|
|
11
11
|
default: module.WistiaPlayerWrapper
|
|
12
12
|
}))
|
|
13
13
|
);
|
|
@@ -22,7 +22,7 @@ var WistiaPlayerWrapper = forwardRef(
|
|
|
22
22
|
setSwatchAspectRatio(ratio);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
void import("./wistia-player-
|
|
25
|
+
void import("./wistia-player-XOOSWBLD.mjs");
|
|
26
26
|
void customElements.whenDefined("wistia-player").then(() => {
|
|
27
27
|
setIsWistiaPlayerDefined(true);
|
|
28
28
|
});
|
|
@@ -8695,7 +8695,7 @@ var __webpack_modules__ = {
|
|
|
8695
8695
|
var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
8696
8696
|
var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
8697
8697
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
8698
|
-
var TAGGED_VERSION = "0.0.
|
|
8698
|
+
var TAGGED_VERSION = "0.0.55";
|
|
8699
8699
|
var DEFAULT_PROTOCOL = function() {
|
|
8700
8700
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
8701
8701
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
|
|
@@ -12281,7 +12281,6 @@ __webpack_require__2.d(__webpack_exports__2, {
|
|
|
12281
12281
|
/* harmony export */
|
|
12282
12282
|
});
|
|
12283
12283
|
var preact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__2(5181);
|
|
12284
|
-
var _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__2(4586);
|
|
12285
12284
|
var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__2(5509);
|
|
12286
12285
|
var _components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__2(9804);
|
|
12287
12286
|
var _hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__2(2721);
|
|
@@ -12289,19 +12288,19 @@ var _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__2
|
|
|
12289
12288
|
var _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__2(6462);
|
|
12290
12289
|
var _appHostname_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__2(787);
|
|
12291
12290
|
var _utilities_assets_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__2(7209);
|
|
12292
|
-
var
|
|
12291
|
+
var _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__2(7323);
|
|
12293
12292
|
var _utilities_detect_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__2(7231);
|
|
12294
12293
|
var _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__2(7157);
|
|
12295
12294
|
var _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__2(3280);
|
|
12296
12295
|
var _utilities_elem_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__2(7715);
|
|
12297
|
-
var
|
|
12296
|
+
var _utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__2(2760);
|
|
12298
12297
|
var _utilities_extractEmailFromParams_ts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__2(3832);
|
|
12299
12298
|
var _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__2(5857);
|
|
12300
|
-
var
|
|
12299
|
+
var _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__2(5393);
|
|
12301
12300
|
var _utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__2(438);
|
|
12302
|
-
var
|
|
12301
|
+
var _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__2(3123);
|
|
12303
12302
|
var _utilities_runScript_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__2(1248);
|
|
12304
|
-
var
|
|
12303
|
+
var _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__2(7211);
|
|
12305
12304
|
var _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__2(1161);
|
|
12306
12305
|
var _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__2(4755);
|
|
12307
12306
|
var _utilities_url_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__2(2671);
|
|
@@ -12311,9 +12310,9 @@ var _utilities_wistiaQueue_ts__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require_
|
|
|
12311
12310
|
var _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__2(6637);
|
|
12312
12311
|
var _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__2(2147);
|
|
12313
12312
|
var _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__2(5833);
|
|
12314
|
-
var
|
|
12313
|
+
var _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__2(959);
|
|
12315
12314
|
var _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__2(3411);
|
|
12316
|
-
var
|
|
12315
|
+
var _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__2(4989);
|
|
12317
12316
|
var _WistiaPlayer;
|
|
12318
12317
|
function _slicedToArray(r, e) {
|
|
12319
12318
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
@@ -13988,17 +13987,11 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
13988
13987
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13989
13988
|
while (1) switch (_context.prev = _context.next) {
|
|
13990
13989
|
case 0:
|
|
13991
|
-
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.widthBeforeFullscreen)) {
|
|
13992
|
-
this.style.width = this._fullscreenState.widthBeforeFullscreen;
|
|
13993
|
-
}
|
|
13994
|
-
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.heightBeforeFullscreen)) {
|
|
13995
|
-
this.style.height = this._fullscreenState.heightBeforeFullscreen;
|
|
13996
|
-
}
|
|
13997
13990
|
return _context.abrupt("return", (_classPrivateFieldGet107 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet107 === void 0 ? void 0 : (_classPrivateFieldGet108 = _classPrivateFieldGet107._impl) === null || _classPrivateFieldGet108 === void 0 ? void 0 : _classPrivateFieldGet108.cancelFullscreen().then(function() {
|
|
13998
13991
|
_this3._fullscreenState.heightBeforeFullscreen = void 0;
|
|
13999
13992
|
_this3._fullscreenState.widthBeforeFullscreen = void 0;
|
|
14000
13993
|
}));
|
|
14001
|
-
case
|
|
13994
|
+
case 1:
|
|
14002
13995
|
case "end":
|
|
14003
13996
|
return _context.stop();
|
|
14004
13997
|
}
|
|
@@ -14075,8 +14068,7 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14075
14068
|
return _context4.abrupt("return", addPlugin());
|
|
14076
14069
|
case 3:
|
|
14077
14070
|
return _context4.abrupt("return", new Promise(function(resolve, reject) {
|
|
14078
|
-
|
|
14079
|
-
_this4.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _handler);
|
|
14071
|
+
_this4.whenApiReady().then(function() {
|
|
14080
14072
|
addPlugin().then(function(plugin) {
|
|
14081
14073
|
return resolve(plugin);
|
|
14082
14074
|
}).catch(function(err) {
|
|
@@ -14086,8 +14078,8 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14086
14078
|
reject(new Error("Promise rejected with non-Error value"));
|
|
14087
14079
|
}
|
|
14088
14080
|
});
|
|
14089
|
-
}
|
|
14090
|
-
|
|
14081
|
+
}).catch(function(_error) {
|
|
14082
|
+
});
|
|
14091
14083
|
}));
|
|
14092
14084
|
case 4:
|
|
14093
14085
|
case "end":
|
|
@@ -14331,15 +14323,15 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14331
14323
|
if (!_classPrivateFieldGet(_api, _this6)) {
|
|
14332
14324
|
reject(new Error("api not ready to replace"));
|
|
14333
14325
|
}
|
|
14334
|
-
var
|
|
14335
|
-
_this6.removeEventListener(
|
|
14326
|
+
var _handler = function handler() {
|
|
14327
|
+
_this6.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.$1, _handler);
|
|
14336
14328
|
_this6.mediaId = mediaId;
|
|
14337
14329
|
_this6.uniqueId = _assertClassBrand(_WistiaPlayer_brand, _this6, _generateUniqueId).call(_this6, mediaId);
|
|
14338
14330
|
_assertClassBrand(_WistiaPlayer_brand, _this6, _maybeInjectJsonLd).call(_this6);
|
|
14339
14331
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(_this6.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, _this6).embedOptions);
|
|
14340
14332
|
resolve();
|
|
14341
14333
|
};
|
|
14342
|
-
_this6.addEventListener(
|
|
14334
|
+
_this6.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.$1, _handler);
|
|
14343
14335
|
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__.Z)(_classPrivateFieldGet(_jsonLdId, _this6));
|
|
14344
14336
|
(_classPrivateFieldGet128 = _classPrivateFieldGet(_api, _this6)) === null || _classPrivateFieldGet128 === void 0 ? void 0 : _classPrivateFieldGet128.replaceWith(mediaId, options);
|
|
14345
14337
|
}));
|
|
@@ -14453,6 +14445,49 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14453
14445
|
}
|
|
14454
14446
|
return showPopover;
|
|
14455
14447
|
}()
|
|
14448
|
+
}, {
|
|
14449
|
+
key: "whenApiReady",
|
|
14450
|
+
value: function() {
|
|
14451
|
+
var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee19() {
|
|
14452
|
+
var _this8 = this;
|
|
14453
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
14454
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
14455
|
+
case 0:
|
|
14456
|
+
return _context19.abrupt("return", new Promise(function(resolve) {
|
|
14457
|
+
if (_classPrivateFieldGet(_api, _this8)) {
|
|
14458
|
+
_classPrivateFieldGet(_api, _this8).ready(function() {
|
|
14459
|
+
resolve();
|
|
14460
|
+
});
|
|
14461
|
+
}
|
|
14462
|
+
var _handler2 = function handler() {
|
|
14463
|
+
_this8.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.c5, _handler2);
|
|
14464
|
+
resolve();
|
|
14465
|
+
};
|
|
14466
|
+
_this8.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.c5, _handler2);
|
|
14467
|
+
}));
|
|
14468
|
+
case 1:
|
|
14469
|
+
case "end":
|
|
14470
|
+
return _context19.stop();
|
|
14471
|
+
}
|
|
14472
|
+
}, _callee19);
|
|
14473
|
+
}));
|
|
14474
|
+
function whenApiReady() {
|
|
14475
|
+
return _whenApiReady.apply(this, arguments);
|
|
14476
|
+
}
|
|
14477
|
+
return whenApiReady;
|
|
14478
|
+
}()
|
|
14479
|
+
// --------------------------------------------------
|
|
14480
|
+
// Custom element lifecycle methods
|
|
14481
|
+
// --------------------------------------------------
|
|
14482
|
+
/**
|
|
14483
|
+
* Called when an observed attribute has been added, removed, updated, or replaced.
|
|
14484
|
+
* Also called for initial values when an element is created by the parser, or upgraded.
|
|
14485
|
+
* Note: only attributes listed in the observedAttributes property will receive this callback.
|
|
14486
|
+
* @param {string} name - The name of the attribute that changed.
|
|
14487
|
+
* @param {string} oldValue - The previous value of the attribute, or null if it was added for the first time.
|
|
14488
|
+
* @param {string} newValue - The new value of the attribute, or null if it was removed.
|
|
14489
|
+
* @returns {void}
|
|
14490
|
+
*/
|
|
14456
14491
|
}, {
|
|
14457
14492
|
key: "attributeChangedCallback",
|
|
14458
14493
|
value: function attributeChangedCallback(name, oldValue, newValue) {
|
|
@@ -14476,12 +14511,12 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14476
14511
|
default:
|
|
14477
14512
|
break;
|
|
14478
14513
|
}
|
|
14479
|
-
this[(0,
|
|
14514
|
+
this[(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__.b)(name)] = finalValue;
|
|
14480
14515
|
}
|
|
14481
14516
|
}, {
|
|
14482
14517
|
key: "connectedCallback",
|
|
14483
14518
|
value: function connectedCallback() {
|
|
14484
|
-
var _window$wistiaOptions,
|
|
14519
|
+
var _window$wistiaOptions, _this9 = this, _this$embedHost;
|
|
14485
14520
|
if (_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
|
|
14486
14521
|
return;
|
|
14487
14522
|
}
|
|
@@ -14506,17 +14541,17 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14506
14541
|
_assertClassBrand(_WistiaPlayer_brand, this, _runMethodsFromAttributes).call(this);
|
|
14507
14542
|
_assertClassBrand(_WistiaPlayer_brand, this, _saveInitialAttributesFromDomOptions).call(this);
|
|
14508
14543
|
var resizeCallback = function resizeCallback2() {
|
|
14509
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14544
|
+
_assertClassBrand(_WistiaPlayer_brand, _this9, _renderPreloadThumbnail).call(_this9);
|
|
14510
14545
|
};
|
|
14511
14546
|
_classPrivateFieldSet(_resizeObserver, this, new ResizeObserver(resizeCallback));
|
|
14512
14547
|
_classPrivateFieldGet(_resizeObserver, this).observe(this);
|
|
14513
14548
|
(0, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_22__.n)(mediaId, {
|
|
14514
14549
|
embedHost: (_this$embedHost = this.embedHost) !== null && _this$embedHost !== void 0 ? _this$embedHost : ""
|
|
14515
14550
|
}).then(function(mediaData) {
|
|
14516
|
-
_classPrivateFieldGet(_playerData,
|
|
14517
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14518
|
-
container:
|
|
14519
|
-
mediaData: _classPrivateFieldGet(_playerData,
|
|
14551
|
+
_classPrivateFieldGet(_playerData, _this9).setMediaDataSource(mediaData);
|
|
14552
|
+
_assertClassBrand(_WistiaPlayer_brand, _this9, _initPlayerEmbed).call(_this9, {
|
|
14553
|
+
container: _this9.uniqueId,
|
|
14554
|
+
mediaData: _classPrivateFieldGet(_playerData, _this9).mediaData
|
|
14520
14555
|
});
|
|
14521
14556
|
}).catch(function(error) {
|
|
14522
14557
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__.WO)("player/failure/init-failed");
|
|
@@ -14562,7 +14597,7 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
|
14562
14597
|
_WistiaPlayer = WistiaPlayer;
|
|
14563
14598
|
function _get_pageUrl(_this) {
|
|
14564
14599
|
var _this$getAttribute3;
|
|
14565
|
-
return (_this$getAttribute3 = _this.getAttribute("page-url")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : (0,
|
|
14600
|
+
return (_this$getAttribute3 = _this.getAttribute("page-url")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : (0, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_28__.H)();
|
|
14566
14601
|
}
|
|
14567
14602
|
function _generateUniqueId(mediaId) {
|
|
14568
14603
|
var index = 1;
|
|
@@ -14579,7 +14614,7 @@ function _getSyncedEmbedOption(key) {
|
|
|
14579
14614
|
if ((_classPrivateFieldGet137 = _classPrivateFieldGet(_api, this)) !== null && _classPrivateFieldGet137 !== void 0 && _classPrivateFieldGet137._impl && key in _classPrivateFieldGet(_api, this)._impl._attrs) {
|
|
14580
14615
|
return _classPrivateFieldGet(_api, this)._impl._attrs[key];
|
|
14581
14616
|
}
|
|
14582
|
-
return (_ref17 = (_ref18 = this.embedOptions[key]) !== null && _ref18 !== void 0 ? _ref18 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0,
|
|
14617
|
+
return (_ref17 = (_ref18 = this.embedOptions[key]) !== null && _ref18 !== void 0 ? _ref18 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__.$)(key))) !== null && _ref17 !== void 0 ? _ref17 : defaultEmbedOptions[key];
|
|
14583
14618
|
}
|
|
14584
14619
|
function _getValueFromAttribute(name) {
|
|
14585
14620
|
if (!this.hasAttribute(name)) {
|
|
@@ -14601,7 +14636,7 @@ function _initPlayerEmbed(_ref19) {
|
|
|
14601
14636
|
_classPrivateFieldGet(_playerData, this).updateEmbedOptionOverrides({
|
|
14602
14637
|
videoFoam: true
|
|
14603
14638
|
});
|
|
14604
|
-
if (mediaData && !(0,
|
|
14639
|
+
if (mediaData && !(0, _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_29__.V)(mediaData)) {
|
|
14605
14640
|
_classPrivateFieldSet(_playerType, this, (0, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__.$F)(_classPrivateFieldGet(_judyContext, this), _classPrivateFieldGet(_playerData, this).mediaData, _classPrivateFieldGet(_playerData, this).embedOptions));
|
|
14606
14641
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
14607
14642
|
_assertClassBrand(_WistiaPlayer_brand, this, _maybeInjectJsonLd).call(this);
|
|
@@ -14619,17 +14654,17 @@ function _initPublicApi(_x17, _x18) {
|
|
|
14619
14654
|
return _initPublicApi2.apply(this, arguments);
|
|
14620
14655
|
}
|
|
14621
14656
|
function _initPublicApi2() {
|
|
14622
|
-
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14623
|
-
var
|
|
14657
|
+
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee22(mediaId, options) {
|
|
14658
|
+
var _this15 = this;
|
|
14624
14659
|
var embeddedCallback;
|
|
14625
|
-
return _regeneratorRuntime().wrap(function
|
|
14626
|
-
while (1) switch (
|
|
14660
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
14661
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
14627
14662
|
case 0:
|
|
14628
|
-
|
|
14663
|
+
_context22.next = 2;
|
|
14629
14664
|
return _classPrivateFieldGet(_publicApiScript, this);
|
|
14630
14665
|
case 2:
|
|
14631
14666
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.PublicApi) {
|
|
14632
|
-
|
|
14667
|
+
_context22.next = 5;
|
|
14633
14668
|
break;
|
|
14634
14669
|
}
|
|
14635
14670
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__.WO)("player/failure/init-failed");
|
|
@@ -14637,47 +14672,47 @@ function _initPublicApi2() {
|
|
|
14637
14672
|
case 5:
|
|
14638
14673
|
embeddedCallback = function embeddedCallback2() {
|
|
14639
14674
|
var _classPrivateFieldGet148, _classPrivateFieldGet149;
|
|
14640
|
-
void _assertClassBrand(_WistiaPlayer_brand,
|
|
14641
|
-
_classPrivateFieldSet(_preloadAspectRatio,
|
|
14642
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14643
|
-
(_classPrivateFieldGet148 = _classPrivateFieldGet(_preloadThumbnailRoot,
|
|
14644
|
-
(_classPrivateFieldGet149 = _classPrivateFieldGet(_resizeObserver,
|
|
14645
|
-
_classPrivateFieldSet(_resizeObserver,
|
|
14646
|
-
if (_classPrivateFieldGet(_playPending,
|
|
14647
|
-
void
|
|
14675
|
+
void _assertClassBrand(_WistiaPlayer_brand, _this15, _maybeInitializeMux).call(_this15);
|
|
14676
|
+
_classPrivateFieldSet(_preloadAspectRatio, _this15, void 0);
|
|
14677
|
+
_assertClassBrand(_WistiaPlayer_brand, _this15, _renderEmbedTemplate).call(_this15);
|
|
14678
|
+
(_classPrivateFieldGet148 = _classPrivateFieldGet(_preloadThumbnailRoot, _this15)) === null || _classPrivateFieldGet148 === void 0 ? void 0 : _classPrivateFieldGet148.remove();
|
|
14679
|
+
(_classPrivateFieldGet149 = _classPrivateFieldGet(_resizeObserver, _this15)) === null || _classPrivateFieldGet149 === void 0 ? void 0 : _classPrivateFieldGet149.disconnect();
|
|
14680
|
+
_classPrivateFieldSet(_resizeObserver, _this15, null);
|
|
14681
|
+
if (_classPrivateFieldGet(_playPending, _this15)) {
|
|
14682
|
+
void _this15.play();
|
|
14648
14683
|
}
|
|
14649
14684
|
};
|
|
14650
14685
|
this.addEventListener("embedded", embeddedCallback);
|
|
14651
14686
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
14652
|
-
|
|
14687
|
+
_this15.removeEventListener("embedded", embeddedCallback);
|
|
14653
14688
|
});
|
|
14654
14689
|
_classPrivateFieldSet(_api, this, new _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.PublicApi(mediaId, options));
|
|
14655
14690
|
_classPrivateFieldGet(_api, this).ready(function() {
|
|
14656
14691
|
var _classPrivateFieldGet150;
|
|
14657
|
-
|
|
14692
|
+
_this15.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.c5, {
|
|
14658
14693
|
detail: {
|
|
14659
14694
|
mediaId
|
|
14660
14695
|
}
|
|
14661
14696
|
}));
|
|
14662
|
-
|
|
14697
|
+
_this15.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.iP, {
|
|
14663
14698
|
detail: {
|
|
14664
14699
|
mediaId,
|
|
14665
|
-
api: _classPrivateFieldGet(_api,
|
|
14700
|
+
api: _classPrivateFieldGet(_api, _this15)
|
|
14666
14701
|
}
|
|
14667
14702
|
}));
|
|
14668
|
-
if ((_classPrivateFieldGet150 = _classPrivateFieldGet(_api,
|
|
14669
|
-
Object.entries(_classPrivateFieldGet(_api,
|
|
14703
|
+
if ((_classPrivateFieldGet150 = _classPrivateFieldGet(_api, _this15)) !== null && _classPrivateFieldGet150 !== void 0 && _classPrivateFieldGet150._impl) {
|
|
14704
|
+
Object.entries(_classPrivateFieldGet(_api, _this15)._impl._attrs).forEach(function(_ref25) {
|
|
14670
14705
|
var _ref26 = _slicedToArray(_ref25, 2), key = _ref26[0], value = _ref26[1];
|
|
14671
|
-
_classPrivateFieldGet(_playerData,
|
|
14706
|
+
_classPrivateFieldGet(_playerData, _this15).updateEmbedOptionOverrides(_defineProperty({}, key, value));
|
|
14672
14707
|
});
|
|
14673
14708
|
}
|
|
14674
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14709
|
+
_assertClassBrand(_WistiaPlayer_brand, _this15, _renderPreloadThumbnail).call(_this15);
|
|
14675
14710
|
});
|
|
14676
14711
|
case 10:
|
|
14677
14712
|
case "end":
|
|
14678
|
-
return
|
|
14713
|
+
return _context22.stop();
|
|
14679
14714
|
}
|
|
14680
|
-
},
|
|
14715
|
+
}, _callee22, this);
|
|
14681
14716
|
}));
|
|
14682
14717
|
return _initPublicApi2.apply(this, arguments);
|
|
14683
14718
|
}
|
|
@@ -14688,29 +14723,29 @@ function _maybeInitializeMux() {
|
|
|
14688
14723
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
14689
14724
|
}
|
|
14690
14725
|
function _maybeInitializeMux2() {
|
|
14691
|
-
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14692
|
-
var
|
|
14726
|
+
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee23() {
|
|
14727
|
+
var _this16 = this;
|
|
14693
14728
|
var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
|
|
14694
|
-
return _regeneratorRuntime().wrap(function
|
|
14695
|
-
while (1) switch (
|
|
14729
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
14730
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
14696
14731
|
case 0:
|
|
14697
14732
|
if (_classPrivateFieldGet(_api, this)) {
|
|
14698
|
-
|
|
14733
|
+
_context23.next = 2;
|
|
14699
14734
|
break;
|
|
14700
14735
|
}
|
|
14701
|
-
return
|
|
14736
|
+
return _context23.abrupt("return");
|
|
14702
14737
|
case 2:
|
|
14703
|
-
shouldRandomEnableMux = (0,
|
|
14704
|
-
shouldEnableMuxForPlayer = (0,
|
|
14738
|
+
shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_30__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__._);
|
|
14739
|
+
shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_15__.D5)();
|
|
14705
14740
|
embedType = this.useWebComponent ? "translated-web-component" : "web-component";
|
|
14706
14741
|
if (!shouldEnableMuxForPlayer) {
|
|
14707
|
-
|
|
14742
|
+
_context23.next = 11;
|
|
14708
14743
|
break;
|
|
14709
14744
|
}
|
|
14710
|
-
|
|
14745
|
+
_context23.next = 8;
|
|
14711
14746
|
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_7__.$)("assets/external/wistia-mux.js");
|
|
14712
14747
|
case 8:
|
|
14713
|
-
mux =
|
|
14748
|
+
mux = _context23.sent;
|
|
14714
14749
|
mux.init(_classPrivateFieldGet(_api, this), {
|
|
14715
14750
|
embedType
|
|
14716
14751
|
});
|
|
@@ -14718,14 +14753,14 @@ function _maybeInitializeMux2() {
|
|
|
14718
14753
|
var isTrackingEnabled = event.detail.isTrackingEnabled;
|
|
14719
14754
|
if (!isTrackingEnabled) {
|
|
14720
14755
|
var _classPrivateFieldGet152, _classPrivateFieldGet153;
|
|
14721
|
-
(_classPrivateFieldGet152 = _classPrivateFieldGet(_api,
|
|
14756
|
+
(_classPrivateFieldGet152 = _classPrivateFieldGet(_api, _this16)) === null || _classPrivateFieldGet152 === void 0 ? void 0 : (_classPrivateFieldGet153 = _classPrivateFieldGet152.mux) === null || _classPrivateFieldGet153 === void 0 ? void 0 : _classPrivateFieldGet153.destroy();
|
|
14722
14757
|
}
|
|
14723
14758
|
});
|
|
14724
14759
|
case 11:
|
|
14725
14760
|
case "end":
|
|
14726
|
-
return
|
|
14761
|
+
return _context23.stop();
|
|
14727
14762
|
}
|
|
14728
|
-
},
|
|
14763
|
+
}, _callee23, this);
|
|
14729
14764
|
}));
|
|
14730
14765
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
14731
14766
|
}
|
|
@@ -14751,7 +14786,7 @@ function _maybeSetupEmbedOptionsFromIframe() {
|
|
|
14751
14786
|
_classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeEmbedOptions);
|
|
14752
14787
|
}
|
|
14753
14788
|
function _renderEmbedTemplate() {
|
|
14754
|
-
var _this$embedHost2,
|
|
14789
|
+
var _this$embedHost2, _this10 = this;
|
|
14755
14790
|
if (!_classPrivateFieldGet(_preactRoot, this)) {
|
|
14756
14791
|
return;
|
|
14757
14792
|
}
|
|
@@ -14760,7 +14795,7 @@ function _renderEmbedTemplate() {
|
|
|
14760
14795
|
if (parseFloat(_classPrivateFieldGet(_paddingTop, this)) !== 0 && _classPrivateFieldGet(_paddingTop, this) !== "") {
|
|
14761
14796
|
swatchHeight = "".concat(parseFloat(_classPrivateFieldGet(_paddingTop, this)), "px");
|
|
14762
14797
|
}
|
|
14763
|
-
var playerBorderRadius = (0,
|
|
14798
|
+
var playerBorderRadius = (0, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_32__.JA)({
|
|
14764
14799
|
playerBorderRadius: this.playerBorderRadius,
|
|
14765
14800
|
roundedPlayer: this.roundedPlayer
|
|
14766
14801
|
});
|
|
@@ -14801,7 +14836,7 @@ function _renderEmbedTemplate() {
|
|
|
14801
14836
|
"aria-hidden": "true"
|
|
14802
14837
|
})))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
14803
14838
|
ref: function ref(_ref20) {
|
|
14804
|
-
_classPrivateFieldSet(_preloadThumbnailRoot,
|
|
14839
|
+
_classPrivateFieldSet(_preloadThumbnailRoot, _this10, _ref20);
|
|
14805
14840
|
}
|
|
14806
14841
|
})), _classPrivateFieldGet(_preactRoot, this));
|
|
14807
14842
|
}
|
|
@@ -14830,41 +14865,39 @@ function _renderPreloadThumbnail() {
|
|
|
14830
14865
|
})), _classPrivateFieldGet(_preloadThumbnailRoot, this));
|
|
14831
14866
|
}
|
|
14832
14867
|
function _runMethodsFromAttributes() {
|
|
14833
|
-
var
|
|
14868
|
+
var _this11 = this;
|
|
14834
14869
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
|
|
14835
|
-
|
|
14870
|
+
this.whenApiReady().then(function() {
|
|
14836
14871
|
var _ref21, _classPrivateFieldGet141, _classPrivateFieldGet142, _classPrivateFieldGet143;
|
|
14837
|
-
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand,
|
|
14838
|
-
var isClosedPopover = (_ref21 = ((_classPrivateFieldGet141 = _classPrivateFieldGet(_api,
|
|
14872
|
+
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this11, _getValueFromAttribute).call(_this11, "current-time"));
|
|
14873
|
+
var isClosedPopover = (_ref21 = ((_classPrivateFieldGet141 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet141 === void 0 ? void 0 : _classPrivateFieldGet141.popover) && !_classPrivateFieldGet(_api, _this11).popover.isVisible()) !== null && _ref21 !== void 0 ? _ref21 : false;
|
|
14839
14874
|
var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_6__.GS)();
|
|
14840
|
-
var shouldDelayUntilPlay =
|
|
14841
|
-
void ((_classPrivateFieldGet142 = _classPrivateFieldGet(_api,
|
|
14875
|
+
var shouldDelayUntilPlay = _this11.state !== "playing" && (isMobile || isClosedPopover);
|
|
14876
|
+
void ((_classPrivateFieldGet142 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet142 === void 0 ? void 0 : (_classPrivateFieldGet143 = _classPrivateFieldGet142._impl) === null || _classPrivateFieldGet143 === void 0 ? void 0 : _classPrivateFieldGet143.time(newTime, {
|
|
14842
14877
|
lazy: shouldDelayUntilPlay
|
|
14843
14878
|
}));
|
|
14844
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14845
|
-
|
|
14846
|
-
};
|
|
14847
|
-
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setInitialCurrentTime);
|
|
14879
|
+
_assertClassBrand(_WistiaPlayer_brand, _this11, _setSyncedEmbedOption).call(_this11, "currentTime", newTime);
|
|
14880
|
+
}).catch(function(_error) {
|
|
14881
|
+
});
|
|
14848
14882
|
}
|
|
14849
14883
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "email") !== null) {
|
|
14850
14884
|
_assertClassBrand(_WistiaPlayer_brand, this, _updateEmail).call(this, _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "email"));
|
|
14851
14885
|
}
|
|
14852
14886
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "video-quality") !== null) {
|
|
14853
|
-
|
|
14887
|
+
this.whenApiReady().then(function() {
|
|
14854
14888
|
var _classPrivateFieldGet144, _classPrivateFieldGet145;
|
|
14855
|
-
var newQuality = _assertClassBrand(_WistiaPlayer_brand,
|
|
14856
|
-
(_classPrivateFieldGet144 = _classPrivateFieldGet(_api,
|
|
14857
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14858
|
-
|
|
14859
|
-
};
|
|
14860
|
-
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setVideoQualityFromAttribute);
|
|
14889
|
+
var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this11, _getValueFromAttribute).call(_this11, "video-quality");
|
|
14890
|
+
(_classPrivateFieldGet144 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet144 === void 0 ? void 0 : (_classPrivateFieldGet145 = _classPrivateFieldGet144._impl) === null || _classPrivateFieldGet145 === void 0 ? void 0 : _classPrivateFieldGet145.setVideoQuality(newQuality);
|
|
14891
|
+
_assertClassBrand(_WistiaPlayer_brand, _this11, _setSyncedEmbedOption).call(_this11, "videoQuality", newQuality);
|
|
14892
|
+
}).catch(function(_error) {
|
|
14893
|
+
});
|
|
14861
14894
|
}
|
|
14862
14895
|
}
|
|
14863
14896
|
function _saveInitialAttributesFromDomOptions() {
|
|
14864
|
-
var
|
|
14897
|
+
var _this12 = this;
|
|
14865
14898
|
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref22) {
|
|
14866
14899
|
var _ref23 = _slicedToArray(_ref22, 2), value = _ref23[1];
|
|
14867
|
-
return [(0,
|
|
14900
|
+
return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_27__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this12, _getValueFromAttribute).call(_this12, value.name)];
|
|
14868
14901
|
}));
|
|
14869
14902
|
_classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
|
|
14870
14903
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(this.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, this).embedOptions);
|
|
@@ -14879,18 +14912,18 @@ function _setSyncedEmbedOption(key, value) {
|
|
|
14879
14912
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
14880
14913
|
}
|
|
14881
14914
|
function _setupEventListeners() {
|
|
14882
|
-
var
|
|
14915
|
+
var _this13 = this;
|
|
14883
14916
|
var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
|
|
14884
14917
|
var _ref24 = event.detail, mediaData = _ref24.mediaData;
|
|
14885
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14918
|
+
_assertClassBrand(_WistiaPlayer_brand, _this13, _updateMediaData).call(_this13, mediaData);
|
|
14886
14919
|
};
|
|
14887
|
-
this.addEventListener(
|
|
14920
|
+
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.Wg, loadedMediaDataCallback);
|
|
14888
14921
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
14889
|
-
|
|
14922
|
+
_this13.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_26__.Wg, loadedMediaDataCallback);
|
|
14890
14923
|
});
|
|
14891
14924
|
this.addEventListener("click", function() {
|
|
14892
|
-
_classPrivateFieldSet(_playPending,
|
|
14893
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14925
|
+
_classPrivateFieldSet(_playPending, _this13, true);
|
|
14926
|
+
_assertClassBrand(_WistiaPlayer_brand, _this13, _renderPreloadThumbnail).call(_this13);
|
|
14894
14927
|
}, {
|
|
14895
14928
|
once: true
|
|
14896
14929
|
});
|
|
@@ -14899,9 +14932,9 @@ function _shouldDisplaySwatch() {
|
|
|
14899
14932
|
return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
|
|
14900
14933
|
}
|
|
14901
14934
|
function _updateEmail(email) {
|
|
14902
|
-
var
|
|
14935
|
+
var _this14 = this;
|
|
14903
14936
|
(0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_17__.$B)(function(localStorage2) {
|
|
14904
|
-
localStorage2[_classPrivateGetter(_WistiaPlayer_brand,
|
|
14937
|
+
localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this14, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this14, _get_pageUrl)]), {}, {
|
|
14905
14938
|
trackEmail: email
|
|
14906
14939
|
});
|
|
14907
14940
|
});
|
|
@@ -14917,48 +14950,48 @@ function _updateMediaData(mediaData) {
|
|
|
14917
14950
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
14918
14951
|
}
|
|
14919
14952
|
var getSwatchMetaData = /* @__PURE__ */ function() {
|
|
14920
|
-
var _ref15 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14953
|
+
var _ref15 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee20(url) {
|
|
14921
14954
|
var swatch;
|
|
14922
|
-
return _regeneratorRuntime().wrap(function
|
|
14923
|
-
while (1) switch (
|
|
14955
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
14956
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
14924
14957
|
case 0:
|
|
14925
14958
|
swatch = new Image();
|
|
14926
14959
|
swatch.src = url;
|
|
14927
|
-
|
|
14960
|
+
_context20.next = 4;
|
|
14928
14961
|
return swatch.decode();
|
|
14929
14962
|
case 4:
|
|
14930
|
-
return
|
|
14963
|
+
return _context20.abrupt("return", swatch);
|
|
14931
14964
|
case 5:
|
|
14932
14965
|
case "end":
|
|
14933
|
-
return
|
|
14966
|
+
return _context20.stop();
|
|
14934
14967
|
}
|
|
14935
|
-
},
|
|
14968
|
+
}, _callee20);
|
|
14936
14969
|
}));
|
|
14937
14970
|
return function getSwatchMetaData2(_x14) {
|
|
14938
14971
|
return _ref15.apply(this, arguments);
|
|
14939
14972
|
};
|
|
14940
14973
|
}();
|
|
14941
14974
|
var wistiaSwatchElement = /* @__PURE__ */ function() {
|
|
14942
|
-
var _ref16 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14975
|
+
var _ref16 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee21(mediaId, embedHost) {
|
|
14943
14976
|
var swatchUrl, swatchImg, naturalHeight, naturalWidth, ratio, style;
|
|
14944
|
-
return _regeneratorRuntime().wrap(function
|
|
14945
|
-
while (1) switch (
|
|
14977
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
14978
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
14946
14979
|
case 0:
|
|
14947
14980
|
swatchUrl = getSwatchUrl(mediaId, embedHost);
|
|
14948
|
-
|
|
14981
|
+
_context21.next = 3;
|
|
14949
14982
|
return getSwatchMetaData(swatchUrl);
|
|
14950
14983
|
case 3:
|
|
14951
|
-
swatchImg =
|
|
14984
|
+
swatchImg = _context21.sent;
|
|
14952
14985
|
naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
|
|
14953
14986
|
ratio = naturalHeight / naturalWidth * 100;
|
|
14954
14987
|
style = document.createElement("style");
|
|
14955
14988
|
style.innerHTML = "\n wistia-player[media-id='".concat(mediaId, "']:not(:defined) {\n padding: ").concat(ratio, "% 0 0 0;\n background: url(").concat(swatchUrl, ");\n background-size: contain;\n filter: blur(5px);\n display: block;\n }\n ");
|
|
14956
|
-
return
|
|
14989
|
+
return _context21.abrupt("return", style);
|
|
14957
14990
|
case 9:
|
|
14958
14991
|
case "end":
|
|
14959
|
-
return
|
|
14992
|
+
return _context21.stop();
|
|
14960
14993
|
}
|
|
14961
|
-
},
|
|
14994
|
+
}, _callee21);
|
|
14962
14995
|
}));
|
|
14963
14996
|
return function wistiaSwatchElement2(_x15, _x16) {
|
|
14964
14997
|
return _ref16.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/wistia-player-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"packageManager": "yarn@4.2.2",
|
|
5
5
|
"description": "An embeddable wistia-player web component and React wrapper to add responsive, lightweight, and SEO-friendly videos to your site.",
|
|
6
6
|
"keywords": [
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"start:dev:yalc": "run build:react:dev --watch --yalc"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@wistia/wistia-player": "0.0.
|
|
48
|
+
"@wistia/wistia-player": "0.0.55"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@babel/core": "^7.25.2",
|
|
52
52
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
53
53
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
54
54
|
"@babel/preset-env": "^7.25.8",
|
|
55
|
-
"@babel/preset-react": "^7.
|
|
55
|
+
"@babel/preset-react": "^7.25.9",
|
|
56
56
|
"@babel/preset-typescript": "^7.24.1",
|
|
57
57
|
"@types/react": "^18.3.8",
|
|
58
58
|
"babel-plugin-transform-object-hasown": "^1.1.0",
|