@wistia/wistia-player-react 0.0.115 → 0.1.1

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.
@@ -664,21 +664,21 @@ function _initPlayerEmbed(_ref23) {
664
664
  mediaData
665
665
  });
666
666
  }
667
- function _initPublicApi(_x22, _x23) {
667
+ function _initPublicApi(_x23, _x24) {
668
668
  return _initPublicApi2.apply(this, arguments);
669
669
  }
670
670
  function _initPublicApi2() {
671
- _initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, options) {
672
- var _this20 = this;
671
+ _initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee29(mediaId, options) {
672
+ var _this22 = this;
673
673
  var embeddedCallback;
674
- return _regeneratorRuntime().wrap(function _callee28$(_context28) {
675
- while (1) switch (_context28.prev = _context28.next) {
674
+ return _regeneratorRuntime().wrap(function _callee29$(_context29) {
675
+ while (1) switch (_context29.prev = _context29.next) {
676
676
  case 0:
677
- _context28.next = 2;
677
+ _context29.next = 2;
678
678
  return _classPrivateFieldGet(_publicApiScript, this);
679
679
  case 2:
680
680
  if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.PublicApi) {
681
- _context28.next = 5;
681
+ _context29.next = 5;
682
682
  break;
683
683
  }
684
684
  (0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__.WO)("player/failure/init-failed");
@@ -686,53 +686,53 @@ function _initPublicApi2() {
686
686
  case 5:
687
687
  embeddedCallback = function embeddedCallback2() {
688
688
  var _classPrivateFieldGet103;
689
- void _assertClassBrand(_WistiaPlayer_brand, _this20, _maybeInitializeMux).call(_this20);
690
- _assertClassBrand(_WistiaPlayer_brand, _this20, _renderEmbedTemplate).call(_this20);
691
- (_classPrivateFieldGet103 = _classPrivateFieldGet(_resizeObserver, _this20)) === null || _classPrivateFieldGet103 === void 0 ? void 0 : _classPrivateFieldGet103.disconnect();
692
- _classPrivateFieldSet(_resizeObserver, _this20, null);
693
- if (_classPrivateFieldGet(_playPending, _this20)) {
694
- void _this20.play();
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();
695
695
  }
696
696
  };
697
697
  this.addEventListener("embedded", embeddedCallback);
698
698
  _classPrivateFieldGet(_removeEventListeners, this).push(function() {
699
- _this20.removeEventListener("embedded", embeddedCallback);
699
+ _this22.removeEventListener("embedded", embeddedCallback);
700
700
  });
701
701
  _classPrivateFieldSet(_api, this, new _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.PublicApi(mediaId, options));
702
702
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, this));
703
703
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, this));
704
704
  _classPrivateFieldGet(_removeEventListeners, this).push(function() {
705
- _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, _this20));
706
- _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, _this20));
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));
707
707
  });
708
708
  _classPrivateFieldGet(_api, this).ready(function() {
709
709
  var _classPrivateFieldGet104;
710
- (_classPrivateFieldGet104 = _classPrivateFieldGet(_preloadThumbnailRoot, _this20)) === null || _classPrivateFieldGet104 === void 0 ? void 0 : _classPrivateFieldGet104.remove();
711
- _this20.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, _this20));
712
- _this20.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, {
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, {
713
713
  detail: {
714
714
  mediaId
715
715
  }
716
716
  }));
717
- _this20.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
717
+ _this22.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
718
718
  detail: {
719
719
  mediaId,
720
- api: _classPrivateFieldGet(_api, _this20)
720
+ api: _classPrivateFieldGet(_api, _this22)
721
721
  }
722
722
  }));
723
- if (_classPrivateFieldGet(_impl, _this20)) {
724
- Object.entries(_classPrivateFieldGet(_impl, _this20)._attrs).forEach(function(_ref29) {
723
+ if (_classPrivateFieldGet(_impl, _this22)) {
724
+ Object.entries(_classPrivateFieldGet(_impl, _this22)._attrs).forEach(function(_ref29) {
725
725
  var _ref30 = _slicedToArray(_ref29, 2), key = _ref30[0], value = _ref30[1];
726
- _classPrivateFieldGet(_playerData, _this20).updateEmbedOptionOverrides(_defineProperty({}, key, value));
726
+ _classPrivateFieldGet(_playerData, _this22).updateEmbedOptionOverrides(_defineProperty({}, key, value));
727
727
  });
728
728
  }
729
- _assertClassBrand(_WistiaPlayer_brand, _this20, _renderPreloadThumbnail).call(_this20);
729
+ _assertClassBrand(_WistiaPlayer_brand, _this22, _renderPreloadThumbnail).call(_this22);
730
730
  });
731
731
  case 13:
732
732
  case "end":
733
- return _context28.stop();
733
+ return _context29.stop();
734
734
  }
735
- }, _callee28, this);
735
+ }, _callee29, this);
736
736
  }));
737
737
  return _initPublicApi2.apply(this, arguments);
738
738
  }
@@ -743,29 +743,29 @@ function _maybeInitializeMux() {
743
743
  return _maybeInitializeMux2.apply(this, arguments);
744
744
  }
745
745
  function _maybeInitializeMux2() {
746
- _maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee29() {
747
- var _this21 = this;
746
+ _maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee30() {
747
+ var _this23 = this;
748
748
  var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
749
- return _regeneratorRuntime().wrap(function _callee29$(_context29) {
750
- while (1) switch (_context29.prev = _context29.next) {
749
+ return _regeneratorRuntime().wrap(function _callee30$(_context30) {
750
+ while (1) switch (_context30.prev = _context30.next) {
751
751
  case 0:
752
752
  if (_classPrivateFieldGet(_api, this)) {
753
- _context29.next = 2;
753
+ _context30.next = 2;
754
754
  break;
755
755
  }
756
- return _context29.abrupt("return");
756
+ return _context30.abrupt("return");
757
757
  case 2:
758
758
  shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_33__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_34__._);
759
759
  shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_34__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_17__.D5)();
760
760
  embedType = this.useWebComponent ? "translated-web-component" : "web-component";
761
761
  if (!shouldEnableMuxForPlayer) {
762
- _context29.next = 11;
762
+ _context30.next = 11;
763
763
  break;
764
764
  }
765
- _context29.next = 8;
765
+ _context30.next = 8;
766
766
  return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__.$)("assets/external/wistia-mux.js");
767
767
  case 8:
768
- mux = _context29.sent;
768
+ mux = _context30.sent;
769
769
  mux.init(_classPrivateFieldGet(_api, this), {
770
770
  embedType
771
771
  });
@@ -773,14 +773,14 @@ function _maybeInitializeMux2() {
773
773
  var isTrackingEnabled = event.detail.isTrackingEnabled;
774
774
  if (!isTrackingEnabled) {
775
775
  var _classPrivateFieldGet106, _classPrivateFieldGet107;
776
- (_classPrivateFieldGet106 = _classPrivateFieldGet(_api, _this21)) === null || _classPrivateFieldGet106 === void 0 ? void 0 : (_classPrivateFieldGet107 = _classPrivateFieldGet106.mux) === null || _classPrivateFieldGet107 === void 0 ? void 0 : _classPrivateFieldGet107.destroy();
776
+ (_classPrivateFieldGet106 = _classPrivateFieldGet(_api, _this23)) === null || _classPrivateFieldGet106 === void 0 ? void 0 : (_classPrivateFieldGet107 = _classPrivateFieldGet106.mux) === null || _classPrivateFieldGet107 === void 0 ? void 0 : _classPrivateFieldGet107.destroy();
777
777
  }
778
778
  });
779
779
  case 11:
780
780
  case "end":
781
- return _context29.stop();
781
+ return _context30.stop();
782
782
  }
783
- }, _callee29, this);
783
+ }, _callee30, this);
784
784
  }));
785
785
  return _maybeInitializeMux2.apply(this, arguments);
786
786
  }
@@ -806,7 +806,7 @@ function _maybeSetupEmbedOptionsFromIframe() {
806
806
  _classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeEmbedOptions);
807
807
  }
808
808
  function _renderEmbedTemplate() {
809
- var _this$embedHost2, _this15 = this;
809
+ var _this$embedHost2, _this16 = this;
810
810
  if (!_classPrivateFieldGet(_preactRoot, this)) {
811
811
  return;
812
812
  }
@@ -857,7 +857,7 @@ function _renderEmbedTemplate() {
857
857
  "aria-hidden": "true"
858
858
  })))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
859
859
  ref: function ref(_ref24) {
860
- _classPrivateFieldSet(_preloadThumbnailRoot, _this15, _ref24);
860
+ _classPrivateFieldSet(_preloadThumbnailRoot, _this16, _ref24);
861
861
  }
862
862
  })), _classPrivateFieldGet(_preactRoot, this));
863
863
  }
@@ -889,18 +889,18 @@ function _renderPreloadThumbnail() {
889
889
  })), _classPrivateFieldGet(_preloadThumbnailRoot, this));
890
890
  }
891
891
  function _runMethodsFromAttributes() {
892
- var _this16 = this;
892
+ var _this17 = this;
893
893
  if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
894
894
  this.whenApiReady().then(function() {
895
895
  var _ref25, _classPrivateFieldGet99, _classPrivateFieldGet100;
896
- var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this16, _getValueFromAttribute).call(_this16, "current-time"));
897
- var isClosedPopover = (_ref25 = ((_classPrivateFieldGet99 = _classPrivateFieldGet(_api, _this16)) === null || _classPrivateFieldGet99 === void 0 ? void 0 : _classPrivateFieldGet99.popover) && !_classPrivateFieldGet(_api, _this16).popover.isVisible()) !== null && _ref25 !== void 0 ? _ref25 : false;
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;
898
898
  var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_7__.GS)();
899
- var shouldDelayUntilPlay = _this16.state !== "playing" && (isMobile || isClosedPopover);
900
- void ((_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, _this16)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.time(newTime, {
899
+ var shouldDelayUntilPlay = _this17.state !== "playing" && (isMobile || isClosedPopover);
900
+ void ((_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, _this17)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.time(newTime, {
901
901
  lazy: shouldDelayUntilPlay
902
902
  }));
903
- _assertClassBrand(_WistiaPlayer_brand, _this16, _setSyncedEmbedOption).call(_this16, "currentTime", newTime);
903
+ _assertClassBrand(_WistiaPlayer_brand, _this17, _setSyncedEmbedOption).call(_this17, "currentTime", newTime);
904
904
  }).catch(function(_error) {
905
905
  });
906
906
  }
@@ -910,22 +910,37 @@ function _runMethodsFromAttributes() {
910
910
  if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "video-quality") !== null) {
911
911
  this.whenApiReady().then(function() {
912
912
  var _classPrivateFieldGet101;
913
- var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this16, _getValueFromAttribute).call(_this16, "video-quality");
914
- (_classPrivateFieldGet101 = _classPrivateFieldGet(_impl, _this16)) === null || _classPrivateFieldGet101 === void 0 ? void 0 : _classPrivateFieldGet101.setVideoQuality(newQuality);
915
- _assertClassBrand(_WistiaPlayer_brand, _this16, _setSyncedEmbedOption).call(_this16, "videoQuality", newQuality);
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);
916
916
  }).catch(function(_error) {
917
917
  });
918
918
  }
919
919
  }
920
920
  function _saveInitialAttributesFromDomOptions() {
921
- var _this17 = this;
921
+ var _this18 = this;
922
922
  var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref26) {
923
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, _this17, _getValueFromAttribute).call(_this17, value.name)];
924
+ return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this18, _getValueFromAttribute).call(_this18, value.name)];
925
925
  }));
926
926
  _classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
927
927
  (0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_9__.gY)("__".concat(this.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, this).embedOptions);
928
928
  }
929
+ function _setMultipleSyncedEmbedOptions(options) {
930
+ var _this19 = this;
931
+ Object.entries(options).forEach(function(entry) {
932
+ var _Object$getOwnPropert;
933
+ var _entry = _slicedToArray(entry, 2), key = _entry[0], value = _entry[1];
934
+ if (value == null) {
935
+ return;
936
+ }
937
+ if ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(_this19), key)) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert.set) {
938
+ _this19[key] = value;
939
+ } else {
940
+ _assertClassBrand(_WistiaPlayer_brand, _this19, _setSyncedEmbedOption).call(_this19, key, value);
941
+ }
942
+ });
943
+ }
929
944
  function _setSyncedEmbedOption(key, value) {
930
945
  _classPrivateFieldGet(_logger, this).info("set ".concat(key), value.toString());
931
946
  if (_classPrivateFieldGet(_impl, this)) {
@@ -935,20 +950,20 @@ function _setSyncedEmbedOption(key, value) {
935
950
  _assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
936
951
  }
937
952
  function _setupEventListeners() {
938
- var _this18 = this;
953
+ var _this20 = this;
939
954
  var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
940
955
  var _ref28 = event.detail, mediaData = _ref28.mediaData;
941
- _assertClassBrand(_WistiaPlayer_brand, _this18, _updateMediaData).call(_this18, mediaData);
956
+ _assertClassBrand(_WistiaPlayer_brand, _this20, _updateMediaData).call(_this20, mediaData);
942
957
  };
943
958
  var implCreatedCallback = function implCreatedCallback2(event) {
944
- _classPrivateFieldSet(_impl, _this18, event.detail.impl);
959
+ _classPrivateFieldSet(_impl, _this20, event.detail.impl);
945
960
  };
946
961
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
947
962
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
948
963
  _classPrivateFieldGet(_removeEventListeners, this).push(function() {
949
- _this18.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
964
+ _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
950
965
  }, function() {
951
- _this18.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
966
+ _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
952
967
  });
953
968
  this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), {
954
969
  once: true
@@ -958,9 +973,9 @@ function _shouldDisplaySwatch() {
958
973
  return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
959
974
  }
960
975
  function _updateEmail(email) {
961
- var _this19 = this;
976
+ var _this21 = this;
962
977
  (0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_19__.$B)(function(localStorage2) {
963
- localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this19, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this19, _get_pageUrl)]), {}, {
978
+ localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this21, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this21, _get_pageUrl)]), {}, {
964
979
  trackEmail: email
965
980
  });
966
981
  });
@@ -3368,6 +3383,7 @@ var init_wistia_player = __esm({
3368
3383
  var _iso8601Helper_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__3(7229);
3369
3384
  var _normalizeChapters_ts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__3(9128);
3370
3385
  var generateAudioJsonLd = function generateAudioJsonLd2(mediaData) {
3386
+ var _embedOptions;
3371
3387
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3372
3388
  var videoWidth = options.videoWidth, videoHeight = options.videoHeight;
3373
3389
  var embedOptions = options.embedOptions;
@@ -3385,7 +3401,7 @@ var init_wistia_player = __esm({
3385
3401
  protocol: "https:",
3386
3402
  videoWidth,
3387
3403
  videoHeight,
3388
- embedHost: embedOptions.embedHost
3404
+ embedHost: (_embedOptions = embedOptions) === null || _embedOptions === void 0 ? void 0 : _embedOptions.embedHost
3389
3405
  }),
3390
3406
  contentUrl: generateContentUrl(mediaData),
3391
3407
  embedUrl: generateEmbedUrl(mediaData, embedOptions),
@@ -3424,11 +3440,13 @@ var init_wistia_player = __esm({
3424
3440
  return url.absolute();
3425
3441
  };
3426
3442
  var generateVideoJsonLd = function generateVideoJsonLd2(mediaData) {
3443
+ var _embedOptions2;
3427
3444
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3428
3445
  var videoWidth = options.videoWidth, videoHeight = options.videoHeight;
3429
3446
  var embedOptions = options.embedOptions;
3430
3447
  if (!embedOptions) {
3431
- embedOptions = (0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.wg)((0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.o8)(mediaData.embedOptions));
3448
+ var _cast;
3449
+ embedOptions = (_cast = (0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.wg)((0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.o8)(mediaData.embedOptions))) !== null && _cast !== void 0 ? _cast : {};
3432
3450
  }
3433
3451
  var obj = {
3434
3452
  "@context": "http://schema.org/",
@@ -3441,7 +3459,7 @@ var init_wistia_player = __esm({
3441
3459
  protocol: "https:",
3442
3460
  videoWidth,
3443
3461
  videoHeight,
3444
- embedHost: embedOptions.embedHost
3462
+ embedHost: (_embedOptions2 = embedOptions) === null || _embedOptions2 === void 0 ? void 0 : _embedOptions2.embedHost
3445
3463
  }),
3446
3464
  embedUrl: generateEmbedUrl(mediaData, embedOptions),
3447
3465
  uploadDate: new Date(mediaData.createdAt * 1e3).toISOString(),
@@ -3554,14 +3572,14 @@ var init_wistia_player = __esm({
3554
3572
  case "channel":
3555
3573
  case "form":
3556
3574
  case "transcript":
3557
- return 0.25;
3575
+ return 1;
3558
3576
  case "mediaPlayback":
3559
3577
  return 1e-3;
3560
3578
  case "globalListener":
3561
3579
  case "other":
3562
3580
  case "player":
3563
3581
  default:
3564
- return 0.1;
3582
+ return 1;
3565
3583
  }
3566
3584
  };
3567
3585
  var IS_DEV_ENV = (
@@ -3637,6 +3655,7 @@ var init_wistia_player = __esm({
3637
3655
  Wistia._sentryScope.clear();
3638
3656
  Wistia._sentryScope.setTag("pillar", "publish");
3639
3657
  Wistia._sentryScope.setTag("product", product);
3658
+ Wistia._sentryScope.setTag("url", window.location.href);
3640
3659
  if (isNonEmptyRecord(details)) {
3641
3660
  Wistia._sentryScope.setTags(details);
3642
3661
  }
@@ -8674,7 +8693,7 @@ var init_wistia_player = __esm({
8674
8693
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
8675
8694
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
8676
8695
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
8677
- var TAGGED_VERSION2 = "0.0.115";
8696
+ var TAGGED_VERSION2 = "0.1.1";
8678
8697
  var CURRENT_SHA2 = (
8679
8698
  /* unused pure expression or super */
8680
8699
  null
@@ -15777,8 +15796,8 @@ var init_wistia_player = __esm({
15777
15796
  case 0:
15778
15797
  return _context12.abrupt("return", new Promise(function(resolve, reject) {
15779
15798
  var _classPrivateFieldGet80;
15780
- if ((_classPrivateFieldGet80 = _classPrivateFieldGet(_api, _this7)) !== null && _classPrivateFieldGet80 !== void 0 && _classPrivateFieldGet80.plugin(name)) {
15781
- resolve(_classPrivateFieldGet(_api, _this7).plugin(name));
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]);
15782
15801
  }
15783
15802
  reject(new Error("plugin ".concat(name, " is not defined")));
15784
15803
  }));
@@ -16145,30 +16164,53 @@ var init_wistia_player = __esm({
16145
16164
  return showPopover;
16146
16165
  }()
16147
16166
  }, {
16148
- key: "whenApiReady",
16167
+ key: "updateEmbedOptions",
16149
16168
  value: function() {
16150
- var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee24() {
16169
+ var _updateEmbedOptions = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee24(options) {
16151
16170
  var _this13 = this;
16152
16171
  return _regeneratorRuntime().wrap(function _callee24$(_context24) {
16153
16172
  while (1) switch (_context24.prev = _context24.next) {
16154
16173
  case 0:
16155
16174
  return _context24.abrupt("return", new Promise(function(resolve) {
16156
- if (_classPrivateFieldGet(_api, _this13)) {
16157
- _classPrivateFieldGet(_api, _this13).ready(function() {
16175
+ _assertClassBrand(_WistiaPlayer_brand, _this13, _setMultipleSyncedEmbedOptions).call(_this13, options);
16176
+ resolve(_this13.embedOptions);
16177
+ }));
16178
+ case 1:
16179
+ case "end":
16180
+ return _context24.stop();
16181
+ }
16182
+ }, _callee24);
16183
+ }));
16184
+ function updateEmbedOptions(_x18) {
16185
+ return _updateEmbedOptions.apply(this, arguments);
16186
+ }
16187
+ return updateEmbedOptions;
16188
+ }()
16189
+ }, {
16190
+ key: "whenApiReady",
16191
+ 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) {
16196
+ case 0:
16197
+ return _context25.abrupt("return", new Promise(function(resolve) {
16198
+ if (_classPrivateFieldGet(_api, _this14)) {
16199
+ _classPrivateFieldGet(_api, _this14).ready(function() {
16158
16200
  resolve();
16159
16201
  });
16160
16202
  }
16161
16203
  var _handler2 = function handler() {
16162
- _this13.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16204
+ _this14.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16163
16205
  resolve();
16164
16206
  };
16165
- _this13.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16207
+ _this14.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
16166
16208
  }));
16167
16209
  case 1:
16168
16210
  case "end":
16169
- return _context24.stop();
16211
+ return _context25.stop();
16170
16212
  }
16171
- }, _callee24);
16213
+ }, _callee25);
16172
16214
  }));
16173
16215
  function whenApiReady() {
16174
16216
  return _whenApiReady.apply(this, arguments);
@@ -16178,33 +16220,33 @@ var init_wistia_player = __esm({
16178
16220
  }, {
16179
16221
  key: "whenControlMounted",
16180
16222
  value: function() {
16181
- var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee25(handle) {
16223
+ var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee26(handle) {
16182
16224
  var _classPrivateFieldGet92;
16183
16225
  var control;
16184
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
16185
- while (1) switch (_context25.prev = _context25.next) {
16226
+ return _regeneratorRuntime().wrap(function _callee26$(_context26) {
16227
+ while (1) switch (_context26.prev = _context26.next) {
16186
16228
  case 0:
16187
- _context25.next = 2;
16229
+ _context26.next = 2;
16188
16230
  return this.whenApiReady();
16189
16231
  case 2:
16190
- _context25.next = 4;
16232
+ _context26.next = 4;
16191
16233
  return (_classPrivateFieldGet92 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet92 === void 0 ? void 0 : _classPrivateFieldGet92.whenControlMounted(handle);
16192
16234
  case 4:
16193
- control = _context25.sent;
16235
+ control = _context26.sent;
16194
16236
  if (control) {
16195
- _context25.next = 7;
16237
+ _context26.next = 7;
16196
16238
  break;
16197
16239
  }
16198
16240
  throw new Error("Control not found");
16199
16241
  case 7:
16200
- return _context25.abrupt("return", control);
16242
+ return _context26.abrupt("return", control);
16201
16243
  case 8:
16202
16244
  case "end":
16203
- return _context25.stop();
16245
+ return _context26.stop();
16204
16246
  }
16205
- }, _callee25, this);
16247
+ }, _callee26, this);
16206
16248
  }));
16207
- function whenControlMounted(_x18) {
16249
+ function whenControlMounted(_x19) {
16208
16250
  return _whenControlMounted.apply(this, arguments);
16209
16251
  }
16210
16252
  return whenControlMounted;
@@ -16249,7 +16291,7 @@ var init_wistia_player = __esm({
16249
16291
  }, {
16250
16292
  key: "connectedCallback",
16251
16293
  value: function connectedCallback() {
16252
- var _window$wistiaOptions, _this14 = this, _this$embedHost;
16294
+ var _window$wistiaOptions, _this15 = this, _this$embedHost;
16253
16295
  if (_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
16254
16296
  return;
16255
16297
  }
@@ -16277,7 +16319,7 @@ var init_wistia_player = __esm({
16277
16319
  _assertClassBrand(_WistiaPlayer_brand, this, _runMethodsFromAttributes).call(this);
16278
16320
  _assertClassBrand(_WistiaPlayer_brand, this, _saveInitialAttributesFromDomOptions).call(this);
16279
16321
  var resizeCallback = function resizeCallback2() {
16280
- _assertClassBrand(_WistiaPlayer_brand, _this14, _renderPreloadThumbnail).call(_this14);
16322
+ _assertClassBrand(_WistiaPlayer_brand, _this15, _renderPreloadThumbnail).call(_this15);
16281
16323
  };
16282
16324
  _classPrivateFieldSet(_resizeObserver, this, new ResizeObserver(resizeCallback));
16283
16325
  _classPrivateFieldGet(_resizeObserver, this).observe(this);
@@ -16292,16 +16334,16 @@ var init_wistia_player = __esm({
16292
16334
  return;
16293
16335
  }
16294
16336
  var mediaData = mediaDataOrError;
16295
- _this14.mediaId = (_mediaData$hashedId = mediaData.hashedId) !== null && _mediaData$hashedId !== void 0 ? _mediaData$hashedId : _this14.mediaId;
16296
- _classPrivateFieldGet(_playerData, _this14).setMediaDataSource(mediaData);
16297
- _this14.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, {
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, {
16298
16340
  detail: {
16299
- mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
16341
+ mediaData: _classPrivateFieldGet(_playerData, _this15).mediaData
16300
16342
  }
16301
16343
  }));
16302
- _assertClassBrand(_WistiaPlayer_brand, _this14, _initPlayerEmbed).call(_this14, {
16303
- container: _this14.uniqueId,
16304
- mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
16344
+ _assertClassBrand(_WistiaPlayer_brand, _this15, _initPlayerEmbed).call(_this15, {
16345
+ container: _this15.uniqueId,
16346
+ mediaData: _classPrivateFieldGet(_playerData, _this15).mediaData
16305
16347
  });
16306
16348
  }).catch(function(error) {
16307
16349
  (0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__.WO)("player/failure/init-failed");
@@ -16351,50 +16393,50 @@ var init_wistia_player = __esm({
16351
16393
  }(/* @__PURE__ */ _wrapNativeSuper(HTMLElement));
16352
16394
  _WistiaPlayer = WistiaPlayer;
16353
16395
  getSwatchMetaData2 = /* @__PURE__ */ function() {
16354
- var _ref19 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee26(url) {
16396
+ var _ref19 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee27(url) {
16355
16397
  var swatch;
16356
- return _regeneratorRuntime().wrap(function _callee26$(_context26) {
16357
- while (1) switch (_context26.prev = _context26.next) {
16398
+ return _regeneratorRuntime().wrap(function _callee27$(_context27) {
16399
+ while (1) switch (_context27.prev = _context27.next) {
16358
16400
  case 0:
16359
16401
  swatch = new Image();
16360
16402
  swatch.src = url;
16361
- _context26.next = 4;
16403
+ _context27.next = 4;
16362
16404
  return swatch.decode();
16363
16405
  case 4:
16364
- return _context26.abrupt("return", swatch);
16406
+ return _context27.abrupt("return", swatch);
16365
16407
  case 5:
16366
16408
  case "end":
16367
- return _context26.stop();
16409
+ return _context27.stop();
16368
16410
  }
16369
- }, _callee26);
16411
+ }, _callee27);
16370
16412
  }));
16371
- return function getSwatchMetaData3(_x19) {
16413
+ return function getSwatchMetaData3(_x20) {
16372
16414
  return _ref19.apply(this, arguments);
16373
16415
  };
16374
16416
  }();
16375
16417
  wistiaSwatchElement = /* @__PURE__ */ function() {
16376
- var _ref20 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee27(mediaId, embedHost) {
16418
+ var _ref20 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, embedHost) {
16377
16419
  var swatchUrl2, swatchImg, naturalHeight, naturalWidth, ratio, style;
16378
- return _regeneratorRuntime().wrap(function _callee27$(_context27) {
16379
- while (1) switch (_context27.prev = _context27.next) {
16420
+ return _regeneratorRuntime().wrap(function _callee28$(_context28) {
16421
+ while (1) switch (_context28.prev = _context28.next) {
16380
16422
  case 0:
16381
16423
  swatchUrl2 = getSwatchUrl(mediaId, embedHost);
16382
- _context27.next = 3;
16424
+ _context28.next = 3;
16383
16425
  return getSwatchMetaData2(swatchUrl2);
16384
16426
  case 3:
16385
- swatchImg = _context27.sent;
16427
+ swatchImg = _context28.sent;
16386
16428
  naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
16387
16429
  ratio = naturalHeight / naturalWidth * 100;
16388
16430
  style = document.createElement("style");
16389
16431
  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 ");
16390
- return _context27.abrupt("return", style);
16432
+ return _context28.abrupt("return", style);
16391
16433
  case 9:
16392
16434
  case "end":
16393
- return _context27.stop();
16435
+ return _context28.stop();
16394
16436
  }
16395
- }, _callee27);
16437
+ }, _callee28);
16396
16438
  }));
16397
- return function wistiaSwatchElement2(_x20, _x21) {
16439
+ return function wistiaSwatchElement2(_x21, _x22) {
16398
16440
  return _ref20.apply(this, arguments);
16399
16441
  };
16400
16442
  }();
@@ -7,7 +7,7 @@ import {
7
7
  import { forwardRef, Suspense, lazy, Fragment } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  var WistiaPlayerWrapper = lazy(
10
- async () => import("./WistiaPlayerWrapper-PHGW7WIS.mjs").then((module) => ({
10
+ async () => import("./WistiaPlayerWrapper-25LVD3OE.mjs").then((module) => ({
11
11
  default: module.WistiaPlayerWrapper
12
12
  }))
13
13
  );
@@ -22,7 +22,7 @@ var WistiaPlayerWrapper = forwardRef(
22
22
  setSwatchAspectRatio(ratio);
23
23
  });
24
24
  }
25
- void import("./wistia-player-L3FGFFN4.mjs");
25
+ void import("./wistia-player-NRHMVWJQ.mjs");
26
26
  void customElements.whenDefined("wistia-player").then(() => {
27
27
  setIsWistiaPlayerDefined(true);
28
28
  });
@@ -2386,6 +2386,7 @@ var __webpack_modules__ = {
2386
2386
  var _iso8601Helper_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__3(7229);
2387
2387
  var _normalizeChapters_ts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__3(9128);
2388
2388
  var generateAudioJsonLd = function generateAudioJsonLd2(mediaData) {
2389
+ var _embedOptions;
2389
2390
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2390
2391
  var videoWidth = options.videoWidth, videoHeight = options.videoHeight;
2391
2392
  var embedOptions = options.embedOptions;
@@ -2403,7 +2404,7 @@ var __webpack_modules__ = {
2403
2404
  protocol: "https:",
2404
2405
  videoWidth,
2405
2406
  videoHeight,
2406
- embedHost: embedOptions.embedHost
2407
+ embedHost: (_embedOptions = embedOptions) === null || _embedOptions === void 0 ? void 0 : _embedOptions.embedHost
2407
2408
  }),
2408
2409
  contentUrl: generateContentUrl(mediaData),
2409
2410
  embedUrl: generateEmbedUrl(mediaData, embedOptions),
@@ -2442,11 +2443,13 @@ var __webpack_modules__ = {
2442
2443
  return url.absolute();
2443
2444
  };
2444
2445
  var generateVideoJsonLd = function generateVideoJsonLd2(mediaData) {
2446
+ var _embedOptions2;
2445
2447
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2446
2448
  var videoWidth = options.videoWidth, videoHeight = options.videoHeight;
2447
2449
  var embedOptions = options.embedOptions;
2448
2450
  if (!embedOptions) {
2449
- embedOptions = (0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.wg)((0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.o8)(mediaData.embedOptions));
2451
+ var _cast;
2452
+ embedOptions = (_cast = (0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.wg)((0, utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__.o8)(mediaData.embedOptions))) !== null && _cast !== void 0 ? _cast : {};
2450
2453
  }
2451
2454
  var obj = {
2452
2455
  "@context": "http://schema.org/",
@@ -2459,7 +2462,7 @@ var __webpack_modules__ = {
2459
2462
  protocol: "https:",
2460
2463
  videoWidth,
2461
2464
  videoHeight,
2462
- embedHost: embedOptions.embedHost
2465
+ embedHost: (_embedOptions2 = embedOptions) === null || _embedOptions2 === void 0 ? void 0 : _embedOptions2.embedHost
2463
2466
  }),
2464
2467
  embedUrl: generateEmbedUrl(mediaData, embedOptions),
2465
2468
  uploadDate: new Date(mediaData.createdAt * 1e3).toISOString(),
@@ -2572,14 +2575,14 @@ var __webpack_modules__ = {
2572
2575
  case "channel":
2573
2576
  case "form":
2574
2577
  case "transcript":
2575
- return 0.25;
2578
+ return 1;
2576
2579
  case "mediaPlayback":
2577
2580
  return 1e-3;
2578
2581
  case "globalListener":
2579
2582
  case "other":
2580
2583
  case "player":
2581
2584
  default:
2582
- return 0.1;
2585
+ return 1;
2583
2586
  }
2584
2587
  };
2585
2588
  var IS_DEV_ENV = (
@@ -2655,6 +2658,7 @@ var __webpack_modules__ = {
2655
2658
  Wistia._sentryScope.clear();
2656
2659
  Wistia._sentryScope.setTag("pillar", "publish");
2657
2660
  Wistia._sentryScope.setTag("product", product);
2661
+ Wistia._sentryScope.setTag("url", window.location.href);
2658
2662
  if (isNonEmptyRecord(details)) {
2659
2663
  Wistia._sentryScope.setTags(details);
2660
2664
  }
@@ -7692,7 +7696,7 @@ var __webpack_modules__ = {
7692
7696
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
7693
7697
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
7694
7698
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
7695
- var TAGGED_VERSION2 = "0.0.115";
7699
+ var TAGGED_VERSION2 = "0.1.1";
7696
7700
  var CURRENT_SHA2 = (
7697
7701
  /* unused pure expression or super */
7698
7702
  null
@@ -15273,8 +15277,8 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
15273
15277
  case 0:
15274
15278
  return _context12.abrupt("return", new Promise(function(resolve, reject) {
15275
15279
  var _classPrivateFieldGet80;
15276
- if ((_classPrivateFieldGet80 = _classPrivateFieldGet(_api, _this7)) !== null && _classPrivateFieldGet80 !== void 0 && _classPrivateFieldGet80.plugin(name)) {
15277
- resolve(_classPrivateFieldGet(_api, _this7).plugin(name));
15280
+ if ((_classPrivateFieldGet80 = _classPrivateFieldGet(_api, _this7)) !== null && _classPrivateFieldGet80 !== void 0 && _classPrivateFieldGet80.plugin && name in _classPrivateFieldGet(_api, _this7).plugin) {
15281
+ resolve(_classPrivateFieldGet(_api, _this7).plugin[name]);
15278
15282
  }
15279
15283
  reject(new Error("plugin ".concat(name, " is not defined")));
15280
15284
  }));
@@ -15641,30 +15645,53 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
15641
15645
  return showPopover;
15642
15646
  }()
15643
15647
  }, {
15644
- key: "whenApiReady",
15648
+ key: "updateEmbedOptions",
15645
15649
  value: function() {
15646
- var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee24() {
15650
+ var _updateEmbedOptions = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee24(options) {
15647
15651
  var _this13 = this;
15648
15652
  return _regeneratorRuntime().wrap(function _callee24$(_context24) {
15649
15653
  while (1) switch (_context24.prev = _context24.next) {
15650
15654
  case 0:
15651
15655
  return _context24.abrupt("return", new Promise(function(resolve) {
15652
- if (_classPrivateFieldGet(_api, _this13)) {
15653
- _classPrivateFieldGet(_api, _this13).ready(function() {
15656
+ _assertClassBrand(_WistiaPlayer_brand, _this13, _setMultipleSyncedEmbedOptions).call(_this13, options);
15657
+ resolve(_this13.embedOptions);
15658
+ }));
15659
+ case 1:
15660
+ case "end":
15661
+ return _context24.stop();
15662
+ }
15663
+ }, _callee24);
15664
+ }));
15665
+ function updateEmbedOptions(_x18) {
15666
+ return _updateEmbedOptions.apply(this, arguments);
15667
+ }
15668
+ return updateEmbedOptions;
15669
+ }()
15670
+ }, {
15671
+ key: "whenApiReady",
15672
+ value: function() {
15673
+ var _whenApiReady = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee25() {
15674
+ var _this14 = this;
15675
+ return _regeneratorRuntime().wrap(function _callee25$(_context25) {
15676
+ while (1) switch (_context25.prev = _context25.next) {
15677
+ case 0:
15678
+ return _context25.abrupt("return", new Promise(function(resolve) {
15679
+ if (_classPrivateFieldGet(_api, _this14)) {
15680
+ _classPrivateFieldGet(_api, _this14).ready(function() {
15654
15681
  resolve();
15655
15682
  });
15656
15683
  }
15657
15684
  var _handler2 = function handler() {
15658
- _this13.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
15685
+ _this14.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
15659
15686
  resolve();
15660
15687
  };
15661
- _this13.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
15688
+ _this14.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, _handler2);
15662
15689
  }));
15663
15690
  case 1:
15664
15691
  case "end":
15665
- return _context24.stop();
15692
+ return _context25.stop();
15666
15693
  }
15667
- }, _callee24);
15694
+ }, _callee25);
15668
15695
  }));
15669
15696
  function whenApiReady() {
15670
15697
  return _whenApiReady.apply(this, arguments);
@@ -15674,33 +15701,33 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
15674
15701
  }, {
15675
15702
  key: "whenControlMounted",
15676
15703
  value: function() {
15677
- var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee25(handle) {
15704
+ var _whenControlMounted = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee26(handle) {
15678
15705
  var _classPrivateFieldGet92;
15679
15706
  var control;
15680
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
15681
- while (1) switch (_context25.prev = _context25.next) {
15707
+ return _regeneratorRuntime().wrap(function _callee26$(_context26) {
15708
+ while (1) switch (_context26.prev = _context26.next) {
15682
15709
  case 0:
15683
- _context25.next = 2;
15710
+ _context26.next = 2;
15684
15711
  return this.whenApiReady();
15685
15712
  case 2:
15686
- _context25.next = 4;
15713
+ _context26.next = 4;
15687
15714
  return (_classPrivateFieldGet92 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet92 === void 0 ? void 0 : _classPrivateFieldGet92.whenControlMounted(handle);
15688
15715
  case 4:
15689
- control = _context25.sent;
15716
+ control = _context26.sent;
15690
15717
  if (control) {
15691
- _context25.next = 7;
15718
+ _context26.next = 7;
15692
15719
  break;
15693
15720
  }
15694
15721
  throw new Error("Control not found");
15695
15722
  case 7:
15696
- return _context25.abrupt("return", control);
15723
+ return _context26.abrupt("return", control);
15697
15724
  case 8:
15698
15725
  case "end":
15699
- return _context25.stop();
15726
+ return _context26.stop();
15700
15727
  }
15701
- }, _callee25, this);
15728
+ }, _callee26, this);
15702
15729
  }));
15703
- function whenControlMounted(_x18) {
15730
+ function whenControlMounted(_x19) {
15704
15731
  return _whenControlMounted.apply(this, arguments);
15705
15732
  }
15706
15733
  return whenControlMounted;
@@ -15745,7 +15772,7 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
15745
15772
  }, {
15746
15773
  key: "connectedCallback",
15747
15774
  value: function connectedCallback() {
15748
- var _window$wistiaOptions, _this14 = this, _this$embedHost;
15775
+ var _window$wistiaOptions, _this15 = this, _this$embedHost;
15749
15776
  if (_classPrivateFieldGet(_hasElementConnectedToDOM, this)) {
15750
15777
  return;
15751
15778
  }
@@ -15773,7 +15800,7 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
15773
15800
  _assertClassBrand(_WistiaPlayer_brand, this, _runMethodsFromAttributes).call(this);
15774
15801
  _assertClassBrand(_WistiaPlayer_brand, this, _saveInitialAttributesFromDomOptions).call(this);
15775
15802
  var resizeCallback = function resizeCallback2() {
15776
- _assertClassBrand(_WistiaPlayer_brand, _this14, _renderPreloadThumbnail).call(_this14);
15803
+ _assertClassBrand(_WistiaPlayer_brand, _this15, _renderPreloadThumbnail).call(_this15);
15777
15804
  };
15778
15805
  _classPrivateFieldSet(_resizeObserver, this, new ResizeObserver(resizeCallback));
15779
15806
  _classPrivateFieldGet(_resizeObserver, this).observe(this);
@@ -15788,16 +15815,16 @@ var WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
15788
15815
  return;
15789
15816
  }
15790
15817
  var mediaData = mediaDataOrError;
15791
- _this14.mediaId = (_mediaData$hashedId = mediaData.hashedId) !== null && _mediaData$hashedId !== void 0 ? _mediaData$hashedId : _this14.mediaId;
15792
- _classPrivateFieldGet(_playerData, _this14).setMediaDataSource(mediaData);
15793
- _this14.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, {
15818
+ _this15.mediaId = (_mediaData$hashedId = mediaData.hashedId) !== null && _mediaData$hashedId !== void 0 ? _mediaData$hashedId : _this15.mediaId;
15819
+ _classPrivateFieldGet(_playerData, _this15).setMediaDataSource(mediaData);
15820
+ _this15.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, {
15794
15821
  detail: {
15795
- mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
15822
+ mediaData: _classPrivateFieldGet(_playerData, _this15).mediaData
15796
15823
  }
15797
15824
  }));
15798
- _assertClassBrand(_WistiaPlayer_brand, _this14, _initPlayerEmbed).call(_this14, {
15799
- container: _this14.uniqueId,
15800
- mediaData: _classPrivateFieldGet(_playerData, _this14).mediaData
15825
+ _assertClassBrand(_WistiaPlayer_brand, _this15, _initPlayerEmbed).call(_this15, {
15826
+ container: _this15.uniqueId,
15827
+ mediaData: _classPrivateFieldGet(_playerData, _this15).mediaData
15801
15828
  });
15802
15829
  }).catch(function(error) {
15803
15830
  (0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__.WO)("player/failure/init-failed");
@@ -15927,21 +15954,21 @@ function _initPlayerEmbed(_ref23) {
15927
15954
  mediaData
15928
15955
  });
15929
15956
  }
15930
- function _initPublicApi(_x22, _x23) {
15957
+ function _initPublicApi(_x23, _x24) {
15931
15958
  return _initPublicApi2.apply(this, arguments);
15932
15959
  }
15933
15960
  function _initPublicApi2() {
15934
- _initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, options) {
15935
- var _this20 = this;
15961
+ _initPublicApi2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee29(mediaId, options) {
15962
+ var _this22 = this;
15936
15963
  var embeddedCallback;
15937
- return _regeneratorRuntime().wrap(function _callee28$(_context28) {
15938
- while (1) switch (_context28.prev = _context28.next) {
15964
+ return _regeneratorRuntime().wrap(function _callee29$(_context29) {
15965
+ while (1) switch (_context29.prev = _context29.next) {
15939
15966
  case 0:
15940
- _context28.next = 2;
15967
+ _context29.next = 2;
15941
15968
  return _classPrivateFieldGet(_publicApiScript, this);
15942
15969
  case 2:
15943
15970
  if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.PublicApi) {
15944
- _context28.next = 5;
15971
+ _context29.next = 5;
15945
15972
  break;
15946
15973
  }
15947
15974
  (0, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__.WO)("player/failure/init-failed");
@@ -15949,53 +15976,53 @@ function _initPublicApi2() {
15949
15976
  case 5:
15950
15977
  embeddedCallback = function embeddedCallback2() {
15951
15978
  var _classPrivateFieldGet103;
15952
- void _assertClassBrand(_WistiaPlayer_brand, _this20, _maybeInitializeMux).call(_this20);
15953
- _assertClassBrand(_WistiaPlayer_brand, _this20, _renderEmbedTemplate).call(_this20);
15954
- (_classPrivateFieldGet103 = _classPrivateFieldGet(_resizeObserver, _this20)) === null || _classPrivateFieldGet103 === void 0 ? void 0 : _classPrivateFieldGet103.disconnect();
15955
- _classPrivateFieldSet(_resizeObserver, _this20, null);
15956
- if (_classPrivateFieldGet(_playPending, _this20)) {
15957
- void _this20.play();
15979
+ void _assertClassBrand(_WistiaPlayer_brand, _this22, _maybeInitializeMux).call(_this22);
15980
+ _assertClassBrand(_WistiaPlayer_brand, _this22, _renderEmbedTemplate).call(_this22);
15981
+ (_classPrivateFieldGet103 = _classPrivateFieldGet(_resizeObserver, _this22)) === null || _classPrivateFieldGet103 === void 0 ? void 0 : _classPrivateFieldGet103.disconnect();
15982
+ _classPrivateFieldSet(_resizeObserver, _this22, null);
15983
+ if (_classPrivateFieldGet(_playPending, _this22)) {
15984
+ void _this22.play();
15958
15985
  }
15959
15986
  };
15960
15987
  this.addEventListener("embedded", embeddedCallback);
15961
15988
  _classPrivateFieldGet(_removeEventListeners, this).push(function() {
15962
- _this20.removeEventListener("embedded", embeddedCallback);
15989
+ _this22.removeEventListener("embedded", embeddedCallback);
15963
15990
  });
15964
15991
  _classPrivateFieldSet(_api, this, new _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.PublicApi(mediaId, options));
15965
15992
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, this));
15966
15993
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, this));
15967
15994
  _classPrivateFieldGet(_removeEventListeners, this).push(function() {
15968
- _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, _this20));
15969
- _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, _this20));
15995
+ _this22.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.kY, _classPrivateFieldGet(_handleBeforeReplace, _this22));
15996
+ _this22.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.$1, _classPrivateFieldGet(_handleAfterReplace, _this22));
15970
15997
  });
15971
15998
  _classPrivateFieldGet(_api, this).ready(function() {
15972
15999
  var _classPrivateFieldGet104;
15973
- (_classPrivateFieldGet104 = _classPrivateFieldGet(_preloadThumbnailRoot, _this20)) === null || _classPrivateFieldGet104 === void 0 ? void 0 : _classPrivateFieldGet104.remove();
15974
- _this20.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, _this20));
15975
- _this20.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, {
16000
+ (_classPrivateFieldGet104 = _classPrivateFieldGet(_preloadThumbnailRoot, _this22)) === null || _classPrivateFieldGet104 === void 0 ? void 0 : _classPrivateFieldGet104.remove();
16001
+ _this22.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, _this22));
16002
+ _this22.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.c5, {
15976
16003
  detail: {
15977
16004
  mediaId
15978
16005
  }
15979
16006
  }));
15980
- _this20.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
16007
+ _this22.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.iP, {
15981
16008
  detail: {
15982
16009
  mediaId,
15983
- api: _classPrivateFieldGet(_api, _this20)
16010
+ api: _classPrivateFieldGet(_api, _this22)
15984
16011
  }
15985
16012
  }));
15986
- if (_classPrivateFieldGet(_impl, _this20)) {
15987
- Object.entries(_classPrivateFieldGet(_impl, _this20)._attrs).forEach(function(_ref29) {
16013
+ if (_classPrivateFieldGet(_impl, _this22)) {
16014
+ Object.entries(_classPrivateFieldGet(_impl, _this22)._attrs).forEach(function(_ref29) {
15988
16015
  var _ref30 = _slicedToArray(_ref29, 2), key = _ref30[0], value = _ref30[1];
15989
- _classPrivateFieldGet(_playerData, _this20).updateEmbedOptionOverrides(_defineProperty({}, key, value));
16016
+ _classPrivateFieldGet(_playerData, _this22).updateEmbedOptionOverrides(_defineProperty({}, key, value));
15990
16017
  });
15991
16018
  }
15992
- _assertClassBrand(_WistiaPlayer_brand, _this20, _renderPreloadThumbnail).call(_this20);
16019
+ _assertClassBrand(_WistiaPlayer_brand, _this22, _renderPreloadThumbnail).call(_this22);
15993
16020
  });
15994
16021
  case 13:
15995
16022
  case "end":
15996
- return _context28.stop();
16023
+ return _context29.stop();
15997
16024
  }
15998
- }, _callee28, this);
16025
+ }, _callee29, this);
15999
16026
  }));
16000
16027
  return _initPublicApi2.apply(this, arguments);
16001
16028
  }
@@ -16006,29 +16033,29 @@ function _maybeInitializeMux() {
16006
16033
  return _maybeInitializeMux2.apply(this, arguments);
16007
16034
  }
16008
16035
  function _maybeInitializeMux2() {
16009
- _maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee29() {
16010
- var _this21 = this;
16036
+ _maybeInitializeMux2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee30() {
16037
+ var _this23 = this;
16011
16038
  var shouldRandomEnableMux, shouldEnableMuxForPlayer, embedType, mux;
16012
- return _regeneratorRuntime().wrap(function _callee29$(_context29) {
16013
- while (1) switch (_context29.prev = _context29.next) {
16039
+ return _regeneratorRuntime().wrap(function _callee30$(_context30) {
16040
+ while (1) switch (_context30.prev = _context30.next) {
16014
16041
  case 0:
16015
16042
  if (_classPrivateFieldGet(_api, this)) {
16016
- _context29.next = 2;
16043
+ _context30.next = 2;
16017
16044
  break;
16018
16045
  }
16019
- return _context29.abrupt("return");
16046
+ return _context30.abrupt("return");
16020
16047
  case 2:
16021
16048
  shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_33__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_34__._);
16022
16049
  shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_34__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_17__.D5)();
16023
16050
  embedType = this.useWebComponent ? "translated-web-component" : "web-component";
16024
16051
  if (!shouldEnableMuxForPlayer) {
16025
- _context29.next = 11;
16052
+ _context30.next = 11;
16026
16053
  break;
16027
16054
  }
16028
- _context29.next = 8;
16055
+ _context30.next = 8;
16029
16056
  return (0, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__.$)("assets/external/wistia-mux.js");
16030
16057
  case 8:
16031
- mux = _context29.sent;
16058
+ mux = _context30.sent;
16032
16059
  mux.init(_classPrivateFieldGet(_api, this), {
16033
16060
  embedType
16034
16061
  });
@@ -16036,14 +16063,14 @@ function _maybeInitializeMux2() {
16036
16063
  var isTrackingEnabled = event.detail.isTrackingEnabled;
16037
16064
  if (!isTrackingEnabled) {
16038
16065
  var _classPrivateFieldGet106, _classPrivateFieldGet107;
16039
- (_classPrivateFieldGet106 = _classPrivateFieldGet(_api, _this21)) === null || _classPrivateFieldGet106 === void 0 ? void 0 : (_classPrivateFieldGet107 = _classPrivateFieldGet106.mux) === null || _classPrivateFieldGet107 === void 0 ? void 0 : _classPrivateFieldGet107.destroy();
16066
+ (_classPrivateFieldGet106 = _classPrivateFieldGet(_api, _this23)) === null || _classPrivateFieldGet106 === void 0 ? void 0 : (_classPrivateFieldGet107 = _classPrivateFieldGet106.mux) === null || _classPrivateFieldGet107 === void 0 ? void 0 : _classPrivateFieldGet107.destroy();
16040
16067
  }
16041
16068
  });
16042
16069
  case 11:
16043
16070
  case "end":
16044
- return _context29.stop();
16071
+ return _context30.stop();
16045
16072
  }
16046
- }, _callee29, this);
16073
+ }, _callee30, this);
16047
16074
  }));
16048
16075
  return _maybeInitializeMux2.apply(this, arguments);
16049
16076
  }
@@ -16069,7 +16096,7 @@ function _maybeSetupEmbedOptionsFromIframe() {
16069
16096
  _classPrivateFieldGet(_playerData, this).setIframeEmbedOptionSource(iframeEmbedOptions);
16070
16097
  }
16071
16098
  function _renderEmbedTemplate() {
16072
- var _this$embedHost2, _this15 = this;
16099
+ var _this$embedHost2, _this16 = this;
16073
16100
  if (!_classPrivateFieldGet(_preactRoot, this)) {
16074
16101
  return;
16075
16102
  }
@@ -16120,7 +16147,7 @@ function _renderEmbedTemplate() {
16120
16147
  "aria-hidden": "true"
16121
16148
  })))), (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
16122
16149
  ref: function ref(_ref24) {
16123
- _classPrivateFieldSet(_preloadThumbnailRoot, _this15, _ref24);
16150
+ _classPrivateFieldSet(_preloadThumbnailRoot, _this16, _ref24);
16124
16151
  }
16125
16152
  })), _classPrivateFieldGet(_preactRoot, this));
16126
16153
  }
@@ -16152,18 +16179,18 @@ function _renderPreloadThumbnail() {
16152
16179
  })), _classPrivateFieldGet(_preloadThumbnailRoot, this));
16153
16180
  }
16154
16181
  function _runMethodsFromAttributes() {
16155
- var _this16 = this;
16182
+ var _this17 = this;
16156
16183
  if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "current-time") !== null) {
16157
16184
  this.whenApiReady().then(function() {
16158
16185
  var _ref25, _classPrivateFieldGet99, _classPrivateFieldGet100;
16159
- var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this16, _getValueFromAttribute).call(_this16, "current-time"));
16160
- var isClosedPopover = (_ref25 = ((_classPrivateFieldGet99 = _classPrivateFieldGet(_api, _this16)) === null || _classPrivateFieldGet99 === void 0 ? void 0 : _classPrivateFieldGet99.popover) && !_classPrivateFieldGet(_api, _this16).popover.isVisible()) !== null && _ref25 !== void 0 ? _ref25 : false;
16186
+ var newTime = Number(_assertClassBrand(_WistiaPlayer_brand, _this17, _getValueFromAttribute).call(_this17, "current-time"));
16187
+ 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;
16161
16188
  var isMobile = (0, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_7__.GS)();
16162
- var shouldDelayUntilPlay = _this16.state !== "playing" && (isMobile || isClosedPopover);
16163
- void ((_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, _this16)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.time(newTime, {
16189
+ var shouldDelayUntilPlay = _this17.state !== "playing" && (isMobile || isClosedPopover);
16190
+ void ((_classPrivateFieldGet100 = _classPrivateFieldGet(_impl, _this17)) === null || _classPrivateFieldGet100 === void 0 ? void 0 : _classPrivateFieldGet100.time(newTime, {
16164
16191
  lazy: shouldDelayUntilPlay
16165
16192
  }));
16166
- _assertClassBrand(_WistiaPlayer_brand, _this16, _setSyncedEmbedOption).call(_this16, "currentTime", newTime);
16193
+ _assertClassBrand(_WistiaPlayer_brand, _this17, _setSyncedEmbedOption).call(_this17, "currentTime", newTime);
16167
16194
  }).catch(function(_error) {
16168
16195
  });
16169
16196
  }
@@ -16173,22 +16200,37 @@ function _runMethodsFromAttributes() {
16173
16200
  if (_assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, "video-quality") !== null) {
16174
16201
  this.whenApiReady().then(function() {
16175
16202
  var _classPrivateFieldGet101;
16176
- var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this16, _getValueFromAttribute).call(_this16, "video-quality");
16177
- (_classPrivateFieldGet101 = _classPrivateFieldGet(_impl, _this16)) === null || _classPrivateFieldGet101 === void 0 ? void 0 : _classPrivateFieldGet101.setVideoQuality(newQuality);
16178
- _assertClassBrand(_WistiaPlayer_brand, _this16, _setSyncedEmbedOption).call(_this16, "videoQuality", newQuality);
16203
+ var newQuality = _assertClassBrand(_WistiaPlayer_brand, _this17, _getValueFromAttribute).call(_this17, "video-quality");
16204
+ (_classPrivateFieldGet101 = _classPrivateFieldGet(_impl, _this17)) === null || _classPrivateFieldGet101 === void 0 ? void 0 : _classPrivateFieldGet101.setVideoQuality(newQuality);
16205
+ _assertClassBrand(_WistiaPlayer_brand, _this17, _setSyncedEmbedOption).call(_this17, "videoQuality", newQuality);
16179
16206
  }).catch(function(_error) {
16180
16207
  });
16181
16208
  }
16182
16209
  }
16183
16210
  function _saveInitialAttributesFromDomOptions() {
16184
- var _this17 = this;
16211
+ var _this18 = this;
16185
16212
  var domOptions = Object.fromEntries(Object.entries(this.attributes).map(function(_ref26) {
16186
16213
  var _ref27 = _slicedToArray(_ref26, 2), value = _ref27[1];
16187
- return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this17, _getValueFromAttribute).call(_this17, value.name)];
16214
+ return [(0, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__.b)(value.name), _assertClassBrand(_WistiaPlayer_brand, _this18, _getValueFromAttribute).call(_this18, value.name)];
16188
16215
  }));
16189
16216
  _classPrivateFieldGet(_playerData, this).setDomEmbedOptionSource(domOptions);
16190
16217
  (0, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_9__.gY)("__".concat(this.uniqueId, "_dom_options__"), _classPrivateFieldGet(_playerData, this).embedOptions);
16191
16218
  }
16219
+ function _setMultipleSyncedEmbedOptions(options) {
16220
+ var _this19 = this;
16221
+ Object.entries(options).forEach(function(entry) {
16222
+ var _Object$getOwnPropert;
16223
+ var _entry = _slicedToArray(entry, 2), key = _entry[0], value = _entry[1];
16224
+ if (value == null) {
16225
+ return;
16226
+ }
16227
+ if ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(_this19), key)) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert.set) {
16228
+ _this19[key] = value;
16229
+ } else {
16230
+ _assertClassBrand(_WistiaPlayer_brand, _this19, _setSyncedEmbedOption).call(_this19, key, value);
16231
+ }
16232
+ });
16233
+ }
16192
16234
  function _setSyncedEmbedOption(key, value) {
16193
16235
  _classPrivateFieldGet(_logger, this).info("set ".concat(key), value.toString());
16194
16236
  if (_classPrivateFieldGet(_impl, this)) {
@@ -16198,20 +16240,20 @@ function _setSyncedEmbedOption(key, value) {
16198
16240
  _assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
16199
16241
  }
16200
16242
  function _setupEventListeners() {
16201
- var _this18 = this;
16243
+ var _this20 = this;
16202
16244
  var loadedMediaDataCallback = function loadedMediaDataCallback2(event) {
16203
16245
  var _ref28 = event.detail, mediaData = _ref28.mediaData;
16204
- _assertClassBrand(_WistiaPlayer_brand, _this18, _updateMediaData).call(_this18, mediaData);
16246
+ _assertClassBrand(_WistiaPlayer_brand, _this20, _updateMediaData).call(_this20, mediaData);
16205
16247
  };
16206
16248
  var implCreatedCallback = function implCreatedCallback2(event) {
16207
- _classPrivateFieldSet(_impl, _this18, event.detail.impl);
16249
+ _classPrivateFieldSet(_impl, _this20, event.detail.impl);
16208
16250
  };
16209
16251
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
16210
16252
  this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
16211
16253
  _classPrivateFieldGet(_removeEventListeners, this).push(function() {
16212
- _this18.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
16254
+ _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.rO, loadedMediaDataCallback);
16213
16255
  }, function() {
16214
- _this18.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
16256
+ _this20.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__.dp, implCreatedCallback);
16215
16257
  });
16216
16258
  this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), {
16217
16259
  once: true
@@ -16221,9 +16263,9 @@ function _shouldDisplaySwatch() {
16221
16263
  return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
16222
16264
  }
16223
16265
  function _updateEmail(email) {
16224
- var _this19 = this;
16266
+ var _this21 = this;
16225
16267
  (0, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_19__.$B)(function(localStorage2) {
16226
- localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this19, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this19, _get_pageUrl)]), {}, {
16268
+ localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this21, _get_pageUrl)] = _objectSpread(_objectSpread({}, localStorage2[_classPrivateGetter(_WistiaPlayer_brand, _this21, _get_pageUrl)]), {}, {
16227
16269
  trackEmail: email
16228
16270
  });
16229
16271
  });
@@ -16242,50 +16284,50 @@ function _updateMediaData(mediaData) {
16242
16284
  _assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
16243
16285
  }
16244
16286
  var getSwatchMetaData = /* @__PURE__ */ function() {
16245
- var _ref19 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee26(url) {
16287
+ var _ref19 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee27(url) {
16246
16288
  var swatch;
16247
- return _regeneratorRuntime().wrap(function _callee26$(_context26) {
16248
- while (1) switch (_context26.prev = _context26.next) {
16289
+ return _regeneratorRuntime().wrap(function _callee27$(_context27) {
16290
+ while (1) switch (_context27.prev = _context27.next) {
16249
16291
  case 0:
16250
16292
  swatch = new Image();
16251
16293
  swatch.src = url;
16252
- _context26.next = 4;
16294
+ _context27.next = 4;
16253
16295
  return swatch.decode();
16254
16296
  case 4:
16255
- return _context26.abrupt("return", swatch);
16297
+ return _context27.abrupt("return", swatch);
16256
16298
  case 5:
16257
16299
  case "end":
16258
- return _context26.stop();
16300
+ return _context27.stop();
16259
16301
  }
16260
- }, _callee26);
16302
+ }, _callee27);
16261
16303
  }));
16262
- return function getSwatchMetaData2(_x19) {
16304
+ return function getSwatchMetaData2(_x20) {
16263
16305
  return _ref19.apply(this, arguments);
16264
16306
  };
16265
16307
  }();
16266
16308
  var wistiaSwatchElement = /* @__PURE__ */ function() {
16267
- var _ref20 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee27(mediaId, embedHost) {
16309
+ var _ref20 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee28(mediaId, embedHost) {
16268
16310
  var swatchUrl, swatchImg, naturalHeight, naturalWidth, ratio, style;
16269
- return _regeneratorRuntime().wrap(function _callee27$(_context27) {
16270
- while (1) switch (_context27.prev = _context27.next) {
16311
+ return _regeneratorRuntime().wrap(function _callee28$(_context28) {
16312
+ while (1) switch (_context28.prev = _context28.next) {
16271
16313
  case 0:
16272
16314
  swatchUrl = getSwatchUrl(mediaId, embedHost);
16273
- _context27.next = 3;
16315
+ _context28.next = 3;
16274
16316
  return getSwatchMetaData(swatchUrl);
16275
16317
  case 3:
16276
- swatchImg = _context27.sent;
16318
+ swatchImg = _context28.sent;
16277
16319
  naturalHeight = swatchImg.naturalHeight, naturalWidth = swatchImg.naturalWidth;
16278
16320
  ratio = naturalHeight / naturalWidth * 100;
16279
16321
  style = document.createElement("style");
16280
16322
  style.innerHTML = "\n wistia-player[media-id='".concat(mediaId, "']:not(:defined) {\n padding: ").concat(ratio, "% 0 0 0;\n background: url(").concat(swatchUrl, ");\n background-size: contain;\n filter: blur(5px);\n display: block;\n }\n ");
16281
- return _context27.abrupt("return", style);
16323
+ return _context28.abrupt("return", style);
16282
16324
  case 9:
16283
16325
  case "end":
16284
- return _context27.stop();
16326
+ return _context28.stop();
16285
16327
  }
16286
- }, _callee27);
16328
+ }, _callee28);
16287
16329
  }));
16288
- return function wistiaSwatchElement2(_x20, _x21) {
16330
+ return function wistiaSwatchElement2(_x21, _x22) {
16289
16331
  return _ref20.apply(this, arguments);
16290
16332
  };
16291
16333
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/wistia-player-react",
3
- "version": "0.0.115",
3
+ "version": "0.1.1",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "description": "An embeddable wistia-player web component and React wrapper to add responsive, lightweight, and SEO-friendly videos to your site.",
6
6
  "keywords": [
@@ -45,7 +45,7 @@
45
45
  "start:dev:yalc": "run build:react:dev --watch --yalc"
46
46
  },
47
47
  "dependencies": {
48
- "@wistia/wistia-player": "0.0.115"
48
+ "@wistia/wistia-player": "0.1.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@babel/core": "^7.26.9",
@@ -61,6 +61,6 @@
61
61
  "react": "^18.3.1",
62
62
  "read-package-json": "^7.0.1",
63
63
  "typescript": "5.7.3",
64
- "zx": "^8.5.3"
64
+ "zx": "^8.5.4"
65
65
  }
66
66
  }