@wistia/wistia-player-react 0.7.26 → 0.7.28
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 +21 -0
- package/dist/cjs/WistiaPlayer.cjs +86 -30
- package/dist/mjs/WistiaPlayer.mjs +1 -1
- package/dist/mjs/{WistiaPlayerWrapper-LGVIIG6B.mjs → WistiaPlayerWrapper-XPOTTKXB.mjs} +1 -1
- package/dist/mjs/{wistia-player-LWK7QST4.mjs → wistia-player-3ARLNU4R.mjs} +86 -30
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @wistia/wistia-player-react
|
|
2
2
|
|
|
3
|
+
## 0.7.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7073c21: Viewer problem reports now include the player build sha, which Wistia scripts are on the page, the embed type, native fetch/XHR checks, CSP violations, consent state, a timeline of recent player events, recent hls.js errors, and the ids of errors already sent to Sentry. The report form no longer re-sends while a send is in flight.
|
|
8
|
+
- c86e4dd: Adding `?wistia_report` to a page URL shows a Wistia support diagnostics bar at the bottom of the page. Choosing Send files a page-wide problem report covering every Wistia embed on the page, including ones that never initialized, and shows a short reference to include when replying to Wistia support.
|
|
9
|
+
- Updated dependencies [c6b37dc]
|
|
10
|
+
- Updated dependencies [7073c21]
|
|
11
|
+
- Updated dependencies [c86e4dd]
|
|
12
|
+
- @wistia/wistia-player@0.7.28
|
|
13
|
+
|
|
14
|
+
## 0.7.27
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 805d276: Give show/hide on the annotation plugin support for annotations without time/duration, so that they are immediately shown and have controlled dismissal.
|
|
19
|
+
- Updated dependencies [09b87d1]
|
|
20
|
+
- Updated dependencies [805d276]
|
|
21
|
+
- Updated dependencies [676a12b]
|
|
22
|
+
- @wistia/wistia-player@0.7.27
|
|
23
|
+
|
|
3
24
|
## 0.7.26
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -3687,11 +3687,12 @@ var init_wistia_player = __esm({
|
|
|
3687
3687
|
/* harmony export */
|
|
3688
3688
|
});
|
|
3689
3689
|
var _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(9814);
|
|
3690
|
-
var
|
|
3691
|
-
var
|
|
3692
|
-
var
|
|
3693
|
-
var
|
|
3694
|
-
var
|
|
3690
|
+
var _globalBindAndTrigger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__3(4271);
|
|
3691
|
+
var _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(4755);
|
|
3692
|
+
var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2 = __webpack_require__3(5509);
|
|
3693
|
+
var _appHostname_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__3(787);
|
|
3694
|
+
var _hosts_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__3(5857);
|
|
3695
|
+
var _simpleMetrics_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__3(1161);
|
|
3695
3696
|
const getSampleRatesByProductType = (productType) => {
|
|
3696
3697
|
if (productType === "mediaPlayback") {
|
|
3697
3698
|
return 1e-3;
|
|
@@ -3704,8 +3705,24 @@ var init_wistia_player = __esm({
|
|
|
3704
3705
|
const IS_DEV_ENV = false;
|
|
3705
3706
|
const IS_TEST_ENV = false;
|
|
3706
3707
|
let isSentryLoading = false;
|
|
3708
|
+
let isWaitingForConsentChange = false;
|
|
3709
|
+
const onGlobal = _globalBindAndTrigger_js__WEBPACK_IMPORTED_MODULE_1__.tJ;
|
|
3707
3710
|
const errorsCapturedBeforeSentryClientInit = [];
|
|
3708
3711
|
const MAX_PENDING_ERRORS = 50;
|
|
3712
|
+
const MAX_REMEMBERED_EVENT_IDS = 10;
|
|
3713
|
+
const recentSentryEventIds = [];
|
|
3714
|
+
const getRecentSentryEventIds = () => {
|
|
3715
|
+
return recentSentryEventIds.slice();
|
|
3716
|
+
};
|
|
3717
|
+
const rememberSentryEventId = (eventId) => {
|
|
3718
|
+
if (typeof eventId !== "string" || eventId === "") {
|
|
3719
|
+
return;
|
|
3720
|
+
}
|
|
3721
|
+
recentSentryEventIds.push(eventId);
|
|
3722
|
+
if (recentSentryEventIds.length > MAX_REMEMBERED_EVENT_IDS) {
|
|
3723
|
+
recentSentryEventIds.shift();
|
|
3724
|
+
}
|
|
3725
|
+
};
|
|
3709
3726
|
const configureSentry = () => {
|
|
3710
3727
|
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.BrowserClient) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.makeFetchTransport) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.defaultStackParser) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.Scope)) {
|
|
3711
3728
|
return;
|
|
@@ -3716,18 +3733,18 @@ var init_wistia_player = __esm({
|
|
|
3716
3733
|
stackParser: window.Sentry.defaultStackParser,
|
|
3717
3734
|
integrations: [window.Sentry.httpContextIntegration()],
|
|
3718
3735
|
// Allow httpContextIntegration so we can collect URL, browser, and OS version information. No PII is included here.
|
|
3719
|
-
release: (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.uI)(
|
|
3736
|
+
release: (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.uI)(_hosts_js__WEBPACK_IMPORTED_MODULE_5__.U4) ? _hosts_js__WEBPACK_IMPORTED_MODULE_5__.U4 : _hosts_js__WEBPACK_IMPORTED_MODULE_5__.lR
|
|
3720
3737
|
});
|
|
3721
3738
|
const scope = new window.Sentry.Scope();
|
|
3722
3739
|
scope.setClient(client);
|
|
3723
3740
|
scope.setTags({
|
|
3724
3741
|
pillar: "publish"
|
|
3725
3742
|
});
|
|
3726
|
-
|
|
3743
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope = scope;
|
|
3727
3744
|
client.init();
|
|
3728
|
-
|
|
3745
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.isSentryInitialized = true;
|
|
3729
3746
|
if (errorsCapturedBeforeSentryClientInit.length > 0) {
|
|
3730
|
-
(0,
|
|
3747
|
+
(0, _simpleMetrics_js__WEBPACK_IMPORTED_MODULE_6__.WO)("player/buffered-sentry-errors", errorsCapturedBeforeSentryClientInit.length);
|
|
3731
3748
|
}
|
|
3732
3749
|
errorsCapturedBeforeSentryClientInit.forEach((pending) => {
|
|
3733
3750
|
reportError(pending.product, pending.error, {
|
|
@@ -3740,10 +3757,17 @@ var init_wistia_player = __esm({
|
|
|
3740
3757
|
listenForGlobalUnhandledRejections();
|
|
3741
3758
|
};
|
|
3742
3759
|
const initializeSentry = () => {
|
|
3743
|
-
if ((0,
|
|
3760
|
+
if (!(0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.m8)()) {
|
|
3761
|
+
if (!isWaitingForConsentChange) {
|
|
3762
|
+
isWaitingForConsentChange = true;
|
|
3763
|
+
onGlobal("visitortrackingchange", initializeSentry);
|
|
3764
|
+
}
|
|
3765
|
+
return;
|
|
3766
|
+
}
|
|
3767
|
+
if ((0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.D5)() !== true) {
|
|
3744
3768
|
return;
|
|
3745
3769
|
}
|
|
3746
|
-
if (!window.Sentry && !
|
|
3770
|
+
if (!window.Sentry && !_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.isSentryInitialized && !isSentryLoading) {
|
|
3747
3771
|
isSentryLoading = true;
|
|
3748
3772
|
const sentryLoader = document.createElement("script");
|
|
3749
3773
|
sentryLoader.src = "https://browser.sentry-cdn.com/9.6.1/bundle.min.js";
|
|
@@ -3755,10 +3779,10 @@ var init_wistia_player = __esm({
|
|
|
3755
3779
|
};
|
|
3756
3780
|
const reportError = (product, error, details) => {
|
|
3757
3781
|
try {
|
|
3758
|
-
if ((0,
|
|
3782
|
+
if ((0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.D5)() !== true) {
|
|
3759
3783
|
return;
|
|
3760
3784
|
}
|
|
3761
|
-
if (!
|
|
3785
|
+
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.isSentryInitialized) {
|
|
3762
3786
|
initializeSentry();
|
|
3763
3787
|
if (errorsCapturedBeforeSentryClientInit.length < MAX_PENDING_ERRORS) {
|
|
3764
3788
|
errorsCapturedBeforeSentryClientInit.push({
|
|
@@ -3788,15 +3812,15 @@ var init_wistia_player = __esm({
|
|
|
3788
3812
|
}
|
|
3789
3813
|
if (!shouldSendToSentry) {
|
|
3790
3814
|
console.error(error);
|
|
3791
|
-
} else if ((0,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3815
|
+
} else if ((0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.D5)()) {
|
|
3816
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.clear();
|
|
3817
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTag("pillar", "publish");
|
|
3818
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTag("product", product);
|
|
3795
3819
|
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.uu)(details)) {
|
|
3796
|
-
|
|
3820
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTags(details);
|
|
3797
3821
|
}
|
|
3798
|
-
|
|
3799
|
-
|
|
3822
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTag("url", window.location.href);
|
|
3823
|
+
rememberSentryEventId(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.captureException(error));
|
|
3800
3824
|
}
|
|
3801
3825
|
} catch (err) {
|
|
3802
3826
|
console.error(err);
|
|
@@ -3808,7 +3832,7 @@ var init_wistia_player = __esm({
|
|
|
3808
3832
|
return;
|
|
3809
3833
|
}
|
|
3810
3834
|
const eventErrorSource = event.error?.source ?? "";
|
|
3811
|
-
const fastHostName = (0,
|
|
3835
|
+
const fastHostName = (0, _appHostname_js__WEBPACK_IMPORTED_MODULE_4__.Ni)("fast");
|
|
3812
3836
|
if (eventErrorSource.includes(fastHostName)) {
|
|
3813
3837
|
reportError("globalListener", eventError);
|
|
3814
3838
|
}
|
|
@@ -3819,20 +3843,20 @@ var init_wistia_player = __esm({
|
|
|
3819
3843
|
return;
|
|
3820
3844
|
}
|
|
3821
3845
|
const eventReasonStack = event.reason?.stack ?? "";
|
|
3822
|
-
if (eventReasonStack.includes((0,
|
|
3846
|
+
if (eventReasonStack.includes((0, _appHostname_js__WEBPACK_IMPORTED_MODULE_4__.Ni)("fast"))) {
|
|
3823
3847
|
reportError("globalListener", eventReason);
|
|
3824
3848
|
}
|
|
3825
3849
|
};
|
|
3826
3850
|
const listenForGlobalErrors = () => {
|
|
3827
|
-
if (!
|
|
3851
|
+
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalErrors) {
|
|
3828
3852
|
window.addEventListener("error", globalErrorHandler);
|
|
3829
|
-
|
|
3853
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalErrors = true;
|
|
3830
3854
|
}
|
|
3831
3855
|
};
|
|
3832
3856
|
const listenForGlobalUnhandledRejections = () => {
|
|
3833
|
-
if (!
|
|
3857
|
+
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalUnhandledRejections) {
|
|
3834
3858
|
window.addEventListener("unhandledrejection", globalUnhandledRejectionHandler);
|
|
3835
|
-
|
|
3859
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalUnhandledRejections = true;
|
|
3836
3860
|
}
|
|
3837
3861
|
};
|
|
3838
3862
|
},
|
|
@@ -5573,6 +5597,11 @@ var init_wistia_player = __esm({
|
|
|
5573
5597
|
mj: () => (
|
|
5574
5598
|
/* binding */
|
|
5575
5599
|
globalTrigger
|
|
5600
|
+
),
|
|
5601
|
+
/* harmony export */
|
|
5602
|
+
tJ: () => (
|
|
5603
|
+
/* binding */
|
|
5604
|
+
globalOn
|
|
5576
5605
|
)
|
|
5577
5606
|
/* harmony export */
|
|
5578
5607
|
});
|
|
@@ -6255,6 +6284,11 @@ var init_wistia_player = __esm({
|
|
|
6255
6284
|
D5: () => (
|
|
6256
6285
|
/* binding */
|
|
6257
6286
|
isVisitorTrackingEnabled
|
|
6287
|
+
),
|
|
6288
|
+
/* harmony export */
|
|
6289
|
+
m8: () => (
|
|
6290
|
+
/* binding */
|
|
6291
|
+
isVisitorTrackingDecided
|
|
6258
6292
|
)
|
|
6259
6293
|
/* harmony export */
|
|
6260
6294
|
});
|
|
@@ -6321,7 +6355,7 @@ var init_wistia_player = __esm({
|
|
|
6321
6355
|
}
|
|
6322
6356
|
}
|
|
6323
6357
|
};
|
|
6324
|
-
const
|
|
6358
|
+
const getExplicitConsent = () => {
|
|
6325
6359
|
if (typeof _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._visitorTracking === "boolean") {
|
|
6326
6360
|
return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._visitorTracking;
|
|
6327
6361
|
}
|
|
@@ -6331,6 +6365,9 @@ var init_wistia_player = __esm({
|
|
|
6331
6365
|
return Boolean(isEnabledVal);
|
|
6332
6366
|
}
|
|
6333
6367
|
}
|
|
6368
|
+
return void 0;
|
|
6369
|
+
};
|
|
6370
|
+
const getPrivacyModeApiHandles = () => {
|
|
6334
6371
|
const apis = (0, utilities_getApiHandles_ts__WEBPACK_IMPORTED_MODULE_2__.bp)();
|
|
6335
6372
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.channel && _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.channel.all) {
|
|
6336
6373
|
try {
|
|
@@ -6338,12 +6375,30 @@ var init_wistia_player = __esm({
|
|
|
6338
6375
|
} catch (e) {
|
|
6339
6376
|
}
|
|
6340
6377
|
}
|
|
6341
|
-
|
|
6378
|
+
return apis;
|
|
6379
|
+
};
|
|
6380
|
+
const isVisitorTrackingEnabled = () => {
|
|
6381
|
+
const explicitConsent = getExplicitConsent();
|
|
6382
|
+
if (explicitConsent != null) {
|
|
6383
|
+
return explicitConsent;
|
|
6384
|
+
}
|
|
6385
|
+
const isPrivacyModeEnabled = getPrivacyModeApiHandles().some((api) => {
|
|
6342
6386
|
const data = api._mediaData || api._galleryData || {};
|
|
6343
6387
|
return data.privacyMode === true;
|
|
6344
6388
|
}) || hasRegisteredPrivacyModeSource();
|
|
6345
6389
|
return !isPrivacyModeEnabled;
|
|
6346
6390
|
};
|
|
6391
|
+
const isVisitorTrackingDecided = () => {
|
|
6392
|
+
if (getExplicitConsent() != null) {
|
|
6393
|
+
return true;
|
|
6394
|
+
}
|
|
6395
|
+
if (hasAnyRegisteredPrivacyModeSource()) {
|
|
6396
|
+
return true;
|
|
6397
|
+
}
|
|
6398
|
+
return getPrivacyModeApiHandles().some((api) => {
|
|
6399
|
+
return api != null && api !== "removed" && (api._mediaData != null || api._galleryData != null);
|
|
6400
|
+
});
|
|
6401
|
+
};
|
|
6347
6402
|
const registerPrivacyModeSource = (key, privacyMode) => {
|
|
6348
6403
|
Wistia._privacyModeSources ??= {};
|
|
6349
6404
|
Wistia._privacyModeSources[key] = privacyMode === true;
|
|
@@ -6354,6 +6409,7 @@ var init_wistia_player = __esm({
|
|
|
6354
6409
|
}
|
|
6355
6410
|
};
|
|
6356
6411
|
const hasRegisteredPrivacyModeSource = () => Object.values(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._privacyModeSources || {}).some(Boolean);
|
|
6412
|
+
const hasAnyRegisteredPrivacyModeSource = () => Object.keys(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._privacyModeSources || {}).length > 0;
|
|
6357
6413
|
},
|
|
6358
6414
|
/***/
|
|
6359
6415
|
4989(__unused_webpack_module, __webpack_exports__3, __webpack_require__3) {
|
|
@@ -7763,8 +7819,8 @@ var init_wistia_player = __esm({
|
|
|
7763
7819
|
const PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7764
7820
|
const PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
7765
7821
|
const SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7766
|
-
const TAGGED_VERSION = "0.7.
|
|
7767
|
-
const CURRENT_SHA = "
|
|
7822
|
+
const TAGGED_VERSION = "0.7.28";
|
|
7823
|
+
const CURRENT_SHA = "987326165f6b8d582037859d9f76ba214d7595ff";
|
|
7768
7824
|
const DEFAULT_PROTOCOL = (() => {
|
|
7769
7825
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
7770
7826
|
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-
|
|
11
|
+
async () => import("./WistiaPlayerWrapper-XPOTTKXB.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-3ARLNU4R.mjs");
|
|
41
41
|
void customElements.whenDefined("wistia-player").then(() => {
|
|
42
42
|
setIsWistiaPlayerDefined(true);
|
|
43
43
|
});
|
|
@@ -3046,11 +3046,12 @@ var __webpack_modules__ = {
|
|
|
3046
3046
|
/* harmony export */
|
|
3047
3047
|
});
|
|
3048
3048
|
var _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(9814);
|
|
3049
|
-
var
|
|
3050
|
-
var
|
|
3051
|
-
var
|
|
3052
|
-
var
|
|
3053
|
-
var
|
|
3049
|
+
var _globalBindAndTrigger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__3(4271);
|
|
3050
|
+
var _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__3(4755);
|
|
3051
|
+
var _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2 = __webpack_require__3(5509);
|
|
3052
|
+
var _appHostname_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__3(787);
|
|
3053
|
+
var _hosts_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__3(5857);
|
|
3054
|
+
var _simpleMetrics_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__3(1161);
|
|
3054
3055
|
const getSampleRatesByProductType = (productType) => {
|
|
3055
3056
|
if (productType === "mediaPlayback") {
|
|
3056
3057
|
return 1e-3;
|
|
@@ -3063,8 +3064,24 @@ var __webpack_modules__ = {
|
|
|
3063
3064
|
const IS_DEV_ENV = false;
|
|
3064
3065
|
const IS_TEST_ENV = false;
|
|
3065
3066
|
let isSentryLoading = false;
|
|
3067
|
+
let isWaitingForConsentChange = false;
|
|
3068
|
+
const onGlobal = _globalBindAndTrigger_js__WEBPACK_IMPORTED_MODULE_1__.tJ;
|
|
3066
3069
|
const errorsCapturedBeforeSentryClientInit = [];
|
|
3067
3070
|
const MAX_PENDING_ERRORS = 50;
|
|
3071
|
+
const MAX_REMEMBERED_EVENT_IDS = 10;
|
|
3072
|
+
const recentSentryEventIds = [];
|
|
3073
|
+
const getRecentSentryEventIds = () => {
|
|
3074
|
+
return recentSentryEventIds.slice();
|
|
3075
|
+
};
|
|
3076
|
+
const rememberSentryEventId = (eventId) => {
|
|
3077
|
+
if (typeof eventId !== "string" || eventId === "") {
|
|
3078
|
+
return;
|
|
3079
|
+
}
|
|
3080
|
+
recentSentryEventIds.push(eventId);
|
|
3081
|
+
if (recentSentryEventIds.length > MAX_REMEMBERED_EVENT_IDS) {
|
|
3082
|
+
recentSentryEventIds.shift();
|
|
3083
|
+
}
|
|
3084
|
+
};
|
|
3068
3085
|
const configureSentry = () => {
|
|
3069
3086
|
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.BrowserClient) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.makeFetchTransport) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.defaultStackParser) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.gD)(window.Sentry.Scope)) {
|
|
3070
3087
|
return;
|
|
@@ -3075,18 +3092,18 @@ var __webpack_modules__ = {
|
|
|
3075
3092
|
stackParser: window.Sentry.defaultStackParser,
|
|
3076
3093
|
integrations: [window.Sentry.httpContextIntegration()],
|
|
3077
3094
|
// Allow httpContextIntegration so we can collect URL, browser, and OS version information. No PII is included here.
|
|
3078
|
-
release: (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.uI)(
|
|
3095
|
+
release: (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.uI)(_hosts_js__WEBPACK_IMPORTED_MODULE_5__.U4) ? _hosts_js__WEBPACK_IMPORTED_MODULE_5__.U4 : _hosts_js__WEBPACK_IMPORTED_MODULE_5__.lR
|
|
3079
3096
|
});
|
|
3080
3097
|
const scope = new window.Sentry.Scope();
|
|
3081
3098
|
scope.setClient(client);
|
|
3082
3099
|
scope.setTags({
|
|
3083
3100
|
pillar: "publish"
|
|
3084
3101
|
});
|
|
3085
|
-
|
|
3102
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope = scope;
|
|
3086
3103
|
client.init();
|
|
3087
|
-
|
|
3104
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.isSentryInitialized = true;
|
|
3088
3105
|
if (errorsCapturedBeforeSentryClientInit.length > 0) {
|
|
3089
|
-
(0,
|
|
3106
|
+
(0, _simpleMetrics_js__WEBPACK_IMPORTED_MODULE_6__.WO)("player/buffered-sentry-errors", errorsCapturedBeforeSentryClientInit.length);
|
|
3090
3107
|
}
|
|
3091
3108
|
errorsCapturedBeforeSentryClientInit.forEach((pending) => {
|
|
3092
3109
|
reportError(pending.product, pending.error, {
|
|
@@ -3099,10 +3116,17 @@ var __webpack_modules__ = {
|
|
|
3099
3116
|
listenForGlobalUnhandledRejections();
|
|
3100
3117
|
};
|
|
3101
3118
|
const initializeSentry = () => {
|
|
3102
|
-
if ((0,
|
|
3119
|
+
if (!(0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.m8)()) {
|
|
3120
|
+
if (!isWaitingForConsentChange) {
|
|
3121
|
+
isWaitingForConsentChange = true;
|
|
3122
|
+
onGlobal("visitortrackingchange", initializeSentry);
|
|
3123
|
+
}
|
|
3124
|
+
return;
|
|
3125
|
+
}
|
|
3126
|
+
if ((0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.D5)() !== true) {
|
|
3103
3127
|
return;
|
|
3104
3128
|
}
|
|
3105
|
-
if (!window.Sentry && !
|
|
3129
|
+
if (!window.Sentry && !_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.isSentryInitialized && !isSentryLoading) {
|
|
3106
3130
|
isSentryLoading = true;
|
|
3107
3131
|
const sentryLoader = document.createElement("script");
|
|
3108
3132
|
sentryLoader.src = "https://browser.sentry-cdn.com/9.6.1/bundle.min.js";
|
|
@@ -3114,10 +3138,10 @@ var __webpack_modules__ = {
|
|
|
3114
3138
|
};
|
|
3115
3139
|
const reportError = (product, error, details) => {
|
|
3116
3140
|
try {
|
|
3117
|
-
if ((0,
|
|
3141
|
+
if ((0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.D5)() !== true) {
|
|
3118
3142
|
return;
|
|
3119
3143
|
}
|
|
3120
|
-
if (!
|
|
3144
|
+
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.isSentryInitialized) {
|
|
3121
3145
|
initializeSentry();
|
|
3122
3146
|
if (errorsCapturedBeforeSentryClientInit.length < MAX_PENDING_ERRORS) {
|
|
3123
3147
|
errorsCapturedBeforeSentryClientInit.push({
|
|
@@ -3147,15 +3171,15 @@ var __webpack_modules__ = {
|
|
|
3147
3171
|
}
|
|
3148
3172
|
if (!shouldSendToSentry) {
|
|
3149
3173
|
console.error(error);
|
|
3150
|
-
} else if ((0,
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3174
|
+
} else if ((0, _trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_2__.D5)()) {
|
|
3175
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.clear();
|
|
3176
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTag("pillar", "publish");
|
|
3177
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTag("product", product);
|
|
3154
3178
|
if ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_0__.uu)(details)) {
|
|
3155
|
-
|
|
3179
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTags(details);
|
|
3156
3180
|
}
|
|
3157
|
-
|
|
3158
|
-
|
|
3181
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.setTag("url", window.location.href);
|
|
3182
|
+
rememberSentryEventId(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._sentryScope.captureException(error));
|
|
3159
3183
|
}
|
|
3160
3184
|
} catch (err) {
|
|
3161
3185
|
console.error(err);
|
|
@@ -3167,7 +3191,7 @@ var __webpack_modules__ = {
|
|
|
3167
3191
|
return;
|
|
3168
3192
|
}
|
|
3169
3193
|
const eventErrorSource = event.error?.source ?? "";
|
|
3170
|
-
const fastHostName = (0,
|
|
3194
|
+
const fastHostName = (0, _appHostname_js__WEBPACK_IMPORTED_MODULE_4__.Ni)("fast");
|
|
3171
3195
|
if (eventErrorSource.includes(fastHostName)) {
|
|
3172
3196
|
reportError("globalListener", eventError);
|
|
3173
3197
|
}
|
|
@@ -3178,20 +3202,20 @@ var __webpack_modules__ = {
|
|
|
3178
3202
|
return;
|
|
3179
3203
|
}
|
|
3180
3204
|
const eventReasonStack = event.reason?.stack ?? "";
|
|
3181
|
-
if (eventReasonStack.includes((0,
|
|
3205
|
+
if (eventReasonStack.includes((0, _appHostname_js__WEBPACK_IMPORTED_MODULE_4__.Ni)("fast"))) {
|
|
3182
3206
|
reportError("globalListener", eventReason);
|
|
3183
3207
|
}
|
|
3184
3208
|
};
|
|
3185
3209
|
const listenForGlobalErrors = () => {
|
|
3186
|
-
if (!
|
|
3210
|
+
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalErrors) {
|
|
3187
3211
|
window.addEventListener("error", globalErrorHandler);
|
|
3188
|
-
|
|
3212
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalErrors = true;
|
|
3189
3213
|
}
|
|
3190
3214
|
};
|
|
3191
3215
|
const listenForGlobalUnhandledRejections = () => {
|
|
3192
|
-
if (!
|
|
3216
|
+
if (!_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalUnhandledRejections) {
|
|
3193
3217
|
window.addEventListener("unhandledrejection", globalUnhandledRejectionHandler);
|
|
3194
|
-
|
|
3218
|
+
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._isListeningForGlobalUnhandledRejections = true;
|
|
3195
3219
|
}
|
|
3196
3220
|
};
|
|
3197
3221
|
},
|
|
@@ -4932,6 +4956,11 @@ var __webpack_modules__ = {
|
|
|
4932
4956
|
mj: () => (
|
|
4933
4957
|
/* binding */
|
|
4934
4958
|
globalTrigger
|
|
4959
|
+
),
|
|
4960
|
+
/* harmony export */
|
|
4961
|
+
tJ: () => (
|
|
4962
|
+
/* binding */
|
|
4963
|
+
globalOn
|
|
4935
4964
|
)
|
|
4936
4965
|
/* harmony export */
|
|
4937
4966
|
});
|
|
@@ -5614,6 +5643,11 @@ var __webpack_modules__ = {
|
|
|
5614
5643
|
D5: () => (
|
|
5615
5644
|
/* binding */
|
|
5616
5645
|
isVisitorTrackingEnabled
|
|
5646
|
+
),
|
|
5647
|
+
/* harmony export */
|
|
5648
|
+
m8: () => (
|
|
5649
|
+
/* binding */
|
|
5650
|
+
isVisitorTrackingDecided
|
|
5617
5651
|
)
|
|
5618
5652
|
/* harmony export */
|
|
5619
5653
|
});
|
|
@@ -5680,7 +5714,7 @@ var __webpack_modules__ = {
|
|
|
5680
5714
|
}
|
|
5681
5715
|
}
|
|
5682
5716
|
};
|
|
5683
|
-
const
|
|
5717
|
+
const getExplicitConsent = () => {
|
|
5684
5718
|
if (typeof _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._visitorTracking === "boolean") {
|
|
5685
5719
|
return _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._visitorTracking;
|
|
5686
5720
|
}
|
|
@@ -5690,6 +5724,9 @@ var __webpack_modules__ = {
|
|
|
5690
5724
|
return Boolean(isEnabledVal);
|
|
5691
5725
|
}
|
|
5692
5726
|
}
|
|
5727
|
+
return void 0;
|
|
5728
|
+
};
|
|
5729
|
+
const getPrivacyModeApiHandles = () => {
|
|
5693
5730
|
const apis = (0, utilities_getApiHandles_ts__WEBPACK_IMPORTED_MODULE_2__.bp)();
|
|
5694
5731
|
if (_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.channel && _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s.channel.all) {
|
|
5695
5732
|
try {
|
|
@@ -5697,12 +5734,30 @@ var __webpack_modules__ = {
|
|
|
5697
5734
|
} catch (e) {
|
|
5698
5735
|
}
|
|
5699
5736
|
}
|
|
5700
|
-
|
|
5737
|
+
return apis;
|
|
5738
|
+
};
|
|
5739
|
+
const isVisitorTrackingEnabled = () => {
|
|
5740
|
+
const explicitConsent = getExplicitConsent();
|
|
5741
|
+
if (explicitConsent != null) {
|
|
5742
|
+
return explicitConsent;
|
|
5743
|
+
}
|
|
5744
|
+
const isPrivacyModeEnabled = getPrivacyModeApiHandles().some((api) => {
|
|
5701
5745
|
const data = api._mediaData || api._galleryData || {};
|
|
5702
5746
|
return data.privacyMode === true;
|
|
5703
5747
|
}) || hasRegisteredPrivacyModeSource();
|
|
5704
5748
|
return !isPrivacyModeEnabled;
|
|
5705
5749
|
};
|
|
5750
|
+
const isVisitorTrackingDecided = () => {
|
|
5751
|
+
if (getExplicitConsent() != null) {
|
|
5752
|
+
return true;
|
|
5753
|
+
}
|
|
5754
|
+
if (hasAnyRegisteredPrivacyModeSource()) {
|
|
5755
|
+
return true;
|
|
5756
|
+
}
|
|
5757
|
+
return getPrivacyModeApiHandles().some((api) => {
|
|
5758
|
+
return api != null && api !== "removed" && (api._mediaData != null || api._galleryData != null);
|
|
5759
|
+
});
|
|
5760
|
+
};
|
|
5706
5761
|
const registerPrivacyModeSource = (key, privacyMode) => {
|
|
5707
5762
|
Wistia._privacyModeSources ??= {};
|
|
5708
5763
|
Wistia._privacyModeSources[key] = privacyMode === true;
|
|
@@ -5713,6 +5768,7 @@ var __webpack_modules__ = {
|
|
|
5713
5768
|
}
|
|
5714
5769
|
};
|
|
5715
5770
|
const hasRegisteredPrivacyModeSource = () => Object.values(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._privacyModeSources || {}).some(Boolean);
|
|
5771
|
+
const hasAnyRegisteredPrivacyModeSource = () => Object.keys(_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_3__2.s._privacyModeSources || {}).length > 0;
|
|
5716
5772
|
},
|
|
5717
5773
|
/***/
|
|
5718
5774
|
4989(__unused_webpack_module, __webpack_exports__3, __webpack_require__3) {
|
|
@@ -7122,8 +7178,8 @@ var __webpack_modules__ = {
|
|
|
7122
7178
|
const PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7123
7179
|
const PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
7124
7180
|
const SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7125
|
-
const TAGGED_VERSION = "0.7.
|
|
7126
|
-
const CURRENT_SHA = "
|
|
7181
|
+
const TAGGED_VERSION = "0.7.28";
|
|
7182
|
+
const CURRENT_SHA = "987326165f6b8d582037859d9f76ba214d7595ff";
|
|
7127
7183
|
const DEFAULT_PROTOCOL = (() => {
|
|
7128
7184
|
if (typeof window !== "undefined" && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.location) {
|
|
7129
7185
|
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.
|
|
3
|
+
"version": "0.7.28",
|
|
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.28"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">=18.0.0 <20.0.0",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/core": "^8.0.1",
|
|
57
|
-
"@babel/preset-env": "^8.0.
|
|
57
|
+
"@babel/preset-env": "^8.0.7",
|
|
58
58
|
"@babel/preset-react": "^8.0.1",
|
|
59
59
|
"@babel/preset-typescript": "^8.0.1",
|
|
60
60
|
"@types/react": "^19.3.0",
|
|
61
61
|
"babel-plugin-transform-object-hasown": "^1.1.0",
|
|
62
62
|
"esbuild": "^0.28.1",
|
|
63
63
|
"npm-run-all": "^4.1.5",
|
|
64
|
-
"react": "^19.3.
|
|
64
|
+
"react": "^19.3.1",
|
|
65
65
|
"read-package-json": "^7.0.1",
|
|
66
66
|
"typescript": "5.9.3",
|
|
67
67
|
"zx": "^8.8.5"
|