@wistia/wistia-player 0.6.13 → 0.6.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamicImport.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/dynamicImport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynamicImport.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/dynamicImport.ts"],"names":[],"mappings":"AA8BA,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AACF,eAAO,MAAM,aAAa,GACxB,UAAU,MAAM,EAChB,UAAS,oBAAyB,KACjC,OAAO,CAAC,OAAO,CAgCjB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SentryProductType = 'carousel' | 'channel' | 'form' | 'globalListener' | 'mediaPlayback' | 'other' | 'player' | 'playlist' | 'relatedMedia' | 'transcript';
|
|
1
|
+
export type SentryProductType = 'carousel' | 'channel' | 'dynamicImport' | 'form' | 'globalListener' | 'mediaPlayback' | 'other' | 'player' | 'playlist' | 'relatedMedia' | 'transcript';
|
|
2
2
|
export declare const initializeSentry: () => void;
|
|
3
3
|
export declare const reportError: (product: SentryProductType, error: Error, details?: Record<string, string>) => void;
|
|
4
4
|
export declare const listenForGlobalErrors: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentryUtils.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/sentryUtils.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,SAAS,GACT,MAAM,GACN,gBAAgB,GAChB,eAAe,GACf,OAAO,GACP,QAAQ,GACR,UAAU,GACV,cAAc,GACd,YAAY,CAAC;AA4DjB,eAAO,MAAM,gBAAgB,QAAO,IAwBnC,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,SAAS,iBAAiB,EAC1B,OAAO,KAAK,EACZ,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC/B,IAoDF,CAAC;AAgCF,eAAO,MAAM,qBAAqB,QAAO,IAKxC,CAAC;AAEF,eAAO,MAAM,kCAAkC,QAAO,IAKrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"sentryUtils.d.ts","sourceRoot":"","sources":["../../../../../src/utilities/sentryUtils.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,SAAS,GACT,eAAe,GACf,MAAM,GACN,gBAAgB,GAChB,eAAe,GACf,OAAO,GACP,QAAQ,GACR,UAAU,GACV,cAAc,GACd,YAAY,CAAC;AA4DjB,eAAO,MAAM,gBAAgB,QAAO,IAwBnC,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,SAAS,iBAAiB,EAC1B,OAAO,KAAK,EACZ,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC/B,IAoDF,CAAC;AAgCF,eAAO,MAAM,qBAAqB,QAAO,IAKxC,CAAC;AAEF,eAAO,MAAM,kCAAkC,QAAO,IAKrD,CAAC"}
|
package/dist/wistia-player.js
CHANGED
|
@@ -7173,8 +7173,8 @@ var PROD_EMBED_HOST = 'embed.wistia.com';
|
|
|
7173
7173
|
var PROD_SSL_EMBED_HOST = 'embed-ssl.wistia.com';
|
|
7174
7174
|
var PROD_FASTLY_SSL_HOST = 'embed-fastly.wistia.com';
|
|
7175
7175
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
7176
|
-
var TAGGED_VERSION = "0.6.
|
|
7177
|
-
var CURRENT_SHA = "
|
|
7176
|
+
var TAGGED_VERSION = "0.6.14" || 0;
|
|
7177
|
+
var CURRENT_SHA = "2907a84f6a087c68126f45fcd3389ec88ae9d204" || 0;
|
|
7178
7178
|
var DEFAULT_PROTOCOL = function () {
|
|
7179
7179
|
if (typeof window !== 'undefined' && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z === window && utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location) {
|
|
7180
7180
|
return utilities_root_js__WEBPACK_IMPORTED_MODULE_0__/* .root */ .z.location.protocol;
|
|
@@ -8281,6 +8281,8 @@ var BigPlayButton = function BigPlayButton(_ref) {
|
|
|
8281
8281
|
/* harmony export */ $: () => (/* binding */ dynamicImport)
|
|
8282
8282
|
/* harmony export */ });
|
|
8283
8283
|
/* harmony import */ var _hosts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5857);
|
|
8284
|
+
/* harmony import */ var _sentryUtils_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2621);
|
|
8285
|
+
/* harmony import */ var _simpleMetrics_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1161);
|
|
8284
8286
|
var _objectHasOwn = function (object, property) {
|
|
8285
8287
|
if (typeof object === 'undefined' || object === null) {
|
|
8286
8288
|
throw new TypeError('Cannot convert undefined or null to object');
|
|
@@ -8292,38 +8294,114 @@ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try {
|
|
|
8292
8294
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
8293
8295
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
8294
8296
|
|
|
8297
|
+
|
|
8298
|
+
|
|
8299
|
+
var MAX_RETRIES = 3;
|
|
8300
|
+
var _importWithRetry = /*#__PURE__*/function () {
|
|
8301
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(baseUrl) {
|
|
8302
|
+
var retries,
|
|
8303
|
+
delay,
|
|
8304
|
+
attempt,
|
|
8305
|
+
url,
|
|
8306
|
+
result,
|
|
8307
|
+
_args = arguments,
|
|
8308
|
+
_t;
|
|
8309
|
+
return _regenerator().w(function (_context) {
|
|
8310
|
+
while (1) switch (_context.p = _context.n) {
|
|
8311
|
+
case 0:
|
|
8312
|
+
retries = _args.length > 1 && _args[1] !== undefined ? _args[1] : MAX_RETRIES;
|
|
8313
|
+
delay = _args.length > 2 && _args[2] !== undefined ? _args[2] : 200;
|
|
8314
|
+
attempt = _args.length > 3 && _args[3] !== undefined ? _args[3] : 0;
|
|
8315
|
+
// Append a cache-busting query parameter to avoid Safari's caching of failed imports
|
|
8316
|
+
url = attempt === 0 ? baseUrl : "".concat(baseUrl).concat(baseUrl.includes('?') ? '&' : '?', "retry=").concat(attempt);
|
|
8317
|
+
_context.p = 1;
|
|
8318
|
+
_context.n = 2;
|
|
8319
|
+
return import(/* webpackIgnore: true */url);
|
|
8320
|
+
case 2:
|
|
8321
|
+
result = _context.v;
|
|
8322
|
+
if (attempt > 0) {
|
|
8323
|
+
(0,_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_2__/* .countMetric */ .WO)('dynamic-import/retry-success', 1, {
|
|
8324
|
+
attempt: String(attempt),
|
|
8325
|
+
url: baseUrl
|
|
8326
|
+
});
|
|
8327
|
+
}
|
|
8328
|
+
return _context.a(2, result);
|
|
8329
|
+
case 3:
|
|
8330
|
+
_context.p = 3;
|
|
8331
|
+
_t = _context.v;
|
|
8332
|
+
if (!(retries <= 0)) {
|
|
8333
|
+
_context.n = 4;
|
|
8334
|
+
break;
|
|
8335
|
+
}
|
|
8336
|
+
throw _t;
|
|
8337
|
+
case 4:
|
|
8338
|
+
_context.n = 5;
|
|
8339
|
+
return new Promise(function (resolve) {
|
|
8340
|
+
setTimeout(resolve, delay);
|
|
8341
|
+
});
|
|
8342
|
+
case 5:
|
|
8343
|
+
return _context.a(2, _importWithRetry(baseUrl, retries - 1, delay, attempt + 1));
|
|
8344
|
+
}
|
|
8345
|
+
}, _callee, null, [[1, 3]]);
|
|
8346
|
+
}));
|
|
8347
|
+
return function importWithRetry(_x) {
|
|
8348
|
+
return _ref.apply(this, arguments);
|
|
8349
|
+
};
|
|
8350
|
+
}();
|
|
8295
8351
|
var dynamicImport = /*#__PURE__*/function () {
|
|
8296
|
-
var
|
|
8352
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(filePath) {
|
|
8297
8353
|
var options,
|
|
8298
8354
|
host,
|
|
8299
8355
|
taggedVersion,
|
|
8300
8356
|
currentSha,
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8357
|
+
getVersionSuffix,
|
|
8358
|
+
url,
|
|
8359
|
+
reportedError,
|
|
8360
|
+
_args2 = arguments,
|
|
8361
|
+
_t2;
|
|
8362
|
+
return _regenerator().w(function (_context2) {
|
|
8363
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
8304
8364
|
case 0:
|
|
8305
|
-
options =
|
|
8365
|
+
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
|
|
8306
8366
|
host = _objectHasOwn(options, 'host') && options.host != null ? options.host : (0,_hosts_js__WEBPACK_IMPORTED_MODULE_0__/* .eV1HostWithPort */ .aY)();
|
|
8307
8367
|
taggedVersion = _hosts_js__WEBPACK_IMPORTED_MODULE_0__/* .TAGGED_VERSION */ .U4;
|
|
8308
8368
|
currentSha = _hosts_js__WEBPACK_IMPORTED_MODULE_0__/* .CURRENT_SHA */ .lR;
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8369
|
+
getVersionSuffix = function getVersionSuffix() {
|
|
8370
|
+
if (taggedVersion !== '' && taggedVersion.length > 0 && options.mediaData !== true) {
|
|
8371
|
+
return "@".concat(taggedVersion);
|
|
8372
|
+
}
|
|
8373
|
+
// If there is no tagged version, we can fall back to the current SHA.
|
|
8374
|
+
// This mechanism keeps a cached script from fetching a newer, mismatched version of an imported bundle.
|
|
8375
|
+
if (currentSha !== '' && currentSha.length > 0 && options.mediaData !== true) {
|
|
8376
|
+
return "@".concat(currentSha);
|
|
8377
|
+
}
|
|
8378
|
+
return '';
|
|
8379
|
+
};
|
|
8380
|
+
url = "".concat((0,_hosts_js__WEBPACK_IMPORTED_MODULE_0__/* .eV1Protocol */ .v9)(), "//").concat(host, "/").concat(filePath).concat(getVersionSuffix());
|
|
8381
|
+
_context2.p = 1;
|
|
8382
|
+
_context2.n = 2;
|
|
8383
|
+
return _importWithRetry(url);
|
|
8320
8384
|
case 2:
|
|
8321
|
-
return
|
|
8385
|
+
return _context2.a(2, _context2.v);
|
|
8386
|
+
case 3:
|
|
8387
|
+
_context2.p = 3;
|
|
8388
|
+
_t2 = _context2.v;
|
|
8389
|
+
reportedError = _t2 instanceof Error ? _t2 : new Error(String(_t2));
|
|
8390
|
+
(0,_sentryUtils_ts__WEBPACK_IMPORTED_MODULE_1__/* .reportError */ .N7)('dynamicImport', reportedError, {
|
|
8391
|
+
url: url
|
|
8392
|
+
});
|
|
8393
|
+
(0,_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_2__/* .countMetric */ .WO)('dynamic-import/failure-after-retry', 1, {
|
|
8394
|
+
attempt: String(MAX_RETRIES),
|
|
8395
|
+
url: url
|
|
8396
|
+
});
|
|
8397
|
+
throw _t2;
|
|
8398
|
+
case 4:
|
|
8399
|
+
return _context2.a(2);
|
|
8322
8400
|
}
|
|
8323
|
-
},
|
|
8401
|
+
}, _callee2, null, [[1, 3]]);
|
|
8324
8402
|
}));
|
|
8325
|
-
return function dynamicImport(
|
|
8326
|
-
return
|
|
8403
|
+
return function dynamicImport(_x2) {
|
|
8404
|
+
return _ref2.apply(this, arguments);
|
|
8327
8405
|
};
|
|
8328
8406
|
}();
|
|
8329
8407
|
|