@wistia/wistia-player-react 0.0.76 → 0.0.78

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.
@@ -764,6 +764,7 @@ function _renderEmbedTemplate() {
764
764
  if (!_classPrivateFieldGet(_preactRoot, this)) {
765
765
  return;
766
766
  }
767
+ var mediaType = _classPrivateFieldGet(_playerData, this).mediaData.mediaType;
767
768
  var swatchUrl2 = getSwatchUrl(this.mediaId, (_this$embedHost2 = this.embedHost) !== null && _this$embedHost2 !== void 0 ? _this$embedHost2 : "");
768
769
  var swatchHeight = "100%";
769
770
  if (parseFloat(_classPrivateFieldGet(_paddingTop, this)) !== 0 && _classPrivateFieldGet(_paddingTop, this) !== "") {
@@ -773,7 +774,7 @@ function _renderEmbedTemplate() {
773
774
  playerBorderRadius: this.playerBorderRadius,
774
775
  roundedPlayer: this.roundedPlayer
775
776
  });
776
- (0, preact__WEBPACK_IMPORTED_MODULE_0__.XX)((0, preact__WEBPACK_IMPORTED_MODULE_0__.h)(preact__WEBPACK_IMPORTED_MODULE_0__.FK, null, (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("style", null, ":host {\n display: flex;\n position: relative;\n ".concat(_classPrivateFieldGet(_preloadAspectRatio, this) !== void 0 && "aspect-ratio: ".concat(_classPrivateFieldGet(_preloadAspectRatio, this), ";"), "\n }")), _assertClassBrand(_WistiaPlayer_brand, this, _shouldDisplaySwatch).call(this) && (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
777
+ (0, preact__WEBPACK_IMPORTED_MODULE_0__.XX)((0, preact__WEBPACK_IMPORTED_MODULE_0__.h)(preact__WEBPACK_IMPORTED_MODULE_0__.FK, null, (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("style", null, ":host {\n display: flex;\n position: relative;\n ".concat(mediaType === "Audio" && "min-height: 45px;", "\n ").concat(_classPrivateFieldGet(_preloadAspectRatio, this) !== void 0 && "aspect-ratio: ".concat(_classPrivateFieldGet(_preloadAspectRatio, this), ";"), "\n }")), _assertClassBrand(_WistiaPlayer_brand, this, _shouldDisplaySwatch).call(this) && (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
777
778
  style: {
778
779
  height: swatchHeight,
779
780
  left: 0,
@@ -4558,9 +4559,10 @@ var init_wistia_player = __esm({
4558
4559
  });
4559
4560
  var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(5509);
4560
4561
  var QUEUE_INTERVAL = 500;
4562
+ var doesWQExist = Boolean(window._wq);
4561
4563
  var wistiaQueue = null;
4562
4564
  var maybeStartWistiaQueue = function maybeStartWistiaQueue2() {
4563
- if (wistiaQueue) {
4565
+ if (wistiaQueue || doesWQExist) {
4564
4566
  return;
4565
4567
  }
4566
4568
  wistiaQueue = setInterval(function() {
@@ -4569,8 +4571,8 @@ var init_wistia_player = __esm({
4569
4571
  return;
4570
4572
  }
4571
4573
  while (queue.length > 0) {
4572
- if (typeof queue[0] === "function") {
4573
- var fn = queue.shift();
4574
+ var fn = queue.shift();
4575
+ if (typeof fn === "function") {
4574
4576
  fn(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__.s);
4575
4577
  }
4576
4578
  }
@@ -9661,7 +9663,7 @@ var init_wistia_player = __esm({
9661
9663
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
9662
9664
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
9663
9665
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
9664
- var TAGGED_VERSION = "0.0.76";
9666
+ var TAGGED_VERSION = "0.0.78";
9665
9667
  var DEFAULT_PROTOCOL = function() {
9666
9668
  if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
9667
9669
  return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
@@ -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-TJZD54Z3.mjs").then((module) => ({
10
+ async () => import("./WistiaPlayerWrapper-ESZF3TTL.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-C2XDH6XW.mjs");
25
+ void import("./wistia-player-FPIQXSID.mjs");
26
26
  void customElements.whenDefined("wistia-player").then(() => {
27
27
  setIsWistiaPlayerDefined(true);
28
28
  });
@@ -3634,9 +3634,10 @@ var __webpack_modules__ = {
3634
3634
  });
3635
3635
  var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(5509);
3636
3636
  var QUEUE_INTERVAL = 500;
3637
+ var doesWQExist = Boolean(window._wq);
3637
3638
  var wistiaQueue = null;
3638
3639
  var maybeStartWistiaQueue = function maybeStartWistiaQueue2() {
3639
- if (wistiaQueue) {
3640
+ if (wistiaQueue || doesWQExist) {
3640
3641
  return;
3641
3642
  }
3642
3643
  wistiaQueue = setInterval(function() {
@@ -3645,8 +3646,8 @@ var __webpack_modules__ = {
3645
3646
  return;
3646
3647
  }
3647
3648
  while (queue.length > 0) {
3648
- if (typeof queue[0] === "function") {
3649
- var fn = queue.shift();
3649
+ var fn = queue.shift();
3650
+ if (typeof fn === "function") {
3650
3651
  fn(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__.s);
3651
3652
  }
3652
3653
  }
@@ -8737,7 +8738,7 @@ var __webpack_modules__ = {
8737
8738
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
8738
8739
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
8739
8740
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
8740
- var TAGGED_VERSION = "0.0.76";
8741
+ var TAGGED_VERSION = "0.0.78";
8741
8742
  var DEFAULT_PROTOCOL = function() {
8742
8743
  if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
8743
8744
  return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
@@ -14961,6 +14962,7 @@ function _renderEmbedTemplate() {
14961
14962
  if (!_classPrivateFieldGet(_preactRoot, this)) {
14962
14963
  return;
14963
14964
  }
14965
+ var mediaType = _classPrivateFieldGet(_playerData, this).mediaData.mediaType;
14964
14966
  var swatchUrl = getSwatchUrl(this.mediaId, (_this$embedHost2 = this.embedHost) !== null && _this$embedHost2 !== void 0 ? _this$embedHost2 : "");
14965
14967
  var swatchHeight = "100%";
14966
14968
  if (parseFloat(_classPrivateFieldGet(_paddingTop, this)) !== 0 && _classPrivateFieldGet(_paddingTop, this) !== "") {
@@ -14970,7 +14972,7 @@ function _renderEmbedTemplate() {
14970
14972
  playerBorderRadius: this.playerBorderRadius,
14971
14973
  roundedPlayer: this.roundedPlayer
14972
14974
  });
14973
- (0, preact__WEBPACK_IMPORTED_MODULE_0__.XX)((0, preact__WEBPACK_IMPORTED_MODULE_0__.h)(preact__WEBPACK_IMPORTED_MODULE_0__.FK, null, (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("style", null, ":host {\n display: flex;\n position: relative;\n ".concat(_classPrivateFieldGet(_preloadAspectRatio, this) !== void 0 && "aspect-ratio: ".concat(_classPrivateFieldGet(_preloadAspectRatio, this), ";"), "\n }")), _assertClassBrand(_WistiaPlayer_brand, this, _shouldDisplaySwatch).call(this) && (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
14975
+ (0, preact__WEBPACK_IMPORTED_MODULE_0__.XX)((0, preact__WEBPACK_IMPORTED_MODULE_0__.h)(preact__WEBPACK_IMPORTED_MODULE_0__.FK, null, (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("style", null, ":host {\n display: flex;\n position: relative;\n ".concat(mediaType === "Audio" && "min-height: 45px;", "\n ").concat(_classPrivateFieldGet(_preloadAspectRatio, this) !== void 0 && "aspect-ratio: ".concat(_classPrivateFieldGet(_preloadAspectRatio, this), ";"), "\n }")), _assertClassBrand(_WistiaPlayer_brand, this, _shouldDisplaySwatch).call(this) && (0, preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
14974
14976
  style: {
14975
14977
  height: swatchHeight,
14976
14978
  left: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/wistia-player-react",
3
- "version": "0.0.76",
3
+ "version": "0.0.78",
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,13 +45,13 @@
45
45
  "start:dev:yalc": "run build:react:dev --watch --yalc"
46
46
  },
47
47
  "dependencies": {
48
- "@wistia/wistia-player": "0.0.76"
48
+ "@wistia/wistia-player": "0.0.78"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@babel/core": "^7.25.2",
52
52
  "@babel/plugin-proposal-class-properties": "^7.18.6",
53
53
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
54
- "@babel/preset-env": "^7.25.8",
54
+ "@babel/preset-env": "^7.26.0",
55
55
  "@babel/preset-react": "^7.25.9",
56
56
  "@babel/preset-typescript": "^7.26.0",
57
57
  "@types/react": "^18.3.12",
@@ -61,6 +61,6 @@
61
61
  "react": "^18.3.1",
62
62
  "read-package-json": "^7.0.1",
63
63
  "typescript": "5.7.2",
64
- "zx": "^8.2.2"
64
+ "zx": "^8.2.4"
65
65
  }
66
66
  }