@wistia/wistia-player-react 0.7.14 → 0.7.15
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.
|
@@ -232,6 +232,23 @@ function _deferMediaDataFetchingToCarouselEmbed() {
|
|
|
232
232
|
}
|
|
233
233
|
return !!document.querySelector(`wistia-channel-carousel[player-dom-id="${this.id}"]:not([is-inside-playlist-embed="true"][channel-id])`);
|
|
234
234
|
}
|
|
235
|
+
function _destroyPreloadThumbnailForPopover() {
|
|
236
|
+
if (!_assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this)) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const {
|
|
240
|
+
shadowRoot
|
|
241
|
+
} = this;
|
|
242
|
+
const activeElement = shadowRoot?.activeElement ?? null;
|
|
243
|
+
const hadFocus = activeElement !== null && _classPrivateFieldGet(_preloadThumbnailRoot, this) !== null && _classPrivateFieldGet(_preloadThumbnailRoot, this).contains(activeElement);
|
|
244
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
|
|
245
|
+
this.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
246
|
+
if (hadFocus) {
|
|
247
|
+
shadowRoot?.querySelector('[tabindex="0"]')?.focus({
|
|
248
|
+
preventScroll: true
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
235
252
|
function _destroyPreloadThumbnailRoot() {
|
|
236
253
|
if (_classPrivateFieldGet(_preloadThumbnailRoot, this)) {
|
|
237
254
|
(0, preact__WEBPACK_IMPORTED_MODULE_0__.render)(null, _classPrivateFieldGet(_preloadThumbnailRoot, this));
|
|
@@ -322,7 +339,7 @@ async function _initPublicApi(mediaId, options) {
|
|
|
322
339
|
_classPrivateFieldGet(_resizeObserver, this)?.disconnect();
|
|
323
340
|
_classPrivateFieldSet(_resizeObserver, this, null);
|
|
324
341
|
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
|
|
325
|
-
this.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this));
|
|
342
|
+
this.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
326
343
|
this.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.c5, {
|
|
327
344
|
detail: {
|
|
328
345
|
mediaId
|
|
@@ -576,16 +593,20 @@ function _setupEventListeners() {
|
|
|
576
593
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.rO, loadedMediaDataCallback);
|
|
577
594
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.dp, implCreatedCallback);
|
|
578
595
|
this.addEventListener("popover-hide", _classPrivateFieldGet(_returnFocusToPopoverTrigger, this));
|
|
596
|
+
const popoverThumbnailReadyCallback = () => {
|
|
597
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailForPopover).call(this);
|
|
598
|
+
};
|
|
599
|
+
this.addEventListener("popover-thumbnail-ready", popoverThumbnailReadyCallback);
|
|
579
600
|
_classPrivateFieldGet(_removeEventListeners, this).push(() => {
|
|
580
601
|
this.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.rO, loadedMediaDataCallback);
|
|
581
602
|
}, () => {
|
|
582
603
|
this.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.dp, implCreatedCallback);
|
|
583
604
|
}, () => {
|
|
584
605
|
this.removeEventListener("popover-hide", _classPrivateFieldGet(_returnFocusToPopoverTrigger, this));
|
|
606
|
+
}, () => {
|
|
607
|
+
this.removeEventListener("popover-thumbnail-ready", popoverThumbnailReadyCallback);
|
|
585
608
|
});
|
|
586
|
-
this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this),
|
|
587
|
-
once: true
|
|
588
|
-
});
|
|
609
|
+
this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
589
610
|
}
|
|
590
611
|
function _shouldDisplaySwatch() {
|
|
591
612
|
return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
|
|
@@ -611,7 +632,7 @@ function _updateMediaData(mediaData) {
|
|
|
611
632
|
_classPrivateFieldSet(_playerType, this, (0, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_19__.$F)(_classPrivateFieldGet(_judyContext, this), _classPrivateFieldGet(_playerData, this).mediaData, _classPrivateFieldGet(_playerData, this).embedOptions));
|
|
612
633
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
613
634
|
}
|
|
614
|
-
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_1__, _utilities_gradients_ts__WEBPACK_IMPORTED_MODULE_2__, _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__, _components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_4__, _hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_5__, _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_6__, _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_7__, _appHostname_js__WEBPACK_IMPORTED_MODULE_8__, _utilities_assets_js__WEBPACK_IMPORTED_MODULE_9__, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_10__, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_11__, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_12__, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_13__, _utilities_elem_js__WEBPACK_IMPORTED_MODULE_14__, _utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__, _utilities_extractEmailFromParams_ts__WEBPACK_IMPORTED_MODULE_16__, _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_17__, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_18__, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_19__, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_20__, _utilities_runScript_js__WEBPACK_IMPORTED_MODULE_21__, _utilities_seqid_js__WEBPACK_IMPORTED_MODULE_22__, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_23__, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_24__, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_25__, _utilities_url_js__WEBPACK_IMPORTED_MODULE_26__, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_27__, _utilities_wistiaOptions_ts__WEBPACK_IMPORTED_MODULE_28__, _utilities_wistiaQueue_ts__WEBPACK_IMPORTED_MODULE_29__, _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_30__, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_31__, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_32__, _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_33__, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_34__, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_35__, _types_gradient_ts__WEBPACK_IMPORTED_MODULE_36__, _WistiaPlayer, requiredAttributes, optionalPublicAttributes, optionalPrivateAttributes, defaultEmbedOptions, getSwatchUrl, _api, _eventListeners, _fullscreenState, _impl, _internals, _jsonLdId, _judyContext, _logger, _oldEngine, _playerData, _playerType, _removeEventListeners, _cachedRemapTime, _hasElementConnectedToDOM, _paddingTop, _playPending, _preactRoot, _preloadThumbnailRoot, _publicApiScript, _resizeObserver, _WistiaPlayer_brand, _handleAfterReplace, _handleBeforeReplace, _handlePreloadThumbnailClick, _returnFocusToPopoverTrigger, WistiaPlayer, getSwatchMetaData2, wistiaSwatchElement, __webpack_exports__WistiaPlayer, __webpack_exports__wistiaSwatchElement;
|
|
635
|
+
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_1__, _utilities_gradients_ts__WEBPACK_IMPORTED_MODULE_2__, _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__, _components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_4__, _hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_5__, _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_6__, _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_7__, _appHostname_js__WEBPACK_IMPORTED_MODULE_8__, _utilities_assets_js__WEBPACK_IMPORTED_MODULE_9__, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_10__, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_11__, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_12__, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_13__, _utilities_elem_js__WEBPACK_IMPORTED_MODULE_14__, _utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__, _utilities_extractEmailFromParams_ts__WEBPACK_IMPORTED_MODULE_16__, _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_17__, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_18__, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_19__, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_20__, _utilities_runScript_js__WEBPACK_IMPORTED_MODULE_21__, _utilities_seqid_js__WEBPACK_IMPORTED_MODULE_22__, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_23__, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_24__, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_25__, _utilities_url_js__WEBPACK_IMPORTED_MODULE_26__, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_27__, _utilities_wistiaOptions_ts__WEBPACK_IMPORTED_MODULE_28__, _utilities_wistiaQueue_ts__WEBPACK_IMPORTED_MODULE_29__, _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_30__, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_31__, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_32__, _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_33__, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_34__, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_35__, _types_gradient_ts__WEBPACK_IMPORTED_MODULE_36__, _WistiaPlayer, requiredAttributes, optionalPublicAttributes, optionalPrivateAttributes, defaultEmbedOptions, getSwatchUrl, PRELOAD_CLICK_OPTIONS, _api, _eventListeners, _fullscreenState, _impl, _internals, _jsonLdId, _judyContext, _logger, _oldEngine, _playerData, _playerType, _removeEventListeners, _cachedRemapTime, _hasElementConnectedToDOM, _paddingTop, _playPending, _preactRoot, _preloadThumbnailRoot, _publicApiScript, _resizeObserver, _WistiaPlayer_brand, _handleAfterReplace, _handleBeforeReplace, _handlePreloadThumbnailClick, _returnFocusToPopoverTrigger, WistiaPlayer, getSwatchMetaData2, wistiaSwatchElement, __webpack_exports__WistiaPlayer, __webpack_exports__wistiaSwatchElement;
|
|
615
636
|
var init_wistia_player = __esm({
|
|
616
637
|
"../wistia-player/dist/wistia-player.js"() {
|
|
617
638
|
__webpack_modules__ = {
|
|
@@ -2047,6 +2068,20 @@ var init_wistia_player = __esm({
|
|
|
2047
2068
|
const REGEX_WIZARD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.wiz\.wistia\.io/i;
|
|
2048
2069
|
const REGEX_CDB_STAGING_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.cdb-staging\.wistia\.io/i;
|
|
2049
2070
|
const REGEX_DEV_METAL_TUNNEL = /([a-z0-9-]+)-txl-([a-z0-9-]+)\.([a-z0-9-]+)\.mtl\.wistia\.io/i;
|
|
2071
|
+
const HOST_MODE_META_NAME = "wistia-host-mode";
|
|
2072
|
+
const HOST_MODE_PRODUCTION = "production";
|
|
2073
|
+
const isProductionHostMode = () => {
|
|
2074
|
+
if (typeof document === "undefined" || typeof document.querySelector !== "function") {
|
|
2075
|
+
return false;
|
|
2076
|
+
}
|
|
2077
|
+
try {
|
|
2078
|
+
const meta = document.querySelector(`meta[name="${HOST_MODE_META_NAME}"]`);
|
|
2079
|
+
const content = meta?.getAttribute("content");
|
|
2080
|
+
return typeof content === "string" && content.trim().toLowerCase() === HOST_MODE_PRODUCTION;
|
|
2081
|
+
} catch {
|
|
2082
|
+
return false;
|
|
2083
|
+
}
|
|
2084
|
+
};
|
|
2050
2085
|
const appHostname = (subdomain = "app") => {
|
|
2051
2086
|
const hostname = "wistia.com";
|
|
2052
2087
|
const subdomainSuffixHostname = getSubdomainSuffixHostname(subdomain);
|
|
@@ -2056,6 +2091,9 @@ var init_wistia_player = __esm({
|
|
|
2056
2091
|
return `${subdomain}.${hostname}`;
|
|
2057
2092
|
};
|
|
2058
2093
|
const getSubdomainSuffixHostname = (subdomain = "app") => {
|
|
2094
|
+
if (isProductionHostMode()) {
|
|
2095
|
+
return null;
|
|
2096
|
+
}
|
|
2059
2097
|
if (typeof window !== "undefined" && window.location) {
|
|
2060
2098
|
const currentHost = window.location.hostname;
|
|
2061
2099
|
const cdbStagingDevBoxMatches = REGEX_CDB_STAGING_DEV_BOX.exec(currentHost);
|
|
@@ -6088,6 +6126,9 @@ var init_wistia_player = __esm({
|
|
|
6088
6126
|
};
|
|
6089
6127
|
defineLanguage("en-US", "English");
|
|
6090
6128
|
defineTranslations("en-US", {
|
|
6129
|
+
BACKGROUND_FOCUS_MORE_OPTIONS_HINT: "Press O for more options",
|
|
6130
|
+
ELLIPSIS_LESS: "Show fewer buttons",
|
|
6131
|
+
ELLIPSIS_MORE: "Show more buttons",
|
|
6091
6132
|
PAUSE: "Pause",
|
|
6092
6133
|
PLAY: "Play",
|
|
6093
6134
|
PLAY_BUTTON_LIVE_NOT_STARTED: "Livestream has not started",
|
|
@@ -7612,8 +7653,8 @@ var init_wistia_player = __esm({
|
|
|
7612
7653
|
const PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7613
7654
|
const PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
7614
7655
|
const SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7615
|
-
const TAGGED_VERSION = "0.7.
|
|
7616
|
-
const CURRENT_SHA = "
|
|
7656
|
+
const TAGGED_VERSION = "0.7.15";
|
|
7657
|
+
const CURRENT_SHA = "e0025c338cd1e425139e24b3fe9129d51c193690";
|
|
7617
7658
|
const DEFAULT_PROTOCOL = (() => {
|
|
7618
7659
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
7619
7660
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
|
|
@@ -12613,6 +12654,9 @@ var init_wistia_player = __esm({
|
|
|
12613
12654
|
const fastHost = (0, _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_17__.CX)(embedHost);
|
|
12614
12655
|
return `https://${fastHost}/embed/medias/${mediaId}/swatch`;
|
|
12615
12656
|
};
|
|
12657
|
+
PRELOAD_CLICK_OPTIONS = {
|
|
12658
|
+
once: true
|
|
12659
|
+
};
|
|
12616
12660
|
_api = /* @__PURE__ */ new WeakMap();
|
|
12617
12661
|
_eventListeners = /* @__PURE__ */ new WeakMap();
|
|
12618
12662
|
_fullscreenState = /* @__PURE__ */ new WeakMap();
|
|
@@ -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-
|
|
11
|
+
async () => import("./WistiaPlayerWrapper-ZBHZK3BC.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-
|
|
40
|
+
void import("./wistia-player-K36WAKA7.mjs");
|
|
41
41
|
void customElements.whenDefined("wistia-player").then(() => {
|
|
42
42
|
setIsWistiaPlayerDefined(true);
|
|
43
43
|
});
|
|
@@ -1432,6 +1432,20 @@ var __webpack_modules__ = {
|
|
|
1432
1432
|
const REGEX_WIZARD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.wiz\.wistia\.io/i;
|
|
1433
1433
|
const REGEX_CDB_STAGING_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.cdb-staging\.wistia\.io/i;
|
|
1434
1434
|
const REGEX_DEV_METAL_TUNNEL = /([a-z0-9-]+)-txl-([a-z0-9-]+)\.([a-z0-9-]+)\.mtl\.wistia\.io/i;
|
|
1435
|
+
const HOST_MODE_META_NAME = "wistia-host-mode";
|
|
1436
|
+
const HOST_MODE_PRODUCTION = "production";
|
|
1437
|
+
const isProductionHostMode = () => {
|
|
1438
|
+
if (typeof document === "undefined" || typeof document.querySelector !== "function") {
|
|
1439
|
+
return false;
|
|
1440
|
+
}
|
|
1441
|
+
try {
|
|
1442
|
+
const meta = document.querySelector(`meta[name="${HOST_MODE_META_NAME}"]`);
|
|
1443
|
+
const content = meta?.getAttribute("content");
|
|
1444
|
+
return typeof content === "string" && content.trim().toLowerCase() === HOST_MODE_PRODUCTION;
|
|
1445
|
+
} catch {
|
|
1446
|
+
return false;
|
|
1447
|
+
}
|
|
1448
|
+
};
|
|
1435
1449
|
const appHostname = (subdomain = "app") => {
|
|
1436
1450
|
const hostname = "wistia.com";
|
|
1437
1451
|
const subdomainSuffixHostname = getSubdomainSuffixHostname(subdomain);
|
|
@@ -1441,6 +1455,9 @@ var __webpack_modules__ = {
|
|
|
1441
1455
|
return `${subdomain}.${hostname}`;
|
|
1442
1456
|
};
|
|
1443
1457
|
const getSubdomainSuffixHostname = (subdomain = "app") => {
|
|
1458
|
+
if (isProductionHostMode()) {
|
|
1459
|
+
return null;
|
|
1460
|
+
}
|
|
1444
1461
|
if (typeof window !== "undefined" && window.location) {
|
|
1445
1462
|
const currentHost = window.location.hostname;
|
|
1446
1463
|
const cdbStagingDevBoxMatches = REGEX_CDB_STAGING_DEV_BOX.exec(currentHost);
|
|
@@ -5473,6 +5490,9 @@ var __webpack_modules__ = {
|
|
|
5473
5490
|
};
|
|
5474
5491
|
defineLanguage("en-US", "English");
|
|
5475
5492
|
defineTranslations("en-US", {
|
|
5493
|
+
BACKGROUND_FOCUS_MORE_OPTIONS_HINT: "Press O for more options",
|
|
5494
|
+
ELLIPSIS_LESS: "Show fewer buttons",
|
|
5495
|
+
ELLIPSIS_MORE: "Show more buttons",
|
|
5476
5496
|
PAUSE: "Pause",
|
|
5477
5497
|
PLAY: "Play",
|
|
5478
5498
|
PLAY_BUTTON_LIVE_NOT_STARTED: "Livestream has not started",
|
|
@@ -6997,8 +7017,8 @@ var __webpack_modules__ = {
|
|
|
6997
7017
|
const PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
6998
7018
|
const PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
6999
7019
|
const SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7000
|
-
const TAGGED_VERSION = "0.7.
|
|
7001
|
-
const CURRENT_SHA = "
|
|
7020
|
+
const TAGGED_VERSION = "0.7.15";
|
|
7021
|
+
const CURRENT_SHA = "e0025c338cd1e425139e24b3fe9129d51c193690";
|
|
7002
7022
|
const DEFAULT_PROTOCOL = (() => {
|
|
7003
7023
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
7004
7024
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location.protocol;
|
|
@@ -12056,6 +12076,9 @@ var getSwatchUrl = (mediaId, embedHost = "") => {
|
|
|
12056
12076
|
const fastHost = (0, _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_17__.CX)(embedHost);
|
|
12057
12077
|
return `https://${fastHost}/embed/medias/${mediaId}/swatch`;
|
|
12058
12078
|
};
|
|
12079
|
+
var PRELOAD_CLICK_OPTIONS = {
|
|
12080
|
+
once: true
|
|
12081
|
+
};
|
|
12059
12082
|
var _api = /* @__PURE__ */ new WeakMap();
|
|
12060
12083
|
var _eventListeners = /* @__PURE__ */ new WeakMap();
|
|
12061
12084
|
var _fullscreenState = /* @__PURE__ */ new WeakMap();
|
|
@@ -14143,6 +14166,23 @@ function _deferMediaDataFetchingToCarouselEmbed() {
|
|
|
14143
14166
|
}
|
|
14144
14167
|
return !!document.querySelector(`wistia-channel-carousel[player-dom-id="${this.id}"]:not([is-inside-playlist-embed="true"][channel-id])`);
|
|
14145
14168
|
}
|
|
14169
|
+
function _destroyPreloadThumbnailForPopover() {
|
|
14170
|
+
if (!_assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this)) {
|
|
14171
|
+
return;
|
|
14172
|
+
}
|
|
14173
|
+
const {
|
|
14174
|
+
shadowRoot
|
|
14175
|
+
} = this;
|
|
14176
|
+
const activeElement = shadowRoot?.activeElement ?? null;
|
|
14177
|
+
const hadFocus = activeElement !== null && _classPrivateFieldGet(_preloadThumbnailRoot, this) !== null && _classPrivateFieldGet(_preloadThumbnailRoot, this).contains(activeElement);
|
|
14178
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
|
|
14179
|
+
this.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
14180
|
+
if (hadFocus) {
|
|
14181
|
+
shadowRoot?.querySelector('[tabindex="0"]')?.focus({
|
|
14182
|
+
preventScroll: true
|
|
14183
|
+
});
|
|
14184
|
+
}
|
|
14185
|
+
}
|
|
14146
14186
|
function _destroyPreloadThumbnailRoot() {
|
|
14147
14187
|
if (_classPrivateFieldGet(_preloadThumbnailRoot, this)) {
|
|
14148
14188
|
(0, preact__WEBPACK_IMPORTED_MODULE_0__.render)(null, _classPrivateFieldGet(_preloadThumbnailRoot, this));
|
|
@@ -14233,7 +14273,7 @@ async function _initPublicApi(mediaId, options) {
|
|
|
14233
14273
|
_classPrivateFieldGet(_resizeObserver, this)?.disconnect();
|
|
14234
14274
|
_classPrivateFieldSet(_resizeObserver, this, null);
|
|
14235
14275
|
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
|
|
14236
|
-
this.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this));
|
|
14276
|
+
this.removeEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
14237
14277
|
this.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.c5, {
|
|
14238
14278
|
detail: {
|
|
14239
14279
|
mediaId
|
|
@@ -14487,16 +14527,20 @@ function _setupEventListeners() {
|
|
|
14487
14527
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.rO, loadedMediaDataCallback);
|
|
14488
14528
|
this.addEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.dp, implCreatedCallback);
|
|
14489
14529
|
this.addEventListener("popover-hide", _classPrivateFieldGet(_returnFocusToPopoverTrigger, this));
|
|
14530
|
+
const popoverThumbnailReadyCallback = () => {
|
|
14531
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailForPopover).call(this);
|
|
14532
|
+
};
|
|
14533
|
+
this.addEventListener("popover-thumbnail-ready", popoverThumbnailReadyCallback);
|
|
14490
14534
|
_classPrivateFieldGet(_removeEventListeners, this).push(() => {
|
|
14491
14535
|
this.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.rO, loadedMediaDataCallback);
|
|
14492
14536
|
}, () => {
|
|
14493
14537
|
this.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__.dp, implCreatedCallback);
|
|
14494
14538
|
}, () => {
|
|
14495
14539
|
this.removeEventListener("popover-hide", _classPrivateFieldGet(_returnFocusToPopoverTrigger, this));
|
|
14540
|
+
}, () => {
|
|
14541
|
+
this.removeEventListener("popover-thumbnail-ready", popoverThumbnailReadyCallback);
|
|
14496
14542
|
});
|
|
14497
|
-
this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this),
|
|
14498
|
-
once: true
|
|
14499
|
-
});
|
|
14543
|
+
this.addEventListener("click", _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
14500
14544
|
}
|
|
14501
14545
|
function _shouldDisplaySwatch() {
|
|
14502
14546
|
return this.swatch !== false && (!this.wistiaPopover || _assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/wistia-player-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
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.
|
|
49
|
+
"@wistia/wistia-player": "0.7.15"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">=18.0.0 <20.0.0",
|