@wistia/wistia-player 0.7.4 → 0.7.6
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/webComponents/WistiaChannelCarousel.d.ts.map +1 -1
- package/dist/types/embeds/forms/types.d.ts +3 -1
- package/dist/types/embeds/forms/types.d.ts.map +1 -1
- package/dist/types/embeds/playlist/WistiaPlaylist.d.ts +4 -0
- package/dist/types/embeds/playlist/WistiaPlaylist.d.ts.map +1 -1
- package/dist/types/embeds/wistiaPlayer/WistiaPlayer.d.ts +1 -1
- package/dist/types/embeds/wistiaPlayer/WistiaPlayer.d.ts.map +1 -1
- package/dist/types/embeds/wistiaPlayer/utilities/constants.d.ts +1 -0
- package/dist/types/embeds/wistiaPlayer/utilities/constants.d.ts.map +1 -1
- package/dist/types/embeds/wistiaPlayer/utilities/getInitialMediaData.d.ts.map +1 -1
- package/dist/types/types/carousel.d.ts +6 -0
- package/dist/types/types/carousel.d.ts.map +1 -1
- package/dist/types/utilities/duration.d.ts +1 -0
- package/dist/types/utilities/duration.d.ts.map +1 -1
- package/dist/types/utilities/gradients.d.ts.map +1 -1
- package/dist/types/utilities/sentryUtils.d.ts +5 -1
- package/dist/types/utilities/sentryUtils.d.ts.map +1 -1
- package/dist/types/utilities/shouldEnableMux.d.ts.map +1 -1
- package/dist/wistia-player.js +130 -39
- package/dist/wistia-player.js.map +1 -1
- package/package.json +1 -1
package/dist/wistia-player.js
CHANGED
|
@@ -2145,13 +2145,14 @@ var runScript = function runScript(src, timeout) {
|
|
|
2145
2145
|
/* harmony export */ G5: () => (/* binding */ flexibleDuration),
|
|
2146
2146
|
/* harmony export */ ab: () => (/* binding */ secondsConverter)
|
|
2147
2147
|
/* harmony export */ });
|
|
2148
|
-
/* unused harmony exports formattedDurationToSeconds, accessibilityDuration, humanReadableDuration, getSecondsRemaining, secondsToMilliseconds */
|
|
2148
|
+
/* unused harmony exports formattedDurationToSeconds, accessibilityDuration, humanReadableDuration, getSecondsRemaining, secondsToMilliseconds, formatDuration */
|
|
2149
2149
|
/* harmony import */ var iso8601_duration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6633);
|
|
2150
2150
|
|
|
2151
2151
|
|
|
2152
2152
|
var SECONDS_IN_HOUR = 3600;
|
|
2153
2153
|
var MINUTES_IN_HOUR = 60;
|
|
2154
2154
|
var SECONDS_IN_MINUTE = 60;
|
|
2155
|
+
var SECONDS_CUTTOFF = 45;
|
|
2155
2156
|
var padNumber = function padNumber(num) {
|
|
2156
2157
|
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2157
2158
|
var result = "".concat(num);
|
|
@@ -2257,6 +2258,18 @@ var getSecondsRemaining = function getSecondsRemaining(start, end) {
|
|
|
2257
2258
|
var secondsToMilliseconds = function secondsToMilliseconds(seconds) {
|
|
2258
2259
|
return seconds * 1000;
|
|
2259
2260
|
};
|
|
2261
|
+
var formatDuration = function formatDuration(totalSeconds) {
|
|
2262
|
+
var _secondsConverter4 = secondsConverter(totalSeconds, 'hms'),
|
|
2263
|
+
hours = _secondsConverter4.hours,
|
|
2264
|
+
minutes = _secondsConverter4.minutes;
|
|
2265
|
+
if (totalSeconds < SECONDS_CUTTOFF) {
|
|
2266
|
+
return "".concat(Math.round(totalSeconds), " SEC");
|
|
2267
|
+
}
|
|
2268
|
+
if (hours) {
|
|
2269
|
+
return "".concat(hours, " HR ").concat(minutes, " MIN");
|
|
2270
|
+
}
|
|
2271
|
+
return "".concat(Math.round(totalSeconds / SECONDS_IN_MINUTE), " MIN");
|
|
2272
|
+
};
|
|
2260
2273
|
|
|
2261
2274
|
/***/ },
|
|
2262
2275
|
|
|
@@ -2264,11 +2277,22 @@ var secondsToMilliseconds = function secondsToMilliseconds(seconds) {
|
|
|
2264
2277
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2265
2278
|
|
|
2266
2279
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2267
|
-
/* harmony export */
|
|
2268
|
-
/* harmony export */
|
|
2280
|
+
/* harmony export */ EA: () => (/* binding */ CONTROL_BAR_HEIGHT),
|
|
2281
|
+
/* harmony export */ Lc: () => (/* binding */ AUDIO_DEFAULT_HEIGHT),
|
|
2282
|
+
/* harmony export */ R7: () => (/* binding */ DEFAULT_ASPECT)
|
|
2269
2283
|
/* harmony export */ });
|
|
2270
2284
|
var CONTROL_BAR_HEIGHT = 34;
|
|
2271
2285
|
|
|
2286
|
+
// Default height for an audio <wistia-player> when the author hasn't set an
|
|
2287
|
+
// explicit height. Audio has no intrinsic media height (the <audio> element is
|
|
2288
|
+
// 0px and the UI is absolutely positioned), so without this the host collapses
|
|
2289
|
+
// to a bare control bar — most visibly after a video→audio replaceWith. Matches
|
|
2290
|
+
// FULL_SIZED_PLAYER_MIN_HEIGHT in players/vulcanV2Player/audio/constants.js so
|
|
2291
|
+
// the audio UI renders its full-sized layout. Author CSS (e.g. the inline
|
|
2292
|
+
// `height` the standard embed codes set) still overrides this.
|
|
2293
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
2294
|
+
var AUDIO_DEFAULT_HEIGHT = 218;
|
|
2295
|
+
|
|
2272
2296
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
2273
2297
|
var DEFAULT_ASPECT = 16 / 9;
|
|
2274
2298
|
|
|
@@ -2960,10 +2984,10 @@ var reportError = function reportError(product, error, details) {
|
|
|
2960
2984
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.clear();
|
|
2961
2985
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.setTag('pillar', 'publish');
|
|
2962
2986
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.setTag('product', product);
|
|
2963
|
-
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.setTag('url', window.location.href);
|
|
2964
2987
|
if ((0,_wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__/* .isNonEmptyRecord */ .uu)(details)) {
|
|
2965
2988
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.setTags(details);
|
|
2966
2989
|
}
|
|
2990
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.setTag('url', window.location.href);
|
|
2967
2991
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__/* .Wistia */ .s._sentryScope.captureException(error);
|
|
2968
2992
|
}
|
|
2969
2993
|
} catch (err) {
|
|
@@ -3549,18 +3573,26 @@ var throwAsync = function throwAsync(e) {
|
|
|
3549
3573
|
var OBJ_PROP = '_namespacedLocalStorage';
|
|
3550
3574
|
var localStorageWorks = function localStorageWorks() {
|
|
3551
3575
|
var ns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'wistia-test-localstorage';
|
|
3552
|
-
// Check the global on every call — don't rely solely on the cached result.
|
|
3553
|
-
// In test environments (Vitest with jsdom), a previous test can warm the
|
|
3554
|
-
// cache to `true` and then have the global torn down between files, leaving
|
|
3555
|
-
// pending timers/intervals to dereference a missing `localStorage` and
|
|
3556
|
-
// crash with a ReferenceError.
|
|
3557
|
-
if (typeof localStorage === 'undefined') {
|
|
3558
|
-
return false;
|
|
3559
|
-
}
|
|
3560
|
-
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__/* .Wistia */ .s._localStorageWorks != null) {
|
|
3561
|
-
return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__/* .Wistia */ .s._localStorageWorks;
|
|
3562
|
-
}
|
|
3563
3576
|
try {
|
|
3577
|
+
// Check the global on every call — don't rely solely on the cached result.
|
|
3578
|
+
// In test environments (Vitest with jsdom), a previous test can warm the
|
|
3579
|
+
// cache to `true` and then have the global torn down between files, leaving
|
|
3580
|
+
// pending timers/intervals to dereference a missing `localStorage` and
|
|
3581
|
+
// crash with a ReferenceError.
|
|
3582
|
+
//
|
|
3583
|
+
// This access must live inside the try/catch: simply *reading* the global
|
|
3584
|
+
// can throw, not just be undefined. In a sandboxed iframe without
|
|
3585
|
+
// `allow-same-origin`, the `localStorage` getter throws a SecurityError —
|
|
3586
|
+
// and `typeof` does NOT suppress it (it only suppresses ReferenceError for
|
|
3587
|
+
// truly undeclared identifiers, and `localStorage` is a declared property
|
|
3588
|
+
// on `window`). We must never recommend adding `allow-same-origin` to fix
|
|
3589
|
+
// this, so the code has to tolerate the throw.
|
|
3590
|
+
if (typeof localStorage === 'undefined') {
|
|
3591
|
+
return false;
|
|
3592
|
+
}
|
|
3593
|
+
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__/* .Wistia */ .s._localStorageWorks != null) {
|
|
3594
|
+
return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_0__/* .Wistia */ .s._localStorageWorks;
|
|
3595
|
+
}
|
|
3564
3596
|
// no-ops that test get, set, and remove. These may throw an exception
|
|
3565
3597
|
// in Private Browsing mode on iOS and Safari.
|
|
3566
3598
|
var currentVal = localStorage.getItem(ns);
|
|
@@ -5163,6 +5195,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
5163
5195
|
|
|
5164
5196
|
|
|
5165
5197
|
|
|
5198
|
+
|
|
5166
5199
|
var DEFAULT_ALPHA = 0.9;
|
|
5167
5200
|
var GRADIENT_COLOR_INDEX = 0;
|
|
5168
5201
|
var GRADIENT_PERCENTAGE_INDEX = 1;
|
|
@@ -5219,12 +5252,21 @@ var cleanGradient = function cleanGradient(gradient) {
|
|
|
5219
5252
|
return result;
|
|
5220
5253
|
};
|
|
5221
5254
|
var getPlayerColorOrFirstGradientStop = function getPlayerColorOrFirstGradientStop(playerColor, gradient) {
|
|
5255
|
+
var _addHashToHex;
|
|
5222
5256
|
if (!isGradient(gradient) || !gradient.on) {
|
|
5223
5257
|
return playerColor !== null && playerColor !== void 0 ? playerColor : DEFAULT_PLAYER_COLOR;
|
|
5224
5258
|
}
|
|
5259
|
+
var firstGradientColorStop = getGradientColor(gradient);
|
|
5260
|
+
|
|
5261
|
+
// This should not be possible because we verified that the gradient passes isGradient above.
|
|
5262
|
+
// However, since getGradietnColor's return type is string | null,
|
|
5263
|
+
// we need to add this logic to appease TS.
|
|
5264
|
+
if (isNil(firstGradientColorStop)) {
|
|
5265
|
+
return playerColor !== null && playerColor !== void 0 ? playerColor : DEFAULT_PLAYER_COLOR;
|
|
5266
|
+
}
|
|
5225
5267
|
|
|
5226
5268
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5227
|
-
return addHashToHex(
|
|
5269
|
+
return (_addHashToHex = addHashToHex(firstGradientColorStop)) !== null && _addHashToHex !== void 0 ? _addHashToHex : DEFAULT_PLAYER_COLOR;
|
|
5228
5270
|
};
|
|
5229
5271
|
|
|
5230
5272
|
/***/ },
|
|
@@ -6396,11 +6438,16 @@ var addHashToHex = function addHashToHex(hex) {
|
|
|
6396
6438
|
return;
|
|
6397
6439
|
}
|
|
6398
6440
|
|
|
6441
|
+
// A valid hex color might be composed of all numbers
|
|
6442
|
+
// so we need to ensure that the hex is actually a string
|
|
6443
|
+
// before we try to examine its contents.
|
|
6444
|
+
var hexGuaranteedToBeString = String(hex);
|
|
6445
|
+
|
|
6399
6446
|
// return if already has hash
|
|
6400
|
-
if (
|
|
6401
|
-
return
|
|
6447
|
+
if (hexGuaranteedToBeString.charAt(0) === '#') {
|
|
6448
|
+
return hexGuaranteedToBeString;
|
|
6402
6449
|
}
|
|
6403
|
-
return "#".concat(
|
|
6450
|
+
return "#".concat(hexGuaranteedToBeString);
|
|
6404
6451
|
};
|
|
6405
6452
|
var colorWithAlpha = function colorWithAlpha(color, alpha) {
|
|
6406
6453
|
return new Color(color).alpha(alpha).toRgba();
|
|
@@ -7062,7 +7109,16 @@ var pollForJsonp = /*#__PURE__*/function () {
|
|
|
7062
7109
|
while (1) switch (_context.n) {
|
|
7063
7110
|
case 0:
|
|
7064
7111
|
return _context.a(2, new Promise(function (resolve, reject) {
|
|
7065
|
-
var
|
|
7112
|
+
var pollState = {
|
|
7113
|
+
isSettled: false,
|
|
7114
|
+
intervalId: -1,
|
|
7115
|
+
timeoutId: -1
|
|
7116
|
+
};
|
|
7117
|
+
var cleanup = function cleanup() {
|
|
7118
|
+
pollState.isSettled = true;
|
|
7119
|
+
clearInterval(pollState.intervalId);
|
|
7120
|
+
clearTimeout(pollState.timeoutId);
|
|
7121
|
+
};
|
|
7066
7122
|
|
|
7067
7123
|
// try looking once before the interval. This is especially useful for tests
|
|
7068
7124
|
// since using vi.useFakeTimers() doesn't work with this function
|
|
@@ -7070,7 +7126,7 @@ var pollForJsonp = /*#__PURE__*/function () {
|
|
|
7070
7126
|
var jsonp = window["wistiajsonp-/embed/medias/".concat(mediaId, ".jsonp")];
|
|
7071
7127
|
if (jsonp) {
|
|
7072
7128
|
if (jsonp.media) {
|
|
7073
|
-
|
|
7129
|
+
cleanup();
|
|
7074
7130
|
|
|
7075
7131
|
// Any data from speed demon scripts we know won't be localized, so we can
|
|
7076
7132
|
// cache it.
|
|
@@ -7083,15 +7139,16 @@ var pollForJsonp = /*#__PURE__*/function () {
|
|
|
7083
7139
|
return;
|
|
7084
7140
|
}
|
|
7085
7141
|
if ((0,_utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_6__/* .isMediaDataError */ .V)(jsonp)) {
|
|
7086
|
-
|
|
7142
|
+
cleanup();
|
|
7087
7143
|
resolve(jsonp);
|
|
7088
7144
|
}
|
|
7089
7145
|
}
|
|
7090
7146
|
};
|
|
7091
7147
|
checkForJsonp();
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7148
|
+
if (pollState.isSettled) return;
|
|
7149
|
+
pollState.intervalId = window.setInterval(checkForJsonp, INTERVAL_TIME);
|
|
7150
|
+
pollState.timeoutId = window.setTimeout(function () {
|
|
7151
|
+
cleanup();
|
|
7095
7152
|
reject(new Error('Timeout loading jsonp media data'));
|
|
7096
7153
|
}, JS_LOAD_TIMEOUT);
|
|
7097
7154
|
}));
|
|
@@ -7272,8 +7329,8 @@ var PROD_EMBED_HOST = 'embed.wistia.com';
|
|
|
7272
7329
|
var PROD_SSL_EMBED_HOST = 'embed-ssl.wistia.com';
|
|
7273
7330
|
var PROD_FASTLY_SSL_HOST = 'embed-fastly.wistia.com';
|
|
7274
7331
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7275
|
-
var TAGGED_VERSION = "0.7.
|
|
7276
|
-
var CURRENT_SHA = "
|
|
7332
|
+
var TAGGED_VERSION = "0.7.6" || 0;
|
|
7333
|
+
var CURRENT_SHA = "d17a7f2fb96b0add1ebf115f18abea8875108342" || 0;
|
|
7277
7334
|
var DEFAULT_PROTOCOL = function () {
|
|
7278
7335
|
if (typeof window !== 'undefined' && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location) {
|
|
7279
7336
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location.protocol;
|
|
@@ -8490,7 +8547,7 @@ var dynamicImport = /*#__PURE__*/function () {
|
|
|
8490
8547
|
_t2 = _context2.v;
|
|
8491
8548
|
reportedError = _t2 instanceof Error ? _t2 : new Error(String(_t2));
|
|
8492
8549
|
(0,_sentryUtils_ts__WEBPACK_IMPORTED_MODULE_1__/* .reportError */ .N7)('dynamicImport', reportedError, {
|
|
8493
|
-
|
|
8550
|
+
importUrl: url
|
|
8494
8551
|
});
|
|
8495
8552
|
(0,_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_2__/* .countMetric */ .WO)('dynamic-import/failure-after-retry', 1, {
|
|
8496
8553
|
attempt: String(MAX_RETRIES),
|
|
@@ -9099,6 +9156,26 @@ var moveToFront = function moveToFront(assets, toFront) {
|
|
|
9099
9156
|
/* harmony export */ });
|
|
9100
9157
|
var MUX_PERCENTAGE_TO_ENABLE = 0.1;
|
|
9101
9158
|
|
|
9159
|
+
/**
|
|
9160
|
+
* Whether the current environment provides the `console` methods that mux-embed
|
|
9161
|
+
* relies on at module-evaluation time.
|
|
9162
|
+
*
|
|
9163
|
+
* mux-embed sets up its logger via `console.trace`/`console.info`/`console.debug`
|
|
9164
|
+
* as soon as the module is imported (`var q = kt("[mux]")`). In restricted
|
|
9165
|
+
* WebKit environments such as Apple Mail's email preview, those methods are
|
|
9166
|
+
* undefined, so simply importing wistia-mux.js throws an error
|
|
9167
|
+
* @returns {boolean} True if the console methods mux-embed needs are available.
|
|
9168
|
+
*/
|
|
9169
|
+
var isMuxEnvironmentSupported = function isMuxEnvironmentSupported() {
|
|
9170
|
+
return typeof console !== 'undefined' &&
|
|
9171
|
+
// eslint-disable-next-line no-console
|
|
9172
|
+
typeof console.trace === 'function' &&
|
|
9173
|
+
// eslint-disable-next-line no-console
|
|
9174
|
+
typeof console.info === 'function' &&
|
|
9175
|
+
// eslint-disable-next-line no-console
|
|
9176
|
+
typeof console.debug === 'function';
|
|
9177
|
+
};
|
|
9178
|
+
|
|
9102
9179
|
/**
|
|
9103
9180
|
* Determines if Mux should be enabled for an embed based on various conditions.
|
|
9104
9181
|
* @param {PublicApi} video The embed mux should be enabled for.
|
|
@@ -9107,6 +9184,7 @@ var MUX_PERCENTAGE_TO_ENABLE = 0.1;
|
|
|
9107
9184
|
*/
|
|
9108
9185
|
var shouldEnableMux = function shouldEnableMux(video, didWinCoinFlip) {
|
|
9109
9186
|
var _video$_opts, _video$_mediaData;
|
|
9187
|
+
var isMuxEnabledInEnvironment = isMuxEnvironmentSupported();
|
|
9110
9188
|
var isMuxEnabledOnWindow = window.wistiaDisableMux !== true;
|
|
9111
9189
|
var isMuxEnabledFromOpts = ((_video$_opts = video._opts) === null || _video$_opts === void 0 ? void 0 : _video$_opts.mux) !== false;
|
|
9112
9190
|
var isMuxEnabledFromStandardEmbed = video.iframe == null;
|
|
@@ -9114,12 +9192,12 @@ var shouldEnableMux = function shouldEnableMux(video, didWinCoinFlip) {
|
|
|
9114
9192
|
var isMuxEnabledFromLiveStream = ((_video$_mediaData = video._mediaData) === null || _video$_mediaData === void 0 ? void 0 : _video$_mediaData.type) === 'LiveStream';
|
|
9115
9193
|
|
|
9116
9194
|
// Mux should be enabled if all of the following are true:
|
|
9117
|
-
// 1.
|
|
9118
|
-
//
|
|
9119
|
-
//
|
|
9120
|
-
//
|
|
9195
|
+
// 1. The environment provides the console methods mux-embed needs
|
|
9196
|
+
// 3. Mux is not disabled from the embed options
|
|
9197
|
+
// 4. Mux is not disabled from the video being an iframe embed
|
|
9198
|
+
// 5. Mux is not disabled from the coin flip OR the video is a live stream
|
|
9121
9199
|
// (Live streams should always have Mux enabled, regardless of the coin flip result)
|
|
9122
|
-
return isMuxEnabledOnWindow && isMuxEnabledFromOpts && isMuxEnabledFromStandardEmbed && (isMuxEnabledFromCoinFlip || isMuxEnabledFromLiveStream);
|
|
9200
|
+
return isMuxEnabledInEnvironment && isMuxEnabledOnWindow && isMuxEnabledFromOpts && isMuxEnabledFromStandardEmbed && (isMuxEnabledFromCoinFlip || isMuxEnabledFromLiveStream);
|
|
9123
9201
|
};
|
|
9124
9202
|
|
|
9125
9203
|
/***/ },
|
|
@@ -10162,7 +10240,15 @@ var elemInDom = function elemInDom(elem) {
|
|
|
10162
10240
|
if (elem === document) {
|
|
10163
10241
|
return true;
|
|
10164
10242
|
}
|
|
10165
|
-
|
|
10243
|
+
var parent = elem.parentNode;
|
|
10244
|
+
if (parent != null) {
|
|
10245
|
+
elem = parent;
|
|
10246
|
+
} else if (typeof elem.getRootNode === 'function') {
|
|
10247
|
+
var _elem$getRootNode;
|
|
10248
|
+
elem = (_elem$getRootNode = elem.getRootNode()) === null || _elem$getRootNode === void 0 ? void 0 : _elem$getRootNode.host;
|
|
10249
|
+
} else {
|
|
10250
|
+
return false;
|
|
10251
|
+
}
|
|
10166
10252
|
}
|
|
10167
10253
|
return false;
|
|
10168
10254
|
};
|
|
@@ -10401,6 +10487,11 @@ var elemRequestFullscreen = function elemRequestFullscreen(elem) {
|
|
|
10401
10487
|
});
|
|
10402
10488
|
}
|
|
10403
10489
|
if (elem.webkitEnterFullscreen) {
|
|
10490
|
+
if (elem.readyState !== undefined && elem.readyState < HTMLMediaElement.HAVE_METADATA) {
|
|
10491
|
+
var errorMessage = 'webkitEnterFullscreen requires at least HAVE_METADATA readyState';
|
|
10492
|
+
wlog.notice(errorMessage);
|
|
10493
|
+
return Promise.reject(new Error(errorMessage));
|
|
10494
|
+
}
|
|
10404
10495
|
elem.webkitEnterFullscreen();
|
|
10405
10496
|
return Promise.resolve();
|
|
10406
10497
|
}
|
|
@@ -14968,7 +15059,7 @@ var PreloadThumbnail = function PreloadThumbnail(_ref) {
|
|
|
14968
15059
|
duration = mediaData.duration,
|
|
14969
15060
|
mediaType = mediaData.mediaType,
|
|
14970
15061
|
name = mediaData.name;
|
|
14971
|
-
var height = playerWidth / ((_ref2 = aspect !== null && aspect !== void 0 ? aspect : aspectRatio) !== null && _ref2 !== void 0 ? _ref2 : _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_3__/* .DEFAULT_ASPECT */ .
|
|
15062
|
+
var height = playerWidth / ((_ref2 = aspect !== null && aspect !== void 0 ? aspect : aspectRatio) !== null && _ref2 !== void 0 ? _ref2 : _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_3__/* .DEFAULT_ASPECT */ .R7);
|
|
14972
15063
|
var scale = Math.min(MAX_SCALE, Math.max(MIN_SCALE, (0,_utilities_fit_control_js__WEBPACK_IMPORTED_MODULE_8__/* .controlMultiplierEstimatedByWidth */ .wt)(playerWidth, [DEFAULT_LOWER_CUTOFF_WIDTH, DEFAULT_UPPER_CUTOFF_WIDTH])));
|
|
14973
15064
|
var calculatedControlsVisibleOnLoad = controlsVisibleOnLoad && playerType === 'vulcan-v2';
|
|
14974
15065
|
var defaultControlBarDistance = (0,_utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_9__/* .getDefaultControlBarDistance */ .Ru)({
|
|
@@ -14976,7 +15067,7 @@ var PreloadThumbnail = function PreloadThumbnail(_ref) {
|
|
|
14976
15067
|
floatingControlBar: floatingControlBar,
|
|
14977
15068
|
roundedPlayer: roundedPlayer
|
|
14978
15069
|
});
|
|
14979
|
-
var calculatedControlBarDistance = calculatedControlsVisibleOnLoad ? (_utilities_constants_ts__WEBPACK_IMPORTED_MODULE_3__/* .CONTROL_BAR_HEIGHT */ .
|
|
15070
|
+
var calculatedControlBarDistance = calculatedControlsVisibleOnLoad ? (_utilities_constants_ts__WEBPACK_IMPORTED_MODULE_3__/* .CONTROL_BAR_HEIGHT */ .EA / 2 + defaultControlBarDistance) * scale : defaultControlBarDistance * scale;
|
|
14980
15071
|
var calculatedBigPlayButtonBorderRadius = (0,_utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_9__/* .getDefaultBigPlayButtonBorderRadius */ .gl)({
|
|
14981
15072
|
bigPlayButtonBorderRadius: bigPlayButtonBorderRadius,
|
|
14982
15073
|
roundedPlayer: roundedPlayer
|
|
@@ -15331,7 +15422,7 @@ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.h
|
|
|
15331
15422
|
var requiredAttributes = ['media-id'];
|
|
15332
15423
|
|
|
15333
15424
|
// Optional attributes surfaced in documentation to our customers.
|
|
15334
|
-
var optionalPublicAttributes = ['aspect', 'audio-description-control', 'autoplay', 'big-play-button', 'branding', 'contrast-icons', 'controls-visible-on-load', 'copy-link-and-thumbnail', 'current-time', 'do-not-track', 'email', 'end-video-behavior', 'fit-strategy', 'fullscreen-control', 'language', 'muted', 'opaque-controls', 'playback-rate-control', 'play-bar-control', 'player-color', 'playlist-links', 'playlist-loop', 'play-pause-control', 'play-pause-notifier', 'popover-animate-thumbnail', 'popover-animation', 'popover-border-color', 'popover-border-radius', 'popover-border-width', 'popover-box-shadow', 'popover-caption', 'popover-caption-container', 'popover-content', 'popover-disable-autoplay', 'popover-overlay-color', 'popover-overlay-opacity', 'popover-prevent-scroll', 'popover-show-on-load', 'poster', 'preload', 'quality-control', 'quality-max', 'quality-min', 'resumable', 'rounded-player', 'seo', 'settings-control', 'silent-autoplay', 'transparent-letterbox', 'video-quality', 'volume', 'volume-control', 'wistia-popover'];
|
|
15425
|
+
var optionalPublicAttributes = ['aspect', 'audio-description-control', 'autoplay', 'big-play-button', 'branding', 'contrast-icons', 'controls-visible-on-load', 'copy-link-and-thumbnail', 'current-time', 'do-not-track', 'email', 'end-video-behavior', 'fit-strategy', 'fullscreen-control', 'language', 'muted', 'opaque-controls', 'playback-rate-control', 'play-bar-control', 'player-color', 'playlist-links', 'playlist-loop', 'play-pause-control', 'play-pause-notifier', 'popover-animate-thumbnail', 'popover-animation', 'popover-border-color', 'popover-border-radius', 'popover-border-width', 'popover-box-shadow', 'popover-caption', 'popover-caption-container', 'popover-content', 'popover-disable-autoplay', 'popover-overlay-color', 'popover-overlay-opacity', 'popover-prevent-scroll', 'popover-show-on-load', 'poster', 'preload', 'quality-control', 'quality-max', 'quality-min', 'resumable', 'rounded-player', 'rounded-playlist', 'seo', 'settings-control', 'silent-autoplay', 'transparent-letterbox', 'video-quality', 'volume', 'volume-control', 'wistia-popover'];
|
|
15335
15426
|
|
|
15336
15427
|
// Optional attributes used by Wistia developers.
|
|
15337
15428
|
var optionalPrivateAttributes = ['big-play-button-border-radius', 'control-bar-border-radius', 'embed-host', 'hls', 'page-url', 'player-border-radius', 'player-force', 'stats-url', 'swatch', 'unique-id', 'use-web-component'];
|
|
@@ -15561,7 +15652,7 @@ var WistiaPlayer = /*#__PURE__*/function (_HTMLElement) {
|
|
|
15561
15652
|
key: "aspect",
|
|
15562
15653
|
get: function get() {
|
|
15563
15654
|
var _ref, _ref2, _classPrivateFieldGet2, _classPrivateFieldGet3;
|
|
15564
|
-
var fallbackAspect = !Number.isNaN(this.offsetWidth / this.offsetHeight) && Number.isFinite(this.offsetWidth / this.offsetHeight) ? this.offsetWidth / this.offsetHeight : _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_6__/* .DEFAULT_ASPECT */ .
|
|
15655
|
+
var fallbackAspect = !Number.isNaN(this.offsetWidth / this.offsetHeight) && Number.isFinite(this.offsetWidth / this.offsetHeight) ? this.offsetWidth / this.offsetHeight : _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_6__/* .DEFAULT_ASPECT */ .R7;
|
|
15565
15656
|
return (_ref = (_ref2 = (_classPrivateFieldGet2 = (_classPrivateFieldGet3 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.aspect()) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : this.embedOptions.aspect) !== null && _ref2 !== void 0 ? _ref2 : _assertClassBrand(_WistiaPlayer_brand, this, _getValueFromAttribute).call(this, 'aspect')) !== null && _ref !== void 0 ? _ref : fallbackAspect;
|
|
15566
15657
|
}
|
|
15567
15658
|
|
|
@@ -18784,7 +18875,7 @@ function _renderEmbedTemplate() {
|
|
|
18784
18875
|
playerBorderRadius: this.playerBorderRadius,
|
|
18785
18876
|
roundedPlayer: this.roundedPlayer
|
|
18786
18877
|
});
|
|
18787
|
-
(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)((0,preact__WEBPACK_IMPORTED_MODULE_0__.h)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,preact__WEBPACK_IMPORTED_MODULE_0__.h)("style", null, ":host {\n display: flex;\n position: relative;\n width: 100%;\n ".concat(mediaType === 'Audio' ? "min-height: 45px;" : '', "\n }")), _assertClassBrand(_WistiaPlayer_brand, this, _shouldDisplaySwatch).call(this) && (0,preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
18878
|
+
(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)((0,preact__WEBPACK_IMPORTED_MODULE_0__.h)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,preact__WEBPACK_IMPORTED_MODULE_0__.h)("style", null, ":host {\n display: flex;\n position: relative;\n width: 100%;\n ".concat(mediaType === 'Audio' ? "height: ".concat(_utilities_constants_ts__WEBPACK_IMPORTED_MODULE_6__/* .AUDIO_DEFAULT_HEIGHT */ .Lc, "px; min-height: 45px;") : '', "\n }")), _assertClassBrand(_WistiaPlayer_brand, this, _shouldDisplaySwatch).call(this) && (0,preact__WEBPACK_IMPORTED_MODULE_0__.h)("div", {
|
|
18788
18879
|
style: {
|
|
18789
18880
|
height: swatchHeight,
|
|
18790
18881
|
left: 0,
|