@wistia/wistia-player 0.0.0-alpha.21 → 0.0.0-alpha.24
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/react/WistiaPlayer.mjs +1 -1
- package/dist/react/{WistiaPlayerWrapper-ZWRGDVQY.mjs → WistiaPlayerWrapper-WFORPVUY.mjs} +1 -1
- package/dist/react/{wistia-player-DCOCSTNW.mjs → wistia-player-V2G7W56G.mjs} +37 -23
- package/dist/types/dist/wistia-player.d.ts.map +1 -1
- package/dist/wistia-player.js +41 -31
- package/dist/wistia-player.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import { forwardRef, Suspense, lazy } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
var WistiaPlayerWrapper = lazy(
|
|
9
|
-
async () => import("./WistiaPlayerWrapper-
|
|
9
|
+
async () => import("./WistiaPlayerWrapper-WFORPVUY.mjs").then((module) => ({ default: module.WistiaPlayerWrapper }))
|
|
10
10
|
);
|
|
11
11
|
var WistiaPlayer = forwardRef((props, ref) => {
|
|
12
12
|
const { aspect, embedHost, mediaId, style } = props;
|
|
@@ -28,7 +28,7 @@ var WistiaPlayerWrapper = forwardRef((props, ref) => {
|
|
|
28
28
|
setSwatchAspectRatio(ratio);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
void import("./wistia-player-
|
|
31
|
+
void import("./wistia-player-V2G7W56G.mjs").then(() => {
|
|
32
32
|
setIsWistiaPlayerDefined(true);
|
|
33
33
|
});
|
|
34
34
|
}, []);
|
|
@@ -10538,7 +10538,7 @@ var __webpack_modules__ = {
|
|
|
10538
10538
|
case 0:
|
|
10539
10539
|
options = _args.length > 1 && _args[1] !== void 0 ? _args[1] : {};
|
|
10540
10540
|
host = (_options$host = options.host) !== null && _options$host !== void 0 ? _options$host : (0, _hosts_js__WEBPACK_IMPORTED_MODULE_0__.eV1HostWithPort)();
|
|
10541
|
-
taggedVersion = "0.0.0-alpha.
|
|
10541
|
+
taggedVersion = "0.0.0-alpha.24";
|
|
10542
10542
|
if (!(taggedVersion !== "" && taggedVersion.length > 0 && options.mediaData !== true)) {
|
|
10543
10543
|
_context.next = 5;
|
|
10544
10544
|
break;
|
|
@@ -15484,7 +15484,7 @@ var __webpack_modules__ = {
|
|
|
15484
15484
|
if (this.isValidKey(this._eventKey)) {
|
|
15485
15485
|
return this._eventKey;
|
|
15486
15486
|
}
|
|
15487
|
-
this._eventKey = uniqId("
|
|
15487
|
+
this._eventKey = uniqId("b2cd030dfe65c923e594d550dd834e35".substring(0, 7) + "_");
|
|
15488
15488
|
this.publicApi.trigger("eventkeychange", this._eventKey);
|
|
15489
15489
|
return this._eventKey;
|
|
15490
15490
|
};
|
|
@@ -15723,7 +15723,7 @@ var __webpack_modules__ = {
|
|
|
15723
15723
|
var first = (0, _util_getOrSetIsFirst_js__WEBPACK_IMPORTED_MODULE_3__.Y)(_this.hashedId, _this.SCOPE, "load");
|
|
15724
15724
|
_classPrivateFieldSet(_this, _playSession, _ds_index_js__WEBPACK_IMPORTED_MODULE_2__.L.load(_classPrivateFieldGet(_this, _clockStart), {
|
|
15725
15725
|
visitor_key: _classPrivateFieldGet(_this, _api).visitorKey(),
|
|
15726
|
-
session_key: (0, utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_5__.f)("".concat("
|
|
15726
|
+
session_key: (0, utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_5__.f)("".concat("b2cd030dfe65c923e594d550dd834e35".substring(0, 7), "_")),
|
|
15727
15727
|
embed_url: _classPrivateFieldGet(_this, _api)._attrs.pageUrl,
|
|
15728
15728
|
referrer_url: _classPrivateFieldGet(_this, _api)._attrs.referrerUrl,
|
|
15729
15729
|
account_id: mediaData.accountId,
|
|
@@ -20099,7 +20099,7 @@ var __webpack_modules__ = {
|
|
|
20099
20099
|
}, {
|
|
20100
20100
|
key: "generate",
|
|
20101
20101
|
value: function generate() {
|
|
20102
|
-
return (0, utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_3__.f)("".concat("
|
|
20102
|
+
return (0, utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_3__.f)("".concat("b2cd030dfe65c923e594d550dd834e35".substring(0, 7), "_"));
|
|
20103
20103
|
}
|
|
20104
20104
|
}]);
|
|
20105
20105
|
return VisitorKey;
|
|
@@ -39379,6 +39379,15 @@ var __webpack_modules__ = {
|
|
|
39379
39379
|
};
|
|
39380
39380
|
return true;
|
|
39381
39381
|
}
|
|
39382
|
+
var allowHls = shouldServeHls(context, mediaData, embedOptions);
|
|
39383
|
+
if (mediaData.protected && allowHls === false) {
|
|
39384
|
+
embedOptions.notPlayableOptions = {
|
|
39385
|
+
fadeIn: false,
|
|
39386
|
+
message: "This video is not playable.",
|
|
39387
|
+
shouldRefresh: false
|
|
39388
|
+
};
|
|
39389
|
+
return true;
|
|
39390
|
+
}
|
|
39382
39391
|
return assets.length === 0 || assets.length === 1 && assets[0].type === "original" || assetsArentReady || (0, _assets_js__WEBPACK_IMPORTED_MODULE_7__.nonfailedPublicOver400)(assets).length > 0 && (0, _assets_js__WEBPACK_IMPORTED_MODULE_7__.readyPublicOver400)(assets).length === 0 || isTwoStrokeVideo(mediaData) && isNotPlayable2(context, mediaData.secondaryMediaData);
|
|
39383
39392
|
};
|
|
39384
39393
|
var isPasswordProtected = function isPasswordProtected2(context, embedOptions) {
|
|
@@ -41395,7 +41404,7 @@ var __webpack_modules__ = {
|
|
|
41395
41404
|
/* harmony export */
|
|
41396
41405
|
});
|
|
41397
41406
|
var runScript = function runScript2(src2, timeout) {
|
|
41398
|
-
var taggedVersion = "0.0.0-alpha.
|
|
41407
|
+
var taggedVersion = "0.0.0-alpha.24";
|
|
41399
41408
|
return new Promise(function(resolve, reject) {
|
|
41400
41409
|
if (timeout == null) {
|
|
41401
41410
|
timeout = 8e3;
|
|
@@ -45989,7 +45998,7 @@ var __webpack_exports__2 = {};
|
|
|
45989
45998
|
}, {
|
|
45990
45999
|
key: "connectedCallback",
|
|
45991
46000
|
value: function connectedCallback() {
|
|
45992
|
-
var _window$Wistia, _window$wistiaOptions,
|
|
46001
|
+
var _window$Wistia, _window$wistiaOptions, _this6 = this;
|
|
45993
46002
|
if (_classPrivateFieldGet(this, _hasElementConnectedToDOM)) {
|
|
45994
46003
|
return;
|
|
45995
46004
|
}
|
|
@@ -46009,13 +46018,8 @@ var __webpack_exports__2 = {};
|
|
|
46009
46018
|
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
46010
46019
|
container: this
|
|
46011
46020
|
});
|
|
46012
|
-
} else if ((_window$Wistia2 = window.Wistia) !== null && _window$Wistia2 !== void 0 && (_window$Wistia2$_inli = _window$Wistia2._inlineMediaData) !== null && _window$Wistia2$_inli !== void 0 && _window$Wistia2$_inli[this.mediaId]) {
|
|
46013
|
-
this.uniqueId = _classPrivateMethodGet(this, _generateUniqueId, _generateUniqueId2).call(this, mediaId);
|
|
46014
|
-
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
46015
|
-
mediaData: _classPrivateFieldGet(this, _mediaData),
|
|
46016
|
-
container: this.uniqueId
|
|
46017
|
-
});
|
|
46018
46021
|
} else {
|
|
46022
|
+
var _window$Wistia2, _window$Wistia2$_inli;
|
|
46019
46023
|
_classPrivateFieldGet(this, _logger).info("initialize embed");
|
|
46020
46024
|
this.uniqueId = _classPrivateMethodGet(this, _generateUniqueId, _generateUniqueId2).call(this, mediaId);
|
|
46021
46025
|
_classPrivateMethodGet(this, _runMethodsFromAttributes, _runMethodsFromAttributes2).call(this);
|
|
@@ -46024,19 +46028,29 @@ var __webpack_exports__2 = {};
|
|
|
46024
46028
|
if (this.embedHost !== null) {
|
|
46025
46029
|
options.host = this.embedHost;
|
|
46026
46030
|
}
|
|
46027
|
-
|
|
46028
|
-
|
|
46029
|
-
|
|
46030
|
-
_classPrivateMethodGet(_this6, _setEmbedOptions, _setEmbedOptions2).call(_this6, {
|
|
46031
|
-
videoFoam: !(_this6.style.width || _this6.style.height)
|
|
46031
|
+
if ((_window$Wistia2 = window.Wistia) !== null && _window$Wistia2 !== void 0 && (_window$Wistia2$_inli = _window$Wistia2._inlineMediaData) !== null && _window$Wistia2$_inli !== void 0 && _window$Wistia2$_inli[this.mediaId]) {
|
|
46032
|
+
_classPrivateMethodGet(this, _setEmbedOptions, _setEmbedOptions2).call(this, {
|
|
46033
|
+
videoFoam: !(this.style.width || this.style.height)
|
|
46032
46034
|
});
|
|
46033
|
-
_classPrivateMethodGet(
|
|
46034
|
-
|
|
46035
|
-
|
|
46035
|
+
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
46036
|
+
mediaData: _classPrivateFieldGet(this, _mediaData),
|
|
46037
|
+
container: this.uniqueId
|
|
46036
46038
|
});
|
|
46037
|
-
}
|
|
46038
|
-
|
|
46039
|
-
|
|
46039
|
+
} else {
|
|
46040
|
+
this.importMediaData(mediaId, options).then(function(module) {
|
|
46041
|
+
var mediaData = module.mediaData;
|
|
46042
|
+
_classPrivateMethodGet(_this6, _setMediaData, _setMediaData2).call(_this6, mediaData);
|
|
46043
|
+
_classPrivateMethodGet(_this6, _setEmbedOptions, _setEmbedOptions2).call(_this6, {
|
|
46044
|
+
videoFoam: !(_this6.style.width || _this6.style.height)
|
|
46045
|
+
});
|
|
46046
|
+
_classPrivateMethodGet(_this6, _initPublicApi, _initPublicApi2).call(_this6, mediaId, {
|
|
46047
|
+
container: _this6.uniqueId,
|
|
46048
|
+
mediaData: _classPrivateFieldGet(_this6, _mediaData)
|
|
46049
|
+
});
|
|
46050
|
+
}).catch(function(error) {
|
|
46051
|
+
throw new Error(error.message);
|
|
46052
|
+
});
|
|
46053
|
+
}
|
|
46040
46054
|
}
|
|
46041
46055
|
if (this.shadowRoot) {
|
|
46042
46056
|
this.shadowRoot.appendChild(_classPrivateMethodGet(this, _createEmbedTemplate, _createEmbedTemplate2).call(this).content.cloneNode(true));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wistia-player.d.ts","sourceRoot":"","sources":["../../wistia-player.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wistia-player.d.ts","sourceRoot":"","sources":["../../wistia-player.js"],"names":[],"mappings":"AA4rvCA,iDAA4D;AAC5D,wDAAmE"}
|
package/dist/wistia-player.js
CHANGED
|
@@ -8410,7 +8410,7 @@ var dynamicImport = /*#__PURE__*/function () {
|
|
|
8410
8410
|
case 0:
|
|
8411
8411
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
8412
8412
|
host = (_options$host = options.host) !== null && _options$host !== void 0 ? _options$host : (0,_hosts_js__WEBPACK_IMPORTED_MODULE_0__.eV1HostWithPort)(); // @ts-expect-error webpack should resolve this for us
|
|
8413
|
-
taggedVersion = "0.0.0-alpha.
|
|
8413
|
+
taggedVersion = "0.0.0-alpha.24";
|
|
8414
8414
|
if (!(taggedVersion !== '' && taggedVersion.length > 0 && options.mediaData !== true)) {
|
|
8415
8415
|
_context.next = 5;
|
|
8416
8416
|
break;
|
|
@@ -13800,7 +13800,7 @@ VideoTrackerSession = (function() {
|
|
|
13800
13800
|
if (this.isValidKey(this._eventKey)) {
|
|
13801
13801
|
return this._eventKey;
|
|
13802
13802
|
}
|
|
13803
|
-
this._eventKey = uniqId(("
|
|
13803
|
+
this._eventKey = uniqId(("b2cd030dfe65c923e594d550dd834e35".substring(0, 7)) + "_");
|
|
13804
13804
|
this.publicApi.trigger('eventkeychange', this._eventKey);
|
|
13805
13805
|
return this._eventKey;
|
|
13806
13806
|
};
|
|
@@ -13915,7 +13915,7 @@ var LiveMediaTracker = /*#__PURE__*/function () {
|
|
|
13915
13915
|
var first = (0,_util_getOrSetIsFirst_js__WEBPACK_IMPORTED_MODULE_3__/* .getOrSetIsFirst */ .Y)(_this.hashedId, _this.SCOPE, 'load');
|
|
13916
13916
|
_classPrivateFieldSet(_this, _playSession, _ds_index_js__WEBPACK_IMPORTED_MODULE_2__/* .PlaySession */ .L.load(_classPrivateFieldGet(_this, _clockStart), {
|
|
13917
13917
|
visitor_key: _classPrivateFieldGet(_this, _api).visitorKey(),
|
|
13918
|
-
session_key: (0,utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_5__/* .uniqId */ .f)("".concat("
|
|
13918
|
+
session_key: (0,utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_5__/* .uniqId */ .f)("".concat("b2cd030dfe65c923e594d550dd834e35".substring(0, 7), "_")),
|
|
13919
13919
|
embed_url: _classPrivateFieldGet(_this, _api)._attrs.pageUrl,
|
|
13920
13920
|
referrer_url: _classPrivateFieldGet(_this, _api)._attrs.referrerUrl,
|
|
13921
13921
|
account_id: mediaData.accountId,
|
|
@@ -18140,7 +18140,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
18140
18140
|
}, {
|
|
18141
18141
|
key: "generate",
|
|
18142
18142
|
value: function generate() {
|
|
18143
|
-
return (0,utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_3__/* .uniqId */ .f)("".concat("
|
|
18143
|
+
return (0,utilities_uniqId_js__WEBPACK_IMPORTED_MODULE_3__/* .uniqId */ .f)("".concat("b2cd030dfe65c923e594d550dd834e35".substring(0, 7), "_"));
|
|
18144
18144
|
}
|
|
18145
18145
|
}]);
|
|
18146
18146
|
return VisitorKey;
|
|
@@ -33571,6 +33571,8 @@ var choosePlayer = function choosePlayer(context, mediaData, embedOptions) {
|
|
|
33571
33571
|
// 2. DRM-lite customers must include their `authorization` credentials as embedOptions. If we know
|
|
33572
33572
|
// a media is "protected", but there are no authorization credentials for the embed, we can build
|
|
33573
33573
|
// directly into the NotPlayablePlayer state.
|
|
33574
|
+
// 3. DRM-lite customers that either do not have HLS enabled or cannot use HLS
|
|
33575
|
+
// will reach a NOT_PLAYABLE state.
|
|
33574
33576
|
logger.info('return', NOT_PLAYABLE);
|
|
33575
33577
|
return NOT_PLAYABLE;
|
|
33576
33578
|
}
|
|
@@ -33839,6 +33841,15 @@ var isNotPlayable = function isNotPlayable(context, mediaData) {
|
|
|
33839
33841
|
};
|
|
33840
33842
|
return true;
|
|
33841
33843
|
}
|
|
33844
|
+
var allowHls = shouldServeHls(context, mediaData, embedOptions);
|
|
33845
|
+
if (mediaData.protected && allowHls === false) {
|
|
33846
|
+
embedOptions.notPlayableOptions = {
|
|
33847
|
+
fadeIn: false,
|
|
33848
|
+
message: 'This video is not playable.',
|
|
33849
|
+
shouldRefresh: false
|
|
33850
|
+
};
|
|
33851
|
+
return true;
|
|
33852
|
+
}
|
|
33842
33853
|
return assets.length === 0 || assets.length === 1 && assets[0].type === 'original' || assetsArentReady || (0,_assets_js__WEBPACK_IMPORTED_MODULE_7__.nonfailedPublicOver400)(assets).length > 0 && (0,_assets_js__WEBPACK_IMPORTED_MODULE_7__.readyPublicOver400)(assets).length === 0 || isTwoStrokeVideo(mediaData) && isNotPlayable(context, mediaData.secondaryMediaData);
|
|
33843
33854
|
};
|
|
33844
33855
|
var isPasswordProtected = function isPasswordProtected(context, embedOptions) {
|
|
@@ -35684,7 +35695,7 @@ var root = rootTest;
|
|
|
35684
35695
|
// fire and forget.
|
|
35685
35696
|
// run a script and immediately remove it from the DOM.
|
|
35686
35697
|
var runScript = function runScript(src, timeout) {
|
|
35687
|
-
var taggedVersion = "0.0.0-alpha.
|
|
35698
|
+
var taggedVersion = "0.0.0-alpha.24";
|
|
35688
35699
|
return new Promise(function (resolve, reject) {
|
|
35689
35700
|
if (timeout == null) {
|
|
35690
35701
|
timeout = 8000;
|
|
@@ -40305,8 +40316,6 @@ var WistiaPlayer = /*#__PURE__*/function (_HTMLElement) {
|
|
|
40305
40316
|
value: function connectedCallback() {
|
|
40306
40317
|
var _window$Wistia,
|
|
40307
40318
|
_window$wistiaOptions,
|
|
40308
|
-
_window$Wistia2,
|
|
40309
|
-
_window$Wistia2$_inli,
|
|
40310
40319
|
_this6 = this;
|
|
40311
40320
|
if (_classPrivateFieldGet(this, _hasElementConnectedToDOM)) {
|
|
40312
40321
|
return;
|
|
@@ -40336,18 +40345,8 @@ var WistiaPlayer = /*#__PURE__*/function (_HTMLElement) {
|
|
|
40336
40345
|
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
40337
40346
|
container: this
|
|
40338
40347
|
});
|
|
40339
|
-
}
|
|
40340
|
-
|
|
40341
|
-
else if ((_window$Wistia2 = window.Wistia) !== null && _window$Wistia2 !== void 0 && (_window$Wistia2$_inli = _window$Wistia2._inlineMediaData) !== null && _window$Wistia2$_inli !== void 0 && _window$Wistia2$_inli[this.mediaId]) {
|
|
40342
|
-
this.uniqueId = _classPrivateMethodGet(this, _generateUniqueId, _generateUniqueId2).call(this, mediaId);
|
|
40343
|
-
// Create and save the public api instance
|
|
40344
|
-
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
40345
|
-
mediaData: _classPrivateFieldGet(this, _mediaData),
|
|
40346
|
-
container: this.uniqueId
|
|
40347
|
-
});
|
|
40348
|
-
}
|
|
40349
|
-
// fetch mediaData and then init the public api
|
|
40350
|
-
else {
|
|
40348
|
+
} else {
|
|
40349
|
+
var _window$Wistia2, _window$Wistia2$_inli;
|
|
40351
40350
|
_classPrivateFieldGet(this, _logger).info('initialize embed');
|
|
40352
40351
|
|
|
40353
40352
|
// Generate a unique id for this embed in case there are
|
|
@@ -40365,21 +40364,32 @@ var WistiaPlayer = /*#__PURE__*/function (_HTMLElement) {
|
|
|
40365
40364
|
if (this.embedHost !== null) {
|
|
40366
40365
|
options.host = this.embedHost;
|
|
40367
40366
|
}
|
|
40368
|
-
|
|
40369
|
-
|
|
40370
|
-
|
|
40371
|
-
_classPrivateMethodGet(_this6, _setEmbedOptions, _setEmbedOptions2).call(_this6, {
|
|
40372
|
-
videoFoam: !(_this6.style.width || _this6.style.height)
|
|
40367
|
+
if ((_window$Wistia2 = window.Wistia) !== null && _window$Wistia2 !== void 0 && (_window$Wistia2$_inli = _window$Wistia2._inlineMediaData) !== null && _window$Wistia2$_inli !== void 0 && _window$Wistia2$_inli[this.mediaId]) {
|
|
40368
|
+
_classPrivateMethodGet(this, _setEmbedOptions, _setEmbedOptions2).call(this, {
|
|
40369
|
+
videoFoam: !(this.style.width || this.style.height)
|
|
40373
40370
|
});
|
|
40374
|
-
|
|
40375
40371
|
// Create and save the public api instance
|
|
40376
|
-
_classPrivateMethodGet(
|
|
40377
|
-
|
|
40378
|
-
|
|
40372
|
+
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
40373
|
+
mediaData: _classPrivateFieldGet(this, _mediaData),
|
|
40374
|
+
container: this.uniqueId
|
|
40379
40375
|
});
|
|
40380
|
-
}
|
|
40381
|
-
|
|
40382
|
-
|
|
40376
|
+
} else {
|
|
40377
|
+
this.importMediaData(mediaId, options).then(function (module) {
|
|
40378
|
+
var mediaData = module.mediaData;
|
|
40379
|
+
_classPrivateMethodGet(_this6, _setMediaData, _setMediaData2).call(_this6, mediaData);
|
|
40380
|
+
_classPrivateMethodGet(_this6, _setEmbedOptions, _setEmbedOptions2).call(_this6, {
|
|
40381
|
+
videoFoam: !(_this6.style.width || _this6.style.height)
|
|
40382
|
+
});
|
|
40383
|
+
|
|
40384
|
+
// Create and save the public api instance
|
|
40385
|
+
_classPrivateMethodGet(_this6, _initPublicApi, _initPublicApi2).call(_this6, mediaId, {
|
|
40386
|
+
container: _this6.uniqueId,
|
|
40387
|
+
mediaData: _classPrivateFieldGet(_this6, _mediaData)
|
|
40388
|
+
});
|
|
40389
|
+
}).catch(function (error) {
|
|
40390
|
+
throw new Error(error.message);
|
|
40391
|
+
});
|
|
40392
|
+
}
|
|
40383
40393
|
}
|
|
40384
40394
|
|
|
40385
40395
|
// Add our responsive embed template to the shadow DOM
|