@wistia/wistia-player-react 0.6.2 → 0.6.4

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.
@@ -4021,7 +4021,8 @@ var init_wistia_player = __esm({
4021
4021
  dsn: "https://a3591ba5e949a37083cc6f5a4191e903@o4505518331658240.ingest.us.sentry.io/4505794284290048",
4022
4022
  transport: window.Sentry.makeFetchTransport,
4023
4023
  stackParser: window.Sentry.defaultStackParser,
4024
- integrations: [],
4024
+ integrations: [window.Sentry.httpContextIntegration()],
4025
+ // Allow httpContextIntegration so we can collect URL, browser, and OS version information. No PII is included here.
4025
4026
  release: isNonEmptyString(TAGGED_VERSION) ? TAGGED_VERSION : CURRENT_SHA
4026
4027
  });
4027
4028
  var scope = new window.Sentry.Scope();
@@ -5977,6 +5978,37 @@ var init_wistia_player = __esm({
5977
5978
  var utilities_detect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(7231);
5978
5979
  var _wistia_type_guards__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__3(9814);
5979
5980
  var _assets_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__3(7209);
5981
+ function _createForOfIteratorHelper(r, e) {
5982
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
5983
+ if (!t) {
5984
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray2(r)) || e && r && "number" == typeof r.length) {
5985
+ t && (r = t);
5986
+ var _n = 0, F = function F2() {
5987
+ };
5988
+ return { s: F, n: function n() {
5989
+ return _n >= r.length ? { done: true } : { done: false, value: r[_n++] };
5990
+ }, e: function e2(r2) {
5991
+ throw r2;
5992
+ }, f: F };
5993
+ }
5994
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5995
+ }
5996
+ var o, a = true, u = false;
5997
+ return { s: function s() {
5998
+ t = t.call(r);
5999
+ }, n: function n() {
6000
+ var r2 = t.next();
6001
+ return a = r2.done, r2;
6002
+ }, e: function e2(r2) {
6003
+ u = true, o = r2;
6004
+ }, f: function f() {
6005
+ try {
6006
+ a || null == t.return || t.return();
6007
+ } finally {
6008
+ if (u) throw o;
6009
+ }
6010
+ } };
6011
+ }
5980
6012
  function _toConsumableArray(r) {
5981
6013
  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray2(r) || _nonIterableSpread();
5982
6014
  }
@@ -6044,12 +6076,38 @@ var init_wistia_player = __esm({
6044
6076
  media.embedOptions.channelPassword = options.channelPassword;
6045
6077
  }
6046
6078
  };
6079
+ var mergeFormCustomizations = function mergeFormCustomizations2(formCustomizations, embedOptions) {
6080
+ if (!formCustomizations || !embedOptions) return;
6081
+ if (!embedOptions.plugin) embedOptions.plugin = {};
6082
+ if (!embedOptions.plugin.form) embedOptions.plugin.form = {};
6083
+ var form = embedOptions.plugin.form;
6084
+ if (formCustomizations.form_button_text) form.formButtonText = formCustomizations.form_button_text;
6085
+ if (formCustomizations.form_lower_text) form.formLowerText = formCustomizations.form_lower_text;
6086
+ if (formCustomizations.title) form.title = formCustomizations.title;
6087
+ };
6088
+ var mergeFormCustomizationsIntoEmbedOptions = function mergeFormCustomizationsIntoEmbedOptions2(media) {
6089
+ mergeFormCustomizations(media.formCustomizations, media.embedOptions);
6090
+ if (Array.isArray(media.translatedMediaData)) {
6091
+ var _iterator = _createForOfIteratorHelper(media.translatedMediaData), _step;
6092
+ try {
6093
+ for (_iterator.s(); !(_step = _iterator.n()).done; ) {
6094
+ var entry = _step.value;
6095
+ mergeFormCustomizations(entry.formCustomizations, entry.embedOptions);
6096
+ }
6097
+ } catch (err) {
6098
+ _iterator.e(err);
6099
+ } finally {
6100
+ _iterator.f();
6101
+ }
6102
+ }
6103
+ };
6047
6104
  var mediaDataTransforms2 = function mediaDataTransforms3(media) {
6048
6105
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6049
6106
  maybeCloneOriginalAsMp4(media, options);
6050
6107
  convertStillImageToWebp(media);
6051
6108
  maybeAddChannelIdToEmbedOptions(media, options);
6052
6109
  maybeAddChannelPasswordToEmbedOptions(media, options);
6110
+ mergeFormCustomizationsIntoEmbedOptions(media);
6053
6111
  return media;
6054
6112
  };
6055
6113
  },
@@ -8952,7 +9010,7 @@ var init_wistia_player = __esm({
8952
9010
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
8953
9011
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
8954
9012
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
8955
- var TAGGED_VERSION2 = "0.6.2";
9013
+ var TAGGED_VERSION2 = "0.6.4";
8956
9014
  var CURRENT_SHA2 = (
8957
9015
  /* unused pure expression or super */
8958
9016
  null
@@ -8,7 +8,7 @@ import {
8
8
  import { forwardRef, Suspense, lazy, Fragment } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  var WistiaPlayerWrapper = lazy(
11
- async () => import("./WistiaPlayerWrapper-ZL6N32WH.mjs").then((module) => ({
11
+ async () => import("./WistiaPlayerWrapper-MEOAQZCW.mjs").then((module) => ({
12
12
  default: module.WistiaPlayerWrapper
13
13
  }))
14
14
  );
@@ -37,7 +37,7 @@ var WistiaPlayerWrapper = forwardRef(
37
37
  setSwatchAspectRatio(ratio);
38
38
  });
39
39
  }
40
- void import("./wistia-player-3SI5RXKK.mjs");
40
+ void import("./wistia-player-B2YCJL7Y.mjs");
41
41
  void customElements.whenDefined("wistia-player").then(() => {
42
42
  setIsWistiaPlayerDefined(true);
43
43
  });
@@ -3155,7 +3155,8 @@ var __webpack_modules__ = {
3155
3155
  dsn: "https://a3591ba5e949a37083cc6f5a4191e903@o4505518331658240.ingest.us.sentry.io/4505794284290048",
3156
3156
  transport: window.Sentry.makeFetchTransport,
3157
3157
  stackParser: window.Sentry.defaultStackParser,
3158
- integrations: [],
3158
+ integrations: [window.Sentry.httpContextIntegration()],
3159
+ // Allow httpContextIntegration so we can collect URL, browser, and OS version information. No PII is included here.
3159
3160
  release: isNonEmptyString(TAGGED_VERSION) ? TAGGED_VERSION : CURRENT_SHA
3160
3161
  });
3161
3162
  var scope = new window.Sentry.Scope();
@@ -5111,6 +5112,37 @@ var __webpack_modules__ = {
5111
5112
  var utilities_detect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(7231);
5112
5113
  var _wistia_type_guards__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__3(9814);
5113
5114
  var _assets_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__3(7209);
5115
+ function _createForOfIteratorHelper(r, e) {
5116
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
5117
+ if (!t) {
5118
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray2(r)) || e && r && "number" == typeof r.length) {
5119
+ t && (r = t);
5120
+ var _n = 0, F = function F2() {
5121
+ };
5122
+ return { s: F, n: function n() {
5123
+ return _n >= r.length ? { done: true } : { done: false, value: r[_n++] };
5124
+ }, e: function e2(r2) {
5125
+ throw r2;
5126
+ }, f: F };
5127
+ }
5128
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5129
+ }
5130
+ var o, a = true, u = false;
5131
+ return { s: function s() {
5132
+ t = t.call(r);
5133
+ }, n: function n() {
5134
+ var r2 = t.next();
5135
+ return a = r2.done, r2;
5136
+ }, e: function e2(r2) {
5137
+ u = true, o = r2;
5138
+ }, f: function f() {
5139
+ try {
5140
+ a || null == t.return || t.return();
5141
+ } finally {
5142
+ if (u) throw o;
5143
+ }
5144
+ } };
5145
+ }
5114
5146
  function _toConsumableArray(r) {
5115
5147
  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray2(r) || _nonIterableSpread();
5116
5148
  }
@@ -5178,12 +5210,38 @@ var __webpack_modules__ = {
5178
5210
  media.embedOptions.channelPassword = options.channelPassword;
5179
5211
  }
5180
5212
  };
5213
+ var mergeFormCustomizations = function mergeFormCustomizations2(formCustomizations, embedOptions) {
5214
+ if (!formCustomizations || !embedOptions) return;
5215
+ if (!embedOptions.plugin) embedOptions.plugin = {};
5216
+ if (!embedOptions.plugin.form) embedOptions.plugin.form = {};
5217
+ var form = embedOptions.plugin.form;
5218
+ if (formCustomizations.form_button_text) form.formButtonText = formCustomizations.form_button_text;
5219
+ if (formCustomizations.form_lower_text) form.formLowerText = formCustomizations.form_lower_text;
5220
+ if (formCustomizations.title) form.title = formCustomizations.title;
5221
+ };
5222
+ var mergeFormCustomizationsIntoEmbedOptions = function mergeFormCustomizationsIntoEmbedOptions2(media) {
5223
+ mergeFormCustomizations(media.formCustomizations, media.embedOptions);
5224
+ if (Array.isArray(media.translatedMediaData)) {
5225
+ var _iterator = _createForOfIteratorHelper(media.translatedMediaData), _step;
5226
+ try {
5227
+ for (_iterator.s(); !(_step = _iterator.n()).done; ) {
5228
+ var entry = _step.value;
5229
+ mergeFormCustomizations(entry.formCustomizations, entry.embedOptions);
5230
+ }
5231
+ } catch (err) {
5232
+ _iterator.e(err);
5233
+ } finally {
5234
+ _iterator.f();
5235
+ }
5236
+ }
5237
+ };
5181
5238
  var mediaDataTransforms2 = function mediaDataTransforms3(media) {
5182
5239
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5183
5240
  maybeCloneOriginalAsMp4(media, options);
5184
5241
  convertStillImageToWebp(media);
5185
5242
  maybeAddChannelIdToEmbedOptions(media, options);
5186
5243
  maybeAddChannelPasswordToEmbedOptions(media, options);
5244
+ mergeFormCustomizationsIntoEmbedOptions(media);
5187
5245
  return media;
5188
5246
  };
5189
5247
  },
@@ -8086,7 +8144,7 @@ var __webpack_modules__ = {
8086
8144
  var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
8087
8145
  var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
8088
8146
  var SSL_EMBED_HOST = "embed-ssl.wistia.com";
8089
- var TAGGED_VERSION2 = "0.6.2";
8147
+ var TAGGED_VERSION2 = "0.6.4";
8090
8148
  var CURRENT_SHA2 = (
8091
8149
  /* unused pure expression or super */
8092
8150
  null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/wistia-player-react",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
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": [
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@wistia/type-guards": "^0.9.3",
49
- "@wistia/wistia-player": "0.6.2"
49
+ "@wistia/wistia-player": "0.6.4"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": ">=18.0.0 <20.0.0",
@@ -56,7 +56,7 @@
56
56
  "@babel/core": "^7.29.0",
57
57
  "@babel/plugin-proposal-class-properties": "^7.18.6",
58
58
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
59
- "@babel/preset-env": "^7.28.5",
59
+ "@babel/preset-env": "^7.29.0",
60
60
  "@babel/preset-react": "^7.28.5",
61
61
  "@babel/preset-typescript": "^7.28.5",
62
62
  "@types/react": "^19.2.14",