@wistia/wistia-player 0.0.111 → 0.0.113
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/dist/types/embeds/carousel/CarouselApi.d.ts.map +1 -1
- package/dist/types/embeds/carousel/CarouselComponent.d.ts.map +1 -1
- package/dist/types/embeds/carousel/WistiaCarousel.d.ts +12 -10
- package/dist/types/embeds/carousel/WistiaCarousel.d.ts.map +1 -1
- package/dist/types/embeds/playlist/PlaylistStyles.d.ts +1 -1
- package/dist/types/embeds/playlist/PlaylistStyles.d.ts.map +1 -1
- package/dist/types/embeds/playlist/WistiaPlaylist.d.ts +21 -10
- package/dist/types/embeds/playlist/WistiaPlaylist.d.ts.map +1 -1
- package/dist/types/embeds/shared/playlists/playlist-methods.d.ts +2 -1
- package/dist/types/embeds/shared/playlists/playlist-methods.d.ts.map +1 -1
- package/dist/types/embeds/wistiaPlayer/WistiaPlayer.d.ts +10 -0
- package/dist/types/embeds/wistiaPlayer/WistiaPlayer.d.ts.map +1 -1
- package/dist/types/types/carousel.d.ts +4 -1
- package/dist/types/types/carousel.d.ts.map +1 -1
- package/dist/types/types/controls.d.ts +1 -1
- package/dist/types/types/controls.d.ts.map +1 -1
- package/dist/types/types/player-api-types.d.ts +22 -1
- package/dist/types/types/player-api-types.d.ts.map +1 -1
- package/dist/types/types/plugins.d.ts +3 -1
- package/dist/types/types/plugins.d.ts.map +1 -1
- package/dist/types/utilities/sentryUtils.d.ts +1 -1
- package/dist/types/utilities/sentryUtils.d.ts.map +1 -1
- package/dist/types/wistia_namespace.d.ts.map +1 -1
- package/dist/wistia-player.js +27 -14
- package/dist/wistia-player.js.map +1 -1
- package/package.json +1 -1
package/dist/wistia-player.js
CHANGED
|
@@ -1606,13 +1606,13 @@ var colorContrastRatiosByShape = {
|
|
|
1606
1606
|
};
|
|
1607
1607
|
var rgbToHsl = function rgbToHsl(color) {
|
|
1608
1608
|
var colorArray = color;
|
|
1609
|
-
if (color instanceof _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .
|
|
1609
|
+
if (color instanceof _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .Q1) {
|
|
1610
1610
|
if ((0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_2__/* .isNil */ .gD)(color.r) || (0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_2__/* .isNil */ .gD)(color.g) || (0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_2__/* .isNil */ .gD)(color.b)) {
|
|
1611
1611
|
throw new Error('Color does not contain required RGB values');
|
|
1612
1612
|
}
|
|
1613
1613
|
colorArray = [color.r, color.g, color.b];
|
|
1614
1614
|
} else if (typeof color === 'string') {
|
|
1615
|
-
var colorInstance = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .
|
|
1615
|
+
var colorInstance = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .Q1(color);
|
|
1616
1616
|
if ((0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_2__/* .isNil */ .gD)(colorInstance.r) || (0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_2__/* .isNil */ .gD)(colorInstance.g) || (0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_2__/* .isNil */ .gD)(colorInstance.b)) {
|
|
1617
1617
|
throw new Error('Color does not contain required RGB values');
|
|
1618
1618
|
}
|
|
@@ -1660,8 +1660,8 @@ var rgbToHsl = function rgbToHsl(color) {
|
|
|
1660
1660
|
var getContrast = function getContrast(foreground, background) {
|
|
1661
1661
|
// WCAG contrast ratio
|
|
1662
1662
|
// see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
|
|
1663
|
-
var foregroundColor = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .
|
|
1664
|
-
var backgroundColor = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .
|
|
1663
|
+
var foregroundColor = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .Q1(foreground);
|
|
1664
|
+
var backgroundColor = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .Q1(background);
|
|
1665
1665
|
var l1 = foregroundColor.getRelativeLuminance();
|
|
1666
1666
|
var l2 = backgroundColor.getRelativeLuminance();
|
|
1667
1667
|
return l1 > l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);
|
|
@@ -2629,13 +2629,15 @@ var getSampleRatesByProductType = function getSampleRatesByProductType(productTy
|
|
|
2629
2629
|
case 'form':
|
|
2630
2630
|
case 'transcript':
|
|
2631
2631
|
return 0.25;
|
|
2632
|
+
case 'mediaPlayback':
|
|
2633
|
+
// These errors don't seem terribly useful for us, and it's not clear they are actionable.
|
|
2634
|
+
// Let's set a low sample rate for them.
|
|
2635
|
+
return 0.001;
|
|
2632
2636
|
case 'globalListener':
|
|
2633
2637
|
case 'other':
|
|
2634
2638
|
case 'player':
|
|
2635
2639
|
default:
|
|
2636
|
-
|
|
2637
|
-
// Ideally we can keep increasing this.
|
|
2638
|
-
return 0.01;
|
|
2640
|
+
return 0.1;
|
|
2639
2641
|
}
|
|
2640
2642
|
/* eslint-enable @typescript-eslint/no-magic-numbers */
|
|
2641
2643
|
};
|
|
@@ -4858,7 +4860,7 @@ var GRADIENT_COLOR_INDEX = 0;
|
|
|
4858
4860
|
var GRADIENT_PERCENTAGE_INDEX = 1;
|
|
4859
4861
|
var hexToRGBA = function hexToRGBA(hex) {
|
|
4860
4862
|
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ALPHA;
|
|
4861
|
-
var color = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .
|
|
4863
|
+
var color = new _color_js__WEBPACK_IMPORTED_MODULE_0__/* .Color */ .Q1(hex);
|
|
4862
4864
|
|
|
4863
4865
|
// the "as Color" here is because the implicit types are not quite right... because we're passing a value to the
|
|
4864
4866
|
// alpha function and using it as a setter it returns the new color as a Color object, not a number or undefined
|
|
@@ -5545,9 +5547,9 @@ var inferPageUrl = function inferPageUrl() {
|
|
|
5545
5547
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
5546
5548
|
|
|
5547
5549
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5548
|
-
/* harmony export */
|
|
5550
|
+
/* harmony export */ Q1: () => (/* binding */ Color)
|
|
5549
5551
|
/* harmony export */ });
|
|
5550
|
-
/* unused harmony
|
|
5552
|
+
/* unused harmony exports addHashToHex, colorWithAlpha */
|
|
5551
5553
|
/* harmony import */ var _color_utils_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(998);
|
|
5552
5554
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
5553
5555
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
@@ -6009,6 +6011,9 @@ var addHashToHex = function addHashToHex(hex) {
|
|
|
6009
6011
|
}
|
|
6010
6012
|
return "#".concat(hex);
|
|
6011
6013
|
};
|
|
6014
|
+
var colorWithAlpha = function colorWithAlpha(color, alpha) {
|
|
6015
|
+
return new Color(color).alpha(alpha).toRgba();
|
|
6016
|
+
};
|
|
6012
6017
|
|
|
6013
6018
|
/***/ }),
|
|
6014
6019
|
|
|
@@ -6103,6 +6108,14 @@ if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia._mediaD
|
|
|
6103
6108
|
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia._liveStreamPollingPromises == null) {
|
|
6104
6109
|
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia._liveStreamPollingPromises = {};
|
|
6105
6110
|
}
|
|
6111
|
+
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia.first == null) {
|
|
6112
|
+
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia.first = function () {
|
|
6113
|
+
var _root$Wistia$api;
|
|
6114
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
|
|
6115
|
+
return (_root$Wistia$api = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia.api()) !== null && _root$Wistia$api !== void 0 ? _root$Wistia$api : document.querySelector('wistia-player');
|
|
6116
|
+
// 👆 prefer the E-v1 api first, so for translated embeds, it'll use the TranslationApi, otherwise use the first wistia-player on the page
|
|
6117
|
+
};
|
|
6118
|
+
}
|
|
6106
6119
|
var Wistia = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.Wistia;
|
|
6107
6120
|
|
|
6108
6121
|
/***/ }),
|
|
@@ -6863,8 +6876,8 @@ var PROD_EMBED_HOST = 'embed.wistia.com';
|
|
|
6863
6876
|
var PROD_SSL_EMBED_HOST = 'embed-ssl.wistia.com';
|
|
6864
6877
|
var PROD_FASTLY_SSL_HOST = 'embed-fastly.wistia.com';
|
|
6865
6878
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
6866
|
-
var TAGGED_VERSION = "0.0.
|
|
6867
|
-
var CURRENT_SHA = (/* unused pure expression or super */ null && ("
|
|
6879
|
+
var TAGGED_VERSION = "0.0.113" || 0;
|
|
6880
|
+
var CURRENT_SHA = (/* unused pure expression or super */ null && ("ea2b6678b79dc984b7212e974c585a5be4975698" || 0));
|
|
6868
6881
|
var DEFAULT_PROTOCOL = function () {
|
|
6869
6882
|
if (typeof window !== 'undefined' && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location) {
|
|
6870
6883
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location.protocol;
|
|
@@ -7848,7 +7861,7 @@ var BigPlayButton = function BigPlayButton(_ref) {
|
|
|
7848
7861
|
width: "".concat(scaledWidth, "px")
|
|
7849
7862
|
};
|
|
7850
7863
|
var shouldMixBlendMode = !detect.edge && !noMixBlendMode;
|
|
7851
|
-
var blendColor = new _utilities_color_js__WEBPACK_IMPORTED_MODULE_4__/* .Color */ .
|
|
7864
|
+
var blendColor = new _utilities_color_js__WEBPACK_IMPORTED_MODULE_4__/* .Color */ .Q1(color !== null && color !== void 0 ? color : '#000').alpha(1);
|
|
7852
7865
|
var blendStyle = {
|
|
7853
7866
|
background: blendColor.toRgba(),
|
|
7854
7867
|
display: shouldMixBlendMode ? 'block' : 'none',
|
|
@@ -7859,7 +7872,7 @@ var BigPlayButton = function BigPlayButton(_ref) {
|
|
|
7859
7872
|
top: 0,
|
|
7860
7873
|
width: "".concat(scaledWidth, "px")
|
|
7861
7874
|
};
|
|
7862
|
-
var overlayColor = new _utilities_color_js__WEBPACK_IMPORTED_MODULE_4__/* .Color */ .
|
|
7875
|
+
var overlayColor = new _utilities_color_js__WEBPACK_IMPORTED_MODULE_4__/* .Color */ .Q1(color !== null && color !== void 0 ? color : '#000');
|
|
7863
7876
|
var overlayAlphaValue = shouldMixBlendMode ? ALPHA_MIX_BLEND_MODE : ALPHA_NO_MIX_BLEND_MODE;
|
|
7864
7877
|
overlayColor.alpha(overlayAlphaValue);
|
|
7865
7878
|
if (isFocused) {
|