@wistia/wistia-player-react 0.1.0 → 0.1.2
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.
|
@@ -596,6 +596,7 @@ function _defaultLocalization() {
|
|
|
596
596
|
genericNativeName: "English",
|
|
597
597
|
hashedId: this.mediaId,
|
|
598
598
|
ietfLanguageTag: "eng",
|
|
599
|
+
isLocalization: true,
|
|
599
600
|
iso6392LanguageCode: "eng",
|
|
600
601
|
name: "English",
|
|
601
602
|
nativeName: "English",
|
|
@@ -607,11 +608,11 @@ function _deferMediaDataFetchingToCarouselEmbed() {
|
|
|
607
608
|
return !!document.querySelector('wistia-carousel[player-dom-id="'.concat(this.id, '"]:not([is-inside-playlist-embed="true"][channel-id])'));
|
|
608
609
|
}
|
|
609
610
|
function _findLocalizationByLanguage(language) {
|
|
610
|
-
var
|
|
611
|
+
var _classPrivateFieldGet111;
|
|
611
612
|
if (language == null) {
|
|
612
613
|
return void 0;
|
|
613
614
|
}
|
|
614
|
-
return (
|
|
615
|
+
return (_classPrivateFieldGet111 = _classPrivateFieldGet(_playerData, this).mediaData.localizations) === null || _classPrivateFieldGet111 === void 0 ? void 0 : _classPrivateFieldGet111.find(function(localization) {
|
|
615
616
|
return localization.ietfLanguageTag === language || localization.iso6392LanguageCode === language;
|
|
616
617
|
});
|
|
617
618
|
}
|
|
@@ -620,11 +621,11 @@ function _generateUniqueId(mediaId) {
|
|
|
620
621
|
return (0, _utilities_seqid_js__WEBPACK_IMPORTED_MODULE_15__.h)(prefix);
|
|
621
622
|
}
|
|
622
623
|
function _getSyncedEmbedOption(key) {
|
|
623
|
-
var
|
|
624
|
+
var _ref20, _ref21;
|
|
624
625
|
if (_classPrivateFieldGet(_impl, this) && key in _classPrivateFieldGet(_impl, this)._attrs) {
|
|
625
626
|
return _classPrivateFieldGet(_impl, this)._attrs[key];
|
|
626
627
|
}
|
|
627
|
-
return (
|
|
628
|
+
return (_ref20 = (_ref21 = this.embedOptions[key]) !== null && _ref21 !== void 0 ? _ref21 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.$)(key))) !== null && _ref20 !== void 0 ? _ref20 : defaultEmbedOptions[key];
|
|
628
629
|
}
|
|
629
630
|
function _getValueFromAttribute(name) {
|
|
630
631
|
if (!this.hasAttribute(name)) {
|
|
@@ -642,8 +643,8 @@ function _getValueFromAttribute(name) {
|
|
|
642
643
|
return this.getAttribute(name);
|
|
643
644
|
}
|
|
644
645
|
}
|
|
645
|
-
function _initPlayerEmbed(
|
|
646
|
-
var container =
|
|
646
|
+
function _initPlayerEmbed(_ref22) {
|
|
647
|
+
var container = _ref22.container, mediaData = _ref22.mediaData;
|
|
647
648
|
if (!_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
|
|
648
649
|
return;
|
|
649
650
|
}
|
|
@@ -656,8 +657,8 @@ function _initPlayerEmbed(_ref23) {
|
|
|
656
657
|
_assertClassBrand(_WistiaPlayer_brand, this, _maybeInjectJsonLd).call(this);
|
|
657
658
|
}
|
|
658
659
|
if ("attachInternals" in HTMLElement.prototype && "states" in ElementInternals.prototype) {
|
|
659
|
-
var
|
|
660
|
-
(
|
|
660
|
+
var _classPrivateFieldGet112;
|
|
661
|
+
(_classPrivateFieldGet112 = _classPrivateFieldGet(_internals, this)) === null || _classPrivateFieldGet112 === void 0 ? void 0 : _classPrivateFieldGet112.states.delete("--initializing");
|
|
661
662
|
}
|
|
662
663
|
void _assertClassBrand(_WistiaPlayer_brand, this, _initPublicApi).call(this, this.mediaId, {
|
|
663
664
|
container,
|
|
@@ -668,71 +669,71 @@ function _initPublicApi(_x23, _x24) {
|
|
|
668
669
|
return _initPublicApi2.apply(this, arguments);
|
|
669
670
|
}
|
|
670
671
|
function _initPublicApi2() {
|
|
671
|
-
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
672
|
-
var
|
|
672
|
+
_initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, options) {
|
|
673
|
+
var _this21 = this;
|
|
673
674
|
var embeddedCallback;
|
|
674
|
-
return _regeneratorRuntime().wrap(function
|
|
675
|
-
while (1) switch (
|
|
675
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
676
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
676
677
|
case 0:
|
|
677
|
-
|
|
678
|
+
_context28.next = 2;
|
|
678
679
|
return _classPrivateFieldGet(_publicApiScript, this);
|
|
679
680
|
case 2:
|
|
680
681
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.PublicApi) {
|
|
681
|
-
|
|
682
|
+
_context28.next = 5;
|
|
682
683
|
break;
|
|
683
684
|
}
|
|
684
685
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__.WO)("player/failure/init-failed");
|
|
685
686
|
throw new Error("Wistia.PublicApi is not defined");
|
|
686
687
|
case 5:
|
|
687
688
|
embeddedCallback = function embeddedCallback2() {
|
|
688
|
-
var
|
|
689
|
-
void _assertClassBrand(_WistiaPlayer_brand,
|
|
690
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
691
|
-
(
|
|
692
|
-
_classPrivateFieldSet(_resizeObserver,
|
|
693
|
-
if (_classPrivateFieldGet(_playPending,
|
|
694
|
-
void
|
|
689
|
+
var _classPrivateFieldGet119;
|
|
690
|
+
void _assertClassBrand(_WistiaPlayer_brand, _this21, _maybeInitializeMux).call(_this21);
|
|
691
|
+
_assertClassBrand(_WistiaPlayer_brand, _this21, _renderEmbedTemplate).call(_this21);
|
|
692
|
+
(_classPrivateFieldGet119 = _classPrivateFieldGet(_resizeObserver, _this21)) === null || _classPrivateFieldGet119 === void 0 ? void 0 : _classPrivateFieldGet119.disconnect();
|
|
693
|
+
_classPrivateFieldSet(_resizeObserver, _this21, null);
|
|
694
|
+
if (_classPrivateFieldGet(_playPending, _this21)) {
|
|
695
|
+
void _this21.play();
|
|
695
696
|
}
|
|
696
697
|
};
|
|
697
698
|
this.addEventListener("embedded", embeddedCallback);
|
|
698
699
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
699
|
-
|
|
700
|
+
_this21.removeEventListener("embedded", embeddedCallback);
|
|
700
701
|
});
|
|
701
702
|
_classPrivateFieldSet(_api, this, new _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.PublicApi(mediaId, options));
|
|
702
703
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, this));
|
|
703
704
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, this));
|
|
704
705
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
705
|
-
|
|
706
|
-
|
|
706
|
+
_this21.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, _this21));
|
|
707
|
+
_this21.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, _this21));
|
|
707
708
|
});
|
|
708
709
|
_classPrivateFieldGet(_api, this).ready(function() {
|
|
709
|
-
var
|
|
710
|
-
(
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
var _classPrivateFieldGet120;
|
|
711
|
+
(_classPrivateFieldGet120 = _classPrivateFieldGet(_preloadThumbnailRoot, _this21)) === null || _classPrivateFieldGet120 === void 0 ? void 0 : _classPrivateFieldGet120.remove();
|
|
712
|
+
_this21.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, _this21));
|
|
713
|
+
_this21.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, {
|
|
713
714
|
detail: {
|
|
714
715
|
mediaId
|
|
715
716
|
}
|
|
716
717
|
}));
|
|
717
|
-
|
|
718
|
+
_this21.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
|
|
718
719
|
detail: {
|
|
719
720
|
mediaId,
|
|
720
|
-
api: _classPrivateFieldGet(_api,
|
|
721
|
+
api: _classPrivateFieldGet(_api, _this21)
|
|
721
722
|
}
|
|
722
723
|
}));
|
|
723
|
-
if (_classPrivateFieldGet(_impl,
|
|
724
|
-
Object.entries(_classPrivateFieldGet(_impl,
|
|
725
|
-
var
|
|
726
|
-
_classPrivateFieldGet(_playerData,
|
|
724
|
+
if (_classPrivateFieldGet(_impl, _this21)) {
|
|
725
|
+
Object.entries(_classPrivateFieldGet(_impl, _this21)._attrs).forEach(function(_ref28) {
|
|
726
|
+
var _ref29 = _slicedToArray(_ref28, 2), key = _ref29[0], value = _ref29[1];
|
|
727
|
+
_classPrivateFieldGet(_playerData, _this21).updateEmbedOptionOverrides(_defineProperty({}, key, value));
|
|
727
728
|
});
|
|
728
729
|
}
|
|
729
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
730
|
+
_assertClassBrand(_WistiaPlayer_brand, _this21, _renderPreloadThumbnail).call(_this21);
|
|
730
731
|
});
|
|
731
732
|
case 13:
|
|
732
733
|
case "end":
|
|
733
|
-
return
|
|
734
|
+
return _context28.stop();
|
|
734
735
|
}
|
|
735
|
-
},
|
|
736
|
+
}, _callee28, this);
|
|
736
737
|
}));
|
|
737
738
|
return _initPublicApi2.apply(this, arguments);
|
|
738
739
|
}
|
|
@@ -743,44 +744,44 @@ function _maybeInitializeMux() {
|
|
|
743
744
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
744
745
|
}
|
|
745
746
|
function _maybeInitializeMux2() {
|
|
746
|
-
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
747
|
-
var
|
|
747
|
+
_maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee29() {
|
|
748
|
+
var _this22 = this;
|
|
748
749
|
var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
|
|
749
|
-
return _regeneratorRuntime().wrap(function
|
|
750
|
-
while (1) switch (
|
|
750
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
751
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
751
752
|
case 0:
|
|
752
753
|
if (_classPrivateFieldGet(_api, this)) {
|
|
753
|
-
|
|
754
|
+
_context29.next = 2;
|
|
754
755
|
break;
|
|
755
756
|
}
|
|
756
|
-
return
|
|
757
|
+
return _context29.abrupt("return");
|
|
757
758
|
case 2:
|
|
758
759
|
shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_33__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_34__._);
|
|
759
760
|
shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_34__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_17__.D5)();
|
|
760
761
|
embedType = this.useWebComponent ? "translated-web-component" : "web-component";
|
|
761
762
|
if (!shouldEnableMuxForPlayer) {
|
|
762
|
-
|
|
763
|
+
_context29.next = 11;
|
|
763
764
|
break;
|
|
764
765
|
}
|
|
765
|
-
|
|
766
|
+
_context29.next = 8;
|
|
766
767
|
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__.$)("assets/external/wistia-mux.js");
|
|
767
768
|
case 8:
|
|
768
|
-
mux =
|
|
769
|
+
mux = _context29.sent;
|
|
769
770
|
mux.init(_classPrivateFieldGet(_api, this), {
|
|
770
771
|
embedType
|
|
771
772
|
});
|
|
772
773
|
this.addEventListener("visitor-tracking-change", function(event) {
|
|
773
774
|
var isTrackingEnabled = event.detail.isTrackingEnabled;
|
|
774
775
|
if (!isTrackingEnabled) {
|
|
775
|
-
var
|
|
776
|
-
(
|
|
776
|
+
var _classPrivateFieldGet122, _classPrivateFieldGet123;
|
|
777
|
+
(_classPrivateFieldGet122 = _classPrivateFieldGet(_api, _this22)) === null || _classPrivateFieldGet122 === void 0 ? void 0 : (_classPrivateFieldGet123 = _classPrivateFieldGet122.mux) === null || _classPrivateFieldGet123 === void 0 ? void 0 : _classPrivateFieldGet123.destroy();
|
|
777
778
|
}
|
|
778
779
|
});
|
|
779
780
|
case 11:
|
|
780
781
|
case "end":
|
|
781
|
-
return
|
|
782
|
+
return _context29.stop();
|
|
782
783
|
}
|
|
783
|
-
},
|
|
784
|
+
}, _callee29, this);
|
|
784
785
|
}));
|
|
785
786
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
786
787
|
}
|
|
@@ -806,7 +807,7 @@ function _maybeSetupEmbedOptionsFromIframe() {
|
|
|
806
807
|
_classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeEmbedOptions);
|
|
807
808
|
}
|
|
808
809
|
function _renderEmbedTemplate() {
|
|
809
|
-
var _this$embedHost2,
|
|
810
|
+
var _this$embedHost2, _this15 = this;
|
|
810
811
|
if (!_classPrivateFieldGet(_preactRoot, this)) {
|
|
811
812
|
return;
|
|
812
813
|
}
|
|
@@ -856,8 +857,8 @@ function _renderEmbedTemplate() {
|
|
|
856
857
|
alt: "",
|
|
857
858
|
"aria-hidden": "true"
|
|
858
859
|
})))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
859
|
-
ref: function ref(
|
|
860
|
-
_classPrivateFieldSet(_preloadThumbnailRoot,
|
|
860
|
+
ref: function ref(_ref23) {
|
|
861
|
+
_classPrivateFieldSet(_preloadThumbnailRoot, _this15, _ref23);
|
|
861
862
|
}
|
|
862
863
|
})), _classPrivateFieldGet(_preactRoot, this));
|
|
863
864
|
}
|
|
@@ -866,8 +867,8 @@ function _renderPreloadThumbnail() {
|
|
|
866
867
|
if (!_classPrivateFieldGet(_preloadThumbnailRoot, this)) {
|
|
867
868
|
return;
|
|
868
869
|
}
|
|
869
|
-
var
|
|
870
|
-
var
|
|
870
|
+
var _classPrivateFieldGet113 = _classPrivateFieldGet(_playerData, this).mediaData, assets = _classPrivateFieldGet113.assets, mediaType = _classPrivateFieldGet113.mediaType, carouselHardWall = _classPrivateFieldGet113.carouselHardWall;
|
|
871
|
+
var _classPrivateFieldGet114 = _classPrivateFieldGet(_playerData, this).embedOptions, autoPlay = _classPrivateFieldGet114.autoPlay, plugin = _classPrivateFieldGet114.plugin;
|
|
871
872
|
if (carouselHardWall) {
|
|
872
873
|
return;
|
|
873
874
|
}
|
|
@@ -889,18 +890,18 @@ function _renderPreloadThumbnail() {
|
|
|
889
890
|
})), _classPrivateFieldGet(_preloadThumbnailRoot, this));
|
|
890
891
|
}
|
|
891
892
|
function _runMethodsFromAttributes() {
|
|
892
|
-
var
|
|
893
|
+
var _this16 = this;
|
|
893
894
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
|
|
894
895
|
this.whenApiReady().then(function() {
|
|
895
|
-
var
|
|
896
|
-
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand,
|
|
897
|
-
var isClosedPopover = (
|
|
896
|
+
var _ref24, _classPrivateFieldGet115, _classPrivateFieldGet116;
|
|
897
|
+
var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this16, _getValueFromAttribute).call(_this16, "current-time"));
|
|
898
|
+
var isClosedPopover = (_ref24 = ((_classPrivateFieldGet115 = _classPrivateFieldGet(_api, _this16)) === null || _classPrivateFieldGet115 === void 0 ? void 0 : _classPrivateFieldGet115.popover) && !_classPrivateFieldGet(_api, _this16).popover.isVisible()) !== null && _ref24 !== void 0 ? _ref24 : false;
|
|
898
899
|
var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_7__.GS)();
|
|
899
|
-
var shouldDelayUntilPlay =
|
|
900
|
-
void ((
|
|
900
|
+
var shouldDelayUntilPlay = _this16.state !== "playing" && (isMobile || isClosedPopover);
|
|
901
|
+
void ((_classPrivateFieldGet116 = _classPrivateFieldGet(_impl, _this16)) === null || _classPrivateFieldGet116 === void 0 ? void 0 : _classPrivateFieldGet116.time(newTime, {
|
|
901
902
|
lazy: shouldDelayUntilPlay
|
|
902
903
|
}));
|
|
903
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
904
|
+
_assertClassBrand(_WistiaPlayer_brand, _this16, _setSyncedEmbedOption).call(_this16, "currentTime", newTime);
|
|
904
905
|
}).catch(function(_error) {
|
|
905
906
|
});
|
|
906
907
|
}
|
|
@@ -909,35 +910,35 @@ function _runMethodsFromAttributes() {
|
|
|
909
910
|
}
|
|
910
911
|
if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "video-quality") !== null) {
|
|
911
912
|
this.whenApiReady().then(function() {
|
|
912
|
-
var
|
|
913
|
-
var newQuality = _assertClassBrand(_WistiaPlayer_brand,
|
|
914
|
-
(
|
|
915
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
913
|
+
var _classPrivateFieldGet117;
|
|
914
|
+
var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this16, _getValueFromAttribute).call(_this16, "video-quality");
|
|
915
|
+
(_classPrivateFieldGet117 = _classPrivateFieldGet(_impl, _this16)) === null || _classPrivateFieldGet117 === void 0 ? void 0 : _classPrivateFieldGet117.setVideoQuality(newQuality);
|
|
916
|
+
_assertClassBrand(_WistiaPlayer_brand, _this16, _setSyncedEmbedOption).call(_this16, "videoQuality", newQuality);
|
|
916
917
|
}).catch(function(_error) {
|
|
917
918
|
});
|
|
918
919
|
}
|
|
919
920
|
}
|
|
920
921
|
function _saveInitialAttributesFromDomOptions() {
|
|
921
|
-
var
|
|
922
|
-
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(
|
|
923
|
-
var
|
|
924
|
-
return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand,
|
|
922
|
+
var _this17 = this;
|
|
923
|
+
var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref25) {
|
|
924
|
+
var _ref26 = _slicedToArray(_ref25, 2), value = _ref26[1];
|
|
925
|
+
return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this17, _getValueFromAttribute).call(_this17, value.name)];
|
|
925
926
|
}));
|
|
926
927
|
_classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
|
|
927
928
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_9__.gY)("__".concat(this.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, this).embedOptions);
|
|
928
929
|
}
|
|
929
930
|
function _setMultipleSyncedEmbedOptions(options) {
|
|
930
|
-
var
|
|
931
|
+
var _this18 = this;
|
|
931
932
|
Object.entries(options).forEach(function(entry) {
|
|
932
933
|
var _Object$getOwnPropert;
|
|
933
934
|
var _entry = _slicedToArray(entry, 2), key = _entry[0], value = _entry[1];
|
|
934
935
|
if (value == null) {
|
|
935
936
|
return;
|
|
936
937
|
}
|
|
937
|
-
if ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(
|
|
938
|
-
|
|
938
|
+
if ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(_this18), key)) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert.set) {
|
|
939
|
+
_this18[key] = value;
|
|
939
940
|
} else {
|
|
940
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
941
|
+
_assertClassBrand(_WistiaPlayer_brand, _this18, _setSyncedEmbedOption).call(_this18, key, value);
|
|
941
942
|
}
|
|
942
943
|
});
|
|
943
944
|
}
|
|
@@ -950,20 +951,20 @@ function _setSyncedEmbedOption(key, value) {
|
|
|
950
951
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
951
952
|
}
|
|
952
953
|
function _setupEventListeners() {
|
|
953
|
-
var
|
|
954
|
+
var _this19 = this;
|
|
954
955
|
var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
|
|
955
|
-
var
|
|
956
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
956
|
+
var _ref27 = event.detail, mediaData = _ref27.mediaData;
|
|
957
|
+
_assertClassBrand(_WistiaPlayer_brand, _this19, _updateMediaData).call(_this19, mediaData);
|
|
957
958
|
};
|
|
958
959
|
var implCreatedCallback = function implCreatedCallback2(event) {
|
|
959
|
-
_classPrivateFieldSet(_impl,
|
|
960
|
+
_classPrivateFieldSet(_impl, _this19, event.detail.impl);
|
|
960
961
|
};
|
|
961
962
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
|
|
962
963
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
|
|
963
964
|
_classPrivateFieldGet(_removeEventListeners, this).push(function() {
|
|
964
|
-
|
|
965
|
+
_this19.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
|
|
965
966
|
}, function() {
|
|
966
|
-
|
|
967
|
+
_this19.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
|
|
967
968
|
});
|
|
968
969
|
this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), {
|
|
969
970
|
once: true
|
|
@@ -973,9 +974,9 @@ function _shouldDisplaySwatch() {
|
|
|
973
974
|
return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
|
|
974
975
|
}
|
|
975
976
|
function _updateEmail(email) {
|
|
976
|
-
var
|
|
977
|
+
var _this20 = this;
|
|
977
978
|
(0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_19__.$B)(function(localStorage2) {
|
|
978
|
-
localStorage2[_classPrivateGetter(_WistiaPlayer_brand,
|
|
979
|
+
localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this20, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this20, _get_pageUrl)]), {}, {
|
|
979
980
|
trackEmail: email
|
|
980
981
|
});
|
|
981
982
|
});
|
|
@@ -4186,6 +4187,7 @@ var init_wistia_player = __esm({
|
|
|
4186
4187
|
var BEFORE_REPLACE_EVENT = "before-replace";
|
|
4187
4188
|
var BETWEENTIMES_EVENT_EV1 = "betweentimes";
|
|
4188
4189
|
var CROSSTIME_EVENT_EV1 = "crosstime";
|
|
4190
|
+
var EMBED_OPTIONS_CHANGED_EVENT = "embed-options-changed";
|
|
4189
4191
|
var IMPL_CREATED_EVENT = "impl-created";
|
|
4190
4192
|
var INIT_EMBED_EVENT = "initembed";
|
|
4191
4193
|
var INPUT_CONTEXT_CHANGE_EVENT = "input-context-change";
|
|
@@ -6250,7 +6252,28 @@ var init_wistia_player = __esm({
|
|
|
6250
6252
|
var getAlpha2Code = function getAlpha2Code2(iso6392Code) {
|
|
6251
6253
|
return iso6392Code.split("-")[0];
|
|
6252
6254
|
};
|
|
6255
|
+
var getStack = function getStack2() {
|
|
6256
|
+
var _err$stack;
|
|
6257
|
+
var err = new Error();
|
|
6258
|
+
return (_err$stack = err.stack) === null || _err$stack === void 0 ? void 0 : _err$stack.split("\n").slice(2).join("\n");
|
|
6259
|
+
};
|
|
6253
6260
|
var getPreferredAvailableLanguageIndex = function getPreferredAvailableLanguageIndex2(availableLanguages, preferredLanguages) {
|
|
6261
|
+
if (availableLanguages.some(function(lang) {
|
|
6262
|
+
return typeof lang !== "string";
|
|
6263
|
+
})) {
|
|
6264
|
+
console.error("availableLanguages has non-string values", availableLanguages, getStack());
|
|
6265
|
+
availableLanguages = availableLanguages.filter(function(lang) {
|
|
6266
|
+
return typeof lang === "string";
|
|
6267
|
+
});
|
|
6268
|
+
}
|
|
6269
|
+
if (preferredLanguages.some(function(lang) {
|
|
6270
|
+
return typeof lang !== "string";
|
|
6271
|
+
})) {
|
|
6272
|
+
console.error("preferredLanguages has non-string values", preferredLanguages, getStack());
|
|
6273
|
+
preferredLanguages = preferredLanguages.filter(function(lang) {
|
|
6274
|
+
return typeof lang === "string";
|
|
6275
|
+
});
|
|
6276
|
+
}
|
|
6254
6277
|
var exactMatch = preferredLanguages.find(function(preferred) {
|
|
6255
6278
|
return availableLanguages.includes(preferred);
|
|
6256
6279
|
});
|
|
@@ -6440,10 +6463,41 @@ var init_wistia_player = __esm({
|
|
|
6440
6463
|
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s._translationPromises) {
|
|
6441
6464
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s._translationPromises = {};
|
|
6442
6465
|
}
|
|
6443
|
-
var supportedLanguages =
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6466
|
+
var supportedLanguages = ["ar", "de", "es", "en-US", "fr", "it", "ja", "ko", "pt", "ru", "zh-CN"];
|
|
6467
|
+
var ietfLanguageTagToCode = {
|
|
6468
|
+
ara: "ar",
|
|
6469
|
+
ger: "de",
|
|
6470
|
+
spa: "es",
|
|
6471
|
+
eng: "en-US",
|
|
6472
|
+
fre: "fr",
|
|
6473
|
+
ita: "it",
|
|
6474
|
+
jpn: "ja",
|
|
6475
|
+
kor: "ko",
|
|
6476
|
+
por: "pt",
|
|
6477
|
+
rus: "ru",
|
|
6478
|
+
chi: "zh-CN"
|
|
6479
|
+
};
|
|
6480
|
+
var normalizeLanguageCode = function normalizeLanguageCode2(code) {
|
|
6481
|
+
if (code == null) {
|
|
6482
|
+
return "en-US";
|
|
6483
|
+
}
|
|
6484
|
+
code = ietfLanguageTagToCode[code] || code;
|
|
6485
|
+
if (!supportedLanguages.includes(code)) {
|
|
6486
|
+
var match = matchingLanguages(function() {
|
|
6487
|
+
return [code];
|
|
6488
|
+
})[0];
|
|
6489
|
+
if (match) {
|
|
6490
|
+
code = match;
|
|
6491
|
+
}
|
|
6492
|
+
}
|
|
6493
|
+
if (code === "en" || /^en-/.test(code)) {
|
|
6494
|
+
code = "en-US";
|
|
6495
|
+
}
|
|
6496
|
+
if (code === "zh" || /^zh-/.test(code)) {
|
|
6497
|
+
code = "zh-CN";
|
|
6498
|
+
}
|
|
6499
|
+
return code;
|
|
6500
|
+
};
|
|
6447
6501
|
var defineLanguage = function defineLanguage2(code, text, translations2) {
|
|
6448
6502
|
languages[code] = {
|
|
6449
6503
|
code,
|
|
@@ -6454,7 +6508,10 @@ var init_wistia_player = __esm({
|
|
|
6454
6508
|
}
|
|
6455
6509
|
};
|
|
6456
6510
|
var getLanguage = function getLanguage2(code) {
|
|
6457
|
-
return languages[code];
|
|
6511
|
+
return languages[normalizeLanguageCode(code)];
|
|
6512
|
+
};
|
|
6513
|
+
var isSupportedPlayerLanguage = function isSupportedPlayerLanguage2(code) {
|
|
6514
|
+
return supportedLanguages.includes(normalizeLanguageCode(code));
|
|
6458
6515
|
};
|
|
6459
6516
|
var defineTranslations = function defineTranslations2(code, keyValPairs) {
|
|
6460
6517
|
if (languages[code] == null) {
|
|
@@ -6487,6 +6544,7 @@ var init_wistia_player = __esm({
|
|
|
6487
6544
|
return dummyTextArea.value;
|
|
6488
6545
|
};
|
|
6489
6546
|
var getTranslation = function getTranslation2(code, key) {
|
|
6547
|
+
code = normalizeLanguageCode(code);
|
|
6490
6548
|
var text;
|
|
6491
6549
|
if (translations[code] && translations[code][key]) {
|
|
6492
6550
|
text = translations[code][key];
|
|
@@ -6497,16 +6555,27 @@ var init_wistia_player = __esm({
|
|
|
6497
6555
|
};
|
|
6498
6556
|
var getLanguagePreference = function getLanguagePreference2() {
|
|
6499
6557
|
if (navigator.languages || navigator.language) {
|
|
6500
|
-
|
|
6558
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s.languagePreference = navigator.languages || [navigator.language];
|
|
6501
6559
|
} else {
|
|
6502
|
-
|
|
6560
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s.languagePreference = ["en-US"];
|
|
6503
6561
|
}
|
|
6504
|
-
return
|
|
6562
|
+
return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s.languagePreference;
|
|
6505
6563
|
};
|
|
6564
|
+
var defaultPromise = Promise.resolve({
|
|
6565
|
+
code: "en-US",
|
|
6566
|
+
translations: translations["en-US"]
|
|
6567
|
+
});
|
|
6506
6568
|
var loadAndDefineTranslation = function loadAndDefineTranslation2(code) {
|
|
6569
|
+
code = normalizeLanguageCode(code);
|
|
6570
|
+
if (!supportedLanguages.includes(code)) {
|
|
6571
|
+
return defaultPromise;
|
|
6572
|
+
}
|
|
6507
6573
|
if (Wistia._translationPromises[code]) {
|
|
6508
6574
|
return Wistia._translationPromises[code];
|
|
6509
6575
|
}
|
|
6576
|
+
if (code === "en-US") {
|
|
6577
|
+
return defaultPromise;
|
|
6578
|
+
}
|
|
6510
6579
|
var result = new Promise(function(resolve, reject) {
|
|
6511
6580
|
dynamicImport(["assets/external/translations/".concat(code, ".js")]).then(function(moduleClass) {
|
|
6512
6581
|
var languageCode = moduleClass.languageCode, languageLabel = moduleClass.languageLabel, translations2 = moduleClass.translations;
|
|
@@ -8693,7 +8762,7 @@ var init_wistia_player = __esm({
|
|
|
8693
8762
|
var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
8694
8763
|
var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
8695
8764
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
8696
|
-
var TAGGED_VERSION2 = "0.1.
|
|
8765
|
+
var TAGGED_VERSION2 = "0.1.2";
|
|
8697
8766
|
var CURRENT_SHA2 = (
|
|
8698
8767
|
/* unused pure expression or super */
|
|
8699
8768
|
null
|
|
@@ -14380,6 +14449,32 @@ var init_wistia_player = __esm({
|
|
|
14380
14449
|
var _classPrivateFieldGet8, _classPrivateFieldGet9;
|
|
14381
14450
|
return (_classPrivateFieldGet8 = (_classPrivateFieldGet9 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet9 === void 0 ? void 0 : _classPrivateFieldGet9.getStandardBuffered()) !== null && _classPrivateFieldGet8 !== void 0 ? _classPrivateFieldGet8 : {};
|
|
14382
14451
|
}
|
|
14452
|
+
}, {
|
|
14453
|
+
key: "captionsEnabled",
|
|
14454
|
+
get: function get() {
|
|
14455
|
+
var _classPrivateFieldGet10, _classPrivateFieldGet11;
|
|
14456
|
+
return (_classPrivateFieldGet10 = (_classPrivateFieldGet11 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet11 === void 0 ? void 0 : _classPrivateFieldGet11.captionsEnabled()) !== null && _classPrivateFieldGet10 !== void 0 ? _classPrivateFieldGet10 : false;
|
|
14457
|
+
},
|
|
14458
|
+
set: function set(enabled) {
|
|
14459
|
+
var _classPrivateFieldGet12;
|
|
14460
|
+
(_classPrivateFieldGet12 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet12 === void 0 ? void 0 : _classPrivateFieldGet12.captionsEnabled(enabled);
|
|
14461
|
+
}
|
|
14462
|
+
}, {
|
|
14463
|
+
key: "captionsLanguage",
|
|
14464
|
+
get: function get() {
|
|
14465
|
+
var _classPrivateFieldGet13, _classPrivateFieldGet14;
|
|
14466
|
+
return (_classPrivateFieldGet13 = (_classPrivateFieldGet14 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet14 === void 0 ? void 0 : _classPrivateFieldGet14.captionsLanguage()) !== null && _classPrivateFieldGet13 !== void 0 ? _classPrivateFieldGet13 : _assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this);
|
|
14467
|
+
},
|
|
14468
|
+
set: function set(language) {
|
|
14469
|
+
var _classPrivateFieldGet15;
|
|
14470
|
+
(_classPrivateFieldGet15 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet15 === void 0 ? void 0 : _classPrivateFieldGet15.captionsLanguage(language);
|
|
14471
|
+
}
|
|
14472
|
+
}, {
|
|
14473
|
+
key: "captionsLanguages",
|
|
14474
|
+
get: function get() {
|
|
14475
|
+
var _classPrivateFieldGet16, _classPrivateFieldGet17;
|
|
14476
|
+
return (_classPrivateFieldGet16 = (_classPrivateFieldGet17 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet17 === void 0 ? void 0 : _classPrivateFieldGet17.captionsLanguages()) !== null && _classPrivateFieldGet16 !== void 0 ? _classPrivateFieldGet16 : [_assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this)];
|
|
14477
|
+
}
|
|
14383
14478
|
/**
|
|
14384
14479
|
* Returns the border radius of the control bar.
|
|
14385
14480
|
* @returns {number}
|
|
@@ -14390,8 +14485,8 @@ var init_wistia_player = __esm({
|
|
|
14390
14485
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "controlBarBorderRadius");
|
|
14391
14486
|
},
|
|
14392
14487
|
set: function set(radius) {
|
|
14393
|
-
var
|
|
14394
|
-
(
|
|
14488
|
+
var _classPrivateFieldGet18;
|
|
14489
|
+
(_classPrivateFieldGet18 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet18 === void 0 ? void 0 : _classPrivateFieldGet18.setControlBarBorderRadius(Number(radius));
|
|
14395
14490
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "controlBarBorderRadius", radius);
|
|
14396
14491
|
}
|
|
14397
14492
|
/**
|
|
@@ -14417,8 +14512,8 @@ var init_wistia_player = __esm({
|
|
|
14417
14512
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "controlsVisibleOnLoad");
|
|
14418
14513
|
},
|
|
14419
14514
|
set: function set(shouldHide) {
|
|
14420
|
-
var
|
|
14421
|
-
(
|
|
14515
|
+
var _classPrivateFieldGet19;
|
|
14516
|
+
(_classPrivateFieldGet19 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet19 === void 0 ? void 0 : _classPrivateFieldGet19.renderUI();
|
|
14422
14517
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "controlsVisibleOnLoad", shouldHide);
|
|
14423
14518
|
}
|
|
14424
14519
|
/**
|
|
@@ -14449,12 +14544,12 @@ var init_wistia_player = __esm({
|
|
|
14449
14544
|
}, {
|
|
14450
14545
|
key: "currentTime",
|
|
14451
14546
|
get: function get() {
|
|
14452
|
-
var _ref3, _ref4,
|
|
14453
|
-
return (_ref3 = (_ref4 = (
|
|
14547
|
+
var _ref3, _ref4, _classPrivateFieldGet20;
|
|
14548
|
+
return (_ref3 = (_ref4 = (_classPrivateFieldGet20 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet20 === void 0 ? void 0 : _classPrivateFieldGet20.time()) !== null && _ref4 !== void 0 ? _ref4 : this.embedOptions.currentTime) !== null && _ref3 !== void 0 ? _ref3 : 0;
|
|
14454
14549
|
},
|
|
14455
14550
|
set: function set(newTime) {
|
|
14456
|
-
var
|
|
14457
|
-
void ((
|
|
14551
|
+
var _classPrivateFieldGet21;
|
|
14552
|
+
void ((_classPrivateFieldGet21 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet21 === void 0 ? void 0 : _classPrivateFieldGet21.time(newTime));
|
|
14458
14553
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "currentTime", newTime);
|
|
14459
14554
|
}
|
|
14460
14555
|
/**
|
|
@@ -14463,10 +14558,10 @@ var init_wistia_player = __esm({
|
|
|
14463
14558
|
}, {
|
|
14464
14559
|
key: "debug",
|
|
14465
14560
|
get: function get() {
|
|
14466
|
-
var
|
|
14561
|
+
var _classPrivateFieldGet22;
|
|
14467
14562
|
return {
|
|
14468
14563
|
impl: _classPrivateFieldGet(_impl, this),
|
|
14469
|
-
engine: (
|
|
14564
|
+
engine: (_classPrivateFieldGet22 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet22 === void 0 ? void 0 : _classPrivateFieldGet22.engine
|
|
14470
14565
|
};
|
|
14471
14566
|
}
|
|
14472
14567
|
/**
|
|
@@ -14499,8 +14594,8 @@ var init_wistia_player = __esm({
|
|
|
14499
14594
|
}, {
|
|
14500
14595
|
key: "duration",
|
|
14501
14596
|
get: function get() {
|
|
14502
|
-
var
|
|
14503
|
-
return (
|
|
14597
|
+
var _classPrivateFieldGet23, _classPrivateFieldGet24;
|
|
14598
|
+
return (_classPrivateFieldGet23 = (_classPrivateFieldGet24 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet24 === void 0 ? void 0 : _classPrivateFieldGet24.duration()) !== null && _classPrivateFieldGet23 !== void 0 ? _classPrivateFieldGet23 : 0;
|
|
14504
14599
|
}
|
|
14505
14600
|
/**
|
|
14506
14601
|
* Returns the email associated with this viewing session.
|
|
@@ -14550,8 +14645,8 @@ var init_wistia_player = __esm({
|
|
|
14550
14645
|
}, {
|
|
14551
14646
|
key: "ended",
|
|
14552
14647
|
get: function get() {
|
|
14553
|
-
var
|
|
14554
|
-
return ((
|
|
14648
|
+
var _classPrivateFieldGet25;
|
|
14649
|
+
return ((_classPrivateFieldGet25 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet25 === void 0 ? void 0 : _classPrivateFieldGet25.state()) === "ended";
|
|
14555
14650
|
}
|
|
14556
14651
|
/**
|
|
14557
14652
|
* Returns the current end video behavior value
|
|
@@ -14564,11 +14659,11 @@ var init_wistia_player = __esm({
|
|
|
14564
14659
|
},
|
|
14565
14660
|
set: function set(behavior) {
|
|
14566
14661
|
if (behavior === "loop") {
|
|
14567
|
-
var
|
|
14568
|
-
(
|
|
14662
|
+
var _classPrivateFieldGet26;
|
|
14663
|
+
(_classPrivateFieldGet26 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet26 === void 0 ? void 0 : _classPrivateFieldGet26.addLoopBehavior();
|
|
14569
14664
|
} else {
|
|
14570
|
-
var
|
|
14571
|
-
(
|
|
14665
|
+
var _classPrivateFieldGet27;
|
|
14666
|
+
(_classPrivateFieldGet27 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet27 === void 0 ? void 0 : _classPrivateFieldGet27.removeLoopBehavior();
|
|
14572
14667
|
}
|
|
14573
14668
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "endVideoBehavior", behavior);
|
|
14574
14669
|
}
|
|
@@ -14579,8 +14674,8 @@ var init_wistia_player = __esm({
|
|
|
14579
14674
|
}, {
|
|
14580
14675
|
key: "eventKey",
|
|
14581
14676
|
get: function get() {
|
|
14582
|
-
var
|
|
14583
|
-
return (
|
|
14677
|
+
var _classPrivateFieldGet28;
|
|
14678
|
+
return (_classPrivateFieldGet28 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet28 === void 0 ? void 0 : _classPrivateFieldGet28.eventKey();
|
|
14584
14679
|
}
|
|
14585
14680
|
/**
|
|
14586
14681
|
* Returns if the fullscreen button control will appear in the control bar.
|
|
@@ -14592,8 +14687,8 @@ var init_wistia_player = __esm({
|
|
|
14592
14687
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "fullscreenControl");
|
|
14593
14688
|
},
|
|
14594
14689
|
set: function set(shouldDisplay) {
|
|
14595
|
-
var
|
|
14596
|
-
(
|
|
14690
|
+
var _classPrivateFieldGet29;
|
|
14691
|
+
(_classPrivateFieldGet29 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet29 === void 0 ? void 0 : _classPrivateFieldGet29.fullscreenControlEnabled(shouldDisplay);
|
|
14597
14692
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "fullscreenControl", shouldDisplay);
|
|
14598
14693
|
}
|
|
14599
14694
|
/**
|
|
@@ -14616,14 +14711,14 @@ var init_wistia_player = __esm({
|
|
|
14616
14711
|
}, {
|
|
14617
14712
|
key: "inFullscreen",
|
|
14618
14713
|
get: function get() {
|
|
14619
|
-
var
|
|
14620
|
-
return (
|
|
14714
|
+
var _classPrivateFieldGet30, _classPrivateFieldGet31;
|
|
14715
|
+
return (_classPrivateFieldGet30 = (_classPrivateFieldGet31 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet31 === void 0 ? void 0 : _classPrivateFieldGet31.inFullscreen()) !== null && _classPrivateFieldGet30 !== void 0 ? _classPrivateFieldGet30 : false;
|
|
14621
14716
|
}
|
|
14622
14717
|
}, {
|
|
14623
14718
|
key: "inputContext",
|
|
14624
14719
|
get: function get() {
|
|
14625
|
-
var
|
|
14626
|
-
return (
|
|
14720
|
+
var _classPrivateFieldGet32;
|
|
14721
|
+
return (_classPrivateFieldGet32 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet32 === void 0 ? void 0 : _classPrivateFieldGet32.getInputContext();
|
|
14627
14722
|
}
|
|
14628
14723
|
/**
|
|
14629
14724
|
* Returns whether instantHLS is enabled for the video.
|
|
@@ -14632,73 +14727,24 @@ var init_wistia_player = __esm({
|
|
|
14632
14727
|
}, {
|
|
14633
14728
|
key: "instantHls",
|
|
14634
14729
|
get: function get() {
|
|
14635
|
-
var
|
|
14636
|
-
return (
|
|
14730
|
+
var _classPrivateFieldGet33, _classPrivateFieldGet34;
|
|
14731
|
+
return (_classPrivateFieldGet33 = (_classPrivateFieldGet34 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet34 === void 0 ? void 0 : _classPrivateFieldGet34.isInstantHls()) !== null && _classPrivateFieldGet33 !== void 0 ? _classPrivateFieldGet33 : false;
|
|
14637
14732
|
}
|
|
14638
14733
|
}, {
|
|
14639
14734
|
key: "language",
|
|
14640
14735
|
get: function get() {
|
|
14641
|
-
var
|
|
14642
|
-
|
|
14643
|
-
return _assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this);
|
|
14644
|
-
}
|
|
14645
|
-
return (_assertClassBrand$cal = _assertClassBrand(_WistiaPlayer_brand, this, _findLocalizationByLanguage).call(this, _classPrivateFieldGet(_playerData, this).mediaData.ietfLanguageTag)) !== null && _assertClassBrand$cal !== void 0 ? _assertClassBrand$cal : _assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this);
|
|
14736
|
+
var _classPrivateFieldGet35, _classPrivateFieldGet36;
|
|
14737
|
+
return (_classPrivateFieldGet35 = (_classPrivateFieldGet36 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet36 === void 0 ? void 0 : _classPrivateFieldGet36.language()) !== null && _classPrivateFieldGet35 !== void 0 ? _classPrivateFieldGet35 : _assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this);
|
|
14646
14738
|
},
|
|
14647
14739
|
set: function set(language) {
|
|
14648
|
-
var
|
|
14649
|
-
|
|
14650
|
-
if (localization == null) {
|
|
14651
|
-
console.error("Language ".concat(language, " not found. Available languages for ").concat(this.mediaId, ": ").concat(JSON.stringify(this.languages.map(function(loc) {
|
|
14652
|
-
return loc.iso6392LanguageCode;
|
|
14653
|
-
}))));
|
|
14654
|
-
return;
|
|
14655
|
-
}
|
|
14656
|
-
var replaceOptions = {
|
|
14657
|
-
language: localization.iso6392LanguageCode,
|
|
14658
|
-
existingTracker: (_classPrivateFieldGet27 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet27 === void 0 ? void 0 : _classPrivateFieldGet27._tracker
|
|
14659
|
-
};
|
|
14660
|
-
var doReplace = /* @__PURE__ */ function() {
|
|
14661
|
-
var _ref7 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
14662
|
-
var _this3$language$ietfL, _this3$language;
|
|
14663
|
-
var remapTime, wasPlaying, wasBeforePlay, time;
|
|
14664
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14665
|
-
while (1) switch (_context.prev = _context.next) {
|
|
14666
|
-
case 0:
|
|
14667
|
-
_context.next = 2;
|
|
14668
|
-
return _this3.getRemapTime();
|
|
14669
|
-
case 2:
|
|
14670
|
-
remapTime = _context.sent;
|
|
14671
|
-
wasPlaying = _this3.state === "playing";
|
|
14672
|
-
wasBeforePlay = _this3.state === "beforeplay";
|
|
14673
|
-
time = remapTime((_this3$language$ietfL = (_this3$language = _this3.language) === null || _this3$language === void 0 ? void 0 : _this3$language.ietfLanguageTag) !== null && _this3$language$ietfL !== void 0 ? _this3$language$ietfL : "", localization.ietfLanguageTag, _this3.currentTime);
|
|
14674
|
-
if (!wasBeforePlay) {
|
|
14675
|
-
replaceOptions.time = time;
|
|
14676
|
-
}
|
|
14677
|
-
if (wasPlaying) {
|
|
14678
|
-
replaceOptions.autoPlay = true;
|
|
14679
|
-
}
|
|
14680
|
-
void _this3.replaceWithMedia(localization.hashedId, replaceOptions);
|
|
14681
|
-
case 9:
|
|
14682
|
-
case "end":
|
|
14683
|
-
return _context.stop();
|
|
14684
|
-
}
|
|
14685
|
-
}, _callee);
|
|
14686
|
-
}));
|
|
14687
|
-
return function doReplace2() {
|
|
14688
|
-
return _ref7.apply(this, arguments);
|
|
14689
|
-
};
|
|
14690
|
-
}();
|
|
14691
|
-
void doReplace();
|
|
14740
|
+
var _classPrivateFieldGet37;
|
|
14741
|
+
(_classPrivateFieldGet37 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet37 === void 0 ? void 0 : _classPrivateFieldGet37.language(language);
|
|
14692
14742
|
}
|
|
14693
14743
|
}, {
|
|
14694
14744
|
key: "languages",
|
|
14695
14745
|
get: function get() {
|
|
14696
|
-
var
|
|
14697
|
-
|
|
14698
|
-
if (result.length === 0) {
|
|
14699
|
-
result.push(_assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this));
|
|
14700
|
-
}
|
|
14701
|
-
return result;
|
|
14746
|
+
var _classPrivateFieldGet38, _classPrivateFieldGet39;
|
|
14747
|
+
return (_classPrivateFieldGet38 = (_classPrivateFieldGet39 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet39 === void 0 ? void 0 : _classPrivateFieldGet39.languages()) !== null && _classPrivateFieldGet38 !== void 0 ? _classPrivateFieldGet38 : [_assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this)];
|
|
14702
14748
|
}
|
|
14703
14749
|
/**
|
|
14704
14750
|
* Returns all the mediaData set on the WistiaPlayer
|
|
@@ -14727,6 +14773,30 @@ var init_wistia_player = __esm({
|
|
|
14727
14773
|
_classPrivateFieldGet(_logger, this).info("set mediaId", newMediaId);
|
|
14728
14774
|
this.setAttribute("media-id", newMediaId);
|
|
14729
14775
|
}
|
|
14776
|
+
/**
|
|
14777
|
+
* Returns the language of the media stream.
|
|
14778
|
+
* @returns {Localization | undefined}
|
|
14779
|
+
*/
|
|
14780
|
+
}, {
|
|
14781
|
+
key: "mediaLanguage",
|
|
14782
|
+
get: function get() {
|
|
14783
|
+
var _classPrivateFieldGet40, _classPrivateFieldGet41;
|
|
14784
|
+
return (_classPrivateFieldGet40 = (_classPrivateFieldGet41 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet41 === void 0 ? void 0 : _classPrivateFieldGet41.mediaLanguage()) !== null && _classPrivateFieldGet40 !== void 0 ? _classPrivateFieldGet40 : _assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this);
|
|
14785
|
+
},
|
|
14786
|
+
set: function set(language) {
|
|
14787
|
+
var _classPrivateFieldGet42;
|
|
14788
|
+
(_classPrivateFieldGet42 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet42 === void 0 ? void 0 : _classPrivateFieldGet42.mediaLanguage(language);
|
|
14789
|
+
}
|
|
14790
|
+
/**
|
|
14791
|
+
* Returns the languages of the media.
|
|
14792
|
+
* @returns {Localization[]}
|
|
14793
|
+
*/
|
|
14794
|
+
}, {
|
|
14795
|
+
key: "mediaLanguages",
|
|
14796
|
+
get: function get() {
|
|
14797
|
+
var _classPrivateFieldGet43, _classPrivateFieldGet44;
|
|
14798
|
+
return (_classPrivateFieldGet43 = (_classPrivateFieldGet44 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet44 === void 0 ? void 0 : _classPrivateFieldGet44.mediaLanguages()) !== null && _classPrivateFieldGet43 !== void 0 ? _classPrivateFieldGet43 : [_assertClassBrand(_WistiaPlayer_brand, this, _defaultLocalization).call(this)];
|
|
14799
|
+
}
|
|
14730
14800
|
/**
|
|
14731
14801
|
* Returns if player is currently muted
|
|
14732
14802
|
* @returns {boolean}
|
|
@@ -14734,8 +14804,8 @@ var init_wistia_player = __esm({
|
|
|
14734
14804
|
}, {
|
|
14735
14805
|
key: "muted",
|
|
14736
14806
|
get: function get() {
|
|
14737
|
-
var
|
|
14738
|
-
return (
|
|
14807
|
+
var _ref7, _classPrivateFieldGet45, _classPrivateFieldGet46;
|
|
14808
|
+
return (_ref7 = (_classPrivateFieldGet45 = (_classPrivateFieldGet46 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet46 === void 0 ? void 0 : _classPrivateFieldGet46.isMuted()) !== null && _classPrivateFieldGet45 !== void 0 ? _classPrivateFieldGet45 : this.embedOptions.muted) !== null && _ref7 !== void 0 ? _ref7 : false;
|
|
14739
14809
|
},
|
|
14740
14810
|
set: function set(shouldMute) {
|
|
14741
14811
|
if (_classPrivateFieldGet(_impl, this)) {
|
|
@@ -14755,8 +14825,8 @@ var init_wistia_player = __esm({
|
|
|
14755
14825
|
}, {
|
|
14756
14826
|
key: "name",
|
|
14757
14827
|
get: function get() {
|
|
14758
|
-
var
|
|
14759
|
-
return (
|
|
14828
|
+
var _ref8, _classPrivateFieldGet47, _classPrivateFieldGet48, _classPrivateFieldGet49;
|
|
14829
|
+
return (_ref8 = (_classPrivateFieldGet47 = _classPrivateFieldGet(_playerData, this).mediaData.name) !== null && _classPrivateFieldGet47 !== void 0 ? _classPrivateFieldGet47 : (_classPrivateFieldGet48 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet48 === void 0 ? void 0 : (_classPrivateFieldGet49 = _classPrivateFieldGet48._mediaData) === null || _classPrivateFieldGet49 === void 0 ? void 0 : _classPrivateFieldGet49.name) !== null && _ref8 !== void 0 ? _ref8 : void 0;
|
|
14760
14830
|
}
|
|
14761
14831
|
}, {
|
|
14762
14832
|
key: "paddingTop",
|
|
@@ -14773,8 +14843,8 @@ var init_wistia_player = __esm({
|
|
|
14773
14843
|
}, {
|
|
14774
14844
|
key: "paused",
|
|
14775
14845
|
get: function get() {
|
|
14776
|
-
var
|
|
14777
|
-
return ((
|
|
14846
|
+
var _classPrivateFieldGet50;
|
|
14847
|
+
return ((_classPrivateFieldGet50 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet50 === void 0 ? void 0 : _classPrivateFieldGet50.state()) === "paused";
|
|
14778
14848
|
}
|
|
14779
14849
|
/**
|
|
14780
14850
|
* Returns the percent of the video that has been watched as a decimal between 0 and 1.
|
|
@@ -14783,8 +14853,8 @@ var init_wistia_player = __esm({
|
|
|
14783
14853
|
}, {
|
|
14784
14854
|
key: "percentWatched",
|
|
14785
14855
|
get: function get() {
|
|
14786
|
-
var
|
|
14787
|
-
return (
|
|
14856
|
+
var _classPrivateFieldGet51, _classPrivateFieldGet52;
|
|
14857
|
+
return (_classPrivateFieldGet51 = (_classPrivateFieldGet52 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet52 === void 0 ? void 0 : _classPrivateFieldGet52.percentWatched()) !== null && _classPrivateFieldGet51 !== void 0 ? _classPrivateFieldGet51 : 0;
|
|
14788
14858
|
}
|
|
14789
14859
|
/**
|
|
14790
14860
|
* Returns the playback rate of the video.
|
|
@@ -14793,12 +14863,12 @@ var init_wistia_player = __esm({
|
|
|
14793
14863
|
}, {
|
|
14794
14864
|
key: "playbackRate",
|
|
14795
14865
|
get: function get() {
|
|
14796
|
-
var
|
|
14797
|
-
return (
|
|
14866
|
+
var _ref9, _classPrivateFieldGet53, _classPrivateFieldGet54;
|
|
14867
|
+
return (_ref9 = (_classPrivateFieldGet53 = (_classPrivateFieldGet54 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet54 === void 0 ? void 0 : _classPrivateFieldGet54.playbackRate()) !== null && _classPrivateFieldGet53 !== void 0 ? _classPrivateFieldGet53 : this.embedOptions.playbackRate) !== null && _ref9 !== void 0 ? _ref9 : 1;
|
|
14798
14868
|
},
|
|
14799
14869
|
set: function set(rate) {
|
|
14800
|
-
var
|
|
14801
|
-
(
|
|
14870
|
+
var _classPrivateFieldGet55;
|
|
14871
|
+
(_classPrivateFieldGet55 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet55 === void 0 ? void 0 : _classPrivateFieldGet55.playbackRate(rate);
|
|
14802
14872
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playbackRate", rate);
|
|
14803
14873
|
}
|
|
14804
14874
|
/**
|
|
@@ -14811,8 +14881,8 @@ var init_wistia_player = __esm({
|
|
|
14811
14881
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playbackRateControl");
|
|
14812
14882
|
},
|
|
14813
14883
|
set: function set(shouldDisplay) {
|
|
14814
|
-
var
|
|
14815
|
-
(
|
|
14884
|
+
var _classPrivateFieldGet56;
|
|
14885
|
+
(_classPrivateFieldGet56 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet56 === void 0 ? void 0 : _classPrivateFieldGet56.playbackRateControlEnabled(shouldDisplay);
|
|
14816
14886
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playbackRateControl", shouldDisplay);
|
|
14817
14887
|
}
|
|
14818
14888
|
/**
|
|
@@ -14825,8 +14895,8 @@ var init_wistia_player = __esm({
|
|
|
14825
14895
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playBarControl");
|
|
14826
14896
|
},
|
|
14827
14897
|
set: function set(shouldDisplay) {
|
|
14828
|
-
var
|
|
14829
|
-
(
|
|
14898
|
+
var _classPrivateFieldGet57;
|
|
14899
|
+
(_classPrivateFieldGet57 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet57 === void 0 ? void 0 : _classPrivateFieldGet57.playbarControlEnabled(shouldDisplay);
|
|
14830
14900
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playBarControl", shouldDisplay);
|
|
14831
14901
|
}
|
|
14832
14902
|
/**
|
|
@@ -14839,8 +14909,8 @@ var init_wistia_player = __esm({
|
|
|
14839
14909
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playerBorderRadius");
|
|
14840
14910
|
},
|
|
14841
14911
|
set: function set(radius) {
|
|
14842
|
-
var
|
|
14843
|
-
(
|
|
14912
|
+
var _classPrivateFieldGet58;
|
|
14913
|
+
(_classPrivateFieldGet58 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet58 === void 0 ? void 0 : _classPrivateFieldGet58.setPlayerBorderRadius(Number(radius));
|
|
14844
14914
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playerBorderRadius", radius);
|
|
14845
14915
|
}
|
|
14846
14916
|
/**
|
|
@@ -14858,8 +14928,8 @@ var init_wistia_player = __esm({
|
|
|
14858
14928
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playerColor");
|
|
14859
14929
|
},
|
|
14860
14930
|
set: function set(newColor) {
|
|
14861
|
-
var
|
|
14862
|
-
(
|
|
14931
|
+
var _classPrivateFieldGet59;
|
|
14932
|
+
(_classPrivateFieldGet59 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet59 === void 0 ? void 0 : _classPrivateFieldGet59.playerColor(newColor);
|
|
14863
14933
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playerColor", newColor);
|
|
14864
14934
|
}
|
|
14865
14935
|
/**
|
|
@@ -14872,11 +14942,11 @@ var init_wistia_player = __esm({
|
|
|
14872
14942
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playerColorGradient");
|
|
14873
14943
|
},
|
|
14874
14944
|
set: function set(gradient) {
|
|
14875
|
-
var
|
|
14945
|
+
var _classPrivateFieldGet60;
|
|
14876
14946
|
if (!(0, _types_gradient_ts__WEBPACK_IMPORTED_MODULE_28__.b)(gradient)) {
|
|
14877
14947
|
throw new Error("playerColorGradient must be a valid gradient object");
|
|
14878
14948
|
}
|
|
14879
|
-
(
|
|
14949
|
+
(_classPrivateFieldGet60 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet60 === void 0 ? void 0 : _classPrivateFieldGet60.playerColorGradient(gradient);
|
|
14880
14950
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playerColorGradient", gradient);
|
|
14881
14951
|
}
|
|
14882
14952
|
/**
|
|
@@ -14887,8 +14957,8 @@ var init_wistia_player = __esm({
|
|
|
14887
14957
|
}, {
|
|
14888
14958
|
key: "playerForce",
|
|
14889
14959
|
get: function get() {
|
|
14890
|
-
var
|
|
14891
|
-
return (
|
|
14960
|
+
var _ref10;
|
|
14961
|
+
return (_ref10 = this.getAttribute("player-force")) !== null && _ref10 !== void 0 ? _ref10 : void 0;
|
|
14892
14962
|
},
|
|
14893
14963
|
set: function set(newPlayer) {
|
|
14894
14964
|
_classPrivateFieldGet(_logger, this).info("set playerForce", newPlayer);
|
|
@@ -14932,8 +15002,8 @@ var init_wistia_player = __esm({
|
|
|
14932
15002
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playPauseControl");
|
|
14933
15003
|
},
|
|
14934
15004
|
set: function set(shouldDisplay) {
|
|
14935
|
-
var
|
|
14936
|
-
(
|
|
15005
|
+
var _classPrivateFieldGet61;
|
|
15006
|
+
(_classPrivateFieldGet61 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet61 === void 0 ? void 0 : _classPrivateFieldGet61.playPauseControlEnabled(shouldDisplay);
|
|
14937
15007
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playPauseControl", shouldDisplay);
|
|
14938
15008
|
}
|
|
14939
15009
|
/**
|
|
@@ -14948,8 +15018,8 @@ var init_wistia_player = __esm({
|
|
|
14948
15018
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playPauseNotifier");
|
|
14949
15019
|
},
|
|
14950
15020
|
set: function set(shouldDisplay) {
|
|
14951
|
-
var
|
|
14952
|
-
(
|
|
15021
|
+
var _classPrivateFieldGet62;
|
|
15022
|
+
(_classPrivateFieldGet62 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet62 === void 0 ? void 0 : _classPrivateFieldGet62.playPauseNotifierEnabled(shouldDisplay);
|
|
14953
15023
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "playPauseNotifier", shouldDisplay);
|
|
14954
15024
|
}
|
|
14955
15025
|
/**
|
|
@@ -15167,8 +15237,8 @@ var init_wistia_player = __esm({
|
|
|
15167
15237
|
}, {
|
|
15168
15238
|
key: "preload",
|
|
15169
15239
|
get: function get() {
|
|
15170
|
-
var
|
|
15171
|
-
return (
|
|
15240
|
+
var _ref11, _classPrivateFieldGet63, _classPrivateFieldGet64;
|
|
15241
|
+
return (_ref11 = (_classPrivateFieldGet63 = (_classPrivateFieldGet64 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet64 === void 0 ? void 0 : _classPrivateFieldGet64.preloadValue()) !== null && _classPrivateFieldGet63 !== void 0 ? _classPrivateFieldGet63 : this.embedOptions.preload) !== null && _ref11 !== void 0 ? _ref11 : void 0;
|
|
15172
15242
|
},
|
|
15173
15243
|
set: function set(preloadValue) {
|
|
15174
15244
|
var prevVal = this.preload;
|
|
@@ -15188,8 +15258,8 @@ var init_wistia_player = __esm({
|
|
|
15188
15258
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "qualityControl");
|
|
15189
15259
|
},
|
|
15190
15260
|
set: function set(shouldDisplay) {
|
|
15191
|
-
var
|
|
15192
|
-
(
|
|
15261
|
+
var _classPrivateFieldGet65;
|
|
15262
|
+
(_classPrivateFieldGet65 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet65 === void 0 ? void 0 : _classPrivateFieldGet65.qualityControlEnabled(shouldDisplay);
|
|
15193
15263
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "qualityControl", shouldDisplay);
|
|
15194
15264
|
}
|
|
15195
15265
|
/**
|
|
@@ -15202,8 +15272,8 @@ var init_wistia_player = __esm({
|
|
|
15202
15272
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "qualityMax");
|
|
15203
15273
|
},
|
|
15204
15274
|
set: function set(quality) {
|
|
15205
|
-
var
|
|
15206
|
-
(
|
|
15275
|
+
var _classPrivateFieldGet66;
|
|
15276
|
+
(_classPrivateFieldGet66 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet66 === void 0 ? void 0 : _classPrivateFieldGet66.qualityMax(quality);
|
|
15207
15277
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "qualityMax", quality);
|
|
15208
15278
|
}
|
|
15209
15279
|
/**
|
|
@@ -15216,8 +15286,8 @@ var init_wistia_player = __esm({
|
|
|
15216
15286
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "qualityMin");
|
|
15217
15287
|
},
|
|
15218
15288
|
set: function set(quality) {
|
|
15219
|
-
var
|
|
15220
|
-
(
|
|
15289
|
+
var _classPrivateFieldGet67;
|
|
15290
|
+
(_classPrivateFieldGet67 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet67 === void 0 ? void 0 : _classPrivateFieldGet67.qualityMin(quality);
|
|
15221
15291
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "qualityMin", quality);
|
|
15222
15292
|
}
|
|
15223
15293
|
/**
|
|
@@ -15227,8 +15297,8 @@ var init_wistia_player = __esm({
|
|
|
15227
15297
|
}, {
|
|
15228
15298
|
key: "readyState",
|
|
15229
15299
|
get: function get() {
|
|
15230
|
-
var
|
|
15231
|
-
return (
|
|
15300
|
+
var _classPrivateFieldGet68, _classPrivateFieldGet69;
|
|
15301
|
+
return (_classPrivateFieldGet68 = (_classPrivateFieldGet69 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet69 === void 0 ? void 0 : _classPrivateFieldGet69.getReadyState()) !== null && _classPrivateFieldGet68 !== void 0 ? _classPrivateFieldGet68 : 0;
|
|
15232
15302
|
}
|
|
15233
15303
|
/**
|
|
15234
15304
|
* Returns the current resumable status of the video.
|
|
@@ -15240,8 +15310,8 @@ var init_wistia_player = __esm({
|
|
|
15240
15310
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "resumable");
|
|
15241
15311
|
},
|
|
15242
15312
|
set: function set(resumableState) {
|
|
15243
|
-
var
|
|
15244
|
-
(
|
|
15313
|
+
var _classPrivateFieldGet70;
|
|
15314
|
+
(_classPrivateFieldGet70 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet70 === void 0 ? void 0 : _classPrivateFieldGet70.setResumable(resumableState);
|
|
15245
15315
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "resumable", resumableState);
|
|
15246
15316
|
}
|
|
15247
15317
|
/**
|
|
@@ -15254,8 +15324,8 @@ var init_wistia_player = __esm({
|
|
|
15254
15324
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "roundedPlayer");
|
|
15255
15325
|
},
|
|
15256
15326
|
set: function set(radius) {
|
|
15257
|
-
var
|
|
15258
|
-
(
|
|
15327
|
+
var _classPrivateFieldGet71;
|
|
15328
|
+
(_classPrivateFieldGet71 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet71 === void 0 ? void 0 : _classPrivateFieldGet71.setRoundedPlayer(Number(radius));
|
|
15259
15329
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "roundedPlayer", radius);
|
|
15260
15330
|
}
|
|
15261
15331
|
/**
|
|
@@ -15266,8 +15336,8 @@ var init_wistia_player = __esm({
|
|
|
15266
15336
|
}, {
|
|
15267
15337
|
key: "secondsWatched",
|
|
15268
15338
|
get: function get() {
|
|
15269
|
-
var
|
|
15270
|
-
return (
|
|
15339
|
+
var _classPrivateFieldGet72, _classPrivateFieldGet73;
|
|
15340
|
+
return (_classPrivateFieldGet72 = (_classPrivateFieldGet73 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet73 === void 0 ? void 0 : _classPrivateFieldGet73.secondsWatched()) !== null && _classPrivateFieldGet72 !== void 0 ? _classPrivateFieldGet72 : 0;
|
|
15271
15341
|
}
|
|
15272
15342
|
/**
|
|
15273
15343
|
* Returns an array where each index represents the number of times the viewer has watched each second of the video.
|
|
@@ -15276,8 +15346,8 @@ var init_wistia_player = __esm({
|
|
|
15276
15346
|
}, {
|
|
15277
15347
|
key: "secondsWatchedVector",
|
|
15278
15348
|
get: function get() {
|
|
15279
|
-
var
|
|
15280
|
-
return (
|
|
15349
|
+
var _classPrivateFieldGet74, _classPrivateFieldGet75;
|
|
15350
|
+
return (_classPrivateFieldGet74 = (_classPrivateFieldGet75 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet75 === void 0 ? void 0 : _classPrivateFieldGet75.secondsWatchedVector()) !== null && _classPrivateFieldGet74 !== void 0 ? _classPrivateFieldGet74 : [];
|
|
15281
15351
|
}
|
|
15282
15352
|
/**
|
|
15283
15353
|
* Returns whether JSON+LD seo data will be injected.
|
|
@@ -15301,8 +15371,8 @@ var init_wistia_player = __esm({
|
|
|
15301
15371
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "settingsControl");
|
|
15302
15372
|
},
|
|
15303
15373
|
set: function set(shouldDisplay) {
|
|
15304
|
-
var
|
|
15305
|
-
(
|
|
15374
|
+
var _classPrivateFieldGet76;
|
|
15375
|
+
(_classPrivateFieldGet76 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet76 === void 0 ? void 0 : _classPrivateFieldGet76.settingsControlEnabled(shouldDisplay);
|
|
15306
15376
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "settingsControl", shouldDisplay);
|
|
15307
15377
|
}
|
|
15308
15378
|
/**
|
|
@@ -15324,10 +15394,10 @@ var init_wistia_player = __esm({
|
|
|
15324
15394
|
}, {
|
|
15325
15395
|
key: "sourceLanguage",
|
|
15326
15396
|
get: function get() {
|
|
15327
|
-
var
|
|
15328
|
-
return (
|
|
15397
|
+
var _classPrivateFieldGet77, _classPrivateFieldGet78;
|
|
15398
|
+
return (_classPrivateFieldGet77 = (_classPrivateFieldGet78 = _classPrivateFieldGet(_playerData, this).mediaData.localizations) === null || _classPrivateFieldGet78 === void 0 ? void 0 : _classPrivateFieldGet78.find(function(loc) {
|
|
15329
15399
|
return loc.sourceLanguage;
|
|
15330
|
-
})) !== null &&
|
|
15400
|
+
})) !== null && _classPrivateFieldGet77 !== void 0 ? _classPrivateFieldGet77 : this.mediaLanguages[0];
|
|
15331
15401
|
}
|
|
15332
15402
|
/**
|
|
15333
15403
|
* Returns the source media id for the player. If a player has different localized versions,
|
|
@@ -15347,8 +15417,8 @@ var init_wistia_player = __esm({
|
|
|
15347
15417
|
}, {
|
|
15348
15418
|
key: "state",
|
|
15349
15419
|
get: function get() {
|
|
15350
|
-
var
|
|
15351
|
-
return (
|
|
15420
|
+
var _classPrivateFieldGet79, _classPrivateFieldGet80;
|
|
15421
|
+
return (_classPrivateFieldGet79 = (_classPrivateFieldGet80 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet80 === void 0 ? void 0 : _classPrivateFieldGet80.state()) !== null && _classPrivateFieldGet79 !== void 0 ? _classPrivateFieldGet79 : defaultEmbedOptions.state;
|
|
15352
15422
|
}
|
|
15353
15423
|
/**
|
|
15354
15424
|
* Returns the stats url for the player.
|
|
@@ -15426,12 +15496,12 @@ var init_wistia_player = __esm({
|
|
|
15426
15496
|
}, {
|
|
15427
15497
|
key: "videoQuality",
|
|
15428
15498
|
get: function get() {
|
|
15429
|
-
var
|
|
15430
|
-
return (
|
|
15499
|
+
var _ref12, _classPrivateFieldGet81, _classPrivateFieldGet82;
|
|
15500
|
+
return (_ref12 = (_classPrivateFieldGet81 = (_classPrivateFieldGet82 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet82 === void 0 ? void 0 : _classPrivateFieldGet82.getVideoQuality()) !== null && _classPrivateFieldGet81 !== void 0 ? _classPrivateFieldGet81 : this.embedOptions.videoQuality) !== null && _ref12 !== void 0 ? _ref12 : "auto";
|
|
15431
15501
|
},
|
|
15432
15502
|
set: function set(quality) {
|
|
15433
|
-
var
|
|
15434
|
-
(
|
|
15503
|
+
var _classPrivateFieldGet83;
|
|
15504
|
+
(_classPrivateFieldGet83 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet83 === void 0 ? void 0 : _classPrivateFieldGet83.setVideoQuality(quality);
|
|
15435
15505
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "videoQuality", quality);
|
|
15436
15506
|
}
|
|
15437
15507
|
/**
|
|
@@ -15454,8 +15524,8 @@ var init_wistia_player = __esm({
|
|
|
15454
15524
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "volume");
|
|
15455
15525
|
},
|
|
15456
15526
|
set: function set(level) {
|
|
15457
|
-
var
|
|
15458
|
-
(
|
|
15527
|
+
var _classPrivateFieldGet84;
|
|
15528
|
+
(_classPrivateFieldGet84 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet84 === void 0 ? void 0 : _classPrivateFieldGet84.volume(level);
|
|
15459
15529
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "volume", level);
|
|
15460
15530
|
}
|
|
15461
15531
|
/**
|
|
@@ -15470,8 +15540,8 @@ var init_wistia_player = __esm({
|
|
|
15470
15540
|
return _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "volumeControl");
|
|
15471
15541
|
},
|
|
15472
15542
|
set: function set(shouldDisplay) {
|
|
15473
|
-
var
|
|
15474
|
-
(
|
|
15543
|
+
var _classPrivateFieldGet85;
|
|
15544
|
+
(_classPrivateFieldGet85 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet85 === void 0 ? void 0 : _classPrivateFieldGet85.volumeControlEnabled(shouldDisplay);
|
|
15475
15545
|
_assertClassBrand(_WistiaPlayer_brand, this, _setSyncedEmbedOption).call(this, "volumeControl", shouldDisplay);
|
|
15476
15546
|
}
|
|
15477
15547
|
/**
|
|
@@ -15516,20 +15586,20 @@ var init_wistia_player = __esm({
|
|
|
15516
15586
|
}, {
|
|
15517
15587
|
key: "cancelFullscreen",
|
|
15518
15588
|
value: function() {
|
|
15519
|
-
var _cancelFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15520
|
-
var
|
|
15521
|
-
return _regeneratorRuntime().wrap(function
|
|
15522
|
-
while (1) switch (
|
|
15589
|
+
var _cancelFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
15590
|
+
var _classPrivateFieldGet86, _this3 = this;
|
|
15591
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15592
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15523
15593
|
case 0:
|
|
15524
|
-
return
|
|
15525
|
-
|
|
15526
|
-
|
|
15594
|
+
return _context.abrupt("return", (_classPrivateFieldGet86 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet86 === void 0 ? void 0 : _classPrivateFieldGet86.cancelFullscreen().then(function() {
|
|
15595
|
+
_this3._fullscreenState.heightBeforeFullscreen = void 0;
|
|
15596
|
+
_this3._fullscreenState.widthBeforeFullscreen = void 0;
|
|
15527
15597
|
}));
|
|
15528
15598
|
case 1:
|
|
15529
15599
|
case "end":
|
|
15530
|
-
return
|
|
15600
|
+
return _context.stop();
|
|
15531
15601
|
}
|
|
15532
|
-
},
|
|
15602
|
+
}, _callee, this);
|
|
15533
15603
|
}));
|
|
15534
15604
|
function cancelFullscreen() {
|
|
15535
15605
|
return _cancelFullscreen.apply(this, arguments);
|
|
@@ -15539,23 +15609,23 @@ var init_wistia_player = __esm({
|
|
|
15539
15609
|
}, {
|
|
15540
15610
|
key: "createOverlay",
|
|
15541
15611
|
value: function() {
|
|
15542
|
-
var _createOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15543
|
-
var
|
|
15544
|
-
return _regeneratorRuntime().wrap(function
|
|
15545
|
-
while (1) switch (
|
|
15612
|
+
var _createOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(name, options) {
|
|
15613
|
+
var _classPrivateFieldGet87;
|
|
15614
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
15615
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
15546
15616
|
case 0:
|
|
15547
|
-
if (!((
|
|
15548
|
-
|
|
15617
|
+
if (!((_classPrivateFieldGet87 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet87 !== void 0 && _classPrivateFieldGet87.defineOverlay)) {
|
|
15618
|
+
_context2.next = 2;
|
|
15549
15619
|
break;
|
|
15550
15620
|
}
|
|
15551
|
-
return
|
|
15621
|
+
return _context2.abrupt("return", _classPrivateFieldGet(_impl, this).defineOverlay(name, options));
|
|
15552
15622
|
case 2:
|
|
15553
|
-
return
|
|
15623
|
+
return _context2.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be defined at this time"))));
|
|
15554
15624
|
case 3:
|
|
15555
15625
|
case "end":
|
|
15556
|
-
return
|
|
15626
|
+
return _context2.stop();
|
|
15557
15627
|
}
|
|
15558
|
-
},
|
|
15628
|
+
}, _callee2, this);
|
|
15559
15629
|
}));
|
|
15560
15630
|
function createOverlay(_x, _x2) {
|
|
15561
15631
|
return _createOverlay.apply(this, arguments);
|
|
@@ -15565,37 +15635,37 @@ var init_wistia_player = __esm({
|
|
|
15565
15635
|
}, {
|
|
15566
15636
|
key: "definePlugin",
|
|
15567
15637
|
value: function() {
|
|
15568
|
-
var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15569
|
-
var
|
|
15638
|
+
var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(name, options) {
|
|
15639
|
+
var _this4 = this;
|
|
15570
15640
|
var addPlugin;
|
|
15571
|
-
return _regeneratorRuntime().wrap(function
|
|
15572
|
-
while (1) switch (
|
|
15641
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
15642
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
15573
15643
|
case 0:
|
|
15574
15644
|
addPlugin = /* @__PURE__ */ function() {
|
|
15575
|
-
var
|
|
15576
|
-
var
|
|
15577
|
-
return _regeneratorRuntime().wrap(function
|
|
15578
|
-
while (1) switch (
|
|
15645
|
+
var _ref13 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee3() {
|
|
15646
|
+
var _classPrivateFieldGet88, _classPrivateFieldGet89;
|
|
15647
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
15648
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
15579
15649
|
case 0:
|
|
15580
|
-
return
|
|
15650
|
+
return _context3.abrupt("return", (_classPrivateFieldGet88 = (_classPrivateFieldGet89 = _classPrivateFieldGet(_api, _this4)) === null || _classPrivateFieldGet89 === void 0 ? void 0 : _classPrivateFieldGet89.addPlugin(name, options)) !== null && _classPrivateFieldGet88 !== void 0 ? _classPrivateFieldGet88 : Promise.reject(new Error("plugin ".concat(name, " cannot be defined"))));
|
|
15581
15651
|
case 1:
|
|
15582
15652
|
case "end":
|
|
15583
|
-
return
|
|
15653
|
+
return _context3.stop();
|
|
15584
15654
|
}
|
|
15585
|
-
},
|
|
15655
|
+
}, _callee3);
|
|
15586
15656
|
}));
|
|
15587
15657
|
return function addPlugin2() {
|
|
15588
|
-
return
|
|
15658
|
+
return _ref13.apply(this, arguments);
|
|
15589
15659
|
};
|
|
15590
15660
|
}();
|
|
15591
15661
|
if (!_classPrivateFieldGet(_api, this)) {
|
|
15592
|
-
|
|
15662
|
+
_context4.next = 3;
|
|
15593
15663
|
break;
|
|
15594
15664
|
}
|
|
15595
|
-
return
|
|
15665
|
+
return _context4.abrupt("return", addPlugin());
|
|
15596
15666
|
case 3:
|
|
15597
|
-
return
|
|
15598
|
-
|
|
15667
|
+
return _context4.abrupt("return", new Promise(function(resolve, reject) {
|
|
15668
|
+
_this4.whenApiReady().then(function() {
|
|
15599
15669
|
addPlugin().then(function(plugin) {
|
|
15600
15670
|
return resolve(plugin);
|
|
15601
15671
|
}).catch(function(err) {
|
|
@@ -15610,9 +15680,9 @@ var init_wistia_player = __esm({
|
|
|
15610
15680
|
}));
|
|
15611
15681
|
case 4:
|
|
15612
15682
|
case "end":
|
|
15613
|
-
return
|
|
15683
|
+
return _context4.stop();
|
|
15614
15684
|
}
|
|
15615
|
-
},
|
|
15685
|
+
}, _callee4, this);
|
|
15616
15686
|
}));
|
|
15617
15687
|
function definePlugin(_x3, _x4) {
|
|
15618
15688
|
return _definePlugin.apply(this, arguments);
|
|
@@ -15622,23 +15692,23 @@ var init_wistia_player = __esm({
|
|
|
15622
15692
|
}, {
|
|
15623
15693
|
key: "deleteOverlay",
|
|
15624
15694
|
value: function() {
|
|
15625
|
-
var _deleteOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15626
|
-
var
|
|
15627
|
-
return _regeneratorRuntime().wrap(function
|
|
15628
|
-
while (1) switch (
|
|
15695
|
+
var _deleteOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee5(name) {
|
|
15696
|
+
var _classPrivateFieldGet90;
|
|
15697
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
15698
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
15629
15699
|
case 0:
|
|
15630
|
-
if (!((
|
|
15631
|
-
|
|
15700
|
+
if (!((_classPrivateFieldGet90 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet90 !== void 0 && _classPrivateFieldGet90.undefineOverlay)) {
|
|
15701
|
+
_context5.next = 2;
|
|
15632
15702
|
break;
|
|
15633
15703
|
}
|
|
15634
|
-
return
|
|
15704
|
+
return _context5.abrupt("return", _classPrivateFieldGet(_impl, this).undefineOverlay(name));
|
|
15635
15705
|
case 2:
|
|
15636
|
-
return
|
|
15706
|
+
return _context5.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be deleted at this time"))));
|
|
15637
15707
|
case 3:
|
|
15638
15708
|
case "end":
|
|
15639
|
-
return
|
|
15709
|
+
return _context5.stop();
|
|
15640
15710
|
}
|
|
15641
|
-
},
|
|
15711
|
+
}, _callee5, this);
|
|
15642
15712
|
}));
|
|
15643
15713
|
function deleteOverlay(_x5) {
|
|
15644
15714
|
return _deleteOverlay.apply(this, arguments);
|
|
@@ -15648,23 +15718,23 @@ var init_wistia_player = __esm({
|
|
|
15648
15718
|
}, {
|
|
15649
15719
|
key: "disableControl",
|
|
15650
15720
|
value: function() {
|
|
15651
|
-
var _disableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15652
|
-
var
|
|
15653
|
-
return _regeneratorRuntime().wrap(function
|
|
15654
|
-
while (1) switch (
|
|
15721
|
+
var _disableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee6(name) {
|
|
15722
|
+
var _classPrivateFieldGet91;
|
|
15723
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15724
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15655
15725
|
case 0:
|
|
15656
|
-
if (!((
|
|
15657
|
-
|
|
15726
|
+
if (!((_classPrivateFieldGet91 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet91 !== void 0 && _classPrivateFieldGet91.setControlEnabled)) {
|
|
15727
|
+
_context6.next = 2;
|
|
15658
15728
|
break;
|
|
15659
15729
|
}
|
|
15660
|
-
return
|
|
15730
|
+
return _context6.abrupt("return", _classPrivateFieldGet(_impl, this).setControlEnabled(name, false));
|
|
15661
15731
|
case 2:
|
|
15662
|
-
return
|
|
15732
|
+
return _context6.abrupt("return", Promise.reject(new Error('control "'.concat(name, '" cannot be disabled at this time'))));
|
|
15663
15733
|
case 3:
|
|
15664
15734
|
case "end":
|
|
15665
|
-
return
|
|
15735
|
+
return _context6.stop();
|
|
15666
15736
|
}
|
|
15667
|
-
},
|
|
15737
|
+
}, _callee6, this);
|
|
15668
15738
|
}));
|
|
15669
15739
|
function disableControl(_x6) {
|
|
15670
15740
|
return _disableControl.apply(this, arguments);
|
|
@@ -15674,23 +15744,23 @@ var init_wistia_player = __esm({
|
|
|
15674
15744
|
}, {
|
|
15675
15745
|
key: "enableControl",
|
|
15676
15746
|
value: function() {
|
|
15677
|
-
var _enableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15678
|
-
var
|
|
15679
|
-
return _regeneratorRuntime().wrap(function
|
|
15680
|
-
while (1) switch (
|
|
15747
|
+
var _enableControl = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee7(name) {
|
|
15748
|
+
var _classPrivateFieldGet92;
|
|
15749
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
15750
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
15681
15751
|
case 0:
|
|
15682
|
-
if (!((
|
|
15683
|
-
|
|
15752
|
+
if (!((_classPrivateFieldGet92 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet92 !== void 0 && _classPrivateFieldGet92.setControlEnabled)) {
|
|
15753
|
+
_context7.next = 2;
|
|
15684
15754
|
break;
|
|
15685
15755
|
}
|
|
15686
|
-
return
|
|
15756
|
+
return _context7.abrupt("return", _classPrivateFieldGet(_impl, this).setControlEnabled(name, true));
|
|
15687
15757
|
case 2:
|
|
15688
|
-
return
|
|
15758
|
+
return _context7.abrupt("return", Promise.reject(new Error('control "'.concat(name, '" cannot be enabled at this time'))));
|
|
15689
15759
|
case 3:
|
|
15690
15760
|
case "end":
|
|
15691
|
-
return
|
|
15761
|
+
return _context7.stop();
|
|
15692
15762
|
}
|
|
15693
|
-
},
|
|
15763
|
+
}, _callee7, this);
|
|
15694
15764
|
}));
|
|
15695
15765
|
function enableControl(_x7) {
|
|
15696
15766
|
return _enableControl.apply(this, arguments);
|
|
@@ -15700,34 +15770,34 @@ var init_wistia_player = __esm({
|
|
|
15700
15770
|
}, {
|
|
15701
15771
|
key: "enterInputContext",
|
|
15702
15772
|
value: function() {
|
|
15703
|
-
var _enterInputContext = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15704
|
-
var
|
|
15705
|
-
return _regeneratorRuntime().wrap(function
|
|
15706
|
-
while (1) switch (
|
|
15773
|
+
var _enterInputContext = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee8(context) {
|
|
15774
|
+
var _classPrivateFieldGet93, _this5 = this;
|
|
15775
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
15776
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
15707
15777
|
case 0:
|
|
15708
|
-
if (!((
|
|
15709
|
-
|
|
15778
|
+
if (!((_classPrivateFieldGet93 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet93 !== void 0 && _classPrivateFieldGet93.enterInputContext)) {
|
|
15779
|
+
_context8.next = 2;
|
|
15710
15780
|
break;
|
|
15711
15781
|
}
|
|
15712
|
-
return
|
|
15713
|
-
var
|
|
15782
|
+
return _context8.abrupt("return", new Promise(function(resolve) {
|
|
15783
|
+
var _classPrivateFieldGet94;
|
|
15714
15784
|
var _handler = function handler(event) {
|
|
15715
15785
|
var detail = event.detail;
|
|
15716
15786
|
if (detail.context === context) {
|
|
15717
15787
|
resolve();
|
|
15718
15788
|
}
|
|
15719
|
-
|
|
15789
|
+
_this5.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.ve, _handler);
|
|
15720
15790
|
};
|
|
15721
|
-
|
|
15722
|
-
(
|
|
15791
|
+
_this5.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.ve, _handler);
|
|
15792
|
+
(_classPrivateFieldGet94 = _classPrivateFieldGet(_impl, _this5)) === null || _classPrivateFieldGet94 === void 0 ? void 0 : _classPrivateFieldGet94.enterInputContext(context);
|
|
15723
15793
|
}));
|
|
15724
15794
|
case 2:
|
|
15725
|
-
return
|
|
15795
|
+
return _context8.abrupt("return", Promise.reject(new Error('input context of name "'.concat(context, '" cannot be enabled at this time'))));
|
|
15726
15796
|
case 3:
|
|
15727
15797
|
case "end":
|
|
15728
|
-
return
|
|
15798
|
+
return _context8.stop();
|
|
15729
15799
|
}
|
|
15730
|
-
},
|
|
15800
|
+
}, _callee8, this);
|
|
15731
15801
|
}));
|
|
15732
15802
|
function enterInputContext(_x8) {
|
|
15733
15803
|
return _enterInputContext.apply(this, arguments);
|
|
@@ -15737,23 +15807,23 @@ var init_wistia_player = __esm({
|
|
|
15737
15807
|
}, {
|
|
15738
15808
|
key: "exitInputContext",
|
|
15739
15809
|
value: function() {
|
|
15740
|
-
var _exitInputContext = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15741
|
-
var
|
|
15742
|
-
return _regeneratorRuntime().wrap(function
|
|
15743
|
-
while (1) switch (
|
|
15810
|
+
var _exitInputContext = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee9(context) {
|
|
15811
|
+
var _classPrivateFieldGet95;
|
|
15812
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
15813
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
15744
15814
|
case 0:
|
|
15745
|
-
if (!((
|
|
15746
|
-
|
|
15815
|
+
if (!((_classPrivateFieldGet95 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet95 !== void 0 && _classPrivateFieldGet95.exitInputContext)) {
|
|
15816
|
+
_context9.next = 2;
|
|
15747
15817
|
break;
|
|
15748
15818
|
}
|
|
15749
|
-
return
|
|
15819
|
+
return _context9.abrupt("return", Promise.resolve(_classPrivateFieldGet(_impl, this).exitInputContext(context)));
|
|
15750
15820
|
case 2:
|
|
15751
|
-
return
|
|
15821
|
+
return _context9.abrupt("return", Promise.reject(new Error('control "'.concat(context, '" cannot be enabled at this time'))));
|
|
15752
15822
|
case 3:
|
|
15753
15823
|
case "end":
|
|
15754
|
-
return
|
|
15824
|
+
return _context9.stop();
|
|
15755
15825
|
}
|
|
15756
|
-
},
|
|
15826
|
+
}, _callee9, this);
|
|
15757
15827
|
}));
|
|
15758
15828
|
function exitInputContext(_x9) {
|
|
15759
15829
|
return _exitInputContext.apply(this, arguments);
|
|
@@ -15770,16 +15840,16 @@ var init_wistia_player = __esm({
|
|
|
15770
15840
|
}, {
|
|
15771
15841
|
key: "getInitialMediaData",
|
|
15772
15842
|
value: function() {
|
|
15773
|
-
var _getInitialMediaData2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15774
|
-
return _regeneratorRuntime().wrap(function
|
|
15775
|
-
while (1) switch (
|
|
15843
|
+
var _getInitialMediaData2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee10(mediaId, options) {
|
|
15844
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
15845
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
15776
15846
|
case 0:
|
|
15777
|
-
return
|
|
15847
|
+
return _context10.abrupt("return", (0, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_24__.n)(mediaId, options));
|
|
15778
15848
|
case 1:
|
|
15779
15849
|
case "end":
|
|
15780
|
-
return
|
|
15850
|
+
return _context10.stop();
|
|
15781
15851
|
}
|
|
15782
|
-
},
|
|
15852
|
+
}, _callee10);
|
|
15783
15853
|
}));
|
|
15784
15854
|
function getInitialMediaData(_x10, _x11) {
|
|
15785
15855
|
return _getInitialMediaData2.apply(this, arguments);
|
|
@@ -15789,23 +15859,23 @@ var init_wistia_player = __esm({
|
|
|
15789
15859
|
}, {
|
|
15790
15860
|
key: "getPlugin",
|
|
15791
15861
|
value: function() {
|
|
15792
|
-
var _getPlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15793
|
-
var
|
|
15794
|
-
return _regeneratorRuntime().wrap(function
|
|
15795
|
-
while (1) switch (
|
|
15862
|
+
var _getPlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee11(name) {
|
|
15863
|
+
var _this6 = this;
|
|
15864
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
15865
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
15796
15866
|
case 0:
|
|
15797
|
-
return
|
|
15798
|
-
var
|
|
15799
|
-
if ((
|
|
15800
|
-
resolve(_classPrivateFieldGet(_api,
|
|
15867
|
+
return _context11.abrupt("return", new Promise(function(resolve, reject) {
|
|
15868
|
+
var _classPrivateFieldGet96;
|
|
15869
|
+
if ((_classPrivateFieldGet96 = _classPrivateFieldGet(_api, _this6)) !== null && _classPrivateFieldGet96 !== void 0 && _classPrivateFieldGet96.plugin && name in _classPrivateFieldGet(_api, _this6).plugin) {
|
|
15870
|
+
resolve(_classPrivateFieldGet(_api, _this6).plugin[name]);
|
|
15801
15871
|
}
|
|
15802
15872
|
reject(new Error("plugin ".concat(name, " is not defined")));
|
|
15803
15873
|
}));
|
|
15804
15874
|
case 1:
|
|
15805
15875
|
case "end":
|
|
15806
|
-
return
|
|
15876
|
+
return _context11.stop();
|
|
15807
15877
|
}
|
|
15808
|
-
},
|
|
15878
|
+
}, _callee11);
|
|
15809
15879
|
}));
|
|
15810
15880
|
function getPlugin(_x12) {
|
|
15811
15881
|
return _getPlugin.apply(this, arguments);
|
|
@@ -15815,45 +15885,45 @@ var init_wistia_player = __esm({
|
|
|
15815
15885
|
}, {
|
|
15816
15886
|
key: "getRemapTime",
|
|
15817
15887
|
value: function() {
|
|
15818
|
-
var _getRemapTime = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15819
|
-
var
|
|
15820
|
-
return _regeneratorRuntime().wrap(function
|
|
15821
|
-
while (1) switch (
|
|
15888
|
+
var _getRemapTime = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee12() {
|
|
15889
|
+
var _classPrivateFieldGet97, _this7 = this;
|
|
15890
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
15891
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
15822
15892
|
case 0:
|
|
15823
15893
|
if (!(_classPrivateFieldGet(_cachedRemapTime, this) != null)) {
|
|
15824
|
-
|
|
15894
|
+
_context12.next = 2;
|
|
15825
15895
|
break;
|
|
15826
15896
|
}
|
|
15827
|
-
return
|
|
15897
|
+
return _context12.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
|
|
15828
15898
|
case 2:
|
|
15829
15899
|
if (!(this.languages.length <= 1)) {
|
|
15830
|
-
|
|
15900
|
+
_context12.next = 5;
|
|
15831
15901
|
break;
|
|
15832
15902
|
}
|
|
15833
15903
|
_classPrivateFieldSet(_cachedRemapTime, this, function(_fromLanguage, _toLanguage, fromTime) {
|
|
15834
15904
|
return fromTime;
|
|
15835
15905
|
});
|
|
15836
|
-
return
|
|
15906
|
+
return _context12.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
|
|
15837
15907
|
case 5:
|
|
15838
|
-
if (!((
|
|
15839
|
-
|
|
15908
|
+
if (!((_classPrivateFieldGet97 = _classPrivateFieldGet(_cachedRemapTime, this)) !== null && _classPrivateFieldGet97 !== void 0)) {
|
|
15909
|
+
_context12.next = 9;
|
|
15840
15910
|
break;
|
|
15841
15911
|
}
|
|
15842
|
-
|
|
15843
|
-
|
|
15912
|
+
_classPrivateFieldGet97;
|
|
15913
|
+
_context12.next = 16;
|
|
15844
15914
|
break;
|
|
15845
15915
|
case 9:
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__.$)("assets/external/timeMapping.js").then(function(
|
|
15851
|
-
var remapTime =
|
|
15916
|
+
_context12.t0 = _classPrivateFieldSet;
|
|
15917
|
+
_context12.t1 = _cachedRemapTime;
|
|
15918
|
+
_context12.t2 = this;
|
|
15919
|
+
_context12.next = 14;
|
|
15920
|
+
return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__.$)("assets/external/timeMapping.js").then(function(_ref14) {
|
|
15921
|
+
var remapTime = _ref14.remapTime;
|
|
15852
15922
|
return function(fromLanguage, toLanguage, fromTime) {
|
|
15853
15923
|
var fromTimeInMilliseconds = fromTime * 1e3;
|
|
15854
|
-
var fromLocalization = _assertClassBrand(_WistiaPlayer_brand,
|
|
15855
|
-
var sourceLocalization =
|
|
15856
|
-
var toLocalization = _assertClassBrand(_WistiaPlayer_brand,
|
|
15924
|
+
var fromLocalization = _assertClassBrand(_WistiaPlayer_brand, _this7, _findLocalizationByLanguage).call(_this7, fromLanguage);
|
|
15925
|
+
var sourceLocalization = _this7.sourceLanguage;
|
|
15926
|
+
var toLocalization = _assertClassBrand(_WistiaPlayer_brand, _this7, _findLocalizationByLanguage).call(_this7, toLanguage);
|
|
15857
15927
|
if (fromLocalization == null || toLocalization == null || sourceLocalization == null) {
|
|
15858
15928
|
return fromTime;
|
|
15859
15929
|
}
|
|
@@ -15861,15 +15931,15 @@ var init_wistia_player = __esm({
|
|
|
15861
15931
|
};
|
|
15862
15932
|
});
|
|
15863
15933
|
case 14:
|
|
15864
|
-
|
|
15865
|
-
(0,
|
|
15934
|
+
_context12.t3 = _context12.sent;
|
|
15935
|
+
(0, _context12.t0)(_context12.t1, _context12.t2, _context12.t3);
|
|
15866
15936
|
case 16:
|
|
15867
|
-
return
|
|
15937
|
+
return _context12.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
|
|
15868
15938
|
case 17:
|
|
15869
15939
|
case "end":
|
|
15870
|
-
return
|
|
15940
|
+
return _context12.stop();
|
|
15871
15941
|
}
|
|
15872
|
-
},
|
|
15942
|
+
}, _callee12, this);
|
|
15873
15943
|
}));
|
|
15874
15944
|
function getRemapTime() {
|
|
15875
15945
|
return _getRemapTime.apply(this, arguments);
|
|
@@ -15879,23 +15949,23 @@ var init_wistia_player = __esm({
|
|
|
15879
15949
|
}, {
|
|
15880
15950
|
key: "hideOverlay",
|
|
15881
15951
|
value: function() {
|
|
15882
|
-
var _hideOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15883
|
-
var
|
|
15884
|
-
return _regeneratorRuntime().wrap(function
|
|
15885
|
-
while (1) switch (
|
|
15952
|
+
var _hideOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee13(name) {
|
|
15953
|
+
var _classPrivateFieldGet98;
|
|
15954
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
15955
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
15886
15956
|
case 0:
|
|
15887
|
-
if (!((
|
|
15888
|
-
|
|
15957
|
+
if (!((_classPrivateFieldGet98 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet98 !== void 0 && _classPrivateFieldGet98.cancelOverlay)) {
|
|
15958
|
+
_context13.next = 2;
|
|
15889
15959
|
break;
|
|
15890
15960
|
}
|
|
15891
|
-
return
|
|
15961
|
+
return _context13.abrupt("return", _classPrivateFieldGet(_impl, this).cancelOverlay(name));
|
|
15892
15962
|
case 2:
|
|
15893
|
-
return
|
|
15963
|
+
return _context13.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be cancelled at this time"))));
|
|
15894
15964
|
case 3:
|
|
15895
15965
|
case "end":
|
|
15896
|
-
return
|
|
15966
|
+
return _context13.stop();
|
|
15897
15967
|
}
|
|
15898
|
-
},
|
|
15968
|
+
}, _callee13, this);
|
|
15899
15969
|
}));
|
|
15900
15970
|
function hideOverlay(_x13) {
|
|
15901
15971
|
return _hideOverlay.apply(this, arguments);
|
|
@@ -15905,24 +15975,24 @@ var init_wistia_player = __esm({
|
|
|
15905
15975
|
}, {
|
|
15906
15976
|
key: "hidePopover",
|
|
15907
15977
|
value: function() {
|
|
15908
|
-
var _hidePopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15909
|
-
var
|
|
15910
|
-
return _regeneratorRuntime().wrap(function
|
|
15911
|
-
while (1) switch (
|
|
15978
|
+
var _hidePopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee14() {
|
|
15979
|
+
var _this8 = this;
|
|
15980
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
15981
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
15912
15982
|
case 0:
|
|
15913
|
-
return
|
|
15914
|
-
var
|
|
15915
|
-
if ((
|
|
15916
|
-
_classPrivateFieldGet(_api,
|
|
15983
|
+
return _context14.abrupt("return", new Promise(function(resolve, reject) {
|
|
15984
|
+
var _classPrivateFieldGet99;
|
|
15985
|
+
if ((_classPrivateFieldGet99 = _classPrivateFieldGet(_api, _this8)) !== null && _classPrivateFieldGet99 !== void 0 && _classPrivateFieldGet99.popover) {
|
|
15986
|
+
_classPrivateFieldGet(_api, _this8).popover.hide();
|
|
15917
15987
|
resolve();
|
|
15918
15988
|
}
|
|
15919
15989
|
reject(new Error("Popover cannot be accessed"));
|
|
15920
15990
|
}));
|
|
15921
15991
|
case 1:
|
|
15922
15992
|
case "end":
|
|
15923
|
-
return
|
|
15993
|
+
return _context14.stop();
|
|
15924
15994
|
}
|
|
15925
|
-
},
|
|
15995
|
+
}, _callee14);
|
|
15926
15996
|
}));
|
|
15927
15997
|
function hidePopover() {
|
|
15928
15998
|
return _hidePopover.apply(this, arguments);
|
|
@@ -15932,17 +16002,17 @@ var init_wistia_player = __esm({
|
|
|
15932
16002
|
}, {
|
|
15933
16003
|
key: "pause",
|
|
15934
16004
|
value: function() {
|
|
15935
|
-
var _pause = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15936
|
-
var
|
|
15937
|
-
return _regeneratorRuntime().wrap(function
|
|
15938
|
-
while (1) switch (
|
|
16005
|
+
var _pause = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee15() {
|
|
16006
|
+
var _classPrivateFieldGet100;
|
|
16007
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
16008
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
15939
16009
|
case 0:
|
|
15940
|
-
return
|
|
16010
|
+
return _context15.abrupt("return", (_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.pause());
|
|
15941
16011
|
case 1:
|
|
15942
16012
|
case "end":
|
|
15943
|
-
return
|
|
16013
|
+
return _context15.stop();
|
|
15944
16014
|
}
|
|
15945
|
-
},
|
|
16015
|
+
}, _callee15, this);
|
|
15946
16016
|
}));
|
|
15947
16017
|
function pause() {
|
|
15948
16018
|
return _pause.apply(this, arguments);
|
|
@@ -15952,17 +16022,17 @@ var init_wistia_player = __esm({
|
|
|
15952
16022
|
}, {
|
|
15953
16023
|
key: "play",
|
|
15954
16024
|
value: function() {
|
|
15955
|
-
var _play = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15956
|
-
var
|
|
15957
|
-
return _regeneratorRuntime().wrap(function
|
|
15958
|
-
while (1) switch (
|
|
16025
|
+
var _play = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee16() {
|
|
16026
|
+
var _classPrivateFieldGet101;
|
|
16027
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
16028
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
15959
16029
|
case 0:
|
|
15960
|
-
return
|
|
16030
|
+
return _context16.abrupt("return", (_classPrivateFieldGet101 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet101 === void 0 ? void 0 : _classPrivateFieldGet101.play());
|
|
15961
16031
|
case 1:
|
|
15962
16032
|
case "end":
|
|
15963
|
-
return
|
|
16033
|
+
return _context16.stop();
|
|
15964
16034
|
}
|
|
15965
|
-
},
|
|
16035
|
+
}, _callee16, this);
|
|
15966
16036
|
}));
|
|
15967
16037
|
function play() {
|
|
15968
16038
|
return _play.apply(this, arguments);
|
|
@@ -15972,17 +16042,17 @@ var init_wistia_player = __esm({
|
|
|
15972
16042
|
}, {
|
|
15973
16043
|
key: "releaseControls",
|
|
15974
16044
|
value: function() {
|
|
15975
|
-
var _releaseControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
15976
|
-
var
|
|
15977
|
-
return _regeneratorRuntime().wrap(function
|
|
15978
|
-
while (1) switch (
|
|
16045
|
+
var _releaseControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee17(name) {
|
|
16046
|
+
var _classPrivateFieldGet102;
|
|
16047
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
16048
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
15979
16049
|
case 0:
|
|
15980
|
-
return
|
|
16050
|
+
return _context17.abrupt("return", (_classPrivateFieldGet102 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet102 === void 0 ? void 0 : _classPrivateFieldGet102.releaseControls(name));
|
|
15981
16051
|
case 1:
|
|
15982
16052
|
case "end":
|
|
15983
|
-
return
|
|
16053
|
+
return _context17.stop();
|
|
15984
16054
|
}
|
|
15985
|
-
},
|
|
16055
|
+
}, _callee17, this);
|
|
15986
16056
|
}));
|
|
15987
16057
|
function releaseControls(_x14) {
|
|
15988
16058
|
return _releaseControls.apply(this, arguments);
|
|
@@ -15992,12 +16062,12 @@ var init_wistia_player = __esm({
|
|
|
15992
16062
|
}, {
|
|
15993
16063
|
key: "removeAllEventListeners",
|
|
15994
16064
|
value: function removeAllEventListeners() {
|
|
15995
|
-
var
|
|
15996
|
-
Object.entries(_classPrivateFieldGet(_eventListeners, this)).forEach(function(
|
|
15997
|
-
var
|
|
15998
|
-
listeners.forEach(function(
|
|
15999
|
-
var listener =
|
|
16000
|
-
|
|
16065
|
+
var _this9 = this;
|
|
16066
|
+
Object.entries(_classPrivateFieldGet(_eventListeners, this)).forEach(function(_ref15) {
|
|
16067
|
+
var _ref16 = _slicedToArray(_ref15, 2), type = _ref16[0], listeners = _ref16[1];
|
|
16068
|
+
listeners.forEach(function(_ref17) {
|
|
16069
|
+
var listener = _ref17.listener, options = _ref17.options;
|
|
16070
|
+
_this9.removeEventListener(type, listener, options);
|
|
16001
16071
|
});
|
|
16002
16072
|
});
|
|
16003
16073
|
}
|
|
@@ -16033,31 +16103,31 @@ var init_wistia_player = __esm({
|
|
|
16033
16103
|
}, {
|
|
16034
16104
|
key: "replaceWithMedia",
|
|
16035
16105
|
value: function() {
|
|
16036
|
-
var _replaceWithMedia = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16037
|
-
var
|
|
16038
|
-
var options,
|
|
16039
|
-
return _regeneratorRuntime().wrap(function
|
|
16040
|
-
while (1) switch (
|
|
16106
|
+
var _replaceWithMedia = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee18(mediaId) {
|
|
16107
|
+
var _this10 = this;
|
|
16108
|
+
var options, _args18 = arguments;
|
|
16109
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
16110
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
16041
16111
|
case 0:
|
|
16042
|
-
options =
|
|
16043
|
-
return
|
|
16044
|
-
var
|
|
16045
|
-
if (!_classPrivateFieldGet(_api,
|
|
16112
|
+
options = _args18.length > 1 && _args18[1] !== void 0 ? _args18[1] : {};
|
|
16113
|
+
return _context18.abrupt("return", new Promise(function(resolve, reject) {
|
|
16114
|
+
var _classPrivateFieldGet103;
|
|
16115
|
+
if (!_classPrivateFieldGet(_api, _this10)) {
|
|
16046
16116
|
reject(new Error("api not ready to replace"));
|
|
16047
16117
|
}
|
|
16048
|
-
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_23__.Z)(_classPrivateFieldGet(_jsonLdId,
|
|
16118
|
+
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_23__.Z)(_classPrivateFieldGet(_jsonLdId, _this10));
|
|
16049
16119
|
var _handleAfterReplace2 = function handleAfterReplace() {
|
|
16050
|
-
|
|
16120
|
+
_this10.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _handleAfterReplace2);
|
|
16051
16121
|
resolve();
|
|
16052
16122
|
};
|
|
16053
|
-
|
|
16054
|
-
(
|
|
16123
|
+
_this10.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _handleAfterReplace2);
|
|
16124
|
+
(_classPrivateFieldGet103 = _classPrivateFieldGet(_api, _this10)) === null || _classPrivateFieldGet103 === void 0 ? void 0 : _classPrivateFieldGet103.replaceWith(mediaId, options);
|
|
16055
16125
|
}));
|
|
16056
16126
|
case 2:
|
|
16057
16127
|
case "end":
|
|
16058
|
-
return
|
|
16128
|
+
return _context18.stop();
|
|
16059
16129
|
}
|
|
16060
|
-
},
|
|
16130
|
+
}, _callee18);
|
|
16061
16131
|
}));
|
|
16062
16132
|
function replaceWithMedia(_x15) {
|
|
16063
16133
|
return _replaceWithMedia.apply(this, arguments);
|
|
@@ -16067,17 +16137,17 @@ var init_wistia_player = __esm({
|
|
|
16067
16137
|
}, {
|
|
16068
16138
|
key: "requestControls",
|
|
16069
16139
|
value: function() {
|
|
16070
|
-
var _requestControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16071
|
-
var
|
|
16072
|
-
return _regeneratorRuntime().wrap(function
|
|
16073
|
-
while (1) switch (
|
|
16140
|
+
var _requestControls = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee19(name) {
|
|
16141
|
+
var _classPrivateFieldGet104;
|
|
16142
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
16143
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
16074
16144
|
case 0:
|
|
16075
|
-
return
|
|
16145
|
+
return _context19.abrupt("return", (_classPrivateFieldGet104 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet104 === void 0 ? void 0 : _classPrivateFieldGet104.requestControls(name));
|
|
16076
16146
|
case 1:
|
|
16077
16147
|
case "end":
|
|
16078
|
-
return
|
|
16148
|
+
return _context19.stop();
|
|
16079
16149
|
}
|
|
16080
|
-
},
|
|
16150
|
+
}, _callee19, this);
|
|
16081
16151
|
}));
|
|
16082
16152
|
function requestControls(_x16) {
|
|
16083
16153
|
return _requestControls.apply(this, arguments);
|
|
@@ -16087,23 +16157,23 @@ var init_wistia_player = __esm({
|
|
|
16087
16157
|
}, {
|
|
16088
16158
|
key: "requestFullscreen",
|
|
16089
16159
|
value: function() {
|
|
16090
|
-
var _requestFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16091
|
-
var
|
|
16092
|
-
return _regeneratorRuntime().wrap(function
|
|
16093
|
-
while (1) switch (
|
|
16160
|
+
var _requestFullscreen = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee20() {
|
|
16161
|
+
var _classPrivateFieldGet105;
|
|
16162
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
16163
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
16094
16164
|
case 0:
|
|
16095
|
-
if (!((
|
|
16096
|
-
|
|
16165
|
+
if (!((_classPrivateFieldGet105 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet105 !== void 0 && _classPrivateFieldGet105.requestFullscreen)) {
|
|
16166
|
+
_context20.next = 2;
|
|
16097
16167
|
break;
|
|
16098
16168
|
}
|
|
16099
|
-
return
|
|
16169
|
+
return _context20.abrupt("return", _classPrivateFieldGet(_impl, this).requestFullscreen());
|
|
16100
16170
|
case 2:
|
|
16101
|
-
return
|
|
16171
|
+
return _context20.abrupt("return", Promise.reject(new Error("Fullscreen cannot be accessed")));
|
|
16102
16172
|
case 3:
|
|
16103
16173
|
case "end":
|
|
16104
|
-
return
|
|
16174
|
+
return _context20.stop();
|
|
16105
16175
|
}
|
|
16106
|
-
},
|
|
16176
|
+
}, _callee20, this);
|
|
16107
16177
|
}));
|
|
16108
16178
|
function requestFullscreen() {
|
|
16109
16179
|
return _requestFullscreen.apply(this, arguments);
|
|
@@ -16113,23 +16183,23 @@ var init_wistia_player = __esm({
|
|
|
16113
16183
|
}, {
|
|
16114
16184
|
key: "showOverlay",
|
|
16115
16185
|
value: function() {
|
|
16116
|
-
var _showOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16117
|
-
var
|
|
16118
|
-
return _regeneratorRuntime().wrap(function
|
|
16119
|
-
while (1) switch (
|
|
16186
|
+
var _showOverlay = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee21(name) {
|
|
16187
|
+
var _classPrivateFieldGet106;
|
|
16188
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
16189
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
16120
16190
|
case 0:
|
|
16121
|
-
if (!((
|
|
16122
|
-
|
|
16191
|
+
if (!((_classPrivateFieldGet106 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet106 !== void 0 && _classPrivateFieldGet106.requestOverlay)) {
|
|
16192
|
+
_context21.next = 2;
|
|
16123
16193
|
break;
|
|
16124
16194
|
}
|
|
16125
|
-
return
|
|
16195
|
+
return _context21.abrupt("return", _classPrivateFieldGet(_impl, this).requestOverlay(name));
|
|
16126
16196
|
case 2:
|
|
16127
|
-
return
|
|
16197
|
+
return _context21.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be requested at this time"))));
|
|
16128
16198
|
case 3:
|
|
16129
16199
|
case "end":
|
|
16130
|
-
return
|
|
16200
|
+
return _context21.stop();
|
|
16131
16201
|
}
|
|
16132
|
-
},
|
|
16202
|
+
}, _callee21, this);
|
|
16133
16203
|
}));
|
|
16134
16204
|
function showOverlay(_x17) {
|
|
16135
16205
|
return _showOverlay.apply(this, arguments);
|
|
@@ -16139,24 +16209,24 @@ var init_wistia_player = __esm({
|
|
|
16139
16209
|
}, {
|
|
16140
16210
|
key: "showPopover",
|
|
16141
16211
|
value: function() {
|
|
16142
|
-
var _showPopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16143
|
-
var
|
|
16144
|
-
return _regeneratorRuntime().wrap(function
|
|
16145
|
-
while (1) switch (
|
|
16212
|
+
var _showPopover = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee22() {
|
|
16213
|
+
var _this11 = this;
|
|
16214
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
16215
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
16146
16216
|
case 0:
|
|
16147
|
-
return
|
|
16148
|
-
var
|
|
16149
|
-
if ((
|
|
16150
|
-
_classPrivateFieldGet(_api,
|
|
16217
|
+
return _context22.abrupt("return", new Promise(function(resolve, reject) {
|
|
16218
|
+
var _classPrivateFieldGet107;
|
|
16219
|
+
if ((_classPrivateFieldGet107 = _classPrivateFieldGet(_api, _this11)) !== null && _classPrivateFieldGet107 !== void 0 && _classPrivateFieldGet107.popover) {
|
|
16220
|
+
_classPrivateFieldGet(_api, _this11).popover.show();
|
|
16151
16221
|
resolve();
|
|
16152
16222
|
}
|
|
16153
16223
|
reject(new Error("Popover cannot be accessed"));
|
|
16154
16224
|
}));
|
|
16155
16225
|
case 1:
|
|
16156
16226
|
case "end":
|
|
16157
|
-
return
|
|
16227
|
+
return _context22.stop();
|
|
16158
16228
|
}
|
|
16159
|
-
},
|
|
16229
|
+
}, _callee22);
|
|
16160
16230
|
}));
|
|
16161
16231
|
function showPopover() {
|
|
16162
16232
|
return _showPopover.apply(this, arguments);
|
|
@@ -16166,20 +16236,20 @@ var init_wistia_player = __esm({
|
|
|
16166
16236
|
}, {
|
|
16167
16237
|
key: "updateEmbedOptions",
|
|
16168
16238
|
value: function() {
|
|
16169
|
-
var _updateEmbedOptions = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16170
|
-
var
|
|
16171
|
-
return _regeneratorRuntime().wrap(function
|
|
16172
|
-
while (1) switch (
|
|
16239
|
+
var _updateEmbedOptions = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee23(options) {
|
|
16240
|
+
var _this12 = this;
|
|
16241
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
16242
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
16173
16243
|
case 0:
|
|
16174
|
-
return
|
|
16175
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
16176
|
-
resolve(
|
|
16244
|
+
return _context23.abrupt("return", new Promise(function(resolve) {
|
|
16245
|
+
_assertClassBrand(_WistiaPlayer_brand, _this12, _setMultipleSyncedEmbedOptions).call(_this12, options);
|
|
16246
|
+
resolve(_this12.embedOptions);
|
|
16177
16247
|
}));
|
|
16178
16248
|
case 1:
|
|
16179
16249
|
case "end":
|
|
16180
|
-
return
|
|
16250
|
+
return _context23.stop();
|
|
16181
16251
|
}
|
|
16182
|
-
},
|
|
16252
|
+
}, _callee23);
|
|
16183
16253
|
}));
|
|
16184
16254
|
function updateEmbedOptions(_x18) {
|
|
16185
16255
|
return _updateEmbedOptions.apply(this, arguments);
|
|
@@ -16189,28 +16259,28 @@ var init_wistia_player = __esm({
|
|
|
16189
16259
|
}, {
|
|
16190
16260
|
key: "whenApiReady",
|
|
16191
16261
|
value: function() {
|
|
16192
|
-
var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16193
|
-
var
|
|
16194
|
-
return _regeneratorRuntime().wrap(function
|
|
16195
|
-
while (1) switch (
|
|
16262
|
+
var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee24() {
|
|
16263
|
+
var _this13 = this;
|
|
16264
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
16265
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
16196
16266
|
case 0:
|
|
16197
|
-
return
|
|
16198
|
-
if (_classPrivateFieldGet(_api,
|
|
16199
|
-
_classPrivateFieldGet(_api,
|
|
16267
|
+
return _context24.abrupt("return", new Promise(function(resolve) {
|
|
16268
|
+
if (_classPrivateFieldGet(_api, _this13)) {
|
|
16269
|
+
_classPrivateFieldGet(_api, _this13).ready(function() {
|
|
16200
16270
|
resolve();
|
|
16201
16271
|
});
|
|
16202
16272
|
}
|
|
16203
16273
|
var _handler2 = function handler() {
|
|
16204
|
-
|
|
16274
|
+
_this13.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
|
|
16205
16275
|
resolve();
|
|
16206
16276
|
};
|
|
16207
|
-
|
|
16277
|
+
_this13.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
|
|
16208
16278
|
}));
|
|
16209
16279
|
case 1:
|
|
16210
16280
|
case "end":
|
|
16211
|
-
return
|
|
16281
|
+
return _context24.stop();
|
|
16212
16282
|
}
|
|
16213
|
-
},
|
|
16283
|
+
}, _callee24);
|
|
16214
16284
|
}));
|
|
16215
16285
|
function whenApiReady() {
|
|
16216
16286
|
return _whenApiReady.apply(this, arguments);
|
|
@@ -16220,31 +16290,31 @@ var init_wistia_player = __esm({
|
|
|
16220
16290
|
}, {
|
|
16221
16291
|
key: "whenControlMounted",
|
|
16222
16292
|
value: function() {
|
|
16223
|
-
var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
16224
|
-
var
|
|
16293
|
+
var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee25(handle) {
|
|
16294
|
+
var _classPrivateFieldGet108;
|
|
16225
16295
|
var control;
|
|
16226
|
-
return _regeneratorRuntime().wrap(function
|
|
16227
|
-
while (1) switch (
|
|
16296
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
16297
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
16228
16298
|
case 0:
|
|
16229
|
-
|
|
16299
|
+
_context25.next = 2;
|
|
16230
16300
|
return this.whenApiReady();
|
|
16231
16301
|
case 2:
|
|
16232
|
-
|
|
16233
|
-
return (
|
|
16302
|
+
_context25.next = 4;
|
|
16303
|
+
return (_classPrivateFieldGet108 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet108 === void 0 ? void 0 : _classPrivateFieldGet108.whenControlMounted(handle);
|
|
16234
16304
|
case 4:
|
|
16235
|
-
control =
|
|
16305
|
+
control = _context25.sent;
|
|
16236
16306
|
if (control) {
|
|
16237
|
-
|
|
16307
|
+
_context25.next = 7;
|
|
16238
16308
|
break;
|
|
16239
16309
|
}
|
|
16240
16310
|
throw new Error("Control not found");
|
|
16241
16311
|
case 7:
|
|
16242
|
-
return
|
|
16312
|
+
return _context25.abrupt("return", control);
|
|
16243
16313
|
case 8:
|
|
16244
16314
|
case "end":
|
|
16245
|
-
return
|
|
16315
|
+
return _context25.stop();
|
|
16246
16316
|
}
|
|
16247
|
-
},
|
|
16317
|
+
}, _callee25, this);
|
|
16248
16318
|
}));
|
|
16249
16319
|
function whenControlMounted(_x19) {
|
|
16250
16320
|
return _whenControlMounted.apply(this, arguments);
|
|
@@ -16291,7 +16361,7 @@ var init_wistia_player = __esm({
|
|
|
16291
16361
|
}, {
|
|
16292
16362
|
key: "connectedCallback",
|
|
16293
16363
|
value: function connectedCallback() {
|
|
16294
|
-
var _window$wistiaOptions,
|
|
16364
|
+
var _window$wistiaOptions, _this14 = this, _this$embedHost;
|
|
16295
16365
|
if (_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
|
|
16296
16366
|
return;
|
|
16297
16367
|
}
|
|
@@ -16319,7 +16389,7 @@ var init_wistia_player = __esm({
|
|
|
16319
16389
|
_assertClassBrand(_WistiaPlayer_brand, this, _runMethodsFromAttributes).call(this);
|
|
16320
16390
|
_assertClassBrand(_WistiaPlayer_brand, this, _saveInitialAttributesFromDomOptions).call(this);
|
|
16321
16391
|
var resizeCallback = function resizeCallback2() {
|
|
16322
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
16392
|
+
_assertClassBrand(_WistiaPlayer_brand, _this14, _renderPreloadThumbnail).call(_this14);
|
|
16323
16393
|
};
|
|
16324
16394
|
_classPrivateFieldSet(_resizeObserver, this, new ResizeObserver(resizeCallback));
|
|
16325
16395
|
_classPrivateFieldGet(_resizeObserver, this).observe(this);
|
|
@@ -16334,16 +16404,16 @@ var init_wistia_player = __esm({
|
|
|
16334
16404
|
return;
|
|
16335
16405
|
}
|
|
16336
16406
|
var mediaData = mediaDataOrError;
|
|
16337
|
-
|
|
16338
|
-
_classPrivateFieldGet(_playerData,
|
|
16339
|
-
|
|
16407
|
+
_this14.mediaId = (_mediaData$hashedId = mediaData.hashedId) !== null && _mediaData$hashedId !== void 0 ? _mediaData$hashedId : _this14.mediaId;
|
|
16408
|
+
_classPrivateFieldGet(_playerData, _this14).setMediaDataSource(mediaData);
|
|
16409
|
+
_this14.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, {
|
|
16340
16410
|
detail: {
|
|
16341
|
-
mediaData: _classPrivateFieldGet(_playerData,
|
|
16411
|
+
mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
|
|
16342
16412
|
}
|
|
16343
16413
|
}));
|
|
16344
|
-
_assertClassBrand(_WistiaPlayer_brand,
|
|
16345
|
-
container:
|
|
16346
|
-
mediaData: _classPrivateFieldGet(_playerData,
|
|
16414
|
+
_assertClassBrand(_WistiaPlayer_brand, _this14, _initPlayerEmbed).call(_this14, {
|
|
16415
|
+
container: _this14.uniqueId,
|
|
16416
|
+
mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
|
|
16347
16417
|
});
|
|
16348
16418
|
}).catch(function(error) {
|
|
16349
16419
|
(0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__.WO)("player/failure/init-failed");
|
|
@@ -16363,7 +16433,7 @@ var init_wistia_player = __esm({
|
|
|
16363
16433
|
}, {
|
|
16364
16434
|
key: "disconnectedCallback",
|
|
16365
16435
|
value: function disconnectedCallback() {
|
|
16366
|
-
var
|
|
16436
|
+
var _classPrivateFieldGet109, _classPrivateFieldGet110, _this$shadowRoot;
|
|
16367
16437
|
_classPrivateFieldGet(_removeEventListeners, this).forEach(function(removeListener) {
|
|
16368
16438
|
return removeListener();
|
|
16369
16439
|
});
|
|
@@ -16371,10 +16441,10 @@ var init_wistia_player = __esm({
|
|
|
16371
16441
|
_classPrivateFieldSet(_eventListeners, this, {});
|
|
16372
16442
|
(0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_23__.Z)(_classPrivateFieldGet(_jsonLdId, this));
|
|
16373
16443
|
(0, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_25__.s3)(this.mediaId);
|
|
16374
|
-
(
|
|
16444
|
+
(_classPrivateFieldGet109 = _classPrivateFieldGet(_resizeObserver, this)) === null || _classPrivateFieldGet109 === void 0 ? void 0 : _classPrivateFieldGet109.disconnect();
|
|
16375
16445
|
_classPrivateFieldSet(_resizeObserver, this, null);
|
|
16376
16446
|
(0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_9__.iU)("__".concat(this.uniqueId, "_dom_options__"));
|
|
16377
|
-
(
|
|
16447
|
+
(_classPrivateFieldGet110 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet110 === void 0 ? void 0 : _classPrivateFieldGet110.remove();
|
|
16378
16448
|
_classPrivateFieldSet(_api, this, null);
|
|
16379
16449
|
(_this$shadowRoot = this.shadowRoot) === null || _this$shadowRoot === void 0 ? void 0 : _this$shadowRoot.replaceChildren();
|
|
16380
16450
|
_classPrivateFieldSet(_preactRoot, this, null);
|
|
@@ -16393,51 +16463,51 @@ var init_wistia_player = __esm({
|
|
|
16393
16463
|
}(/* @__PURE__ */ _wrapNativeSuper(HTMLElement));
|
|
16394
16464
|
_WistiaPlayer = WistiaPlayer;
|
|
16395
16465
|
getSwatchMetaData2 = /* @__PURE__ */ function() {
|
|
16396
|
-
var
|
|
16466
|
+
var _ref18 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee26(url) {
|
|
16397
16467
|
var swatch;
|
|
16398
|
-
return _regeneratorRuntime().wrap(function
|
|
16399
|
-
while (1) switch (
|
|
16468
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
16469
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
16400
16470
|
case 0:
|
|
16401
16471
|
swatch = new Image();
|
|
16402
16472
|
swatch.src = url;
|
|
16403
|
-
|
|
16473
|
+
_context26.next = 4;
|
|
16404
16474
|
return swatch.decode();
|
|
16405
16475
|
case 4:
|
|
16406
|
-
return
|
|
16476
|
+
return _context26.abrupt("return", swatch);
|
|
16407
16477
|
case 5:
|
|
16408
16478
|
case "end":
|
|
16409
|
-
return
|
|
16479
|
+
return _context26.stop();
|
|
16410
16480
|
}
|
|
16411
|
-
},
|
|
16481
|
+
}, _callee26);
|
|
16412
16482
|
}));
|
|
16413
16483
|
return function getSwatchMetaData3(_x20) {
|
|
16414
|
-
return
|
|
16484
|
+
return _ref18.apply(this, arguments);
|
|
16415
16485
|
};
|
|
16416
16486
|
}();
|
|
16417
16487
|
wistiaSwatchElement = /* @__PURE__ */ function() {
|
|
16418
|
-
var
|
|
16488
|
+
var _ref19 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee27(mediaId, embedHost) {
|
|
16419
16489
|
var swatchUrl2, swatchImg, naturalHeight, naturalWidth, ratio, style;
|
|
16420
|
-
return _regeneratorRuntime().wrap(function
|
|
16421
|
-
while (1) switch (
|
|
16490
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
16491
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
16422
16492
|
case 0:
|
|
16423
16493
|
swatchUrl2 = getSwatchUrl(mediaId, embedHost);
|
|
16424
|
-
|
|
16494
|
+
_context27.next = 3;
|
|
16425
16495
|
return getSwatchMetaData2(swatchUrl2);
|
|
16426
16496
|
case 3:
|
|
16427
|
-
swatchImg =
|
|
16497
|
+
swatchImg = _context27.sent;
|
|
16428
16498
|
naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
|
|
16429
16499
|
ratio = naturalHeight / naturalWidth * 100;
|
|
16430
16500
|
style = document.createElement("style");
|
|
16431
16501
|
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 ");
|
|
16432
|
-
return
|
|
16502
|
+
return _context27.abrupt("return", style);
|
|
16433
16503
|
case 9:
|
|
16434
16504
|
case "end":
|
|
16435
|
-
return
|
|
16505
|
+
return _context27.stop();
|
|
16436
16506
|
}
|
|
16437
|
-
},
|
|
16507
|
+
}, _callee27);
|
|
16438
16508
|
}));
|
|
16439
16509
|
return function wistiaSwatchElement2(_x21, _x22) {
|
|
16440
|
-
return
|
|
16510
|
+
return _ref19.apply(this, arguments);
|
|
16441
16511
|
};
|
|
16442
16512
|
}();
|
|
16443
16513
|
if (customElements.get("wistia-player") === void 0) {
|