@wistia/wistia-player-react 0.0.43 → 0.0.45
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.
|
@@ -552,9 +552,6 @@ function _classPrivateFieldInitSpec(e, t, a) {
|
|
|
552
552
|
function _checkPrivateRedeclaration(e, t) {
|
|
553
553
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
554
554
|
}
|
|
555
|
-
function _classPrivateSetter(s, r, a, t) {
|
|
556
|
-
return r(_assertClassBrand(s, a), t), t;
|
|
557
|
-
}
|
|
558
555
|
function _classPrivateGetter(s, r, a) {
|
|
559
556
|
return a(_assertClassBrand(s, r));
|
|
560
557
|
}
|
|
@@ -572,9 +569,6 @@ function _get_pageUrl(_this) {
|
|
|
572
569
|
var _this$getAttribute3;
|
|
573
570
|
return (_this$getAttribute3 = _this.getAttribute("page-url")) !== null && _this$getAttribute3 !== void 0 ? _this$getAttribute3 : (0, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_28__.H)();
|
|
574
571
|
}
|
|
575
|
-
function _set_usingFullscreenContainer(_this2, val) {
|
|
576
|
-
_classPrivateFieldSet(_usingFullscreenContainer, _this2, val);
|
|
577
|
-
}
|
|
578
572
|
function _camelCaseToKebabCase(camelCaseString) {
|
|
579
573
|
return camelCaseString.replace(/[A-Z]+(?![a-z])|[A-Z]/g, function(letter, idx) {
|
|
580
574
|
return (idx !== void 0 ? "-" : "") + letter.toLowerCase();
|
|
@@ -630,20 +624,20 @@ function _initPlayerEmbed(_ref19) {
|
|
|
630
624
|
mediaData
|
|
631
625
|
});
|
|
632
626
|
}
|
|
633
|
-
function _initPublicApi(
|
|
627
|
+
function _initPublicApi(_x17, _x18) {
|
|
634
628
|
return _initPublicApi2.apply(this, arguments);
|
|
635
629
|
}
|
|
636
630
|
function _initPublicApi2() {
|
|
637
|
-
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
638
|
-
var _this$api58,
|
|
639
|
-
return _regeneratorRuntime().wrap(function
|
|
640
|
-
while (1) switch (
|
|
631
|
+
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee21(mediaId, options) {
|
|
632
|
+
var _this$api58, _this14 = this, _this$api59;
|
|
633
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
634
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
641
635
|
case 0:
|
|
642
|
-
|
|
636
|
+
_context21.next = 2;
|
|
643
637
|
return _classPrivateFieldGet(_publicApiScript, this);
|
|
644
638
|
case 2:
|
|
645
639
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.PublicApi) {
|
|
646
|
-
|
|
640
|
+
_context21.next = 5;
|
|
647
641
|
break;
|
|
648
642
|
}
|
|
649
643
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__.WO)("player/failure/init-failed");
|
|
@@ -652,41 +646,41 @@ function _initPublicApi2() {
|
|
|
652
646
|
_classPrivateFieldSet(_api, this, new _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.PublicApi(mediaId, options));
|
|
653
647
|
(_this$api58 = this.api) === null || _this$api58 === void 0 ? void 0 : _this$api58.embedded(function() {
|
|
654
648
|
var _classPrivateFieldGet12, _classPrivateFieldGet13;
|
|
655
|
-
void _assertClassBrand(_WistiaPlayer_brand,
|
|
656
|
-
_classPrivateFieldSet(_preloadAspectRatio,
|
|
657
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
658
|
-
(_classPrivateFieldGet12 = _classPrivateFieldGet(_preloadThumbnailRoot,
|
|
659
|
-
(_classPrivateFieldGet13 = _classPrivateFieldGet(_resizeObserver,
|
|
660
|
-
_classPrivateFieldSet(_resizeObserver,
|
|
661
|
-
if (_classPrivateFieldGet(_playPending,
|
|
662
|
-
void
|
|
649
|
+
void _assertClassBrand(_WistiaPlayer_brand, _this14, _maybeInitializeMux).call(_this14);
|
|
650
|
+
_classPrivateFieldSet(_preloadAspectRatio, _this14, void 0);
|
|
651
|
+
_assertClassBrand(_WistiaPlayer_brand, _this14, _renderEmbedTemplate).call(_this14);
|
|
652
|
+
(_classPrivateFieldGet12 = _classPrivateFieldGet(_preloadThumbnailRoot, _this14)) === null || _classPrivateFieldGet12 === void 0 ? void 0 : _classPrivateFieldGet12.remove();
|
|
653
|
+
(_classPrivateFieldGet13 = _classPrivateFieldGet(_resizeObserver, _this14)) === null || _classPrivateFieldGet13 === void 0 ? void 0 : _classPrivateFieldGet13.disconnect();
|
|
654
|
+
_classPrivateFieldSet(_resizeObserver, _this14, null);
|
|
655
|
+
if (_classPrivateFieldGet(_playPending, _this14)) {
|
|
656
|
+
void _this14.play();
|
|
663
657
|
}
|
|
664
658
|
});
|
|
665
659
|
(_this$api59 = this.api) === null || _this$api59 === void 0 ? void 0 : _this$api59.ready(function() {
|
|
666
|
-
|
|
660
|
+
_this14.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, {
|
|
667
661
|
detail: {
|
|
668
662
|
mediaId
|
|
669
663
|
}
|
|
670
664
|
}));
|
|
671
|
-
|
|
665
|
+
_this14.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.iP, {
|
|
672
666
|
detail: {
|
|
673
667
|
mediaId,
|
|
674
|
-
api:
|
|
668
|
+
api: _this14.api
|
|
675
669
|
}
|
|
676
670
|
}));
|
|
677
|
-
if (
|
|
678
|
-
Object.entries(
|
|
671
|
+
if (_this14.api) {
|
|
672
|
+
Object.entries(_this14.api._attrs).forEach(function(_ref25) {
|
|
679
673
|
var _ref26 = _slicedToArray(_ref25, 2), key = _ref26[0], value = _ref26[1];
|
|
680
|
-
_classPrivateFieldGet(_playerData,
|
|
674
|
+
_classPrivateFieldGet(_playerData, _this14).updateEmbedOptionOverrides(_defineProperty({}, key, value));
|
|
681
675
|
});
|
|
682
676
|
}
|
|
683
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
677
|
+
_assertClassBrand(_WistiaPlayer_brand, _this14, _renderPreloadThumbnail).call(_this14);
|
|
684
678
|
});
|
|
685
679
|
case 8:
|
|
686
680
|
case "end":
|
|
687
|
-
return
|
|
681
|
+
return _context21.stop();
|
|
688
682
|
}
|
|
689
|
-
},
|
|
683
|
+
}, _callee21, this);
|
|
690
684
|
}));
|
|
691
685
|
return _initPublicApi2.apply(this, arguments);
|
|
692
686
|
}
|
|
@@ -702,44 +696,44 @@ function _maybeInitializeMux() {
|
|
|
702
696
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
703
697
|
}
|
|
704
698
|
function _maybeInitializeMux2() {
|
|
705
|
-
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
706
|
-
var
|
|
699
|
+
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee22() {
|
|
700
|
+
var _this15 = this;
|
|
707
701
|
var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
|
|
708
|
-
return _regeneratorRuntime().wrap(function
|
|
709
|
-
while (1) switch (
|
|
702
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
703
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
710
704
|
case 0:
|
|
711
705
|
if (this.api) {
|
|
712
|
-
|
|
706
|
+
_context22.next = 2;
|
|
713
707
|
break;
|
|
714
708
|
}
|
|
715
|
-
return
|
|
709
|
+
return _context22.abrupt("return");
|
|
716
710
|
case 2:
|
|
717
711
|
shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_30__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__._);
|
|
718
712
|
shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_31__.J)(this.api, shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_15__.D5)();
|
|
719
713
|
embedType = this.useWebComponent ? "translated-web-component" : "web-component";
|
|
720
714
|
if (!shouldEnableMuxForPlayer) {
|
|
721
|
-
|
|
715
|
+
_context22.next = 11;
|
|
722
716
|
break;
|
|
723
717
|
}
|
|
724
|
-
|
|
718
|
+
_context22.next = 8;
|
|
725
719
|
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_7__.$)("assets/external/wistia-mux.js");
|
|
726
720
|
case 8:
|
|
727
|
-
mux =
|
|
721
|
+
mux = _context22.sent;
|
|
728
722
|
mux.init(this.api, {
|
|
729
723
|
embedType
|
|
730
724
|
});
|
|
731
725
|
this.addEventListener("visitor-tracking-change", function(event) {
|
|
732
726
|
var isTrackingEnabled = event.detail.isTrackingEnabled;
|
|
733
727
|
if (!isTrackingEnabled) {
|
|
734
|
-
var
|
|
735
|
-
(
|
|
728
|
+
var _this15$api, _this15$api$mux;
|
|
729
|
+
(_this15$api = _this15.api) === null || _this15$api === void 0 ? void 0 : (_this15$api$mux = _this15$api.mux) === null || _this15$api$mux === void 0 ? void 0 : _this15$api$mux.destroy();
|
|
736
730
|
}
|
|
737
731
|
});
|
|
738
732
|
case 11:
|
|
739
733
|
case "end":
|
|
740
|
-
return
|
|
734
|
+
return _context22.stop();
|
|
741
735
|
}
|
|
742
|
-
},
|
|
736
|
+
}, _callee22, this);
|
|
743
737
|
}));
|
|
744
738
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
745
739
|
}
|
|
@@ -754,8 +748,18 @@ function _maybeInjectJsonLd() {
|
|
|
754
748
|
});
|
|
755
749
|
}
|
|
756
750
|
}
|
|
751
|
+
function _maybeSetupEmbedOptionsFromIframe() {
|
|
752
|
+
if (!window._inWistiaIframe) {
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
var searchParams = new URLSearchParams(window.location.search);
|
|
756
|
+
var iframeEmbedOptions = Object.fromEntries(searchParams.entries());
|
|
757
|
+
iframeEmbedOptions.pageTitle = document.title;
|
|
758
|
+
iframeEmbedOptions._inIframe = true;
|
|
759
|
+
_classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeEmbedOptions);
|
|
760
|
+
}
|
|
757
761
|
function _renderEmbedTemplate() {
|
|
758
|
-
var _this$embedHost2,
|
|
762
|
+
var _this$embedHost2, _this9 = this;
|
|
759
763
|
if (!_classPrivateFieldGet(_preactRoot, this)) {
|
|
760
764
|
return;
|
|
761
765
|
}
|
|
@@ -805,7 +809,7 @@ function _renderEmbedTemplate() {
|
|
|
805
809
|
"aria-hidden": "true"
|
|
806
810
|
})))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
807
811
|
ref: function ref(_ref20) {
|
|
808
|
-
_classPrivateFieldSet(_preloadThumbnailRoot,
|
|
812
|
+
_classPrivateFieldSet(_preloadThumbnailRoot, _this9, _ref20);
|
|
809
813
|
}
|
|
810
814
|
})), _classPrivateFieldGet(_preactRoot, this));
|
|
811
815
|
}
|
|
@@ -834,19 +838,19 @@ function _renderPreloadThumbnail() {
|
|
|
834
838
|
})), _classPrivateFieldGet(_preloadThumbnailRoot, this));
|
|
835
839
|
}
|
|
836
840
|
function _runMethodsFromAttributes() {
|
|
837
|
-
var
|
|
841
|
+
var _this10 = this;
|
|
838
842
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
|
|
839
843
|
var _setInitialCurrentTime = function setInitialCurrentTime() {
|
|
840
|
-
var _ref21,
|
|
841
|
-
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand,
|
|
842
|
-
var isClosedPopover = (_ref21 = ((
|
|
844
|
+
var _ref21, _this10$api, _this10$api2;
|
|
845
|
+
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this10, _getValueFromAttribute).call(_this10, "current-time"));
|
|
846
|
+
var isClosedPopover = (_ref21 = ((_this10$api = _this10.api) === null || _this10$api === void 0 ? void 0 : _this10$api.popover) && !_this10.api.popover.isVisible()) !== null && _ref21 !== void 0 ? _ref21 : false;
|
|
843
847
|
var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_6__.GS)();
|
|
844
|
-
var shouldDelayUntilPlay =
|
|
845
|
-
void ((
|
|
848
|
+
var shouldDelayUntilPlay = _this10.state !== "playing" && (isMobile || isClosedPopover);
|
|
849
|
+
void ((_this10$api2 = _this10.api) === null || _this10$api2 === void 0 ? void 0 : _this10$api2.time(newTime, {
|
|
846
850
|
lazy: shouldDelayUntilPlay
|
|
847
851
|
}));
|
|
848
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
849
|
-
|
|
852
|
+
_assertClassBrand(_WistiaPlayer_brand, _this10, _setSyncedEmbedOption).call(_this10, "currentTime", newTime);
|
|
853
|
+
_this10.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setInitialCurrentTime);
|
|
850
854
|
};
|
|
851
855
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setInitialCurrentTime);
|
|
852
856
|
}
|
|
@@ -855,27 +859,22 @@ function _runMethodsFromAttributes() {
|
|
|
855
859
|
}
|
|
856
860
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "video-quality") !== null) {
|
|
857
861
|
var _setVideoQualityFromAttribute = function setVideoQualityFromAttribute() {
|
|
858
|
-
var
|
|
859
|
-
var newQuality = _assertClassBrand(_WistiaPlayer_brand,
|
|
860
|
-
(
|
|
861
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
862
|
-
|
|
862
|
+
var _this10$api3, _this10$api3$_impl;
|
|
863
|
+
var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this10, _getValueFromAttribute).call(_this10, "video-quality");
|
|
864
|
+
(_this10$api3 = _this10.api) === null || _this10$api3 === void 0 ? void 0 : (_this10$api3$_impl = _this10$api3._impl) === null || _this10$api3$_impl === void 0 ? void 0 : _this10$api3$_impl.setVideoQuality(newQuality);
|
|
865
|
+
_assertClassBrand(_WistiaPlayer_brand, _this10, _setSyncedEmbedOption).call(_this10, "videoQuality", newQuality);
|
|
866
|
+
_this10.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setVideoQualityFromAttribute);
|
|
863
867
|
};
|
|
864
868
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _setVideoQualityFromAttribute);
|
|
865
869
|
}
|
|
866
870
|
}
|
|
867
871
|
function _saveInitialAttributesFromDomOptions() {
|
|
868
|
-
var
|
|
872
|
+
var _this11 = this;
|
|
869
873
|
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref22) {
|
|
870
874
|
var _ref23 = _slicedToArray(_ref22, 2), value = _ref23[1];
|
|
871
|
-
return [_assertClassBrand(_WistiaPlayer_brand,
|
|
875
|
+
return [_assertClassBrand(_WistiaPlayer_brand, _this11, _kebabCaseToCamelCase).call(_this11, value.name), _assertClassBrand(_WistiaPlayer_brand, _this11, _getValueFromAttribute).call(_this11, value.name)];
|
|
872
876
|
}));
|
|
873
877
|
_classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
|
|
874
|
-
if (window._inWistiaIframe) {
|
|
875
|
-
var searchParams = new URLSearchParams(window.location.search);
|
|
876
|
-
var iframeUrlParams = Object.fromEntries(searchParams.entries());
|
|
877
|
-
_classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeUrlParams);
|
|
878
|
-
}
|
|
879
878
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(this.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, this).embedOptions);
|
|
880
879
|
}
|
|
881
880
|
function _setSyncedEmbedOption(key, value) {
|
|
@@ -887,18 +886,18 @@ function _setSyncedEmbedOption(key, value) {
|
|
|
887
886
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
888
887
|
}
|
|
889
888
|
function _setupEventListeners() {
|
|
890
|
-
var
|
|
889
|
+
var _this12 = this;
|
|
891
890
|
var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
|
|
892
891
|
var _ref24 = event.detail, mediaData = _ref24.mediaData;
|
|
893
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
892
|
+
_assertClassBrand(_WistiaPlayer_brand, _this12, _updateMediaData).call(_this12, mediaData);
|
|
894
893
|
};
|
|
895
894
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.Wg, loadedMediaDataCallback);
|
|
896
895
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
897
|
-
|
|
896
|
+
_this12.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.Wg, loadedMediaDataCallback);
|
|
898
897
|
});
|
|
899
898
|
this.addEventListener("click", function() {
|
|
900
|
-
_classPrivateFieldSet(_playPending,
|
|
901
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
899
|
+
_classPrivateFieldSet(_playPending, _this12, true);
|
|
900
|
+
_assertClassBrand(_WistiaPlayer_brand, _this12, _renderPreloadThumbnail).call(_this12);
|
|
902
901
|
}, {
|
|
903
902
|
once: true
|
|
904
903
|
});
|
|
@@ -907,9 +906,9 @@ function _shouldDisplaySwatch() {
|
|
|
907
906
|
return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
|
|
908
907
|
}
|
|
909
908
|
function _updateEmail(email) {
|
|
910
|
-
var
|
|
909
|
+
var _this13 = this;
|
|
911
910
|
(0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_17__.$B)(function(localStorage2) {
|
|
912
|
-
localStorage2[_classPrivateGetter(_WistiaPlayer_brand,
|
|
911
|
+
localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this13, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this13, _get_pageUrl)]), {}, {
|
|
913
912
|
trackEmail: email
|
|
914
913
|
});
|
|
915
914
|
});
|
|
@@ -924,7 +923,7 @@ function _updateMediaData(mediaData) {
|
|
|
924
923
|
_classPrivateFieldSet(_playerType, this, (0, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_12__.$F)(_classPrivateFieldGet(_judyContext, this), _classPrivateFieldGet(_playerData, this).mediaData, _classPrivateFieldGet(_playerData, this).embedOptions));
|
|
925
924
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
926
925
|
}
|
|
927
|
-
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__, _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_27__, _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__, _WistiaPlayer, requiredAttributes, optionalPublicAttributes, optionalPrivateAttributes, defaultEmbedOptions, getSwatchUrl, _api, _fullscreenState, _internals, _jsonLdId, _judyContext, _logger, _oldEngine, _playerData, _playerType, _removeEventListeners,
|
|
926
|
+
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__, _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_27__, _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__, _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;
|
|
928
927
|
var init_wistia_player = __esm({
|
|
929
928
|
"../wistia-player/dist/wistia-player.js"() {
|
|
930
929
|
__webpack_modules__ = {
|
|
@@ -9330,7 +9329,7 @@ var init_wistia_player = __esm({
|
|
|
9330
9329
|
var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
9331
9330
|
var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
9332
9331
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
9333
|
-
var TAGGED_VERSION = "0.0.
|
|
9332
|
+
var TAGGED_VERSION = "0.0.45";
|
|
9334
9333
|
var DEFAULT_PROTOCOL = function() {
|
|
9335
9334
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
9336
9335
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
|
|
@@ -12999,7 +12998,6 @@ var init_wistia_player = __esm({
|
|
|
12999
12998
|
_playerData = /* @__PURE__ */ new WeakMap();
|
|
13000
12999
|
_playerType = /* @__PURE__ */ new WeakMap();
|
|
13001
13000
|
_removeEventListeners = /* @__PURE__ */ new WeakMap();
|
|
13002
|
-
_usingFullscreenContainer = /* @__PURE__ */ new WeakMap();
|
|
13003
13001
|
_hasElementConnectedToDOM = /* @__PURE__ */ new WeakMap();
|
|
13004
13002
|
_paddingTop = /* @__PURE__ */ new WeakMap();
|
|
13005
13003
|
_playPending = /* @__PURE__ */ new WeakMap();
|
|
@@ -13011,49 +13009,48 @@ var init_wistia_player = __esm({
|
|
|
13011
13009
|
_WistiaPlayer_brand = /* @__PURE__ */ new WeakSet();
|
|
13012
13010
|
WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
13013
13011
|
function WistiaPlayer3() {
|
|
13014
|
-
var
|
|
13012
|
+
var _this2;
|
|
13015
13013
|
_classCallCheck(this, WistiaPlayer3);
|
|
13016
|
-
|
|
13017
|
-
_classPrivateMethodInitSpec(
|
|
13018
|
-
_classPrivateFieldInitSpec(
|
|
13019
|
-
_classPrivateFieldInitSpec(
|
|
13014
|
+
_this2 = _callSuper(this, WistiaPlayer3);
|
|
13015
|
+
_classPrivateMethodInitSpec(_this2, _WistiaPlayer_brand);
|
|
13016
|
+
_classPrivateFieldInitSpec(_this2, _api, void 0);
|
|
13017
|
+
_classPrivateFieldInitSpec(_this2, _fullscreenState, {
|
|
13020
13018
|
heightBeforeFullscreen: void 0,
|
|
13021
13019
|
inFullscreen: false,
|
|
13022
13020
|
nativeFullscreen: false,
|
|
13023
13021
|
widthBeforeFullscreen: void 0
|
|
13024
13022
|
});
|
|
13025
|
-
_classPrivateFieldInitSpec(
|
|
13026
|
-
_classPrivateFieldInitSpec(
|
|
13027
|
-
_classPrivateFieldInitSpec(
|
|
13028
|
-
_classPrivateFieldInitSpec(
|
|
13029
|
-
_classPrivateFieldInitSpec(
|
|
13030
|
-
_classPrivateFieldInitSpec(
|
|
13031
|
-
_classPrivateFieldInitSpec(
|
|
13032
|
-
_classPrivateFieldInitSpec(
|
|
13033
|
-
_classPrivateFieldInitSpec(
|
|
13034
|
-
_classPrivateFieldInitSpec(
|
|
13035
|
-
_classPrivateFieldInitSpec(
|
|
13036
|
-
_classPrivateFieldInitSpec(
|
|
13037
|
-
_classPrivateFieldInitSpec(
|
|
13038
|
-
_classPrivateFieldInitSpec(
|
|
13039
|
-
_classPrivateFieldInitSpec(
|
|
13040
|
-
_classPrivateFieldInitSpec(
|
|
13041
|
-
_classPrivateFieldInitSpec(_this3, _resizeObserver, null);
|
|
13023
|
+
_classPrivateFieldInitSpec(_this2, _internals, void 0);
|
|
13024
|
+
_classPrivateFieldInitSpec(_this2, _jsonLdId, void 0);
|
|
13025
|
+
_classPrivateFieldInitSpec(_this2, _judyContext, null);
|
|
13026
|
+
_classPrivateFieldInitSpec(_this2, _logger, void 0);
|
|
13027
|
+
_classPrivateFieldInitSpec(_this2, _oldEngine, void 0);
|
|
13028
|
+
_classPrivateFieldInitSpec(_this2, _playerData, void 0);
|
|
13029
|
+
_classPrivateFieldInitSpec(_this2, _playerType, void 0);
|
|
13030
|
+
_classPrivateFieldInitSpec(_this2, _removeEventListeners, []);
|
|
13031
|
+
_classPrivateFieldInitSpec(_this2, _hasElementConnectedToDOM, false);
|
|
13032
|
+
_classPrivateFieldInitSpec(_this2, _paddingTop, "0px");
|
|
13033
|
+
_classPrivateFieldInitSpec(_this2, _playPending, false);
|
|
13034
|
+
_classPrivateFieldInitSpec(_this2, _preactRoot, null);
|
|
13035
|
+
_classPrivateFieldInitSpec(_this2, _preloadAspectRatio, void 0);
|
|
13036
|
+
_classPrivateFieldInitSpec(_this2, _preloadThumbnailRoot, null);
|
|
13037
|
+
_classPrivateFieldInitSpec(_this2, _publicApiScript, (0, _utilities_runScript_js__WEBPACK_IMPORTED_MODULE_13__.j)("".concat((0, _utilities_url_js__WEBPACK_IMPORTED_MODULE_16__.ff)(), "//").concat((0, _appHostname_js__WEBPACK_IMPORTED_MODULE_24__.N)("fast"), "/assets/external/publicApi.js")));
|
|
13038
|
+
_classPrivateFieldInitSpec(_this2, _resizeObserver, null);
|
|
13042
13039
|
if ("attachInternals" in HTMLElement.prototype) {
|
|
13043
|
-
_classPrivateFieldSet(_internals,
|
|
13044
|
-
_classPrivateFieldGet(_internals,
|
|
13040
|
+
_classPrivateFieldSet(_internals, _this2, _this2.attachInternals());
|
|
13041
|
+
_classPrivateFieldGet(_internals, _this2).states.add("--initializing");
|
|
13045
13042
|
}
|
|
13046
|
-
|
|
13043
|
+
_this2.attachShadow({
|
|
13047
13044
|
mode: "open"
|
|
13048
13045
|
});
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
_classPrivateFieldSet(_logger,
|
|
13052
|
-
_classPrivateFieldSet(_playerData,
|
|
13046
|
+
_this2.dispatchEvent(new CustomEvent("load-start"));
|
|
13047
|
+
_this2.paddingTop = getComputedStyle(_this2).paddingTop;
|
|
13048
|
+
_classPrivateFieldSet(_logger, _this2, _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_20__.ct.getPrefixedFunctions("WistiaPlayer"));
|
|
13049
|
+
_classPrivateFieldSet(_playerData, _this2, new _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_4__.I());
|
|
13053
13050
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.wistia === void 0) {
|
|
13054
13051
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.wistia = Date.now();
|
|
13055
13052
|
}
|
|
13056
|
-
return
|
|
13053
|
+
return _this2;
|
|
13057
13054
|
}
|
|
13058
13055
|
_inherits(WistiaPlayer3, _HTMLElement);
|
|
13059
13056
|
return _createClass(WistiaPlayer3, [{
|
|
@@ -14092,14 +14089,6 @@ var init_wistia_player = __esm({
|
|
|
14092
14089
|
this.removeAttribute("use-web-component");
|
|
14093
14090
|
}
|
|
14094
14091
|
}
|
|
14095
|
-
/**
|
|
14096
|
-
* @returns {boolean}
|
|
14097
|
-
*/
|
|
14098
|
-
}, {
|
|
14099
|
-
key: "usingFullscreenContainer",
|
|
14100
|
-
get: function get() {
|
|
14101
|
-
return _classPrivateFieldGet(_usingFullscreenContainer, this);
|
|
14102
|
-
}
|
|
14103
14092
|
/**
|
|
14104
14093
|
* Returns the current video quality.
|
|
14105
14094
|
* @returns {number | 'auto'}
|
|
@@ -14115,6 +14104,16 @@ var init_wistia_player = __esm({
|
|
|
14115
14104
|
(_this$api43 = this.api) === null || _this$api43 === void 0 ? void 0 : (_this$api43$_impl = _this$api43._impl) === null || _this$api43$_impl === void 0 ? void 0 : _this$api43$_impl.setVideoQuality(quality);
|
|
14116
14105
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "videoQuality", quality);
|
|
14117
14106
|
}
|
|
14107
|
+
/**
|
|
14108
|
+
* Returns the visitor_key of the viewer of this player.
|
|
14109
|
+
* @returns {string | null | undefined}
|
|
14110
|
+
*/
|
|
14111
|
+
}, {
|
|
14112
|
+
key: "visitorKey",
|
|
14113
|
+
get: function get() {
|
|
14114
|
+
var _Wistia$visitorKey;
|
|
14115
|
+
return (_Wistia$visitorKey = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_1__.s.visitorKey) === null || _Wistia$visitorKey === void 0 ? void 0 : _Wistia$visitorKey.value();
|
|
14116
|
+
}
|
|
14118
14117
|
/**
|
|
14119
14118
|
* Returns the current volume set on the player
|
|
14120
14119
|
* @returns {number}
|
|
@@ -14158,104 +14157,71 @@ var init_wistia_player = __esm({
|
|
|
14158
14157
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "wistiaPopover", shouldBePopover);
|
|
14159
14158
|
}
|
|
14160
14159
|
}, {
|
|
14161
|
-
key: "
|
|
14160
|
+
key: "cancelFullscreen",
|
|
14162
14161
|
value: (
|
|
14163
14162
|
// --------------------------------------------------
|
|
14164
14163
|
// Public api methods
|
|
14165
14164
|
// --------------------------------------------------
|
|
14166
14165
|
/**
|
|
14167
|
-
*
|
|
14168
|
-
* @param {string} mediaId - the id of the media to add
|
|
14169
|
-
* @param {object} options - embed options to apply for this media in the playlist
|
|
14170
|
-
* @param {object} position - position to add the media in the playlist
|
|
14166
|
+
* Attempt to enter fullscreen mode.
|
|
14171
14167
|
* @returns {Promise<void>}
|
|
14172
14168
|
*/
|
|
14173
14169
|
function() {
|
|
14174
|
-
var
|
|
14170
|
+
var _cancelFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
14171
|
+
var _this$api46, _this$api46$_impl, _this3 = this;
|
|
14175
14172
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14176
14173
|
while (1) switch (_context.prev = _context.next) {
|
|
14177
14174
|
case 0:
|
|
14178
|
-
if (
|
|
14179
|
-
|
|
14180
|
-
|
|
14175
|
+
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.widthBeforeFullscreen)) {
|
|
14176
|
+
this.style.width = this._fullscreenState.widthBeforeFullscreen;
|
|
14177
|
+
}
|
|
14178
|
+
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.heightBeforeFullscreen)) {
|
|
14179
|
+
this.style.height = this._fullscreenState.heightBeforeFullscreen;
|
|
14181
14180
|
}
|
|
14182
|
-
this.api
|
|
14183
|
-
|
|
14181
|
+
return _context.abrupt("return", (_this$api46 = this.api) === null || _this$api46 === void 0 ? void 0 : (_this$api46$_impl = _this$api46._impl) === null || _this$api46$_impl === void 0 ? void 0 : _this$api46$_impl.cancelFullscreen().then(function() {
|
|
14182
|
+
_this3._fullscreenState.heightBeforeFullscreen = void 0;
|
|
14183
|
+
_this3._fullscreenState.widthBeforeFullscreen = void 0;
|
|
14184
|
+
}));
|
|
14184
14185
|
case 3:
|
|
14185
|
-
return _context.abrupt("return", Promise.reject(new Error("Playlist cannot be accessed")));
|
|
14186
|
-
case 4:
|
|
14187
14186
|
case "end":
|
|
14188
14187
|
return _context.stop();
|
|
14189
14188
|
}
|
|
14190
14189
|
}, _callee, this);
|
|
14191
14190
|
}));
|
|
14192
|
-
function
|
|
14193
|
-
return
|
|
14191
|
+
function cancelFullscreen() {
|
|
14192
|
+
return _cancelFullscreen.apply(this, arguments);
|
|
14194
14193
|
}
|
|
14195
|
-
return
|
|
14194
|
+
return cancelFullscreen;
|
|
14196
14195
|
}()
|
|
14197
14196
|
)
|
|
14198
14197
|
/**
|
|
14199
|
-
*
|
|
14200
|
-
* @
|
|
14198
|
+
* Creates an overlay with the specified name and options.
|
|
14199
|
+
* @param {string} name - The name of the overlay.
|
|
14200
|
+
* @param {OverlayOptions} options - The options for the overlay.
|
|
14201
|
+
* @returns A promise that resolves when the overlay is created successfully, or rejects with an error if the overlay cannot be defined at this time.
|
|
14201
14202
|
*/
|
|
14202
|
-
}, {
|
|
14203
|
-
key: "cancelFullscreen",
|
|
14204
|
-
value: function() {
|
|
14205
|
-
var _cancelFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2() {
|
|
14206
|
-
var _this$api46, _this$api46$_impl, _this4 = this;
|
|
14207
|
-
var parent2;
|
|
14208
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
14209
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
14210
|
-
case 0:
|
|
14211
|
-
_classPrivateSetter(_WistiaPlayer_brand, _set_usingFullscreenContainer, this, false);
|
|
14212
|
-
parent2 = this.parentNode;
|
|
14213
|
-
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.widthBeforeFullscreen)) {
|
|
14214
|
-
this.style.width = this._fullscreenState.widthBeforeFullscreen;
|
|
14215
|
-
}
|
|
14216
|
-
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_26__.n9)(this._fullscreenState.heightBeforeFullscreen)) {
|
|
14217
|
-
this.style.height = this._fullscreenState.heightBeforeFullscreen;
|
|
14218
|
-
}
|
|
14219
|
-
return _context2.abrupt("return", (_this$api46 = this.api) === null || _this$api46 === void 0 ? void 0 : (_this$api46$_impl = _this$api46._impl) === null || _this$api46$_impl === void 0 ? void 0 : _this$api46$_impl.cancelFullscreen().then(function() {
|
|
14220
|
-
if (parent2.wistiaFullscreenContainer && !parent2.classList.contains("wistia_embed")) {
|
|
14221
|
-
parent2.replaceWith(_this4);
|
|
14222
|
-
}
|
|
14223
|
-
_this4._fullscreenState.heightBeforeFullscreen = void 0;
|
|
14224
|
-
_this4._fullscreenState.widthBeforeFullscreen = void 0;
|
|
14225
|
-
}));
|
|
14226
|
-
case 5:
|
|
14227
|
-
case "end":
|
|
14228
|
-
return _context2.stop();
|
|
14229
|
-
}
|
|
14230
|
-
}, _callee2, this);
|
|
14231
|
-
}));
|
|
14232
|
-
function cancelFullscreen() {
|
|
14233
|
-
return _cancelFullscreen.apply(this, arguments);
|
|
14234
|
-
}
|
|
14235
|
-
return cancelFullscreen;
|
|
14236
|
-
}()
|
|
14237
14203
|
}, {
|
|
14238
14204
|
key: "createOverlay",
|
|
14239
14205
|
value: function() {
|
|
14240
|
-
var _createOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14206
|
+
var _createOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(name, options) {
|
|
14241
14207
|
var _this$api47, _this$api47$_impl;
|
|
14242
|
-
return _regeneratorRuntime().wrap(function
|
|
14243
|
-
while (1) switch (
|
|
14208
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
14209
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
14244
14210
|
case 0:
|
|
14245
14211
|
if (!((_this$api47 = this.api) !== null && _this$api47 !== void 0 && (_this$api47$_impl = _this$api47._impl) !== null && _this$api47$_impl !== void 0 && _this$api47$_impl.defineOverlay)) {
|
|
14246
|
-
|
|
14212
|
+
_context2.next = 2;
|
|
14247
14213
|
break;
|
|
14248
14214
|
}
|
|
14249
|
-
return
|
|
14215
|
+
return _context2.abrupt("return", this.api._impl.defineOverlay(name, options));
|
|
14250
14216
|
case 2:
|
|
14251
|
-
return
|
|
14217
|
+
return _context2.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be defined at this time"))));
|
|
14252
14218
|
case 3:
|
|
14253
14219
|
case "end":
|
|
14254
|
-
return
|
|
14220
|
+
return _context2.stop();
|
|
14255
14221
|
}
|
|
14256
|
-
},
|
|
14222
|
+
}, _callee2, this);
|
|
14257
14223
|
}));
|
|
14258
|
-
function createOverlay(
|
|
14224
|
+
function createOverlay(_x, _x2) {
|
|
14259
14225
|
return _createOverlay.apply(this, arguments);
|
|
14260
14226
|
}
|
|
14261
14227
|
return createOverlay;
|
|
@@ -14263,38 +14229,38 @@ var init_wistia_player = __esm({
|
|
|
14263
14229
|
}, {
|
|
14264
14230
|
key: "definePlugin",
|
|
14265
14231
|
value: function() {
|
|
14266
|
-
var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14267
|
-
var
|
|
14232
|
+
var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(name, options) {
|
|
14233
|
+
var _this4 = this;
|
|
14268
14234
|
var addPlugin;
|
|
14269
|
-
return _regeneratorRuntime().wrap(function
|
|
14270
|
-
while (1) switch (
|
|
14235
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
14236
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
14271
14237
|
case 0:
|
|
14272
14238
|
addPlugin = /* @__PURE__ */ function() {
|
|
14273
|
-
var _ref13 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14274
|
-
var
|
|
14275
|
-
return _regeneratorRuntime().wrap(function
|
|
14276
|
-
while (1) switch (
|
|
14239
|
+
var _ref13 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee3() {
|
|
14240
|
+
var _this4$api$addPlugin, _this4$api;
|
|
14241
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
14242
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
14277
14243
|
case 0:
|
|
14278
|
-
return
|
|
14244
|
+
return _context3.abrupt("return", (_this4$api$addPlugin = (_this4$api = _this4.api) === null || _this4$api === void 0 ? void 0 : _this4$api.addPlugin(name, options)) !== null && _this4$api$addPlugin !== void 0 ? _this4$api$addPlugin : Promise.reject(new Error("plugin ".concat(name, " cannot be defined"))));
|
|
14279
14245
|
case 1:
|
|
14280
14246
|
case "end":
|
|
14281
|
-
return
|
|
14247
|
+
return _context3.stop();
|
|
14282
14248
|
}
|
|
14283
|
-
},
|
|
14249
|
+
}, _callee3);
|
|
14284
14250
|
}));
|
|
14285
14251
|
return function addPlugin2() {
|
|
14286
14252
|
return _ref13.apply(this, arguments);
|
|
14287
14253
|
};
|
|
14288
14254
|
}();
|
|
14289
14255
|
if (!this.api) {
|
|
14290
|
-
|
|
14256
|
+
_context4.next = 3;
|
|
14291
14257
|
break;
|
|
14292
14258
|
}
|
|
14293
|
-
return
|
|
14259
|
+
return _context4.abrupt("return", addPlugin());
|
|
14294
14260
|
case 3:
|
|
14295
|
-
return
|
|
14261
|
+
return _context4.abrupt("return", new Promise(function(resolve, reject) {
|
|
14296
14262
|
var _handler = function handler() {
|
|
14297
|
-
|
|
14263
|
+
_this4.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _handler);
|
|
14298
14264
|
addPlugin().then(function(plugin) {
|
|
14299
14265
|
return resolve(plugin);
|
|
14300
14266
|
}).catch(function(err) {
|
|
@@ -14305,15 +14271,15 @@ var init_wistia_player = __esm({
|
|
|
14305
14271
|
}
|
|
14306
14272
|
});
|
|
14307
14273
|
};
|
|
14308
|
-
|
|
14274
|
+
_this4.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.c5, _handler);
|
|
14309
14275
|
}));
|
|
14310
14276
|
case 4:
|
|
14311
14277
|
case "end":
|
|
14312
|
-
return
|
|
14278
|
+
return _context4.stop();
|
|
14313
14279
|
}
|
|
14314
|
-
},
|
|
14280
|
+
}, _callee4, this);
|
|
14315
14281
|
}));
|
|
14316
|
-
function definePlugin(
|
|
14282
|
+
function definePlugin(_x3, _x4) {
|
|
14317
14283
|
return _definePlugin.apply(this, arguments);
|
|
14318
14284
|
}
|
|
14319
14285
|
return definePlugin;
|
|
@@ -14321,25 +14287,25 @@ var init_wistia_player = __esm({
|
|
|
14321
14287
|
}, {
|
|
14322
14288
|
key: "deleteOverlay",
|
|
14323
14289
|
value: function() {
|
|
14324
|
-
var _deleteOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14290
|
+
var _deleteOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee5(name) {
|
|
14325
14291
|
var _this$api48, _this$api48$_impl;
|
|
14326
|
-
return _regeneratorRuntime().wrap(function
|
|
14327
|
-
while (1) switch (
|
|
14292
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
14293
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
14328
14294
|
case 0:
|
|
14329
14295
|
if (!((_this$api48 = this.api) !== null && _this$api48 !== void 0 && (_this$api48$_impl = _this$api48._impl) !== null && _this$api48$_impl !== void 0 && _this$api48$_impl.undefineOverlay)) {
|
|
14330
|
-
|
|
14296
|
+
_context5.next = 2;
|
|
14331
14297
|
break;
|
|
14332
14298
|
}
|
|
14333
|
-
return
|
|
14299
|
+
return _context5.abrupt("return", this.api._impl.undefineOverlay(name));
|
|
14334
14300
|
case 2:
|
|
14335
|
-
return
|
|
14301
|
+
return _context5.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be deleted at this time"))));
|
|
14336
14302
|
case 3:
|
|
14337
14303
|
case "end":
|
|
14338
|
-
return
|
|
14304
|
+
return _context5.stop();
|
|
14339
14305
|
}
|
|
14340
|
-
},
|
|
14306
|
+
}, _callee5, this);
|
|
14341
14307
|
}));
|
|
14342
|
-
function deleteOverlay(
|
|
14308
|
+
function deleteOverlay(_x5) {
|
|
14343
14309
|
return _deleteOverlay.apply(this, arguments);
|
|
14344
14310
|
}
|
|
14345
14311
|
return deleteOverlay;
|
|
@@ -14347,25 +14313,25 @@ var init_wistia_player = __esm({
|
|
|
14347
14313
|
}, {
|
|
14348
14314
|
key: "disableControl",
|
|
14349
14315
|
value: function() {
|
|
14350
|
-
var _disableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14316
|
+
var _disableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee6(name) {
|
|
14351
14317
|
var _this$api49, _this$api49$_impl;
|
|
14352
|
-
return _regeneratorRuntime().wrap(function
|
|
14353
|
-
while (1) switch (
|
|
14318
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
14319
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
14354
14320
|
case 0:
|
|
14355
14321
|
if (!((_this$api49 = this.api) !== null && _this$api49 !== void 0 && (_this$api49$_impl = _this$api49._impl) !== null && _this$api49$_impl !== void 0 && _this$api49$_impl.setControlEnabled)) {
|
|
14356
|
-
|
|
14322
|
+
_context6.next = 2;
|
|
14357
14323
|
break;
|
|
14358
14324
|
}
|
|
14359
|
-
return
|
|
14325
|
+
return _context6.abrupt("return", this.api._impl.setControlEnabled(name, false));
|
|
14360
14326
|
case 2:
|
|
14361
|
-
return
|
|
14327
|
+
return _context6.abrupt("return", Promise.reject(new Error('control "'.concat(name, '" cannot be disabled at this time'))));
|
|
14362
14328
|
case 3:
|
|
14363
14329
|
case "end":
|
|
14364
|
-
return
|
|
14330
|
+
return _context6.stop();
|
|
14365
14331
|
}
|
|
14366
|
-
},
|
|
14332
|
+
}, _callee6, this);
|
|
14367
14333
|
}));
|
|
14368
|
-
function disableControl(
|
|
14334
|
+
function disableControl(_x6) {
|
|
14369
14335
|
return _disableControl.apply(this, arguments);
|
|
14370
14336
|
}
|
|
14371
14337
|
return disableControl;
|
|
@@ -14373,25 +14339,25 @@ var init_wistia_player = __esm({
|
|
|
14373
14339
|
}, {
|
|
14374
14340
|
key: "enableControl",
|
|
14375
14341
|
value: function() {
|
|
14376
|
-
var _enableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14342
|
+
var _enableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee7(name) {
|
|
14377
14343
|
var _this$api50, _this$api50$_impl;
|
|
14378
|
-
return _regeneratorRuntime().wrap(function
|
|
14379
|
-
while (1) switch (
|
|
14344
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
14345
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
14380
14346
|
case 0:
|
|
14381
14347
|
if (!((_this$api50 = this.api) !== null && _this$api50 !== void 0 && (_this$api50$_impl = _this$api50._impl) !== null && _this$api50$_impl !== void 0 && _this$api50$_impl.setControlEnabled)) {
|
|
14382
|
-
|
|
14348
|
+
_context7.next = 2;
|
|
14383
14349
|
break;
|
|
14384
14350
|
}
|
|
14385
|
-
return
|
|
14351
|
+
return _context7.abrupt("return", this.api._impl.setControlEnabled(name, true));
|
|
14386
14352
|
case 2:
|
|
14387
|
-
return
|
|
14353
|
+
return _context7.abrupt("return", Promise.reject(new Error('control "'.concat(name, '" cannot be enabled at this time'))));
|
|
14388
14354
|
case 3:
|
|
14389
14355
|
case "end":
|
|
14390
|
-
return
|
|
14356
|
+
return _context7.stop();
|
|
14391
14357
|
}
|
|
14392
|
-
},
|
|
14358
|
+
}, _callee7, this);
|
|
14393
14359
|
}));
|
|
14394
|
-
function enableControl(
|
|
14360
|
+
function enableControl(_x7) {
|
|
14395
14361
|
return _enableControl.apply(this, arguments);
|
|
14396
14362
|
}
|
|
14397
14363
|
return enableControl;
|
|
@@ -14399,24 +14365,24 @@ var init_wistia_player = __esm({
|
|
|
14399
14365
|
}, {
|
|
14400
14366
|
key: "getPlugin",
|
|
14401
14367
|
value: function() {
|
|
14402
|
-
var _getPlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14403
|
-
return _regeneratorRuntime().wrap(function
|
|
14404
|
-
while (1) switch (
|
|
14368
|
+
var _getPlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee8(name) {
|
|
14369
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
14370
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
14405
14371
|
case 0:
|
|
14406
14372
|
if (!this.api) {
|
|
14407
|
-
|
|
14373
|
+
_context8.next = 2;
|
|
14408
14374
|
break;
|
|
14409
14375
|
}
|
|
14410
|
-
return
|
|
14376
|
+
return _context8.abrupt("return", this.api.plugin(name));
|
|
14411
14377
|
case 2:
|
|
14412
|
-
return
|
|
14378
|
+
return _context8.abrupt("return", Promise.reject(new Error("plugin ".concat(name, " is not yet defined"))));
|
|
14413
14379
|
case 3:
|
|
14414
14380
|
case "end":
|
|
14415
|
-
return
|
|
14381
|
+
return _context8.stop();
|
|
14416
14382
|
}
|
|
14417
|
-
},
|
|
14383
|
+
}, _callee8, this);
|
|
14418
14384
|
}));
|
|
14419
|
-
function getPlugin(
|
|
14385
|
+
function getPlugin(_x8) {
|
|
14420
14386
|
return _getPlugin.apply(this, arguments);
|
|
14421
14387
|
}
|
|
14422
14388
|
return getPlugin;
|
|
@@ -14424,25 +14390,25 @@ var init_wistia_player = __esm({
|
|
|
14424
14390
|
}, {
|
|
14425
14391
|
key: "hideOverlay",
|
|
14426
14392
|
value: function() {
|
|
14427
|
-
var _hideOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14393
|
+
var _hideOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee9(name) {
|
|
14428
14394
|
var _this$api51, _this$api51$_impl;
|
|
14429
|
-
return _regeneratorRuntime().wrap(function
|
|
14430
|
-
while (1) switch (
|
|
14395
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
14396
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
14431
14397
|
case 0:
|
|
14432
14398
|
if (!((_this$api51 = this.api) !== null && _this$api51 !== void 0 && (_this$api51$_impl = _this$api51._impl) !== null && _this$api51$_impl !== void 0 && _this$api51$_impl.cancelOverlay)) {
|
|
14433
|
-
|
|
14399
|
+
_context9.next = 2;
|
|
14434
14400
|
break;
|
|
14435
14401
|
}
|
|
14436
|
-
return
|
|
14402
|
+
return _context9.abrupt("return", this.api._impl.cancelOverlay(name));
|
|
14437
14403
|
case 2:
|
|
14438
|
-
return
|
|
14404
|
+
return _context9.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be cancelled at this time"))));
|
|
14439
14405
|
case 3:
|
|
14440
14406
|
case "end":
|
|
14441
|
-
return
|
|
14407
|
+
return _context9.stop();
|
|
14442
14408
|
}
|
|
14443
|
-
},
|
|
14409
|
+
}, _callee9, this);
|
|
14444
14410
|
}));
|
|
14445
|
-
function hideOverlay(
|
|
14411
|
+
function hideOverlay(_x9) {
|
|
14446
14412
|
return _hideOverlay.apply(this, arguments);
|
|
14447
14413
|
}
|
|
14448
14414
|
return hideOverlay;
|
|
@@ -14450,24 +14416,24 @@ var init_wistia_player = __esm({
|
|
|
14450
14416
|
}, {
|
|
14451
14417
|
key: "hidePopover",
|
|
14452
14418
|
value: function() {
|
|
14453
|
-
var _hidePopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14454
|
-
var
|
|
14455
|
-
return _regeneratorRuntime().wrap(function
|
|
14456
|
-
while (1) switch (
|
|
14419
|
+
var _hidePopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee10() {
|
|
14420
|
+
var _this5 = this;
|
|
14421
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
14422
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
14457
14423
|
case 0:
|
|
14458
|
-
return
|
|
14459
|
-
var
|
|
14460
|
-
if ((
|
|
14461
|
-
|
|
14424
|
+
return _context10.abrupt("return", new Promise(function(resolve, reject) {
|
|
14425
|
+
var _this5$api;
|
|
14426
|
+
if ((_this5$api = _this5.api) !== null && _this5$api !== void 0 && _this5$api.popover) {
|
|
14427
|
+
_this5.api.popover.hide();
|
|
14462
14428
|
resolve();
|
|
14463
14429
|
}
|
|
14464
14430
|
reject(new Error("Popover cannot be accessed"));
|
|
14465
14431
|
}));
|
|
14466
14432
|
case 1:
|
|
14467
14433
|
case "end":
|
|
14468
|
-
return
|
|
14434
|
+
return _context10.stop();
|
|
14469
14435
|
}
|
|
14470
|
-
},
|
|
14436
|
+
}, _callee10);
|
|
14471
14437
|
}));
|
|
14472
14438
|
function hidePopover() {
|
|
14473
14439
|
return _hidePopover.apply(this, arguments);
|
|
@@ -14477,17 +14443,17 @@ var init_wistia_player = __esm({
|
|
|
14477
14443
|
}, {
|
|
14478
14444
|
key: "pause",
|
|
14479
14445
|
value: function() {
|
|
14480
|
-
var _pause = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14446
|
+
var _pause = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee11() {
|
|
14481
14447
|
var _this$api52, _this$api52$_impl;
|
|
14482
|
-
return _regeneratorRuntime().wrap(function
|
|
14483
|
-
while (1) switch (
|
|
14448
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
14449
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
14484
14450
|
case 0:
|
|
14485
|
-
return
|
|
14451
|
+
return _context11.abrupt("return", (_this$api52 = this.api) === null || _this$api52 === void 0 ? void 0 : (_this$api52$_impl = _this$api52._impl) === null || _this$api52$_impl === void 0 ? void 0 : _this$api52$_impl.pause());
|
|
14486
14452
|
case 1:
|
|
14487
14453
|
case "end":
|
|
14488
|
-
return
|
|
14454
|
+
return _context11.stop();
|
|
14489
14455
|
}
|
|
14490
|
-
},
|
|
14456
|
+
}, _callee11, this);
|
|
14491
14457
|
}));
|
|
14492
14458
|
function pause() {
|
|
14493
14459
|
return _pause.apply(this, arguments);
|
|
@@ -14497,17 +14463,17 @@ var init_wistia_player = __esm({
|
|
|
14497
14463
|
}, {
|
|
14498
14464
|
key: "play",
|
|
14499
14465
|
value: function() {
|
|
14500
|
-
var _play = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14466
|
+
var _play = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee12() {
|
|
14501
14467
|
var _this$api53, _this$api53$_impl;
|
|
14502
|
-
return _regeneratorRuntime().wrap(function
|
|
14503
|
-
while (1) switch (
|
|
14468
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
14469
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
14504
14470
|
case 0:
|
|
14505
|
-
return
|
|
14471
|
+
return _context12.abrupt("return", (_this$api53 = this.api) === null || _this$api53 === void 0 ? void 0 : (_this$api53$_impl = _this$api53._impl) === null || _this$api53$_impl === void 0 ? void 0 : _this$api53$_impl.play());
|
|
14506
14472
|
case 1:
|
|
14507
14473
|
case "end":
|
|
14508
|
-
return
|
|
14474
|
+
return _context12.stop();
|
|
14509
14475
|
}
|
|
14510
|
-
},
|
|
14476
|
+
}, _callee12, this);
|
|
14511
14477
|
}));
|
|
14512
14478
|
function play() {
|
|
14513
14479
|
return _play.apply(this, arguments);
|
|
@@ -14517,19 +14483,19 @@ var init_wistia_player = __esm({
|
|
|
14517
14483
|
}, {
|
|
14518
14484
|
key: "releaseControls",
|
|
14519
14485
|
value: function() {
|
|
14520
|
-
var _releaseControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14486
|
+
var _releaseControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee13(name) {
|
|
14521
14487
|
var _this$api54, _this$api54$_impl;
|
|
14522
|
-
return _regeneratorRuntime().wrap(function
|
|
14523
|
-
while (1) switch (
|
|
14488
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
14489
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
14524
14490
|
case 0:
|
|
14525
|
-
return
|
|
14491
|
+
return _context13.abrupt("return", (_this$api54 = this.api) === null || _this$api54 === void 0 ? void 0 : (_this$api54$_impl = _this$api54._impl) === null || _this$api54$_impl === void 0 ? void 0 : _this$api54$_impl.releaseControls(name));
|
|
14526
14492
|
case 1:
|
|
14527
14493
|
case "end":
|
|
14528
|
-
return
|
|
14494
|
+
return _context13.stop();
|
|
14529
14495
|
}
|
|
14530
|
-
},
|
|
14496
|
+
}, _callee13, this);
|
|
14531
14497
|
}));
|
|
14532
|
-
function releaseControls(
|
|
14498
|
+
function releaseControls(_x10) {
|
|
14533
14499
|
return _releaseControls.apply(this, arguments);
|
|
14534
14500
|
}
|
|
14535
14501
|
return releaseControls;
|
|
@@ -14537,37 +14503,37 @@ var init_wistia_player = __esm({
|
|
|
14537
14503
|
}, {
|
|
14538
14504
|
key: "replaceWithMedia",
|
|
14539
14505
|
value: function() {
|
|
14540
|
-
var _replaceWithMedia = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14541
|
-
var
|
|
14542
|
-
var options,
|
|
14543
|
-
return _regeneratorRuntime().wrap(function
|
|
14544
|
-
while (1) switch (
|
|
14506
|
+
var _replaceWithMedia = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee14(mediaId) {
|
|
14507
|
+
var _this6 = this;
|
|
14508
|
+
var options, _args14 = arguments;
|
|
14509
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
14510
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
14545
14511
|
case 0:
|
|
14546
|
-
options =
|
|
14547
|
-
return
|
|
14548
|
-
var
|
|
14549
|
-
if (!
|
|
14512
|
+
options = _args14.length > 1 && _args14[1] !== void 0 ? _args14[1] : {};
|
|
14513
|
+
return _context14.abrupt("return", new Promise(function(resolve, reject) {
|
|
14514
|
+
var _this6$api;
|
|
14515
|
+
if (!_this6.api) {
|
|
14550
14516
|
reject(new Error("api not ready to replace"));
|
|
14551
14517
|
}
|
|
14552
14518
|
var _handler2 = function handler() {
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14557
|
-
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(
|
|
14519
|
+
_this6.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.$1, _handler2);
|
|
14520
|
+
_this6.mediaId = mediaId;
|
|
14521
|
+
_this6.uniqueId = _assertClassBrand(_WistiaPlayer_brand, _this6, _generateUniqueId).call(_this6, mediaId);
|
|
14522
|
+
_assertClassBrand(_WistiaPlayer_brand, _this6, _maybeInjectJsonLd).call(_this6);
|
|
14523
|
+
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_8__.gY)("__".concat(_this6.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, _this6).embedOptions);
|
|
14558
14524
|
resolve();
|
|
14559
14525
|
};
|
|
14560
|
-
|
|
14561
|
-
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__.Z)(_classPrivateFieldGet(_jsonLdId,
|
|
14562
|
-
(
|
|
14526
|
+
_this6.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_27__.$1, _handler2);
|
|
14527
|
+
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_21__.Z)(_classPrivateFieldGet(_jsonLdId, _this6));
|
|
14528
|
+
(_this6$api = _this6.api) === null || _this6$api === void 0 ? void 0 : _this6$api.replaceWith(mediaId, options);
|
|
14563
14529
|
}));
|
|
14564
14530
|
case 2:
|
|
14565
14531
|
case "end":
|
|
14566
|
-
return
|
|
14532
|
+
return _context14.stop();
|
|
14567
14533
|
}
|
|
14568
|
-
},
|
|
14534
|
+
}, _callee14);
|
|
14569
14535
|
}));
|
|
14570
|
-
function replaceWithMedia(
|
|
14536
|
+
function replaceWithMedia(_x11) {
|
|
14571
14537
|
return _replaceWithMedia.apply(this, arguments);
|
|
14572
14538
|
}
|
|
14573
14539
|
return replaceWithMedia;
|
|
@@ -14575,19 +14541,19 @@ var init_wistia_player = __esm({
|
|
|
14575
14541
|
}, {
|
|
14576
14542
|
key: "requestControls",
|
|
14577
14543
|
value: function() {
|
|
14578
|
-
var _requestControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14544
|
+
var _requestControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee15(name) {
|
|
14579
14545
|
var _this$api55, _this$api55$_impl;
|
|
14580
|
-
return _regeneratorRuntime().wrap(function
|
|
14581
|
-
while (1) switch (
|
|
14546
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
14547
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
14582
14548
|
case 0:
|
|
14583
|
-
return
|
|
14549
|
+
return _context15.abrupt("return", (_this$api55 = this.api) === null || _this$api55 === void 0 ? void 0 : (_this$api55$_impl = _this$api55._impl) === null || _this$api55$_impl === void 0 ? void 0 : _this$api55$_impl.requestControls(name));
|
|
14584
14550
|
case 1:
|
|
14585
14551
|
case "end":
|
|
14586
|
-
return
|
|
14552
|
+
return _context15.stop();
|
|
14587
14553
|
}
|
|
14588
|
-
},
|
|
14554
|
+
}, _callee15, this);
|
|
14589
14555
|
}));
|
|
14590
|
-
function requestControls(
|
|
14556
|
+
function requestControls(_x12) {
|
|
14591
14557
|
return _requestControls.apply(this, arguments);
|
|
14592
14558
|
}
|
|
14593
14559
|
return requestControls;
|
|
@@ -14595,40 +14561,23 @@ var init_wistia_player = __esm({
|
|
|
14595
14561
|
}, {
|
|
14596
14562
|
key: "requestFullscreen",
|
|
14597
14563
|
value: function() {
|
|
14598
|
-
var _requestFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14599
|
-
var _this$api56, _this$api56$_impl
|
|
14600
|
-
|
|
14601
|
-
|
|
14602
|
-
while (1) switch (_context17.prev = _context17.next) {
|
|
14564
|
+
var _requestFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee16() {
|
|
14565
|
+
var _this$api56, _this$api56$_impl;
|
|
14566
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
14567
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
14603
14568
|
case 0:
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
parent2.wistiaFullscreenContainer = true;
|
|
14608
|
-
_classPrivateSetter(_WistiaPlayer_brand, _set_usingFullscreenContainer, this, true);
|
|
14609
|
-
} else if (this.parentNode && !isMobile) {
|
|
14610
|
-
wrapper = document.createElement("div");
|
|
14611
|
-
wrapper.wistiaFullscreenContainer = true;
|
|
14612
|
-
_classPrivateSetter(_WistiaPlayer_brand, _set_usingFullscreenContainer, this, true);
|
|
14613
|
-
this.parentNode.insertBefore(wrapper, this);
|
|
14614
|
-
wrapper.appendChild(this);
|
|
14569
|
+
if (!((_this$api56 = this.api) !== null && _this$api56 !== void 0 && (_this$api56$_impl = _this$api56._impl) !== null && _this$api56$_impl !== void 0 && _this$api56$_impl.requestFullscreen)) {
|
|
14570
|
+
_context16.next = 2;
|
|
14571
|
+
break;
|
|
14615
14572
|
}
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
return
|
|
14619
|
-
|
|
14620
|
-
_this8.style.width = "100%";
|
|
14621
|
-
_this8.style.height = "100%";
|
|
14622
|
-
if ((_this8$api = _this8.api) !== null && _this8$api !== void 0 && _this8$api.chrome) {
|
|
14623
|
-
_this8.api.chrome.style.height = "100%";
|
|
14624
|
-
_this8.api.chrome.style.width = "100%";
|
|
14625
|
-
}
|
|
14626
|
-
}));
|
|
14627
|
-
case 5:
|
|
14573
|
+
return _context16.abrupt("return", this.api._impl.requestFullscreen());
|
|
14574
|
+
case 2:
|
|
14575
|
+
return _context16.abrupt("return", Promise.reject(new Error("Fullscreen cannot be accessed")));
|
|
14576
|
+
case 3:
|
|
14628
14577
|
case "end":
|
|
14629
|
-
return
|
|
14578
|
+
return _context16.stop();
|
|
14630
14579
|
}
|
|
14631
|
-
},
|
|
14580
|
+
}, _callee16, this);
|
|
14632
14581
|
}));
|
|
14633
14582
|
function requestFullscreen() {
|
|
14634
14583
|
return _requestFullscreen.apply(this, arguments);
|
|
@@ -14638,25 +14587,25 @@ var init_wistia_player = __esm({
|
|
|
14638
14587
|
}, {
|
|
14639
14588
|
key: "showOverlay",
|
|
14640
14589
|
value: function() {
|
|
14641
|
-
var _showOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14590
|
+
var _showOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee17(name) {
|
|
14642
14591
|
var _this$api57, _this$api57$_impl;
|
|
14643
|
-
return _regeneratorRuntime().wrap(function
|
|
14644
|
-
while (1) switch (
|
|
14592
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
14593
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
14645
14594
|
case 0:
|
|
14646
14595
|
if (!((_this$api57 = this.api) !== null && _this$api57 !== void 0 && (_this$api57$_impl = _this$api57._impl) !== null && _this$api57$_impl !== void 0 && _this$api57$_impl.requestOverlay)) {
|
|
14647
|
-
|
|
14596
|
+
_context17.next = 2;
|
|
14648
14597
|
break;
|
|
14649
14598
|
}
|
|
14650
|
-
return
|
|
14599
|
+
return _context17.abrupt("return", this.api._impl.requestOverlay(name));
|
|
14651
14600
|
case 2:
|
|
14652
|
-
return
|
|
14601
|
+
return _context17.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be requested at this time"))));
|
|
14653
14602
|
case 3:
|
|
14654
14603
|
case "end":
|
|
14655
|
-
return
|
|
14604
|
+
return _context17.stop();
|
|
14656
14605
|
}
|
|
14657
|
-
},
|
|
14606
|
+
}, _callee17, this);
|
|
14658
14607
|
}));
|
|
14659
|
-
function showOverlay(
|
|
14608
|
+
function showOverlay(_x13) {
|
|
14660
14609
|
return _showOverlay.apply(this, arguments);
|
|
14661
14610
|
}
|
|
14662
14611
|
return showOverlay;
|
|
@@ -14664,24 +14613,24 @@ var init_wistia_player = __esm({
|
|
|
14664
14613
|
}, {
|
|
14665
14614
|
key: "showPopover",
|
|
14666
14615
|
value: function() {
|
|
14667
|
-
var _showPopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14668
|
-
var
|
|
14669
|
-
return _regeneratorRuntime().wrap(function
|
|
14670
|
-
while (1) switch (
|
|
14616
|
+
var _showPopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee18() {
|
|
14617
|
+
var _this7 = this;
|
|
14618
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
14619
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
14671
14620
|
case 0:
|
|
14672
|
-
return
|
|
14673
|
-
var
|
|
14674
|
-
if ((
|
|
14675
|
-
|
|
14621
|
+
return _context18.abrupt("return", new Promise(function(resolve, reject) {
|
|
14622
|
+
var _this7$api;
|
|
14623
|
+
if ((_this7$api = _this7.api) !== null && _this7$api !== void 0 && _this7$api.popover) {
|
|
14624
|
+
_this7.api.popover.show();
|
|
14676
14625
|
resolve();
|
|
14677
14626
|
}
|
|
14678
14627
|
reject(new Error("Popover cannot be accessed"));
|
|
14679
14628
|
}));
|
|
14680
14629
|
case 1:
|
|
14681
14630
|
case "end":
|
|
14682
|
-
return
|
|
14631
|
+
return _context18.stop();
|
|
14683
14632
|
}
|
|
14684
|
-
},
|
|
14633
|
+
}, _callee18);
|
|
14685
14634
|
}));
|
|
14686
14635
|
function showPopover() {
|
|
14687
14636
|
return _showPopover.apply(this, arguments);
|
|
@@ -14716,7 +14665,7 @@ var init_wistia_player = __esm({
|
|
|
14716
14665
|
}, {
|
|
14717
14666
|
key: "connectedCallback",
|
|
14718
14667
|
value: function connectedCallback() {
|
|
14719
|
-
var _window$wistiaOptions,
|
|
14668
|
+
var _window$wistiaOptions, _this8 = this, _this$embedHost;
|
|
14720
14669
|
if (_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
|
|
14721
14670
|
return;
|
|
14722
14671
|
}
|
|
@@ -14737,20 +14686,21 @@ var init_wistia_player = __esm({
|
|
|
14737
14686
|
_classPrivateFieldGet(_logger, this).info("initialize embed");
|
|
14738
14687
|
(0, _utilities_wistiaQueue_ts__WEBPACK_IMPORTED_MODULE_19__.z)();
|
|
14739
14688
|
this.uniqueId = _assertClassBrand(_WistiaPlayer_brand, this, _generateUniqueId).call(this, mediaId);
|
|
14689
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _maybeSetupEmbedOptionsFromIframe).call(this);
|
|
14740
14690
|
_assertClassBrand(_WistiaPlayer_brand, this, _runMethodsFromAttributes).call(this);
|
|
14741
14691
|
_assertClassBrand(_WistiaPlayer_brand, this, _saveInitialAttributesFromDomOptions).call(this);
|
|
14742
14692
|
var resizeCallback = function resizeCallback2() {
|
|
14743
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14693
|
+
_assertClassBrand(_WistiaPlayer_brand, _this8, _renderPreloadThumbnail).call(_this8);
|
|
14744
14694
|
};
|
|
14745
14695
|
_classPrivateFieldSet(_resizeObserver, this, new ResizeObserver(resizeCallback));
|
|
14746
14696
|
_classPrivateFieldGet(_resizeObserver, this).observe(this);
|
|
14747
14697
|
(0, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_22__.n)(mediaId, {
|
|
14748
14698
|
embedHost: (_this$embedHost = this.embedHost) !== null && _this$embedHost !== void 0 ? _this$embedHost : ""
|
|
14749
14699
|
}).then(function(mediaData) {
|
|
14750
|
-
_classPrivateFieldGet(_playerData,
|
|
14751
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
14752
|
-
container:
|
|
14753
|
-
mediaData: _classPrivateFieldGet(_playerData,
|
|
14700
|
+
_classPrivateFieldGet(_playerData, _this8).setMediaDataSource(mediaData);
|
|
14701
|
+
_assertClassBrand(_WistiaPlayer_brand, _this8, _initPlayerEmbed).call(_this8, {
|
|
14702
|
+
container: _this8.uniqueId,
|
|
14703
|
+
mediaData: _classPrivateFieldGet(_playerData, _this8).mediaData
|
|
14754
14704
|
});
|
|
14755
14705
|
}).catch(function(error) {
|
|
14756
14706
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_14__.WO)("player/failure/init-failed");
|
|
@@ -14796,50 +14746,50 @@ var init_wistia_player = __esm({
|
|
|
14796
14746
|
}(/* @__PURE__ */ _wrapNativeSuper(HTMLElement));
|
|
14797
14747
|
_WistiaPlayer = WistiaPlayer;
|
|
14798
14748
|
getSwatchMetaData2 = /* @__PURE__ */ function() {
|
|
14799
|
-
var _ref15 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14749
|
+
var _ref15 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee19(url) {
|
|
14800
14750
|
var swatch;
|
|
14801
|
-
return _regeneratorRuntime().wrap(function
|
|
14802
|
-
while (1) switch (
|
|
14751
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
14752
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
14803
14753
|
case 0:
|
|
14804
14754
|
swatch = new Image();
|
|
14805
14755
|
swatch.src = url;
|
|
14806
|
-
|
|
14756
|
+
_context19.next = 4;
|
|
14807
14757
|
return swatch.decode();
|
|
14808
14758
|
case 4:
|
|
14809
|
-
return
|
|
14759
|
+
return _context19.abrupt("return", swatch);
|
|
14810
14760
|
case 5:
|
|
14811
14761
|
case "end":
|
|
14812
|
-
return
|
|
14762
|
+
return _context19.stop();
|
|
14813
14763
|
}
|
|
14814
|
-
},
|
|
14764
|
+
}, _callee19);
|
|
14815
14765
|
}));
|
|
14816
|
-
return function getSwatchMetaData3(
|
|
14766
|
+
return function getSwatchMetaData3(_x14) {
|
|
14817
14767
|
return _ref15.apply(this, arguments);
|
|
14818
14768
|
};
|
|
14819
14769
|
}();
|
|
14820
14770
|
wistiaSwatchElement = /* @__PURE__ */ function() {
|
|
14821
|
-
var _ref16 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
14771
|
+
var _ref16 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee20(mediaId, embedHost) {
|
|
14822
14772
|
var swatchUrl2, swatchImg, naturalHeight, naturalWidth, ratio, style;
|
|
14823
|
-
return _regeneratorRuntime().wrap(function
|
|
14824
|
-
while (1) switch (
|
|
14773
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
14774
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
14825
14775
|
case 0:
|
|
14826
14776
|
swatchUrl2 = getSwatchUrl(mediaId, embedHost);
|
|
14827
|
-
|
|
14777
|
+
_context20.next = 3;
|
|
14828
14778
|
return getSwatchMetaData2(swatchUrl2);
|
|
14829
14779
|
case 3:
|
|
14830
|
-
swatchImg =
|
|
14780
|
+
swatchImg = _context20.sent;
|
|
14831
14781
|
naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
|
|
14832
14782
|
ratio = naturalHeight / naturalWidth * 100;
|
|
14833
14783
|
style = document.createElement("style");
|
|
14834
14784
|
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 ");
|
|
14835
|
-
return
|
|
14785
|
+
return _context20.abrupt("return", style);
|
|
14836
14786
|
case 9:
|
|
14837
14787
|
case "end":
|
|
14838
|
-
return
|
|
14788
|
+
return _context20.stop();
|
|
14839
14789
|
}
|
|
14840
|
-
},
|
|
14790
|
+
}, _callee20);
|
|
14841
14791
|
}));
|
|
14842
|
-
return function wistiaSwatchElement2(
|
|
14792
|
+
return function wistiaSwatchElement2(_x15, _x16) {
|
|
14843
14793
|
return _ref16.apply(this, arguments);
|
|
14844
14794
|
};
|
|
14845
14795
|
}();
|