@wistia/wistia-player 0.7.13 → 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.
- package/dist/types/embeds/forms/types.d.ts +4 -0
- package/dist/types/embeds/forms/types.d.ts.map +1 -1
- package/dist/types/embeds/forms/utilities/FormApi.d.ts +3 -0
- package/dist/types/embeds/forms/utilities/FormApi.d.ts.map +1 -1
- package/dist/types/embeds/media/players/vulcanV2Player/shared/layout/domain/positionsAndCoordinates.d.ts +36 -0
- package/dist/types/embeds/media/players/vulcanV2Player/shared/layout/domain/positionsAndCoordinates.d.ts.map +1 -0
- package/dist/types/embeds/shared/components/HardWall/HardWall.d.ts +2 -1
- package/dist/types/embeds/shared/components/HardWall/HardWall.d.ts.map +1 -1
- package/dist/types/embeds/shared/components/HardWall/HardWallWithPasswordForm.d.ts.map +1 -1
- package/dist/types/embeds/shared/components/HardWall/PasswordForm.d.ts +1 -1
- package/dist/types/embeds/shared/components/HardWall/PasswordForm.d.ts.map +1 -1
- package/dist/types/embeds/wistiaPlayer/WistiaPlayer.d.ts.map +1 -1
- package/dist/types/types/annotations.d.ts +7 -2
- package/dist/types/types/annotations.d.ts.map +1 -1
- package/dist/types/types/cta.d.ts +2 -0
- package/dist/types/types/cta.d.ts.map +1 -1
- package/dist/types/types/player-api-types.d.ts +6 -0
- package/dist/types/types/player-api-types.d.ts.map +1 -1
- package/dist/types/types/plugins.d.ts +1 -2
- package/dist/types/types/plugins.d.ts.map +1 -1
- package/dist/wistia-player.js +72 -9
- package/dist/wistia-player.js.map +1 -1
- package/package.json +1 -1
package/dist/wistia-player.js
CHANGED
|
@@ -1548,7 +1548,7 @@ const keys = obj => {
|
|
|
1548
1548
|
/* harmony export */ Ni: () => (/* binding */ appHostname),
|
|
1549
1549
|
/* harmony export */ rY: () => (/* binding */ getSubdomainSuffixHostname)
|
|
1550
1550
|
/* harmony export */ });
|
|
1551
|
-
/* unused harmony exports REGEX_CLOUD_DEV_BOX, REGEX_OPENCLAW_DEV_BOX, REGEX_WIZARD_DEV_BOX, REGEX_CDB_STAGING_DEV_BOX, REGEX_DEV_METAL_TUNNEL */
|
|
1551
|
+
/* unused harmony exports REGEX_CLOUD_DEV_BOX, REGEX_OPENCLAW_DEV_BOX, REGEX_WIZARD_DEV_BOX, REGEX_CDB_STAGING_DEV_BOX, REGEX_DEV_METAL_TUNNEL, HOST_MODE_META_NAME, HOST_MODE_PRODUCTION, isProductionHostMode */
|
|
1552
1552
|
// Regex to match cloud dev box hostnames: [subdomain]-cde-[devbox].[region].wistia.io
|
|
1553
1553
|
const REGEX_CLOUD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.wistia\.io/i;
|
|
1554
1554
|
// Regex to match openclaw containerized dev box hostnames: [subdomain]-cde-[devbox].[region].claw.wistia.io
|
|
@@ -1556,6 +1556,20 @@ const REGEX_OPENCLAW_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.cla
|
|
|
1556
1556
|
const REGEX_WIZARD_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.wiz\.wistia\.io/i;
|
|
1557
1557
|
const REGEX_CDB_STAGING_DEV_BOX = /([a-z0-9-]+)-cde-([a-z0-9-]+)\.([a-z0-9-]+)\.cdb-staging\.wistia\.io/i;
|
|
1558
1558
|
const REGEX_DEV_METAL_TUNNEL = /([a-z0-9-]+)-txl-([a-z0-9-]+)\.([a-z0-9-]+)\.mtl\.wistia\.io/i;
|
|
1559
|
+
const HOST_MODE_META_NAME = 'wistia-host-mode';
|
|
1560
|
+
const HOST_MODE_PRODUCTION = 'production';
|
|
1561
|
+
const isProductionHostMode = () => {
|
|
1562
|
+
if (typeof document === 'undefined' || typeof document.querySelector !== 'function') {
|
|
1563
|
+
return false;
|
|
1564
|
+
}
|
|
1565
|
+
try {
|
|
1566
|
+
const meta = document.querySelector(`meta[name="${HOST_MODE_META_NAME}"]`);
|
|
1567
|
+
const content = meta?.getAttribute('content');
|
|
1568
|
+
return typeof content === 'string' && content.trim().toLowerCase() === HOST_MODE_PRODUCTION;
|
|
1569
|
+
} catch {
|
|
1570
|
+
return false;
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1559
1573
|
const appHostname = (subdomain = 'app') => {
|
|
1560
1574
|
const hostname = false || "wistia.com";
|
|
1561
1575
|
const subdomainSuffixHostname = getSubdomainSuffixHostname(subdomain);
|
|
@@ -1565,6 +1579,10 @@ const appHostname = (subdomain = 'app') => {
|
|
|
1565
1579
|
return `${subdomain}.${hostname}`;
|
|
1566
1580
|
};
|
|
1567
1581
|
const getSubdomainSuffixHostname = (subdomain = 'app') => {
|
|
1582
|
+
if (isProductionHostMode()) {
|
|
1583
|
+
return null;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1568
1586
|
// Check if we're running in a cloud dev environment by parsing the current hostname
|
|
1569
1587
|
if (typeof window !== 'undefined' && window.location) {
|
|
1570
1588
|
const currentHost = window.location.hostname;
|
|
@@ -3901,6 +3919,7 @@ class ProgressiveThumbnail extends preact__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
3901
3919
|
this._hasRenderedVisible = true;
|
|
3902
3920
|
}
|
|
3903
3921
|
const sharedProps = {
|
|
3922
|
+
ariaHidden: this.props.ariaHidden,
|
|
3904
3923
|
backgroundColor: this.props.backgroundColor,
|
|
3905
3924
|
fitStrategy: this.props.fitStrategy,
|
|
3906
3925
|
isVisible: this.props.isVisible,
|
|
@@ -5427,6 +5446,9 @@ const getDefaultTranslation = () => {
|
|
|
5427
5446
|
// duplicate multiple translation keys.
|
|
5428
5447
|
defineLanguage('en-US', 'English');
|
|
5429
5448
|
defineTranslations('en-US', {
|
|
5449
|
+
BACKGROUND_FOCUS_MORE_OPTIONS_HINT: 'Press O for more options',
|
|
5450
|
+
ELLIPSIS_LESS: 'Show fewer buttons',
|
|
5451
|
+
ELLIPSIS_MORE: 'Show more buttons',
|
|
5430
5452
|
PAUSE: 'Pause',
|
|
5431
5453
|
PLAY: 'Play',
|
|
5432
5454
|
PLAY_BUTTON_LIVE_NOT_STARTED: 'Livestream has not started',
|
|
@@ -5444,7 +5466,7 @@ defineTranslations('en-US', {
|
|
|
5444
5466
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5445
5467
|
/* harmony export */ D5: () => (/* binding */ isVisitorTrackingEnabled)
|
|
5446
5468
|
/* harmony export */ });
|
|
5447
|
-
/* unused harmony exports migrateLegacyVisitorTracking, consent, setVisitorTrackingEnabled */
|
|
5469
|
+
/* unused harmony exports migrateLegacyVisitorTracking, consent, setVisitorTrackingEnabled, registerPrivacyModeSource, unregisterPrivacyModeSource */
|
|
5448
5470
|
/* harmony import */ var utilities_globalBindAndTrigger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4271);
|
|
5449
5471
|
/* harmony import */ var utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4997);
|
|
5450
5472
|
/* harmony import */ var utilities_getApiHandles_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5510);
|
|
@@ -5561,10 +5583,27 @@ const isVisitorTrackingEnabled = () => {
|
|
|
5561
5583
|
const isPrivacyModeEnabled = apis.some(api => {
|
|
5562
5584
|
const data = api._mediaData || api._galleryData || {};
|
|
5563
5585
|
return data.privacyMode === true;
|
|
5564
|
-
});
|
|
5586
|
+
}) || hasRegisteredPrivacyModeSource();
|
|
5565
5587
|
return !isPrivacyModeEnabled;
|
|
5566
5588
|
};
|
|
5567
5589
|
|
|
5590
|
+
// Embeds that aren't API handles or channels -- form embeds, and any future
|
|
5591
|
+
// non-player surface -- register their account's privacy mode here.
|
|
5592
|
+
//
|
|
5593
|
+
// Without this, the scan above only sees media handles, so a page with a form
|
|
5594
|
+
// embed and no video reports privacy mode as OFF no matter what the account is
|
|
5595
|
+
// set to, and consent() returns true for a privacy-mode account.
|
|
5596
|
+
const registerPrivacyModeSource = (key, privacyMode) => {
|
|
5597
|
+
Wistia._privacyModeSources ??= {};
|
|
5598
|
+
Wistia._privacyModeSources[key] = privacyMode === true;
|
|
5599
|
+
};
|
|
5600
|
+
const unregisterPrivacyModeSource = key => {
|
|
5601
|
+
if (Wistia._privacyModeSources) {
|
|
5602
|
+
delete Wistia._privacyModeSources[key];
|
|
5603
|
+
}
|
|
5604
|
+
};
|
|
5605
|
+
const hasRegisteredPrivacyModeSource = () => Object.values(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__/* .Wistia */ .s._privacyModeSources || {}).some(Boolean);
|
|
5606
|
+
|
|
5568
5607
|
/***/ },
|
|
5569
5608
|
|
|
5570
5609
|
/***/ 4989
|
|
@@ -6795,8 +6834,8 @@ const PROD_EMBED_HOST = 'embed.wistia.com';
|
|
|
6795
6834
|
const PROD_SSL_EMBED_HOST = 'embed-ssl.wistia.com';
|
|
6796
6835
|
const PROD_FASTLY_SSL_HOST = 'embed-fastly.wistia.com';
|
|
6797
6836
|
const SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
6798
|
-
const TAGGED_VERSION = "0.7.
|
|
6799
|
-
const CURRENT_SHA = "
|
|
6837
|
+
const TAGGED_VERSION = "0.7.15" || 0;
|
|
6838
|
+
const CURRENT_SHA = "e0025c338cd1e425139e24b3fe9129d51c193690" || 0;
|
|
6800
6839
|
const DEFAULT_PROTOCOL = (() => {
|
|
6801
6840
|
if (typeof window !== 'undefined' && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location) {
|
|
6802
6841
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location.protocol;
|
|
@@ -14743,6 +14782,9 @@ const getSwatchUrl = (mediaId, embedHost = '') => {
|
|
|
14743
14782
|
const fastHost = (0,_utilities_hosts_js__WEBPACK_IMPORTED_MODULE_17__/* .cdnFastWistiaComHost */ .CX)(embedHost);
|
|
14744
14783
|
return `https://${fastHost}/embed/medias/${mediaId}/swatch`;
|
|
14745
14784
|
};
|
|
14785
|
+
const PRELOAD_CLICK_OPTIONS = {
|
|
14786
|
+
once: true
|
|
14787
|
+
};
|
|
14746
14788
|
var _api = /*#__PURE__*/new WeakMap();
|
|
14747
14789
|
var _eventListeners = /*#__PURE__*/new WeakMap();
|
|
14748
14790
|
var _fullscreenState = /*#__PURE__*/new WeakMap();
|
|
@@ -17156,6 +17198,23 @@ function _deferMediaDataFetchingToCarouselEmbed() {
|
|
|
17156
17198
|
}
|
|
17157
17199
|
return !!document.querySelector(`wistia-channel-carousel[player-dom-id="${this.id}"]:not([is-inside-playlist-embed="true"][channel-id])`);
|
|
17158
17200
|
}
|
|
17201
|
+
function _destroyPreloadThumbnailForPopover() {
|
|
17202
|
+
if (!_assertClassBrand(_WistiaPlayer_brand, this, _isPopoverWithThumbnail).call(this)) {
|
|
17203
|
+
return;
|
|
17204
|
+
}
|
|
17205
|
+
const {
|
|
17206
|
+
shadowRoot
|
|
17207
|
+
} = this;
|
|
17208
|
+
const activeElement = shadowRoot?.activeElement ?? null;
|
|
17209
|
+
const hadFocus = activeElement !== null && _classPrivateFieldGet(_preloadThumbnailRoot, this) !== null && _classPrivateFieldGet(_preloadThumbnailRoot, this).contains(activeElement);
|
|
17210
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
|
|
17211
|
+
this.removeEventListener('click', _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
17212
|
+
if (hadFocus) {
|
|
17213
|
+
shadowRoot?.querySelector('[tabindex="0"]')?.focus({
|
|
17214
|
+
preventScroll: true
|
|
17215
|
+
});
|
|
17216
|
+
}
|
|
17217
|
+
}
|
|
17159
17218
|
function _destroyPreloadThumbnailRoot() {
|
|
17160
17219
|
if (_classPrivateFieldGet(_preloadThumbnailRoot, this)) {
|
|
17161
17220
|
// Unmount the nested preact root so its components run componentWillUnmount
|
|
@@ -17292,7 +17351,7 @@ async function _initPublicApi(mediaId, options) {
|
|
|
17292
17351
|
_classPrivateFieldGet(_resizeObserver, this)?.disconnect();
|
|
17293
17352
|
_classPrivateFieldSet(_resizeObserver, this, null);
|
|
17294
17353
|
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailRoot).call(this);
|
|
17295
|
-
this.removeEventListener('click', _classPrivateFieldGet(_handlePreloadThumbnailClick, this));
|
|
17354
|
+
this.removeEventListener('click', _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
17296
17355
|
// event for public consumption, exposed on our event types
|
|
17297
17356
|
this.dispatchEvent(new CustomEvent(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__/* .API_READY_EVENT */ .c5, {
|
|
17298
17357
|
detail: {
|
|
@@ -17637,16 +17696,20 @@ function _setupEventListeners() {
|
|
|
17637
17696
|
// Dispatched on this host by the legacy popover code each time the popover
|
|
17638
17697
|
// dialog closes. See #returnFocusToPopoverTrigger.
|
|
17639
17698
|
this.addEventListener('popover-hide', _classPrivateFieldGet(_returnFocusToPopoverTrigger, this));
|
|
17699
|
+
const popoverThumbnailReadyCallback = () => {
|
|
17700
|
+
_assertClassBrand(_WistiaPlayer_brand, this, _destroyPreloadThumbnailForPopover).call(this);
|
|
17701
|
+
};
|
|
17702
|
+
this.addEventListener('popover-thumbnail-ready', popoverThumbnailReadyCallback);
|
|
17640
17703
|
_classPrivateFieldGet(_removeEventListeners, this).push(() => {
|
|
17641
17704
|
this.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__/* .LOADED_MEDIA_DATA_EVENT */ .rO, loadedMediaDataCallback);
|
|
17642
17705
|
}, () => {
|
|
17643
17706
|
this.removeEventListener(_utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_15__/* .IMPL_CREATED_EVENT */ .dp, implCreatedCallback);
|
|
17644
17707
|
}, () => {
|
|
17645
17708
|
this.removeEventListener('popover-hide', _classPrivateFieldGet(_returnFocusToPopoverTrigger, this));
|
|
17709
|
+
}, () => {
|
|
17710
|
+
this.removeEventListener('popover-thumbnail-ready', popoverThumbnailReadyCallback);
|
|
17646
17711
|
});
|
|
17647
|
-
this.addEventListener('click', _classPrivateFieldGet(_handlePreloadThumbnailClick, this),
|
|
17648
|
-
once: true
|
|
17649
|
-
});
|
|
17712
|
+
this.addEventListener('click', _classPrivateFieldGet(_handlePreloadThumbnailClick, this), PRELOAD_CLICK_OPTIONS);
|
|
17650
17713
|
}
|
|
17651
17714
|
/**
|
|
17652
17715
|
* Determines if a swatch should be displayed based on the embed options
|