@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 _classPrivateFieldGet95;
611
+ var _classPrivateFieldGet111;
611
612
  if (language == null) {
612
613
  return void 0;
613
614
  }
614
- return (_classPrivateFieldGet95 = _classPrivateFieldGet(_playerData, this).mediaData.localizations) === null || _classPrivateFieldGet95 === void 0 ? void 0 : _classPrivateFieldGet95.find(function(localization) {
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 _ref21, _ref22;
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 (_ref21 = (_ref22 = this.embedOptions[key]) !== null && _ref22 !== void 0 ? _ref22 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, (0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.$)(key))) !== null && _ref21 !== void 0 ? _ref21 : defaultEmbedOptions[key];
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(_ref23) {
646
- var container = _ref23.container, mediaData = _ref23.mediaData;
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 _classPrivateFieldGet96;
660
- (_classPrivateFieldGet96 = _classPrivateFieldGet(_internals, this)) === null || _classPrivateFieldGet96 === void 0 ? void 0 : _classPrivateFieldGet96.states.delete("--initializing");
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 _callee29(mediaId, options) {
672
- var _this22 = this;
672
+ _initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, options) {
673
+ var _this21 = this;
673
674
  var embeddedCallback;
674
- return _regeneratorRuntime().wrap(function _callee29$(_context29) {
675
- while (1) switch (_context29.prev = _context29.next) {
675
+ return _regeneratorRuntime().wrap(function _callee28$(_context28) {
676
+ while (1) switch (_context28.prev = _context28.next) {
676
677
  case 0:
677
- _context29.next = 2;
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
- _context29.next = 5;
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 _classPrivateFieldGet103;
689
- void _assertClassBrand(_WistiaPlayer_brand, _this22, _maybeInitializeMux).call(_this22);
690
- _assertClassBrand(_WistiaPlayer_brand, _this22, _renderEmbedTemplate).call(_this22);
691
- (_classPrivateFieldGet103 = _classPrivateFieldGet(_resizeObserver, _this22)) === null || _classPrivateFieldGet103 === void 0 ? void 0 : _classPrivateFieldGet103.disconnect();
692
- _classPrivateFieldSet(_resizeObserver, _this22, null);
693
- if (_classPrivateFieldGet(_playPending, _this22)) {
694
- void _this22.play();
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
- _this22.removeEventListener("embedded", embeddedCallback);
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
- _this22.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, _this22));
706
- _this22.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, _this22));
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 _classPrivateFieldGet104;
710
- (_classPrivateFieldGet104 = _classPrivateFieldGet(_preloadThumbnailRoot, _this22)) === null || _classPrivateFieldGet104 === void 0 ? void 0 : _classPrivateFieldGet104.remove();
711
- _this22.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, _this22));
712
- _this22.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, {
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
- _this22.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
718
+ _this21.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
718
719
  detail: {
719
720
  mediaId,
720
- api: _classPrivateFieldGet(_api, _this22)
721
+ api: _classPrivateFieldGet(_api, _this21)
721
722
  }
722
723
  }));
723
- if (_classPrivateFieldGet(_impl, _this22)) {
724
- Object.entries(_classPrivateFieldGet(_impl, _this22)._attrs).forEach(function(_ref29) {
725
- var _ref30 = _slicedToArray(_ref29, 2), key = _ref30[0], value = _ref30[1];
726
- _classPrivateFieldGet(_playerData, _this22).updateEmbedOptionOverrides(_defineProperty({}, key, value));
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, _this22, _renderPreloadThumbnail).call(_this22);
730
+ _assertClassBrand(_WistiaPlayer_brand, _this21, _renderPreloadThumbnail).call(_this21);
730
731
  });
731
732
  case 13:
732
733
  case "end":
733
- return _context29.stop();
734
+ return _context28.stop();
734
735
  }
735
- }, _callee29, this);
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 _callee30() {
747
- var _this23 = this;
747
+ _maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee29() {
748
+ var _this22 = this;
748
749
  var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
749
- return _regeneratorRuntime().wrap(function _callee30$(_context30) {
750
- while (1) switch (_context30.prev = _context30.next) {
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
- _context30.next = 2;
754
+ _context29.next = 2;
754
755
  break;
755
756
  }
756
- return _context30.abrupt("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
- _context30.next = 11;
763
+ _context29.next = 11;
763
764
  break;
764
765
  }
765
- _context30.next = 8;
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 = _context30.sent;
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 _classPrivateFieldGet106, _classPrivateFieldGet107;
776
- (_classPrivateFieldGet106 = _classPrivateFieldGet(_api, _this23)) === null || _classPrivateFieldGet106 === void 0 ? void 0 : (_classPrivateFieldGet107 = _classPrivateFieldGet106.mux) === null || _classPrivateFieldGet107 === void 0 ? void 0 : _classPrivateFieldGet107.destroy();
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 _context30.stop();
782
+ return _context29.stop();
782
783
  }
783
- }, _callee30, this);
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, _this16 = this;
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(_ref24) {
860
- _classPrivateFieldSet(_preloadThumbnailRoot, _this16, _ref24);
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 _classPrivateFieldGet97 = _classPrivateFieldGet(_playerData, this).mediaData, assets = _classPrivateFieldGet97.assets, mediaType = _classPrivateFieldGet97.mediaType, carouselHardWall = _classPrivateFieldGet97.carouselHardWall;
870
- var _classPrivateFieldGet98 = _classPrivateFieldGet(_playerData, this).embedOptions, autoPlay = _classPrivateFieldGet98.autoPlay, plugin = _classPrivateFieldGet98.plugin;
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 _this17 = this;
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 _ref25, _classPrivateFieldGet99, _classPrivateFieldGet100;
896
- var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this17, _getValueFromAttribute).call(_this17, "current-time"));
897
- var isClosedPopover = (_ref25 = ((_classPrivateFieldGet99 = _classPrivateFieldGet(_api, _this17)) === null || _classPrivateFieldGet99 === void 0 ? void 0 : _classPrivateFieldGet99.popover) && !_classPrivateFieldGet(_api, _this17).popover.isVisible()) !== null && _ref25 !== void 0 ? _ref25 : false;
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 = _this17.state !== "playing" && (isMobile || isClosedPopover);
900
- void ((_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, _this17)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.time(newTime, {
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, _this17, _setSyncedEmbedOption).call(_this17, "currentTime", newTime);
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 _classPrivateFieldGet101;
913
- var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this17, _getValueFromAttribute).call(_this17, "video-quality");
914
- (_classPrivateFieldGet101 = _classPrivateFieldGet(_impl, _this17)) === null || _classPrivateFieldGet101 === void 0 ? void 0 : _classPrivateFieldGet101.setVideoQuality(newQuality);
915
- _assertClassBrand(_WistiaPlayer_brand, _this17, _setSyncedEmbedOption).call(_this17, "videoQuality", newQuality);
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 _this18 = this;
922
- var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref26) {
923
- var _ref27 = _slicedToArray(_ref26, 2), value = _ref27[1];
924
- return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this18, _getValueFromAttribute).call(_this18, value.name)];
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 _this19 = this;
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(_this19), key)) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert.set) {
938
- _this19[key] = value;
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, _this19, _setSyncedEmbedOption).call(_this19, key, value);
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 _this20 = this;
954
+ var _this19 = this;
954
955
  var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
955
- var _ref28 = event.detail, mediaData = _ref28.mediaData;
956
- _assertClassBrand(_WistiaPlayer_brand, _this20, _updateMediaData).call(_this20, mediaData);
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, _this20, event.detail.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
- _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
965
+ _this19.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
965
966
  }, function() {
966
- _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
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 _this21 = this;
977
+ var _this20 = this;
977
978
  (0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_19__.$B)(function(localStorage2) {
978
- localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this21, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this21, _get_pageUrl)]), {}, {
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
- /* unused pure expression or super */
6445
- null
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
- Wistia.languagePreference = navigator.languages || [navigator.language];
6558
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s.languagePreference = navigator.languages || [navigator.language];
6501
6559
  } else {
6502
- Wistia.languagePreference = ["en-US"];
6560
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__2.s.languagePreference = ["en-US"];
6503
6561
  }
6504
- return Wistia.languagePreference;
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.0";
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 _classPrivateFieldGet10;
14394
- (_classPrivateFieldGet10 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet10 === void 0 ? void 0 : _classPrivateFieldGet10.setControlBarBorderRadius(Number(radius));
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 _classPrivateFieldGet11;
14421
- (_classPrivateFieldGet11 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet11 === void 0 ? void 0 : _classPrivateFieldGet11.renderUI();
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, _classPrivateFieldGet12;
14453
- return (_ref3 = (_ref4 = (_classPrivateFieldGet12 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet12 === void 0 ? void 0 : _classPrivateFieldGet12.time()) !== null && _ref4 !== void 0 ? _ref4 : this.embedOptions.currentTime) !== null && _ref3 !== void 0 ? _ref3 : 0;
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 _classPrivateFieldGet13;
14457
- void ((_classPrivateFieldGet13 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet13 === void 0 ? void 0 : _classPrivateFieldGet13.time(newTime));
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 _classPrivateFieldGet14;
14561
+ var _classPrivateFieldGet22;
14467
14562
  return {
14468
14563
  impl: _classPrivateFieldGet(_impl, this),
14469
- engine: (_classPrivateFieldGet14 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet14 === void 0 ? void 0 : _classPrivateFieldGet14.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 _classPrivateFieldGet15, _classPrivateFieldGet16;
14503
- return (_classPrivateFieldGet15 = (_classPrivateFieldGet16 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet16 === void 0 ? void 0 : _classPrivateFieldGet16.duration()) !== null && _classPrivateFieldGet15 !== void 0 ? _classPrivateFieldGet15 : 0;
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 _classPrivateFieldGet17;
14554
- return ((_classPrivateFieldGet17 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet17 === void 0 ? void 0 : _classPrivateFieldGet17.state()) === "ended";
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 _classPrivateFieldGet18;
14568
- (_classPrivateFieldGet18 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet18 === void 0 ? void 0 : _classPrivateFieldGet18.addLoopBehavior();
14662
+ var _classPrivateFieldGet26;
14663
+ (_classPrivateFieldGet26 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet26 === void 0 ? void 0 : _classPrivateFieldGet26.addLoopBehavior();
14569
14664
  } else {
14570
- var _classPrivateFieldGet19;
14571
- (_classPrivateFieldGet19 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet19 === void 0 ? void 0 : _classPrivateFieldGet19.removeLoopBehavior();
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 _classPrivateFieldGet20;
14583
- return (_classPrivateFieldGet20 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet20 === void 0 ? void 0 : _classPrivateFieldGet20.eventKey();
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 _classPrivateFieldGet21;
14596
- (_classPrivateFieldGet21 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet21 === void 0 ? void 0 : _classPrivateFieldGet21.fullscreenControlEnabled(shouldDisplay);
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 _classPrivateFieldGet22, _classPrivateFieldGet23;
14620
- return (_classPrivateFieldGet22 = (_classPrivateFieldGet23 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet23 === void 0 ? void 0 : _classPrivateFieldGet23.inFullscreen()) !== null && _classPrivateFieldGet22 !== void 0 ? _classPrivateFieldGet22 : false;
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 _classPrivateFieldGet24;
14626
- return (_classPrivateFieldGet24 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet24 === void 0 ? void 0 : _classPrivateFieldGet24.getInputContext();
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 _classPrivateFieldGet25, _classPrivateFieldGet26;
14636
- return (_classPrivateFieldGet25 = (_classPrivateFieldGet26 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet26 === void 0 ? void 0 : _classPrivateFieldGet26.isInstantHls()) !== null && _classPrivateFieldGet25 !== void 0 ? _classPrivateFieldGet25 : false;
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 _assertClassBrand$cal;
14642
- if (_classPrivateFieldGet(_playerData, this).mediaData.ietfLanguageTag == null) {
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 _classPrivateFieldGet27, _this3 = this;
14649
- var localization = _assertClassBrand(_WistiaPlayer_brand, this, _findLocalizationByLanguage).call(this, language);
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 _classPrivateFieldGet28;
14697
- var result = (_classPrivateFieldGet28 = _classPrivateFieldGet(_playerData, this).mediaData.localizations) !== null && _classPrivateFieldGet28 !== void 0 ? _classPrivateFieldGet28 : [];
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 _ref8, _classPrivateFieldGet29, _classPrivateFieldGet30;
14738
- return (_ref8 = (_classPrivateFieldGet29 = (_classPrivateFieldGet30 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet30 === void 0 ? void 0 : _classPrivateFieldGet30.isMuted()) !== null && _classPrivateFieldGet29 !== void 0 ? _classPrivateFieldGet29 : this.embedOptions.muted) !== null && _ref8 !== void 0 ? _ref8 : false;
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 _ref9, _classPrivateFieldGet31, _classPrivateFieldGet32, _classPrivateFieldGet33;
14759
- return (_ref9 = (_classPrivateFieldGet31 = _classPrivateFieldGet(_playerData, this).mediaData.name) !== null && _classPrivateFieldGet31 !== void 0 ? _classPrivateFieldGet31 : (_classPrivateFieldGet32 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet32 === void 0 ? void 0 : (_classPrivateFieldGet33 = _classPrivateFieldGet32._mediaData) === null || _classPrivateFieldGet33 === void 0 ? void 0 : _classPrivateFieldGet33.name) !== null && _ref9 !== void 0 ? _ref9 : void 0;
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 _classPrivateFieldGet34;
14777
- return ((_classPrivateFieldGet34 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet34 === void 0 ? void 0 : _classPrivateFieldGet34.state()) === "paused";
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 _classPrivateFieldGet35, _classPrivateFieldGet36;
14787
- return (_classPrivateFieldGet35 = (_classPrivateFieldGet36 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet36 === void 0 ? void 0 : _classPrivateFieldGet36.percentWatched()) !== null && _classPrivateFieldGet35 !== void 0 ? _classPrivateFieldGet35 : 0;
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 _ref10, _classPrivateFieldGet37, _classPrivateFieldGet38;
14797
- return (_ref10 = (_classPrivateFieldGet37 = (_classPrivateFieldGet38 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet38 === void 0 ? void 0 : _classPrivateFieldGet38.playbackRate()) !== null && _classPrivateFieldGet37 !== void 0 ? _classPrivateFieldGet37 : this.embedOptions.playbackRate) !== null && _ref10 !== void 0 ? _ref10 : 1;
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 _classPrivateFieldGet39;
14801
- (_classPrivateFieldGet39 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet39 === void 0 ? void 0 : _classPrivateFieldGet39.playbackRate(rate);
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 _classPrivateFieldGet40;
14815
- (_classPrivateFieldGet40 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet40 === void 0 ? void 0 : _classPrivateFieldGet40.playbackRateControlEnabled(shouldDisplay);
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 _classPrivateFieldGet41;
14829
- (_classPrivateFieldGet41 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet41 === void 0 ? void 0 : _classPrivateFieldGet41.playbarControlEnabled(shouldDisplay);
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 _classPrivateFieldGet42;
14843
- (_classPrivateFieldGet42 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet42 === void 0 ? void 0 : _classPrivateFieldGet42.setPlayerBorderRadius(Number(radius));
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 _classPrivateFieldGet43;
14862
- (_classPrivateFieldGet43 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet43 === void 0 ? void 0 : _classPrivateFieldGet43.playerColor(newColor);
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 _classPrivateFieldGet44;
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
- (_classPrivateFieldGet44 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet44 === void 0 ? void 0 : _classPrivateFieldGet44.playerColorGradient(gradient);
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 _ref11;
14891
- return (_ref11 = this.getAttribute("player-force")) !== null && _ref11 !== void 0 ? _ref11 : void 0;
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 _classPrivateFieldGet45;
14936
- (_classPrivateFieldGet45 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet45 === void 0 ? void 0 : _classPrivateFieldGet45.playPauseControlEnabled(shouldDisplay);
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 _classPrivateFieldGet46;
14952
- (_classPrivateFieldGet46 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet46 === void 0 ? void 0 : _classPrivateFieldGet46.playPauseNotifierEnabled(shouldDisplay);
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 _ref12, _classPrivateFieldGet47, _classPrivateFieldGet48;
15171
- return (_ref12 = (_classPrivateFieldGet47 = (_classPrivateFieldGet48 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet48 === void 0 ? void 0 : _classPrivateFieldGet48.preloadValue()) !== null && _classPrivateFieldGet47 !== void 0 ? _classPrivateFieldGet47 : this.embedOptions.preload) !== null && _ref12 !== void 0 ? _ref12 : void 0;
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 _classPrivateFieldGet49;
15192
- (_classPrivateFieldGet49 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet49 === void 0 ? void 0 : _classPrivateFieldGet49.qualityControlEnabled(shouldDisplay);
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 _classPrivateFieldGet50;
15206
- (_classPrivateFieldGet50 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet50 === void 0 ? void 0 : _classPrivateFieldGet50.qualityMax(quality);
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 _classPrivateFieldGet51;
15220
- (_classPrivateFieldGet51 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet51 === void 0 ? void 0 : _classPrivateFieldGet51.qualityMin(quality);
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 _classPrivateFieldGet52, _classPrivateFieldGet53;
15231
- return (_classPrivateFieldGet52 = (_classPrivateFieldGet53 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet53 === void 0 ? void 0 : _classPrivateFieldGet53.getReadyState()) !== null && _classPrivateFieldGet52 !== void 0 ? _classPrivateFieldGet52 : 0;
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 _classPrivateFieldGet54;
15244
- (_classPrivateFieldGet54 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet54 === void 0 ? void 0 : _classPrivateFieldGet54.setResumable(resumableState);
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 _classPrivateFieldGet55;
15258
- (_classPrivateFieldGet55 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet55 === void 0 ? void 0 : _classPrivateFieldGet55.setRoundedPlayer(Number(radius));
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 _classPrivateFieldGet56, _classPrivateFieldGet57;
15270
- return (_classPrivateFieldGet56 = (_classPrivateFieldGet57 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet57 === void 0 ? void 0 : _classPrivateFieldGet57.secondsWatched()) !== null && _classPrivateFieldGet56 !== void 0 ? _classPrivateFieldGet56 : 0;
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 _classPrivateFieldGet58, _classPrivateFieldGet59;
15280
- return (_classPrivateFieldGet58 = (_classPrivateFieldGet59 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet59 === void 0 ? void 0 : _classPrivateFieldGet59.secondsWatchedVector()) !== null && _classPrivateFieldGet58 !== void 0 ? _classPrivateFieldGet58 : [];
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 _classPrivateFieldGet60;
15305
- (_classPrivateFieldGet60 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet60 === void 0 ? void 0 : _classPrivateFieldGet60.settingsControlEnabled(shouldDisplay);
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 _classPrivateFieldGet61, _classPrivateFieldGet62;
15328
- return (_classPrivateFieldGet61 = (_classPrivateFieldGet62 = _classPrivateFieldGet(_playerData, this).mediaData.localizations) === null || _classPrivateFieldGet62 === void 0 ? void 0 : _classPrivateFieldGet62.find(function(loc) {
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 && _classPrivateFieldGet61 !== void 0 ? _classPrivateFieldGet61 : this.languages[0];
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 _classPrivateFieldGet63, _classPrivateFieldGet64;
15351
- return (_classPrivateFieldGet63 = (_classPrivateFieldGet64 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet64 === void 0 ? void 0 : _classPrivateFieldGet64.state()) !== null && _classPrivateFieldGet63 !== void 0 ? _classPrivateFieldGet63 : defaultEmbedOptions.state;
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 _ref13, _classPrivateFieldGet65, _classPrivateFieldGet66;
15430
- return (_ref13 = (_classPrivateFieldGet65 = (_classPrivateFieldGet66 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet66 === void 0 ? void 0 : _classPrivateFieldGet66.getVideoQuality()) !== null && _classPrivateFieldGet65 !== void 0 ? _classPrivateFieldGet65 : this.embedOptions.videoQuality) !== null && _ref13 !== void 0 ? _ref13 : "auto";
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 _classPrivateFieldGet67;
15434
- (_classPrivateFieldGet67 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet67 === void 0 ? void 0 : _classPrivateFieldGet67.setVideoQuality(quality);
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 _classPrivateFieldGet68;
15458
- (_classPrivateFieldGet68 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet68 === void 0 ? void 0 : _classPrivateFieldGet68.volume(level);
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 _classPrivateFieldGet69;
15474
- (_classPrivateFieldGet69 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet69 === void 0 ? void 0 : _classPrivateFieldGet69.volumeControlEnabled(shouldDisplay);
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 _callee2() {
15520
- var _classPrivateFieldGet70, _this4 = this;
15521
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
15522
- while (1) switch (_context2.prev = _context2.next) {
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 _context2.abrupt("return", (_classPrivateFieldGet70 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet70 === void 0 ? void 0 : _classPrivateFieldGet70.cancelFullscreen().then(function() {
15525
- _this4._fullscreenState.heightBeforeFullscreen = void 0;
15526
- _this4._fullscreenState.widthBeforeFullscreen = void 0;
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 _context2.stop();
15600
+ return _context.stop();
15531
15601
  }
15532
- }, _callee2, this);
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 _callee3(name, options) {
15543
- var _classPrivateFieldGet71;
15544
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
15545
- while (1) switch (_context3.prev = _context3.next) {
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 (!((_classPrivateFieldGet71 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet71 !== void 0 && _classPrivateFieldGet71.defineOverlay)) {
15548
- _context3.next = 2;
15617
+ if (!((_classPrivateFieldGet87 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet87 !== void 0 && _classPrivateFieldGet87.defineOverlay)) {
15618
+ _context2.next = 2;
15549
15619
  break;
15550
15620
  }
15551
- return _context3.abrupt("return", _classPrivateFieldGet(_impl, this).defineOverlay(name, options));
15621
+ return _context2.abrupt("return", _classPrivateFieldGet(_impl, this).defineOverlay(name, options));
15552
15622
  case 2:
15553
- return _context3.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be defined at this time"))));
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 _context3.stop();
15626
+ return _context2.stop();
15557
15627
  }
15558
- }, _callee3, this);
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 _callee5(name, options) {
15569
- var _this5 = this;
15638
+ var _definePlugin = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(name, options) {
15639
+ var _this4 = this;
15570
15640
  var addPlugin;
15571
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
15572
- while (1) switch (_context5.prev = _context5.next) {
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 _ref14 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4() {
15576
- var _classPrivateFieldGet72, _classPrivateFieldGet73;
15577
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
15578
- while (1) switch (_context4.prev = _context4.next) {
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 _context4.abrupt("return", (_classPrivateFieldGet72 = (_classPrivateFieldGet73 = _classPrivateFieldGet(_api, _this5)) === null || _classPrivateFieldGet73 === void 0 ? void 0 : _classPrivateFieldGet73.addPlugin(name, options)) !== null && _classPrivateFieldGet72 !== void 0 ? _classPrivateFieldGet72 : Promise.reject(new Error("plugin ".concat(name, " cannot be defined"))));
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 _context4.stop();
15653
+ return _context3.stop();
15584
15654
  }
15585
- }, _callee4);
15655
+ }, _callee3);
15586
15656
  }));
15587
15657
  return function addPlugin2() {
15588
- return _ref14.apply(this, arguments);
15658
+ return _ref13.apply(this, arguments);
15589
15659
  };
15590
15660
  }();
15591
15661
  if (!_classPrivateFieldGet(_api, this)) {
15592
- _context5.next = 3;
15662
+ _context4.next = 3;
15593
15663
  break;
15594
15664
  }
15595
- return _context5.abrupt("return", addPlugin());
15665
+ return _context4.abrupt("return", addPlugin());
15596
15666
  case 3:
15597
- return _context5.abrupt("return", new Promise(function(resolve, reject) {
15598
- _this5.whenApiReady().then(function() {
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 _context5.stop();
15683
+ return _context4.stop();
15614
15684
  }
15615
- }, _callee5, this);
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 _callee6(name) {
15626
- var _classPrivateFieldGet74;
15627
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
15628
- while (1) switch (_context6.prev = _context6.next) {
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 (!((_classPrivateFieldGet74 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet74 !== void 0 && _classPrivateFieldGet74.undefineOverlay)) {
15631
- _context6.next = 2;
15700
+ if (!((_classPrivateFieldGet90 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet90 !== void 0 && _classPrivateFieldGet90.undefineOverlay)) {
15701
+ _context5.next = 2;
15632
15702
  break;
15633
15703
  }
15634
- return _context6.abrupt("return", _classPrivateFieldGet(_impl, this).undefineOverlay(name));
15704
+ return _context5.abrupt("return", _classPrivateFieldGet(_impl, this).undefineOverlay(name));
15635
15705
  case 2:
15636
- return _context6.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be deleted at this time"))));
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 _context6.stop();
15709
+ return _context5.stop();
15640
15710
  }
15641
- }, _callee6, this);
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 _callee7(name) {
15652
- var _classPrivateFieldGet75;
15653
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
15654
- while (1) switch (_context7.prev = _context7.next) {
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 (!((_classPrivateFieldGet75 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet75 !== void 0 && _classPrivateFieldGet75.setControlEnabled)) {
15657
- _context7.next = 2;
15726
+ if (!((_classPrivateFieldGet91 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet91 !== void 0 && _classPrivateFieldGet91.setControlEnabled)) {
15727
+ _context6.next = 2;
15658
15728
  break;
15659
15729
  }
15660
- return _context7.abrupt("return", _classPrivateFieldGet(_impl, this).setControlEnabled(name, false));
15730
+ return _context6.abrupt("return", _classPrivateFieldGet(_impl, this).setControlEnabled(name, false));
15661
15731
  case 2:
15662
- return _context7.abrupt("return", Promise.reject(new Error('control "'.concat(name, '" cannot be disabled at this time'))));
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 _context7.stop();
15735
+ return _context6.stop();
15666
15736
  }
15667
- }, _callee7, this);
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 _callee8(name) {
15678
- var _classPrivateFieldGet76;
15679
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
15680
- while (1) switch (_context8.prev = _context8.next) {
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 (!((_classPrivateFieldGet76 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet76 !== void 0 && _classPrivateFieldGet76.setControlEnabled)) {
15683
- _context8.next = 2;
15752
+ if (!((_classPrivateFieldGet92 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet92 !== void 0 && _classPrivateFieldGet92.setControlEnabled)) {
15753
+ _context7.next = 2;
15684
15754
  break;
15685
15755
  }
15686
- return _context8.abrupt("return", _classPrivateFieldGet(_impl, this).setControlEnabled(name, true));
15756
+ return _context7.abrupt("return", _classPrivateFieldGet(_impl, this).setControlEnabled(name, true));
15687
15757
  case 2:
15688
- return _context8.abrupt("return", Promise.reject(new Error('control "'.concat(name, '" cannot be enabled at this time'))));
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 _context8.stop();
15761
+ return _context7.stop();
15692
15762
  }
15693
- }, _callee8, this);
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 _callee9(context) {
15704
- var _classPrivateFieldGet77, _this6 = this;
15705
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
15706
- while (1) switch (_context9.prev = _context9.next) {
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 (!((_classPrivateFieldGet77 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet77 !== void 0 && _classPrivateFieldGet77.enterInputContext)) {
15709
- _context9.next = 2;
15778
+ if (!((_classPrivateFieldGet93 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet93 !== void 0 && _classPrivateFieldGet93.enterInputContext)) {
15779
+ _context8.next = 2;
15710
15780
  break;
15711
15781
  }
15712
- return _context9.abrupt("return", new Promise(function(resolve) {
15713
- var _classPrivateFieldGet78;
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
- _this6.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.ve, _handler);
15789
+ _this5.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.ve, _handler);
15720
15790
  };
15721
- _this6.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.ve, _handler);
15722
- (_classPrivateFieldGet78 = _classPrivateFieldGet(_impl, _this6)) === null || _classPrivateFieldGet78 === void 0 ? void 0 : _classPrivateFieldGet78.enterInputContext(context);
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 _context9.abrupt("return", Promise.reject(new Error('input context of name "'.concat(context, '" cannot be enabled at this time'))));
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 _context9.stop();
15798
+ return _context8.stop();
15729
15799
  }
15730
- }, _callee9, this);
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 _callee10(context) {
15741
- var _classPrivateFieldGet79;
15742
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
15743
- while (1) switch (_context10.prev = _context10.next) {
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 (!((_classPrivateFieldGet79 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet79 !== void 0 && _classPrivateFieldGet79.exitInputContext)) {
15746
- _context10.next = 2;
15815
+ if (!((_classPrivateFieldGet95 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet95 !== void 0 && _classPrivateFieldGet95.exitInputContext)) {
15816
+ _context9.next = 2;
15747
15817
  break;
15748
15818
  }
15749
- return _context10.abrupt("return", Promise.resolve(_classPrivateFieldGet(_impl, this).exitInputContext(context)));
15819
+ return _context9.abrupt("return", Promise.resolve(_classPrivateFieldGet(_impl, this).exitInputContext(context)));
15750
15820
  case 2:
15751
- return _context10.abrupt("return", Promise.reject(new Error('control "'.concat(context, '" cannot be enabled at this time'))));
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 _context10.stop();
15824
+ return _context9.stop();
15755
15825
  }
15756
- }, _callee10, this);
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 _callee11(mediaId, options) {
15774
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
15775
- while (1) switch (_context11.prev = _context11.next) {
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 _context11.abrupt("return", (0, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_24__.n)(mediaId, options));
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 _context11.stop();
15850
+ return _context10.stop();
15781
15851
  }
15782
- }, _callee11);
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 _callee12(name) {
15793
- var _this7 = this;
15794
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
15795
- while (1) switch (_context12.prev = _context12.next) {
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 _context12.abrupt("return", new Promise(function(resolve, reject) {
15798
- var _classPrivateFieldGet80;
15799
- if ((_classPrivateFieldGet80 = _classPrivateFieldGet(_api, _this7)) !== null && _classPrivateFieldGet80 !== void 0 && _classPrivateFieldGet80.plugin && name in _classPrivateFieldGet(_api, _this7).plugin) {
15800
- resolve(_classPrivateFieldGet(_api, _this7).plugin[name]);
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 _context12.stop();
15876
+ return _context11.stop();
15807
15877
  }
15808
- }, _callee12);
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 _callee13() {
15819
- var _classPrivateFieldGet81, _this8 = this;
15820
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
15821
- while (1) switch (_context13.prev = _context13.next) {
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
- _context13.next = 2;
15894
+ _context12.next = 2;
15825
15895
  break;
15826
15896
  }
15827
- return _context13.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
15897
+ return _context12.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
15828
15898
  case 2:
15829
15899
  if (!(this.languages.length <= 1)) {
15830
- _context13.next = 5;
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 _context13.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
15906
+ return _context12.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
15837
15907
  case 5:
15838
- if (!((_classPrivateFieldGet81 = _classPrivateFieldGet(_cachedRemapTime, this)) !== null && _classPrivateFieldGet81 !== void 0)) {
15839
- _context13.next = 9;
15908
+ if (!((_classPrivateFieldGet97 = _classPrivateFieldGet(_cachedRemapTime, this)) !== null && _classPrivateFieldGet97 !== void 0)) {
15909
+ _context12.next = 9;
15840
15910
  break;
15841
15911
  }
15842
- _classPrivateFieldGet81;
15843
- _context13.next = 16;
15912
+ _classPrivateFieldGet97;
15913
+ _context12.next = 16;
15844
15914
  break;
15845
15915
  case 9:
15846
- _context13.t0 = _classPrivateFieldSet;
15847
- _context13.t1 = _cachedRemapTime;
15848
- _context13.t2 = this;
15849
- _context13.next = 14;
15850
- return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__.$)("assets/external/timeMapping.js").then(function(_ref15) {
15851
- var remapTime = _ref15.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, _this8, _findLocalizationByLanguage).call(_this8, fromLanguage);
15855
- var sourceLocalization = _this8.sourceLanguage;
15856
- var toLocalization = _assertClassBrand(_WistiaPlayer_brand, _this8, _findLocalizationByLanguage).call(_this8, toLanguage);
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
- _context13.t3 = _context13.sent;
15865
- (0, _context13.t0)(_context13.t1, _context13.t2, _context13.t3);
15934
+ _context12.t3 = _context12.sent;
15935
+ (0, _context12.t0)(_context12.t1, _context12.t2, _context12.t3);
15866
15936
  case 16:
15867
- return _context13.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
15937
+ return _context12.abrupt("return", _classPrivateFieldGet(_cachedRemapTime, this));
15868
15938
  case 17:
15869
15939
  case "end":
15870
- return _context13.stop();
15940
+ return _context12.stop();
15871
15941
  }
15872
- }, _callee13, this);
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 _callee14(name) {
15883
- var _classPrivateFieldGet82;
15884
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
15885
- while (1) switch (_context14.prev = _context14.next) {
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 (!((_classPrivateFieldGet82 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet82 !== void 0 && _classPrivateFieldGet82.cancelOverlay)) {
15888
- _context14.next = 2;
15957
+ if (!((_classPrivateFieldGet98 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet98 !== void 0 && _classPrivateFieldGet98.cancelOverlay)) {
15958
+ _context13.next = 2;
15889
15959
  break;
15890
15960
  }
15891
- return _context14.abrupt("return", _classPrivateFieldGet(_impl, this).cancelOverlay(name));
15961
+ return _context13.abrupt("return", _classPrivateFieldGet(_impl, this).cancelOverlay(name));
15892
15962
  case 2:
15893
- return _context14.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be cancelled at this time"))));
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 _context14.stop();
15966
+ return _context13.stop();
15897
15967
  }
15898
- }, _callee14, this);
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 _callee15() {
15909
- var _this9 = this;
15910
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
15911
- while (1) switch (_context15.prev = _context15.next) {
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 _context15.abrupt("return", new Promise(function(resolve, reject) {
15914
- var _classPrivateFieldGet83;
15915
- if ((_classPrivateFieldGet83 = _classPrivateFieldGet(_api, _this9)) !== null && _classPrivateFieldGet83 !== void 0 && _classPrivateFieldGet83.popover) {
15916
- _classPrivateFieldGet(_api, _this9).popover.hide();
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 _context15.stop();
15993
+ return _context14.stop();
15924
15994
  }
15925
- }, _callee15);
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 _callee16() {
15936
- var _classPrivateFieldGet84;
15937
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
15938
- while (1) switch (_context16.prev = _context16.next) {
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 _context16.abrupt("return", (_classPrivateFieldGet84 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet84 === void 0 ? void 0 : _classPrivateFieldGet84.pause());
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 _context16.stop();
16013
+ return _context15.stop();
15944
16014
  }
15945
- }, _callee16, this);
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 _callee17() {
15956
- var _classPrivateFieldGet85;
15957
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
15958
- while (1) switch (_context17.prev = _context17.next) {
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 _context17.abrupt("return", (_classPrivateFieldGet85 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet85 === void 0 ? void 0 : _classPrivateFieldGet85.play());
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 _context17.stop();
16033
+ return _context16.stop();
15964
16034
  }
15965
- }, _callee17, this);
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 _callee18(name) {
15976
- var _classPrivateFieldGet86;
15977
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
15978
- while (1) switch (_context18.prev = _context18.next) {
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 _context18.abrupt("return", (_classPrivateFieldGet86 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet86 === void 0 ? void 0 : _classPrivateFieldGet86.releaseControls(name));
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 _context18.stop();
16053
+ return _context17.stop();
15984
16054
  }
15985
- }, _callee18, this);
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 _this10 = this;
15996
- Object.entries(_classPrivateFieldGet(_eventListeners, this)).forEach(function(_ref16) {
15997
- var _ref17 = _slicedToArray(_ref16, 2), type = _ref17[0], listeners = _ref17[1];
15998
- listeners.forEach(function(_ref18) {
15999
- var listener = _ref18.listener, options = _ref18.options;
16000
- _this10.removeEventListener(type, listener, options);
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 _callee19(mediaId) {
16037
- var _this11 = this;
16038
- var options, _args19 = arguments;
16039
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
16040
- while (1) switch (_context19.prev = _context19.next) {
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 = _args19.length > 1 && _args19[1] !== void 0 ? _args19[1] : {};
16043
- return _context19.abrupt("return", new Promise(function(resolve, reject) {
16044
- var _classPrivateFieldGet87;
16045
- if (!_classPrivateFieldGet(_api, _this11)) {
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, _this11));
16118
+ (0, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_23__.Z)(_classPrivateFieldGet(_jsonLdId, _this10));
16049
16119
  var _handleAfterReplace2 = function handleAfterReplace() {
16050
- _this11.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _handleAfterReplace2);
16120
+ _this10.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _handleAfterReplace2);
16051
16121
  resolve();
16052
16122
  };
16053
- _this11.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _handleAfterReplace2);
16054
- (_classPrivateFieldGet87 = _classPrivateFieldGet(_api, _this11)) === null || _classPrivateFieldGet87 === void 0 ? void 0 : _classPrivateFieldGet87.replaceWith(mediaId, options);
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 _context19.stop();
16128
+ return _context18.stop();
16059
16129
  }
16060
- }, _callee19);
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 _callee20(name) {
16071
- var _classPrivateFieldGet88;
16072
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
16073
- while (1) switch (_context20.prev = _context20.next) {
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 _context20.abrupt("return", (_classPrivateFieldGet88 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet88 === void 0 ? void 0 : _classPrivateFieldGet88.requestControls(name));
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 _context20.stop();
16148
+ return _context19.stop();
16079
16149
  }
16080
- }, _callee20, this);
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 _callee21() {
16091
- var _classPrivateFieldGet89;
16092
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
16093
- while (1) switch (_context21.prev = _context21.next) {
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 (!((_classPrivateFieldGet89 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet89 !== void 0 && _classPrivateFieldGet89.requestFullscreen)) {
16096
- _context21.next = 2;
16165
+ if (!((_classPrivateFieldGet105 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet105 !== void 0 && _classPrivateFieldGet105.requestFullscreen)) {
16166
+ _context20.next = 2;
16097
16167
  break;
16098
16168
  }
16099
- return _context21.abrupt("return", _classPrivateFieldGet(_impl, this).requestFullscreen());
16169
+ return _context20.abrupt("return", _classPrivateFieldGet(_impl, this).requestFullscreen());
16100
16170
  case 2:
16101
- return _context21.abrupt("return", Promise.reject(new Error("Fullscreen cannot be accessed")));
16171
+ return _context20.abrupt("return", Promise.reject(new Error("Fullscreen cannot be accessed")));
16102
16172
  case 3:
16103
16173
  case "end":
16104
- return _context21.stop();
16174
+ return _context20.stop();
16105
16175
  }
16106
- }, _callee21, this);
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 _callee22(name) {
16117
- var _classPrivateFieldGet90;
16118
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
16119
- while (1) switch (_context22.prev = _context22.next) {
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 (!((_classPrivateFieldGet90 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet90 !== void 0 && _classPrivateFieldGet90.requestOverlay)) {
16122
- _context22.next = 2;
16191
+ if (!((_classPrivateFieldGet106 = _classPrivateFieldGet(_impl, this)) !== null && _classPrivateFieldGet106 !== void 0 && _classPrivateFieldGet106.requestOverlay)) {
16192
+ _context21.next = 2;
16123
16193
  break;
16124
16194
  }
16125
- return _context22.abrupt("return", _classPrivateFieldGet(_impl, this).requestOverlay(name));
16195
+ return _context21.abrupt("return", _classPrivateFieldGet(_impl, this).requestOverlay(name));
16126
16196
  case 2:
16127
- return _context22.abrupt("return", Promise.reject(new Error("overlay ".concat(name, " cannot be requested at this time"))));
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 _context22.stop();
16200
+ return _context21.stop();
16131
16201
  }
16132
- }, _callee22, this);
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 _callee23() {
16143
- var _this12 = this;
16144
- return _regeneratorRuntime().wrap(function _callee23$(_context23) {
16145
- while (1) switch (_context23.prev = _context23.next) {
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 _context23.abrupt("return", new Promise(function(resolve, reject) {
16148
- var _classPrivateFieldGet91;
16149
- if ((_classPrivateFieldGet91 = _classPrivateFieldGet(_api, _this12)) !== null && _classPrivateFieldGet91 !== void 0 && _classPrivateFieldGet91.popover) {
16150
- _classPrivateFieldGet(_api, _this12).popover.show();
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 _context23.stop();
16227
+ return _context22.stop();
16158
16228
  }
16159
- }, _callee23);
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 _callee24(options) {
16170
- var _this13 = this;
16171
- return _regeneratorRuntime().wrap(function _callee24$(_context24) {
16172
- while (1) switch (_context24.prev = _context24.next) {
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 _context24.abrupt("return", new Promise(function(resolve) {
16175
- _assertClassBrand(_WistiaPlayer_brand, _this13, _setMultipleSyncedEmbedOptions).call(_this13, options);
16176
- resolve(_this13.embedOptions);
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 _context24.stop();
16250
+ return _context23.stop();
16181
16251
  }
16182
- }, _callee24);
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 _callee25() {
16193
- var _this14 = this;
16194
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
16195
- while (1) switch (_context25.prev = _context25.next) {
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 _context25.abrupt("return", new Promise(function(resolve) {
16198
- if (_classPrivateFieldGet(_api, _this14)) {
16199
- _classPrivateFieldGet(_api, _this14).ready(function() {
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
- _this14.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16274
+ _this13.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16205
16275
  resolve();
16206
16276
  };
16207
- _this14.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16277
+ _this13.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16208
16278
  }));
16209
16279
  case 1:
16210
16280
  case "end":
16211
- return _context25.stop();
16281
+ return _context24.stop();
16212
16282
  }
16213
- }, _callee25);
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 _callee26(handle) {
16224
- var _classPrivateFieldGet92;
16293
+ var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee25(handle) {
16294
+ var _classPrivateFieldGet108;
16225
16295
  var control;
16226
- return _regeneratorRuntime().wrap(function _callee26$(_context26) {
16227
- while (1) switch (_context26.prev = _context26.next) {
16296
+ return _regeneratorRuntime().wrap(function _callee25$(_context25) {
16297
+ while (1) switch (_context25.prev = _context25.next) {
16228
16298
  case 0:
16229
- _context26.next = 2;
16299
+ _context25.next = 2;
16230
16300
  return this.whenApiReady();
16231
16301
  case 2:
16232
- _context26.next = 4;
16233
- return (_classPrivateFieldGet92 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet92 === void 0 ? void 0 : _classPrivateFieldGet92.whenControlMounted(handle);
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 = _context26.sent;
16305
+ control = _context25.sent;
16236
16306
  if (control) {
16237
- _context26.next = 7;
16307
+ _context25.next = 7;
16238
16308
  break;
16239
16309
  }
16240
16310
  throw new Error("Control not found");
16241
16311
  case 7:
16242
- return _context26.abrupt("return", control);
16312
+ return _context25.abrupt("return", control);
16243
16313
  case 8:
16244
16314
  case "end":
16245
- return _context26.stop();
16315
+ return _context25.stop();
16246
16316
  }
16247
- }, _callee26, this);
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, _this15 = this, _this$embedHost;
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, _this15, _renderPreloadThumbnail).call(_this15);
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
- _this15.mediaId = (_mediaData$hashedId = mediaData.hashedId) !== null && _mediaData$hashedId !== void 0 ? _mediaData$hashedId : _this15.mediaId;
16338
- _classPrivateFieldGet(_playerData, _this15).setMediaDataSource(mediaData);
16339
- _this15.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, {
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, _this15).mediaData
16411
+ mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
16342
16412
  }
16343
16413
  }));
16344
- _assertClassBrand(_WistiaPlayer_brand, _this15, _initPlayerEmbed).call(_this15, {
16345
- container: _this15.uniqueId,
16346
- mediaData: _classPrivateFieldGet(_playerData, _this15).mediaData
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 _classPrivateFieldGet93, _classPrivateFieldGet94, _this$shadowRoot;
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
- (_classPrivateFieldGet93 = _classPrivateFieldGet(_resizeObserver, this)) === null || _classPrivateFieldGet93 === void 0 ? void 0 : _classPrivateFieldGet93.disconnect();
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
- (_classPrivateFieldGet94 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet94 === void 0 ? void 0 : _classPrivateFieldGet94.remove();
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 _ref19 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee27(url) {
16466
+ var _ref18 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee26(url) {
16397
16467
  var swatch;
16398
- return _regeneratorRuntime().wrap(function _callee27$(_context27) {
16399
- while (1) switch (_context27.prev = _context27.next) {
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
- _context27.next = 4;
16473
+ _context26.next = 4;
16404
16474
  return swatch.decode();
16405
16475
  case 4:
16406
- return _context27.abrupt("return", swatch);
16476
+ return _context26.abrupt("return", swatch);
16407
16477
  case 5:
16408
16478
  case "end":
16409
- return _context27.stop();
16479
+ return _context26.stop();
16410
16480
  }
16411
- }, _callee27);
16481
+ }, _callee26);
16412
16482
  }));
16413
16483
  return function getSwatchMetaData3(_x20) {
16414
- return _ref19.apply(this, arguments);
16484
+ return _ref18.apply(this, arguments);
16415
16485
  };
16416
16486
  }();
16417
16487
  wistiaSwatchElement = /* @__PURE__ */ function() {
16418
- var _ref20 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, embedHost) {
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 _callee28$(_context28) {
16421
- while (1) switch (_context28.prev = _context28.next) {
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
- _context28.next = 3;
16494
+ _context27.next = 3;
16425
16495
  return getSwatchMetaData2(swatchUrl2);
16426
16496
  case 3:
16427
- swatchImg = _context28.sent;
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 _context28.abrupt("return", style);
16502
+ return _context27.abrupt("return", style);
16433
16503
  case 9:
16434
16504
  case "end":
16435
- return _context28.stop();
16505
+ return _context27.stop();
16436
16506
  }
16437
- }, _callee28);
16507
+ }, _callee27);
16438
16508
  }));
16439
16509
  return function wistiaSwatchElement2(_x21, _x22) {
16440
- return _ref20.apply(this, arguments);
16510
+ return _ref19.apply(this, arguments);
16441
16511
  };
16442
16512
  }();
16443
16513
  if (customElements.get("wistia-player") === void 0) {