@wistia/wistia-player 0.7.10 → 0.7.12

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.
@@ -1562,12 +1562,13 @@ var keys = function keys(obj) {
1562
1562
  /* harmony export */ Ni: () => (/* binding */ appHostname),
1563
1563
  /* harmony export */ rY: () => (/* binding */ getSubdomainSuffixHostname)
1564
1564
  /* harmony export */ });
1565
- /* unused harmony exports REGEX_CLOUD_DEV_BOX, REGEX_OPENCLAW_DEV_BOX, REGEX_WIZARD_DEV_BOX, REGEX_DEV_METAL_TUNNEL */
1565
+ /* unused harmony exports REGEX_CLOUD_DEV_BOX, REGEX_OPENCLAW_DEV_BOX, REGEX_WIZARD_DEV_BOX, REGEX_CDB_STAGING_DEV_BOX, REGEX_DEV_METAL_TUNNEL */
1566
1566
  // Regex to match cloud dev box hostnames: [subdomain]-cde-[devbox].[region].wistia.io
1567
1567
  var REGEX_CLOUD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.wistia\.io/i;
1568
1568
  // Regex to match openclaw containerized dev box hostnames: [subdomain]-cde-[devbox].[region].claw.wistia.io
1569
1569
  var REGEX_OPENCLAW_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.claw\.wistia\.io/i;
1570
1570
  var REGEX_WIZARD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.wiz\.wistia\.io/i;
1571
+ var REGEX_CDB_STAGING_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.cdb-staging\.wistia\.io/i;
1571
1572
  var REGEX_DEV_METAL_TUNNEL = /([a-z0-9-]+)-txl-([a-z0-9-]+)\.([a-z0-9-]+)\.mtl\.wistia\.io/i;
1572
1573
  var appHostname = function appHostname() {
1573
1574
  var subdomain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'app';
@@ -1585,6 +1586,10 @@ var getSubdomainSuffixHostname = function getSubdomainSuffixHostname() {
1585
1586
  var currentHost = window.location.hostname;
1586
1587
 
1587
1588
  // If we're already on a cloud dev box, extract the devbox and region
1589
+ var cdbStagingDevBoxMatches = REGEX_CDB_STAGING_DEV_BOX.exec(currentHost);
1590
+ if (cdbStagingDevBoxMatches) {
1591
+ return "".concat(subdomain, "-cde-").concat(cdbStagingDevBoxMatches[2], ".").concat(cdbStagingDevBoxMatches[3], ".cdb-staging.wistia.io");
1592
+ }
1588
1593
  var cloudDevBoxMatches = REGEX_CLOUD_DEV_BOX.exec(currentHost);
1589
1594
  if (cloudDevBoxMatches) {
1590
1595
  // Return the new hostname with the same devbox and region
@@ -4110,7 +4115,12 @@ var ProgressiveThumbnail = /*#__PURE__*/function (_Component) {
4110
4115
  }, {
4111
4116
  key: "componentDidMount",
4112
4117
  value: function componentDidMount() {
4113
- setTimeout(this.afterTwoSeconds, 2000);
4118
+ this._fadeTimer = setTimeout(this.afterTwoSeconds, 2000);
4119
+ }
4120
+ }, {
4121
+ key: "componentWillUnmount",
4122
+ value: function componentWillUnmount() {
4123
+ clearTimeout(this._fadeTimer);
4114
4124
  }
4115
4125
  }, {
4116
4126
  key: "normalThumbWrapperStyle",
@@ -5395,6 +5405,8 @@ var getPreferredAvailableLanguageIndex = function getPreferredAvailableLanguageI
5395
5405
  /* harmony export */ eZ: () => (/* binding */ sortedImages)
5396
5406
  /* harmony export */ });
5397
5407
  /* harmony import */ var utilities_hosts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5857);
5408
+ /* harmony import */ var utilities_root_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8176);
5409
+
5398
5410
 
5399
5411
  var bestImage = function bestImage(images) {
5400
5412
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -5413,7 +5425,7 @@ var bestImage = function bestImage(images) {
5413
5425
 
5414
5426
  // For sharper screens, let's load up larger images so the thumbnail
5415
5427
  // looks hella sharp
5416
- var desiredWidth = (window.devicePixelRatio || 1) * currentWidth;
5428
+ var desiredWidth = (utilities_root_js__WEBPACK_IMPORTED_MODULE_1__/* .root */ .z.devicePixelRatio || 1) * currentWidth;
5417
5429
  if (desiredWidth <= _sortedImages[0].width) {
5418
5430
  return _sortedImages[0];
5419
5431
  }
@@ -5707,10 +5719,11 @@ var getDefaultTranslation = function getDefaultTranslation() {
5707
5719
  // duplicate multiple translation keys.
5708
5720
  defineLanguage('en-US', 'English');
5709
5721
  defineTranslations('en-US', {
5722
+ PAUSE: 'Pause',
5710
5723
  PLAY: 'Play',
5711
5724
  PLAY_BUTTON_LIVE_NOT_STARTED: 'Livestream has not started',
5712
5725
  PLAY_BUTTON_TITLE_WHEN_NOT_PLAYING: 'Play Video',
5713
- PLAY_BUTTON_TITLE_WHEN_PLAYING: 'Pause',
5726
+ PLAY_BUTTON_TITLE_WHEN_PLAYING: 'Pause Video',
5714
5727
  REWATCH: 'Rewatch',
5715
5728
  SKIP: 'Skip'
5716
5729
  });
@@ -7338,8 +7351,8 @@ var PROD_EMBED_HOST = 'embed.wistia.com';
7338
7351
  var PROD_SSL_EMBED_HOST = 'embed-ssl.wistia.com';
7339
7352
  var PROD_FASTLY_SSL_HOST = 'embed-fastly.wistia.com';
7340
7353
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
7341
- var TAGGED_VERSION = "0.7.10" || 0;
7342
- var CURRENT_SHA = "47fc839b53fd9b104159ae2f4f03ebe022191e45" || 0;
7354
+ var TAGGED_VERSION = "0.7.12" || 0;
7355
+ var CURRENT_SHA = "01d97dee6fbb2a9d20e51228ee7b76cd1a281fe6" || 0;
7343
7356
  var DEFAULT_PROTOCOL = function () {
7344
7357
  if (typeof window !== 'undefined' && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location) {
7345
7358
  return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location.protocol;
@@ -18577,9 +18590,9 @@ var WistiaPlayer = /*#__PURE__*/function (_HTMLElement) {
18577
18590
  (0,_utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_13__/* .removeEmbedOptionStore */ .iU)("__".concat(this.uniqueId, "_dom_options__"));
18578
18591
  (_classPrivateFieldGet122 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet122 === void 0 ? void 0 : _classPrivateFieldGet122.remove();
18579
18592
  _classPrivateFieldSet(_api, this, null);
18593
+ _assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
18580
18594
  (_this$shadowRoot = this.shadowRoot) === null || _this$shadowRoot === void 0 ? void 0 : _this$shadowRoot.replaceChildren();
18581
18595
  _classPrivateFieldSet(_preactRoot, this, null);
18582
- _classPrivateFieldSet(_preloadThumbnailRoot, this, null);
18583
18596
  _classPrivateFieldSet(_hasElementConnectedToDOM, this, false);
18584
18597
  }
18585
18598
 
@@ -18637,6 +18650,15 @@ function _deferMediaDataFetchingToCarouselEmbed() {
18637
18650
  }
18638
18651
  return !!document.querySelector("wistia-channel-carousel[player-dom-id=\"".concat(this.id, "\"]:not([is-inside-playlist-embed=\"true\"][channel-id])"));
18639
18652
  }
18653
+ function _destroyPreloadThumbnailRoot() {
18654
+ if (_classPrivateFieldGet(_preloadThumbnailRoot, this)) {
18655
+ // Unmount the nested preact root so its components run componentWillUnmount
18656
+ // (e.g. clearing timers) before we detach the DOM out from under preact.
18657
+ (0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null, _classPrivateFieldGet(_preloadThumbnailRoot, this));
18658
+ _classPrivateFieldGet(_preloadThumbnailRoot, this).remove();
18659
+ _classPrivateFieldSet(_preloadThumbnailRoot, this, null);
18660
+ }
18661
+ }
18640
18662
  function _findLocalizationByLanguage(language) {
18641
18663
  var _classPrivateFieldGet123;
18642
18664
  if (language == null) {
@@ -18778,10 +18800,10 @@ function _initPublicApi2() {
18778
18800
  _this19.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__/* .AFTER_REPLACE_EVENT */ .$1, _classPrivateFieldGet(_handleAfterReplace, _this19));
18779
18801
  });
18780
18802
  _classPrivateFieldGet(_api, this).ready(function () {
18781
- var _classPrivateFieldGet131, _classPrivateFieldGet132;
18803
+ var _classPrivateFieldGet131;
18782
18804
  (_classPrivateFieldGet131 = _classPrivateFieldGet(_resizeObserver, _this19)) === null || _classPrivateFieldGet131 === void 0 ? void 0 : _classPrivateFieldGet131.disconnect();
18783
18805
  _classPrivateFieldSet(_resizeObserver, _this19, null);
18784
- (_classPrivateFieldGet132 = _classPrivateFieldGet(_preloadThumbnailRoot, _this19)) === null || _classPrivateFieldGet132 === void 0 ? void 0 : _classPrivateFieldGet132.remove();
18806
+ _assertClassBrand(_WistiaPlayer_brand, _this19, _destroyPreloadThumbnailRoot).call(_this19);
18785
18807
  _this19.removeEventListener('click', _classPrivateFieldGet(_handlePreloadThumbnailClick, _this19));
18786
18808
  // event for public consumption, exposed on our event types
18787
18809
  _this19.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__/* .API_READY_EVENT */ .c5, {
@@ -18872,8 +18894,8 @@ function _maybeInitializeMux2() {
18872
18894
  this.addEventListener('visitor-tracking-change', function (event) {
18873
18895
  var isTrackingEnabled = event.detail.isTrackingEnabled;
18874
18896
  if (!isTrackingEnabled) {
18875
- var _classPrivateFieldGet134, _classPrivateFieldGet135;
18876
- (_classPrivateFieldGet134 = _classPrivateFieldGet(_api, _this20)) === null || _classPrivateFieldGet134 === void 0 ? void 0 : (_classPrivateFieldGet135 = _classPrivateFieldGet134.mux) === null || _classPrivateFieldGet135 === void 0 ? void 0 : _classPrivateFieldGet135.destroy();
18897
+ var _classPrivateFieldGet133, _classPrivateFieldGet134;
18898
+ (_classPrivateFieldGet133 = _classPrivateFieldGet(_api, _this20)) === null || _classPrivateFieldGet133 === void 0 ? void 0 : (_classPrivateFieldGet134 = _classPrivateFieldGet133.mux) === null || _classPrivateFieldGet134 === void 0 ? void 0 : _classPrivateFieldGet134.destroy();
18877
18899
  }
18878
18900
  });
18879
18901
  case 6: