@wistia/wistia-player-react 0.7.29 → 0.7.31

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @wistia/wistia-player-react
2
2
 
3
+ ## 0.7.31
4
+
5
+ ### Patch Changes
6
+
7
+ - a1484dc: Fixed the settings menu showing blank "Speed", "Quality" and "Auto" labels in Safari Private Browsing on some pages. Translated player text is no longer decoded through a form control, which Safari's tracking protection can blank out.
8
+ - a6cb4eb: Updates hls.js to 1.7.4. Handing a video off to AirPlay from Safari no longer relies on a workaround in the player: hls.js now steps aside on its own while the receiver plays, and the player re-attaches it when playback returns to the device.
9
+ - 45ecceb: The published types now include the `wmode` embed option and the `disallowOriginalFilePlayback`, `forceInstantHls`, `forceOriginalFilePlayback` and `playerBackgroundColor` attributes. How the player applies poster, volume, background color and letterbox settings is unchanged.
10
+ - Updated dependencies [a1484dc]
11
+ - Updated dependencies [a6cb4eb]
12
+ - Updated dependencies [45ecceb]
13
+ - @wistia/wistia-player@0.7.31
14
+
15
+ ## 0.7.30
16
+
17
+ ### Patch Changes
18
+
19
+ - 85473d5: Updates the form to use the players visitor key when available
20
+ - 6820312: Playback health reports now include the playback engine and the hls.js version as their own fields, so health data can be split by engine.
21
+ - 3300924: Adds a `preferredHlsEngine` embed option. When set to `native` on a browser with built-in HLS playback (Safari, iOS), the player uses the browser's own HLS engine instead of hls.js; otherwise playback is unchanged.
22
+ - Updated dependencies [85473d5]
23
+ - Updated dependencies [6820312]
24
+ - Updated dependencies [3300924]
25
+ - @wistia/wistia-player@0.7.30
26
+
3
27
  ## 0.7.29
4
28
 
5
29
  ### Patch Changes
@@ -964,10 +964,11 @@ var init_wistia_player = __esm({
964
964
  if (mediaData.mediaType === "Audio") {
965
965
  return SIMPLE_AUDIO_ENGINE_PATH;
966
966
  }
967
+ const canUseNativeHls = allowHls && detect.nativeHls;
967
968
  const isApple = detect.safari || detect.ios.version > 0;
968
969
  const allowsSameOrigin = window.origin !== "null";
969
970
  const restrictedBySameOrigin = isApple && !allowsSameOrigin;
970
- if (allowHls && detect.nativeHls && (detect.managedMediaSource === false || restrictedBySameOrigin)) {
971
+ if (canUseNativeHls && (detect.managedMediaSource === false || restrictedBySameOrigin)) {
971
972
  logger.info(NATIVE_HLS_VIDEO);
972
973
  return NATIVE_HLS_ENGINE_PATH;
973
974
  }
@@ -976,6 +977,10 @@ var init_wistia_player = __esm({
976
977
  logger.info(ALPHA_VIDEO);
977
978
  return ALPHA_VIDEO_ENGINE_PATH;
978
979
  }
980
+ if (canUseNativeHls && options.preferredHlsEngine === "native") {
981
+ logger.info(NATIVE_HLS_VIDEO, "preferred");
982
+ return NATIVE_HLS_ENGINE_PATH;
983
+ }
979
984
  logger.info(HLS_VIDEO);
980
985
  return HLS_ENGINE_PATH;
981
986
  }
@@ -5688,12 +5693,13 @@ var init_wistia_player = __esm({
5688
5693
  /* harmony export */
5689
5694
  });
5690
5695
  var utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(731);
5691
- var utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__3(7157);
5692
- var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(5509);
5693
- const languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languages || {};
5694
- const translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.translations || {};
5695
- if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s._translationPromises) {
5696
- _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s._translationPromises = {};
5696
+ var utilities_unescape_html_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__3(2428);
5697
+ var utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(7157);
5698
+ var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2 = __webpack_require__3(5509);
5699
+ const languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languages || {};
5700
+ const translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.translations || {};
5701
+ if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._translationPromises) {
5702
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._translationPromises = {};
5697
5703
  }
5698
5704
  const supportedLanguages = ["ar", "de", "es", "en-US", "fr", "it", "ja", "ko", "pt", "ru", "zh-CN"];
5699
5705
  const ietfLanguageTagToCode = {
@@ -5760,18 +5766,21 @@ var init_wistia_player = __esm({
5760
5766
  }
5761
5767
  return text;
5762
5768
  };
5763
- let dummyTextArea;
5764
- const cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.cachedDecodings || {};
5769
+ const cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.cachedDecodings || {};
5765
5770
  const decodeEntities = (text) => {
5766
- if (!dummyTextArea) {
5767
- dummyTextArea = document.createElement("textarea");
5771
+ if (typeof text !== "string" || !text.includes("&")) {
5772
+ return text;
5773
+ }
5774
+ const cached = cachedDecodings[text];
5775
+ if (cached) {
5776
+ return cached;
5768
5777
  }
5769
- if (cachedDecodings[text] != null) {
5770
- return cachedDecodings[text];
5778
+ const decoded = (0, utilities_unescape_html_js__WEBPACK_IMPORTED_MODULE_1__.U)(text);
5779
+ if (!decoded) {
5780
+ return text;
5771
5781
  }
5772
- dummyTextArea.innerHTML = text;
5773
- cachedDecodings[text] = dummyTextArea.value;
5774
- return dummyTextArea.value;
5782
+ cachedDecodings[text] = decoded;
5783
+ return decoded;
5775
5784
  };
5776
5785
  const getTranslation = (code, key) => {
5777
5786
  code = normalizeLanguageCode(code);
@@ -5792,11 +5801,11 @@ var init_wistia_player = __esm({
5792
5801
  };
5793
5802
  const getLanguagePreference = () => {
5794
5803
  if (navigator.languages || navigator.language) {
5795
- _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languagePreference = navigator.languages || [navigator.language];
5804
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languagePreference = navigator.languages || [navigator.language];
5796
5805
  } else {
5797
- _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languagePreference = ["en-US"];
5806
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languagePreference = ["en-US"];
5798
5807
  }
5799
- return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languagePreference;
5808
+ return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languagePreference;
5800
5809
  };
5801
5810
  let defaultPromise = Promise.resolve({
5802
5811
  code: "en-US",
@@ -7070,8 +7079,8 @@ var init_wistia_player = __esm({
7070
7079
  const PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
7071
7080
  const PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
7072
7081
  const SSL_EMBED_HOST = "embed-ssl.wistia.com";
7073
- const TAGGED_VERSION = "0.7.29";
7074
- const CURRENT_SHA = "ddc2e26385ad53fe7392e20438bff9984c2dce38";
7082
+ const TAGGED_VERSION = "0.7.31";
7083
+ const CURRENT_SHA = "65b8997b69ccf6fecc2c118378433208e340851c";
7075
7084
  const DEFAULT_PROTOCOL = (() => {
7076
7085
  if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
7077
7086
  return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
@@ -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-BAQFD4YO.mjs").then((module) => ({
11
+ async () => import("./WistiaPlayerWrapper-D26PGA5B.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-432ZX4TL.mjs");
40
+ void import("./wistia-player-7PFMT4CO.mjs");
41
41
  void customElements.whenDefined("wistia-player").then(() => {
42
42
  setIsWistiaPlayerDefined(true);
43
43
  });
@@ -323,10 +323,11 @@ var __webpack_modules__ = {
323
323
  if (mediaData.mediaType === "Audio") {
324
324
  return SIMPLE_AUDIO_ENGINE_PATH;
325
325
  }
326
+ const canUseNativeHls = allowHls && detect.nativeHls;
326
327
  const isApple = detect.safari || detect.ios.version > 0;
327
328
  const allowsSameOrigin = window.origin !== "null";
328
329
  const restrictedBySameOrigin = isApple && !allowsSameOrigin;
329
- if (allowHls && detect.nativeHls && (detect.managedMediaSource === false || restrictedBySameOrigin)) {
330
+ if (canUseNativeHls && (detect.managedMediaSource === false || restrictedBySameOrigin)) {
330
331
  logger.info(NATIVE_HLS_VIDEO);
331
332
  return NATIVE_HLS_ENGINE_PATH;
332
333
  }
@@ -335,6 +336,10 @@ var __webpack_modules__ = {
335
336
  logger.info(ALPHA_VIDEO);
336
337
  return ALPHA_VIDEO_ENGINE_PATH;
337
338
  }
339
+ if (canUseNativeHls && options.preferredHlsEngine === "native") {
340
+ logger.info(NATIVE_HLS_VIDEO, "preferred");
341
+ return NATIVE_HLS_ENGINE_PATH;
342
+ }
338
343
  logger.info(HLS_VIDEO);
339
344
  return HLS_ENGINE_PATH;
340
345
  }
@@ -5047,12 +5052,13 @@ var __webpack_modules__ = {
5047
5052
  /* harmony export */
5048
5053
  });
5049
5054
  var utilities_obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(731);
5050
- var utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__3(7157);
5051
- var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(5509);
5052
- const languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languages || {};
5053
- const translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.translations || {};
5054
- if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s._translationPromises) {
5055
- _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s._translationPromises = {};
5055
+ var utilities_unescape_html_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__3(2428);
5056
+ var utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(7157);
5057
+ var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2 = __webpack_require__3(5509);
5058
+ const languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languages = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languages || {};
5059
+ const translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.translations = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.translations || {};
5060
+ if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._translationPromises) {
5061
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._translationPromises = {};
5056
5062
  }
5057
5063
  const supportedLanguages = ["ar", "de", "es", "en-US", "fr", "it", "ja", "ko", "pt", "ru", "zh-CN"];
5058
5064
  const ietfLanguageTagToCode = {
@@ -5119,18 +5125,21 @@ var __webpack_modules__ = {
5119
5125
  }
5120
5126
  return text;
5121
5127
  };
5122
- let dummyTextArea;
5123
- const cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.cachedDecodings || {};
5128
+ const cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.cachedDecodings = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.cachedDecodings || {};
5124
5129
  const decodeEntities = (text) => {
5125
- if (!dummyTextArea) {
5126
- dummyTextArea = document.createElement("textarea");
5130
+ if (typeof text !== "string" || !text.includes("&")) {
5131
+ return text;
5132
+ }
5133
+ const cached = cachedDecodings[text];
5134
+ if (cached) {
5135
+ return cached;
5127
5136
  }
5128
- if (cachedDecodings[text] != null) {
5129
- return cachedDecodings[text];
5137
+ const decoded = (0, utilities_unescape_html_js__WEBPACK_IMPORTED_MODULE_1__.U)(text);
5138
+ if (!decoded) {
5139
+ return text;
5130
5140
  }
5131
- dummyTextArea.innerHTML = text;
5132
- cachedDecodings[text] = dummyTextArea.value;
5133
- return dummyTextArea.value;
5141
+ cachedDecodings[text] = decoded;
5142
+ return decoded;
5134
5143
  };
5135
5144
  const getTranslation = (code, key) => {
5136
5145
  code = normalizeLanguageCode(code);
@@ -5151,11 +5160,11 @@ var __webpack_modules__ = {
5151
5160
  };
5152
5161
  const getLanguagePreference = () => {
5153
5162
  if (navigator.languages || navigator.language) {
5154
- _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languagePreference = navigator.languages || [navigator.language];
5163
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languagePreference = navigator.languages || [navigator.language];
5155
5164
  } else {
5156
- _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languagePreference = ["en-US"];
5165
+ _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languagePreference = ["en-US"];
5157
5166
  }
5158
- return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.languagePreference;
5167
+ return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.languagePreference;
5159
5168
  };
5160
5169
  let defaultPromise = Promise.resolve({
5161
5170
  code: "en-US",
@@ -6429,8 +6438,8 @@ var __webpack_modules__ = {
6429
6438
  const PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
6430
6439
  const PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
6431
6440
  const SSL_EMBED_HOST = "embed-ssl.wistia.com";
6432
- const TAGGED_VERSION = "0.7.29";
6433
- const CURRENT_SHA = "ddc2e26385ad53fe7392e20438bff9984c2dce38";
6441
+ const TAGGED_VERSION = "0.7.31";
6442
+ const CURRENT_SHA = "65b8997b69ccf6fecc2c118378433208e340851c";
6434
6443
  const DEFAULT_PROTOCOL = (() => {
6435
6444
  if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
6436
6445
  return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/wistia-player-react",
3
- "version": "0.7.29",
3
+ "version": "0.7.31",
4
4
  "packageManager": "yarn@4.18.0",
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.7.29"
49
+ "@wistia/wistia-player": "0.7.31"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": ">=18.0.0 <20.0.0",