@wistia/wistia-player 0.0.0-alpha.21 → 0.0.0-alpha.23
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-LZOY5CC3.mjs} +1 -1
- package/dist/react/{wistia-player-DCOCSTNW.mjs → wistia-player-2NJSHS63.mjs} +17 -5
- package/dist/types/dist/wistia-player.d.ts.map +1 -1
- package/dist/wistia-player.js +19 -5
- 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-LZOY5CC3.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-2NJSHS63.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.23";
|
|
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("46fd4deaf081a6fa44c254525abfcb33".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("46fd4deaf081a6fa44c254525abfcb33".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("46fd4deaf081a6fa44c254525abfcb33".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.23";
|
|
41399
41408
|
return new Promise(function(resolve, reject) {
|
|
41400
41409
|
if (timeout == null) {
|
|
41401
41410
|
timeout = 8e3;
|
|
@@ -46011,6 +46020,9 @@ var __webpack_exports__2 = {};
|
|
|
46011
46020
|
});
|
|
46012
46021
|
} 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
46022
|
this.uniqueId = _classPrivateMethodGet(this, _generateUniqueId, _generateUniqueId2).call(this, mediaId);
|
|
46023
|
+
_classPrivateMethodGet(this, _setEmbedOptions, _setEmbedOptions2).call(this, {
|
|
46024
|
+
videoFoam: !(this.style.width || this.style.height)
|
|
46025
|
+
});
|
|
46014
46026
|
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
46015
46027
|
mediaData: _classPrivateFieldGet(this, _mediaData),
|
|
46016
46028
|
container: this.uniqueId
|
|
@@ -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":"AAgsvCA,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.23";
|
|
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(("46fd4deaf081a6fa44c254525abfcb33".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("46fd4deaf081a6fa44c254525abfcb33".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("46fd4deaf081a6fa44c254525abfcb33".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.23";
|
|
35688
35699
|
return new Promise(function (resolve, reject) {
|
|
35689
35700
|
if (timeout == null) {
|
|
35690
35701
|
timeout = 8000;
|
|
@@ -40340,6 +40351,9 @@ var WistiaPlayer = /*#__PURE__*/function (_HTMLElement) {
|
|
|
40340
40351
|
// if inline mediaData has been provided, use that instead of making a network request
|
|
40341
40352
|
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
40353
|
this.uniqueId = _classPrivateMethodGet(this, _generateUniqueId, _generateUniqueId2).call(this, mediaId);
|
|
40354
|
+
_classPrivateMethodGet(this, _setEmbedOptions, _setEmbedOptions2).call(this, {
|
|
40355
|
+
videoFoam: !(this.style.width || this.style.height)
|
|
40356
|
+
});
|
|
40343
40357
|
// Create and save the public api instance
|
|
40344
40358
|
_classPrivateMethodGet(this, _initPublicApi, _initPublicApi2).call(this, mediaId, {
|
|
40345
40359
|
mediaData: _classPrivateFieldGet(this, _mediaData),
|