@wistia/wistia-player-react 0.1.5 → 0.1.6
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/cjs/WistiaPlayer.cjs +164 -138
- package/dist/cjs/types/src/WistiaPlayer.d.ts +1 -2
- package/dist/cjs/types/src/WistiaPlayer.d.ts.map +1 -1
- package/dist/cjs/types/src/WistiaPlayerWrapper.d.ts.map +1 -1
- package/dist/cjs/types/src/utils/camelCaseToKebabCase.d.ts.map +1 -1
- package/dist/cjs/types/src/utils/getMergedEmbedOption.d.ts +3 -1
- package/dist/cjs/types/src/utils/getMergedEmbedOption.d.ts.map +1 -1
- package/dist/cjs/types/src/utils/swatch.d.ts.map +1 -1
- package/dist/cjs/types/types/index.d.ts +1 -1
- package/dist/cjs/types/types/index.d.ts.map +1 -1
- package/dist/mjs/WistiaPlayer.mjs +5 -3
- package/dist/mjs/{WistiaPlayerWrapper-DUCLJBK3.mjs → WistiaPlayerWrapper-TCEKSPEZ.mjs} +12 -6
- package/dist/mjs/{chunk-KUPUTXLJ.mjs → chunk-FSLSW5KG.mjs} +31 -7
- package/dist/mjs/types/src/WistiaPlayer.d.ts +1 -2
- package/dist/mjs/types/src/WistiaPlayer.d.ts.map +1 -1
- package/dist/mjs/types/src/WistiaPlayerWrapper.d.ts.map +1 -1
- package/dist/mjs/types/src/utils/camelCaseToKebabCase.d.ts.map +1 -1
- package/dist/mjs/types/src/utils/getMergedEmbedOption.d.ts +3 -1
- package/dist/mjs/types/src/utils/getMergedEmbedOption.d.ts.map +1 -1
- package/dist/mjs/types/src/utils/swatch.d.ts.map +1 -1
- package/dist/mjs/types/types/index.d.ts +1 -1
- package/dist/mjs/types/types/index.d.ts.map +1 -1
- package/dist/mjs/{wistia-player-HIFG7JJV.mjs → wistia-player-BBRI6UJR.mjs} +85 -92
- package/package.json +4 -3
|
@@ -19,24 +19,40 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
+
// ../../node_modules/@wistia/type-guards/dist/index.mjs
|
|
23
|
+
var FALSY_VALUES, isNull, isUndefined, isNil2, isNotNil, isString, isNumber2, isFunction, isBoolean;
|
|
24
|
+
var init_dist = __esm({
|
|
25
|
+
"../../node_modules/@wistia/type-guards/dist/index.mjs"() {
|
|
26
|
+
FALSY_VALUES = [false, 0, -0, 0n, "", null, void 0, Number.NaN];
|
|
27
|
+
isNull = (value) => value === null;
|
|
28
|
+
isUndefined = (value) => value === void 0;
|
|
29
|
+
isNil2 = (value) => isNull(value) || isUndefined(value);
|
|
30
|
+
isNotNil = (value) => !isNil2(value);
|
|
31
|
+
isString = (value) => typeof value === "string";
|
|
32
|
+
isNumber2 = (value) => typeof value === "number";
|
|
33
|
+
isFunction = (value) => isNotNil(value) && typeof value === "function";
|
|
34
|
+
isBoolean = (value) => isNotNil(value) && typeof value === "boolean";
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
22
38
|
// src/utils/getMergedEmbedOption.ts
|
|
23
|
-
var getMergedEmbedOption;
|
|
39
|
+
var isValidEmbedOption, getMergedEmbedOption;
|
|
24
40
|
var init_getMergedEmbedOption = __esm({
|
|
25
41
|
"src/utils/getMergedEmbedOption.ts"() {
|
|
42
|
+
init_dist();
|
|
43
|
+
isValidEmbedOption = (value) => {
|
|
44
|
+
return isNumber2(value) || isString(value) || isBoolean(value);
|
|
45
|
+
};
|
|
26
46
|
getMergedEmbedOption = (mediaId, optionKey, optionValue) => {
|
|
27
47
|
let finalEmbedOption = optionValue;
|
|
28
48
|
if (typeof window === "undefined") {
|
|
29
49
|
return finalEmbedOption;
|
|
30
50
|
}
|
|
31
|
-
if (window.wistiaOptions?._all
|
|
51
|
+
if (isNotNil(window.wistiaOptions?._all) && isNotNil(window.wistiaOptions._all[optionKey]) && isValidEmbedOption(window.wistiaOptions._all[optionKey])) {
|
|
32
52
|
finalEmbedOption = window.wistiaOptions._all[optionKey];
|
|
33
53
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const mediaIdOptionValue = mediaIdOptions[optionKey];
|
|
37
|
-
if (optionValue !== void 0) {
|
|
38
|
-
finalEmbedOption = mediaIdOptionValue;
|
|
39
|
-
}
|
|
54
|
+
if (isNotNil(window.wistiaOptions?.[mediaId]) && isNotNil(window.wistiaOptions[mediaId]) && isValidEmbedOption(window.wistiaOptions[mediaId][optionKey])) {
|
|
55
|
+
finalEmbedOption = window.wistiaOptions[mediaId][optionKey];
|
|
40
56
|
}
|
|
41
57
|
return finalEmbedOption;
|
|
42
58
|
};
|
|
@@ -738,7 +754,7 @@ function _initPublicApi2() {
|
|
|
738
754
|
return _initPublicApi2.apply(this, arguments);
|
|
739
755
|
}
|
|
740
756
|
function _isPopoverWithThumbnail() {
|
|
741
|
-
return this.wistiaPopover && (this.popoverContent
|
|
757
|
+
return this.wistiaPopover && ((0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_33__.gD)(this.popoverContent) || (0, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_33__.jw)(this.popoverContent) || this.popoverContent === "thumbnail");
|
|
742
758
|
}
|
|
743
759
|
function _maybeInitializeMux() {
|
|
744
760
|
return _maybeInitializeMux2.apply(this, arguments);
|
|
@@ -756,8 +772,8 @@ function _maybeInitializeMux2() {
|
|
|
756
772
|
}
|
|
757
773
|
return _context29.abrupt("return");
|
|
758
774
|
case 2:
|
|
759
|
-
shouldRandomEnableMux = (0,
|
|
760
|
-
shouldEnableMuxForPlayer = (0,
|
|
775
|
+
shouldRandomEnableMux = (0, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_34__.k)(_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_35__._);
|
|
776
|
+
shouldEnableMuxForPlayer = (0, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_35__.J)(_classPrivateFieldGet(_api, this), shouldRandomEnableMux) && (0, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_17__.D5)();
|
|
761
777
|
embedType = this.useWebComponent ? "translated-web-component" : "web-component";
|
|
762
778
|
if (!shouldEnableMuxForPlayer) {
|
|
763
779
|
_context29.next = 11;
|
|
@@ -817,7 +833,7 @@ function _renderEmbedTemplate() {
|
|
|
817
833
|
if (parseFloat(_classPrivateFieldGet(_paddingTop, this)) !== 0 && _classPrivateFieldGet(_paddingTop, this) !== "") {
|
|
818
834
|
swatchHeight = "".concat(parseFloat(_classPrivateFieldGet(_paddingTop, this)), "px");
|
|
819
835
|
}
|
|
820
|
-
var playerBorderRadius = (0,
|
|
836
|
+
var playerBorderRadius = (0, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_36__.JA)({
|
|
821
837
|
playerBorderRadius: this.playerBorderRadius,
|
|
822
838
|
roundedPlayer: this.roundedPlayer
|
|
823
839
|
});
|
|
@@ -994,7 +1010,7 @@ function _updateMediaData(mediaData) {
|
|
|
994
1010
|
_classPrivateFieldSet(_playerType, this, (0, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_13__.$F)(_classPrivateFieldGet(_judyContext, this), _classPrivateFieldGet(_playerData, this).mediaData, _classPrivateFieldGet(_playerData, this).embedOptions));
|
|
995
1011
|
_assertClassBrand(_WistiaPlayer_brand, this, _renderPreloadThumbnail).call(this);
|
|
996
1012
|
}
|
|
997
|
-
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _utilities_gradients_ts__WEBPACK_IMPORTED_MODULE_1__, _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__, _components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_3__, _hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_4__, _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_27__, _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_5__, _appHostname_js__WEBPACK_IMPORTED_MODULE_26__, _utilities_assets_js__WEBPACK_IMPORTED_MODULE_6__,
|
|
1013
|
+
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__2, preact__WEBPACK_IMPORTED_MODULE_0__, _wistia_type_guards__WEBPACK_IMPORTED_MODULE_33__, _utilities_gradients_ts__WEBPACK_IMPORTED_MODULE_1__, _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__, _components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_3__, _hooks_usePlayerData_tsx__WEBPACK_IMPORTED_MODULE_4__, _utilities_constants_ts__WEBPACK_IMPORTED_MODULE_27__, _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_5__, _appHostname_js__WEBPACK_IMPORTED_MODULE_26__, _utilities_assets_js__WEBPACK_IMPORTED_MODULE_6__, _utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_34__, _utilities_detect_js__WEBPACK_IMPORTED_MODULE_7__, _utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__, _utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_9__, _utilities_elem_js__WEBPACK_IMPORTED_MODULE_10__, _utilities_eventConstants_ts__WEBPACK_IMPORTED_MODULE_29__, _utilities_extractEmailFromParams_ts__WEBPACK_IMPORTED_MODULE_11__, _utilities_hosts_js__WEBPACK_IMPORTED_MODULE_12__, _utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_32__, _utilities_judy_js__WEBPACK_IMPORTED_MODULE_13__, _utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_36__, _utilities_runScript_js__WEBPACK_IMPORTED_MODULE_14__, _utilities_seqid_js__WEBPACK_IMPORTED_MODULE_15__, _utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_35__, _utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__, _utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_17__, _utilities_url_js__WEBPACK_IMPORTED_MODULE_18__, _utilities_wistiaLocalStorage_js__WEBPACK_IMPORTED_MODULE_19__, _utilities_wistiaOptions_ts__WEBPACK_IMPORTED_MODULE_20__, _utilities_wistiaQueue_ts__WEBPACK_IMPORTED_MODULE_21__, _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_22__, _utilities_injectJsonLd_js__WEBPACK_IMPORTED_MODULE_23__, _utilities_getInitialMediaData_ts__WEBPACK_IMPORTED_MODULE_24__, _utilities_mediaDataError_ts__WEBPACK_IMPORTED_MODULE_31__, _utilities_remote_data_cache_ts__WEBPACK_IMPORTED_MODULE_25__, _utilities_camelCaseToKebabCase_ts__WEBPACK_IMPORTED_MODULE_30__, _types_gradient_ts__WEBPACK_IMPORTED_MODULE_28__, _WistiaPlayer, requiredAttributes, optionalPublicAttributes, optionalPrivateAttributes, defaultEmbedOptions, getSwatchUrl, _api, _eventListeners, _fullscreenState, _impl, _internals, _jsonLdId, _judyContext, _logger, _oldEngine, _playerData, _playerType, _removeEventListeners, _cachedRemapTime, _hasElementConnectedToDOM, _paddingTop, _playPending, _preactRoot, _preloadThumbnailRoot, _publicApiScript, _resizeObserver, _WistiaPlayer_brand, _handleAfterReplace, _handleBeforeReplace, _handlePreloadThumbnailClick, WistiaPlayer, getSwatchMetaData2, wistiaSwatchElement, __webpack_exports__WistiaPlayer, __webpack_exports__wistiaSwatchElement;
|
|
998
1014
|
var init_wistia_player = __esm({
|
|
999
1015
|
"../wistia-player/dist/wistia-player.js"() {
|
|
1000
1016
|
__webpack_modules__ = {
|
|
@@ -2392,7 +2408,7 @@ var init_wistia_player = __esm({
|
|
|
2392
2408
|
var isObject2 = function isObject3(obj) {
|
|
2393
2409
|
return obj != null && typeof obj === "object" && OBJ_REGEXP.test(obj.constructor);
|
|
2394
2410
|
};
|
|
2395
|
-
var
|
|
2411
|
+
var isFunction2 = function isFunction3(obj) {
|
|
2396
2412
|
return obj != null && typeof obj === "function";
|
|
2397
2413
|
};
|
|
2398
2414
|
var REGEXP_REGEXP = /^\s*function RegExp()/;
|
|
@@ -4037,11 +4053,9 @@ var init_wistia_player = __esm({
|
|
|
4037
4053
|
return _createClass2(EventShepherd2, [{
|
|
4038
4054
|
key: "addListener",
|
|
4039
4055
|
value: function addListener(eventName, element, callback) {
|
|
4040
|
-
var _convertedEventNames
|
|
4056
|
+
var _convertedEventNames$, _this$convertedEvents, _this$convertedEvents2;
|
|
4041
4057
|
var normalizedEventName = (_convertedEventNames$ = convertedEventNames[eventName]) !== null && _convertedEventNames$ !== void 0 ? _convertedEventNames$ : eventName;
|
|
4042
|
-
|
|
4043
|
-
this.convertedEventsMap[normalizedEventName] = [];
|
|
4044
|
-
}
|
|
4058
|
+
(_this$convertedEvents2 = (_this$convertedEvents = this.convertedEventsMap)[normalizedEventName]) !== null && _this$convertedEvents2 !== void 0 ? _this$convertedEvents2 : _this$convertedEvents[normalizedEventName] = [];
|
|
4045
4059
|
var eventListenerCallback = function eventListenerCallback2(customEvent) {
|
|
4046
4060
|
if (callbackDetailsConversions[eventName]) {
|
|
4047
4061
|
var convertedDetail = callbackDetailsConversions[eventName](customEvent.detail);
|
|
@@ -4061,8 +4075,8 @@ var init_wistia_player = __esm({
|
|
|
4061
4075
|
value: function removeAllListeners(element) {
|
|
4062
4076
|
var _this = this;
|
|
4063
4077
|
Object.keys(this.convertedEventsMap).forEach(function(eventName) {
|
|
4064
|
-
var _this$
|
|
4065
|
-
(_this$
|
|
4078
|
+
var _this$convertedEvents3;
|
|
4079
|
+
(_this$convertedEvents3 = _this.convertedEventsMap[eventName]) === null || _this$convertedEvents3 === void 0 ? void 0 : _this$convertedEvents3.forEach(function(storedCallbacks) {
|
|
4066
4080
|
element.removeEventListener(eventName, storedCallbacks.eventListenerCallback);
|
|
4067
4081
|
});
|
|
4068
4082
|
_this.convertedEventsMap[eventName] = [];
|
|
@@ -7644,82 +7658,49 @@ var init_wistia_player = __esm({
|
|
|
7644
7658
|
/* harmony export */
|
|
7645
7659
|
});
|
|
7646
7660
|
var _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__3(8176);
|
|
7661
|
+
var _root$Wistia, _root$Wistia2, _root$Wistia2$_destru, _root$Wistia3, _root$Wistia3$_initia, _root$Wistia4, _root$Wistia4$_remote, _root$Wistia5, _root$Wistia5$api, _root$Wistia6, _root$Wistia6$defineC, _root$Wistia7, _root$Wistia7$EventSh, _root$Wistia8, _root$Wistia8$mixin, _root$Wistia9, _root$Wistia9$playlis, _root$Wistia10, _root$Wistia10$Public, _root$Wistia11, _root$Wistia11$uncach, _root$Wistia12, _root$Wistia12$Visito, _root$Wistia13, _root$Wistia13$visito, _root$Wistia14, _root$Wistia14$wistia, _root$Wistia15, _root$Wistia15$_media, _root$Wistia16, _root$Wistia16$_liveS, _root$Wistia17, _root$Wistia17$first;
|
|
7647
7662
|
var _objectHasOwn = function(object, property) {
|
|
7648
7663
|
if (typeof object === "undefined" || object === null) {
|
|
7649
7664
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
7650
7665
|
}
|
|
7651
7666
|
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
7652
7667
|
};
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
}
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
}
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
}
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
}
|
|
7690
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.playlistMethods == null) {
|
|
7691
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.playlistMethods = /* @__PURE__ */ new Map();
|
|
7692
|
-
}
|
|
7693
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.PublicApi == null) {
|
|
7694
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.PublicApi = null;
|
|
7695
|
-
}
|
|
7696
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.uncacheMedia == null) {
|
|
7697
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.uncacheMedia = function() {
|
|
7698
|
-
console.error("Accessed Wistia.uncacheMedia() before it was initialized");
|
|
7699
|
-
return null;
|
|
7700
|
-
};
|
|
7701
|
-
}
|
|
7702
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.VisitorKey == null) {
|
|
7703
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.VisitorKey = null;
|
|
7704
|
-
}
|
|
7705
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.visitorKey == null) {
|
|
7706
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.visitorKey = null;
|
|
7707
|
-
}
|
|
7708
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.wistia == null) {
|
|
7709
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.wistia = void 0;
|
|
7710
|
-
}
|
|
7711
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia._mediaDataPromises == null) {
|
|
7712
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia._mediaDataPromises = {};
|
|
7713
|
-
}
|
|
7714
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia._liveStreamPollingPromises == null) {
|
|
7715
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia._liveStreamPollingPromises = {};
|
|
7716
|
-
}
|
|
7717
|
-
if (_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.first == null) {
|
|
7718
|
-
_utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.first = function() {
|
|
7719
|
-
var _root$Wistia$api;
|
|
7720
|
-
return (_root$Wistia$api = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.api()) !== null && _root$Wistia$api !== void 0 ? _root$Wistia$api : document.querySelector("wistia-player");
|
|
7721
|
-
};
|
|
7722
|
-
}
|
|
7668
|
+
(_root$Wistia = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia) !== null && _root$Wistia !== void 0 ? _root$Wistia : _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia = {};
|
|
7669
|
+
(_root$Wistia2$_destru = (_root$Wistia2 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia)._destructors) !== null && _root$Wistia2$_destru !== void 0 ? _root$Wistia2$_destru : _root$Wistia2._destructors = {};
|
|
7670
|
+
(_root$Wistia3$_initia = (_root$Wistia3 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia)._initializers) !== null && _root$Wistia3$_initia !== void 0 ? _root$Wistia3$_initia : _root$Wistia3._initializers = {};
|
|
7671
|
+
(_root$Wistia4$_remote = (_root$Wistia4 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia)._remoteData) !== null && _root$Wistia4$_remote !== void 0 ? _root$Wistia4$_remote : _root$Wistia4._remoteData = /* @__PURE__ */ new Map();
|
|
7672
|
+
(_root$Wistia5$api = (_root$Wistia5 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).api) !== null && _root$Wistia5$api !== void 0 ? _root$Wistia5$api : _root$Wistia5.api = function() {
|
|
7673
|
+
console.error("Accessed Wistia.api() before it was initialized");
|
|
7674
|
+
return null;
|
|
7675
|
+
};
|
|
7676
|
+
(_root$Wistia6$defineC = (_root$Wistia6 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).defineControl) !== null && _root$Wistia6$defineC !== void 0 ? _root$Wistia6$defineC : _root$Wistia6.defineControl = function() {
|
|
7677
|
+
console.error("Accessed Wistia.defineControl() before it was initialized");
|
|
7678
|
+
return null;
|
|
7679
|
+
};
|
|
7680
|
+
(_root$Wistia7$EventSh = (_root$Wistia7 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).EventShepherdManager) !== null && _root$Wistia7$EventSh !== void 0 ? _root$Wistia7$EventSh : _root$Wistia7.EventShepherdManager = {};
|
|
7681
|
+
(_root$Wistia8$mixin = (_root$Wistia8 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).mixin) !== null && _root$Wistia8$mixin !== void 0 ? _root$Wistia8$mixin : _root$Wistia8.mixin = function(klass) {
|
|
7682
|
+
var obj = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
7683
|
+
Object.keys(obj).forEach(function(key) {
|
|
7684
|
+
if (_objectHasOwn(obj, key)) {
|
|
7685
|
+
klass[key] = obj[key];
|
|
7686
|
+
}
|
|
7687
|
+
});
|
|
7688
|
+
};
|
|
7689
|
+
(_root$Wistia9$playlis = (_root$Wistia9 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).playlistMethods) !== null && _root$Wistia9$playlis !== void 0 ? _root$Wistia9$playlis : _root$Wistia9.playlistMethods = /* @__PURE__ */ new Map();
|
|
7690
|
+
(_root$Wistia10$Public = (_root$Wistia10 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).PublicApi) !== null && _root$Wistia10$Public !== void 0 ? _root$Wistia10$Public : _root$Wistia10.PublicApi = null;
|
|
7691
|
+
(_root$Wistia11$uncach = (_root$Wistia11 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).uncacheMedia) !== null && _root$Wistia11$uncach !== void 0 ? _root$Wistia11$uncach : _root$Wistia11.uncacheMedia = function() {
|
|
7692
|
+
console.error("Accessed Wistia.uncacheMedia() before it was initialized");
|
|
7693
|
+
return null;
|
|
7694
|
+
};
|
|
7695
|
+
(_root$Wistia12$Visito = (_root$Wistia12 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).VisitorKey) !== null && _root$Wistia12$Visito !== void 0 ? _root$Wistia12$Visito : _root$Wistia12.VisitorKey = null;
|
|
7696
|
+
(_root$Wistia13$visito = (_root$Wistia13 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).visitorKey) !== null && _root$Wistia13$visito !== void 0 ? _root$Wistia13$visito : _root$Wistia13.visitorKey = null;
|
|
7697
|
+
(_root$Wistia14$wistia = (_root$Wistia14 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).wistia) !== null && _root$Wistia14$wistia !== void 0 ? _root$Wistia14$wistia : _root$Wistia14.wistia = void 0;
|
|
7698
|
+
(_root$Wistia15$_media = (_root$Wistia15 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia)._mediaDataPromises) !== null && _root$Wistia15$_media !== void 0 ? _root$Wistia15$_media : _root$Wistia15._mediaDataPromises = {};
|
|
7699
|
+
(_root$Wistia16$_liveS = (_root$Wistia16 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia)._liveStreamPollingPromises) !== null && _root$Wistia16$_liveS !== void 0 ? _root$Wistia16$_liveS : _root$Wistia16._liveStreamPollingPromises = {};
|
|
7700
|
+
(_root$Wistia17$first = (_root$Wistia17 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia).first) !== null && _root$Wistia17$first !== void 0 ? _root$Wistia17$first : _root$Wistia17.first = function() {
|
|
7701
|
+
var _root$Wistia$api;
|
|
7702
|
+
return (_root$Wistia$api = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia.api()) !== null && _root$Wistia$api !== void 0 ? _root$Wistia$api : document.querySelector("wistia-player");
|
|
7703
|
+
};
|
|
7723
7704
|
var Wistia2 = _utilities_root_js__WEBPACK_IMPORTED_MODULE_0__.z.Wistia;
|
|
7724
7705
|
}
|
|
7725
7706
|
),
|
|
@@ -8770,7 +8751,7 @@ var init_wistia_player = __esm({
|
|
|
8770
8751
|
var PROD_SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
8771
8752
|
var PROD_FASTLY_SSL_HOST = "embed-fastly.wistia.com";
|
|
8772
8753
|
var SSL_EMBED_HOST = "embed-ssl.wistia.com";
|
|
8773
|
-
var TAGGED_VERSION2 = "0.1.
|
|
8754
|
+
var TAGGED_VERSION2 = "0.1.6";
|
|
8774
8755
|
var CURRENT_SHA2 = (
|
|
8775
8756
|
/* unused pure expression or super */
|
|
8776
8757
|
null
|
|
@@ -12361,7 +12342,7 @@ var init_wistia_player = __esm({
|
|
|
12361
12342
|
if (!isObject2(value) || isMasked(value)) {
|
|
12362
12343
|
return false;
|
|
12363
12344
|
}
|
|
12364
|
-
var pattern =
|
|
12345
|
+
var pattern = isFunction2(value) ? reIsNative : reIsHostCtor;
|
|
12365
12346
|
return pattern.test(toSource(value));
|
|
12366
12347
|
}
|
|
12367
12348
|
function baseIsTypedArray(value) {
|
|
@@ -12425,7 +12406,7 @@ var init_wistia_player = __esm({
|
|
|
12425
12406
|
newValue = objValue;
|
|
12426
12407
|
if (isArguments(objValue)) {
|
|
12427
12408
|
newValue = toPlainObject(objValue);
|
|
12428
|
-
} else if (!isObject2(objValue) ||
|
|
12409
|
+
} else if (!isObject2(objValue) || isFunction2(objValue)) {
|
|
12429
12410
|
newValue = initCloneObject(srcValue);
|
|
12430
12411
|
}
|
|
12431
12412
|
} else {
|
|
@@ -12653,13 +12634,13 @@ var init_wistia_player = __esm({
|
|
|
12653
12634
|
};
|
|
12654
12635
|
var isArray2 = Array.isArray;
|
|
12655
12636
|
function isArrayLike(value) {
|
|
12656
|
-
return value != null && isLength(value.length) && !
|
|
12637
|
+
return value != null && isLength(value.length) && !isFunction2(value);
|
|
12657
12638
|
}
|
|
12658
12639
|
function isArrayLikeObject(value) {
|
|
12659
12640
|
return isObjectLike(value) && isArrayLike(value);
|
|
12660
12641
|
}
|
|
12661
12642
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
12662
|
-
function
|
|
12643
|
+
function isFunction2(value) {
|
|
12663
12644
|
if (!isObject2(value)) {
|
|
12664
12645
|
return false;
|
|
12665
12646
|
}
|
|
@@ -13114,7 +13095,7 @@ var init_wistia_player = __esm({
|
|
|
13114
13095
|
if (!isObject2(value) || isMasked(value)) {
|
|
13115
13096
|
return false;
|
|
13116
13097
|
}
|
|
13117
|
-
var pattern =
|
|
13098
|
+
var pattern = isFunction2(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
13118
13099
|
return pattern.test(toSource(value));
|
|
13119
13100
|
}
|
|
13120
13101
|
function baseKeys(object) {
|
|
@@ -13303,13 +13284,13 @@ var init_wistia_player = __esm({
|
|
|
13303
13284
|
}
|
|
13304
13285
|
var isArray2 = Array.isArray;
|
|
13305
13286
|
function isArrayLike(value) {
|
|
13306
|
-
return value != null && isLength(value.length) && !
|
|
13287
|
+
return value != null && isLength(value.length) && !isFunction2(value);
|
|
13307
13288
|
}
|
|
13308
13289
|
function isArrayLikeObject(value) {
|
|
13309
13290
|
return isObjectLike(value) && isArrayLike(value);
|
|
13310
13291
|
}
|
|
13311
13292
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
13312
|
-
function
|
|
13293
|
+
function isFunction2(value) {
|
|
13313
13294
|
var tag = isObject2(value) ? objectToString.call(value) : "";
|
|
13314
13295
|
return tag == funcTag || tag == genTag;
|
|
13315
13296
|
}
|
|
@@ -14034,49 +14015,54 @@ var init_wistia_player = __esm({
|
|
|
14034
14015
|
/* harmony export */
|
|
14035
14016
|
gD: () => (
|
|
14036
14017
|
/* binding */
|
|
14037
|
-
|
|
14018
|
+
isNil3
|
|
14019
|
+
),
|
|
14020
|
+
/* harmony export */
|
|
14021
|
+
jw: () => (
|
|
14022
|
+
/* binding */
|
|
14023
|
+
isEmptyString
|
|
14038
14024
|
),
|
|
14039
14025
|
/* harmony export */
|
|
14040
14026
|
n9: () => (
|
|
14041
14027
|
/* binding */
|
|
14042
|
-
|
|
14028
|
+
isNotNil2
|
|
14043
14029
|
)
|
|
14044
14030
|
/* harmony export */
|
|
14045
14031
|
});
|
|
14046
|
-
var
|
|
14047
|
-
var
|
|
14048
|
-
var isNotNull = (value) => !
|
|
14049
|
-
var
|
|
14050
|
-
var isNotUndefined = (value) => !
|
|
14051
|
-
var
|
|
14052
|
-
var
|
|
14053
|
-
var
|
|
14054
|
-
var isNotString = (value) => !
|
|
14055
|
-
var isEmptyString = (value) =>
|
|
14056
|
-
var isNonEmptyString2 = (value) =>
|
|
14057
|
-
var
|
|
14058
|
-
var isNotNumber = (value) => !
|
|
14032
|
+
var FALSY_VALUES2 = [false, 0, -0, 0n, "", null, void 0, Number.NaN];
|
|
14033
|
+
var isNull2 = (value) => value === null;
|
|
14034
|
+
var isNotNull = (value) => !isNull2(value);
|
|
14035
|
+
var isUndefined2 = (value) => value === void 0;
|
|
14036
|
+
var isNotUndefined = (value) => !isUndefined2(value);
|
|
14037
|
+
var isNil3 = (value) => isNull2(value) || isUndefined2(value);
|
|
14038
|
+
var isNotNil2 = (value) => !isNil3(value);
|
|
14039
|
+
var isString2 = (value) => typeof value === "string";
|
|
14040
|
+
var isNotString = (value) => !isString2(value);
|
|
14041
|
+
var isEmptyString = (value) => isString2(value) && value === "";
|
|
14042
|
+
var isNonEmptyString2 = (value) => isString2(value) && !isEmptyString(value);
|
|
14043
|
+
var isNumber3 = (value) => typeof value === "number";
|
|
14044
|
+
var isNotNumber = (value) => !isNumber3(value);
|
|
14059
14045
|
var isNaN2 = (value) => Number.isNaN(value);
|
|
14060
14046
|
var isInteger = (value) => Number.isInteger(value);
|
|
14061
|
-
var isRecord = (value) =>
|
|
14047
|
+
var isRecord = (value) => isNotNil2(value) && typeof value === "object" && !(value instanceof Array);
|
|
14062
14048
|
var isNotRecord = (value) => !isRecord(value);
|
|
14063
14049
|
var isEmptyRecord = (value) => isRecord(value) && Object.keys(value).length === 0;
|
|
14064
14050
|
var isNonEmptyRecord2 = (value) => isRecord(value) && Object.keys(value).length > 0;
|
|
14065
|
-
var isArray2 = (value) =>
|
|
14051
|
+
var isArray2 = (value) => isNotNil2(value) && typeof value === "object" && value instanceof Array;
|
|
14066
14052
|
var isNotArray = (value) => !isArray2(value);
|
|
14067
14053
|
var isEmptyArray = (value) => isArray2(value) && value.length === 0;
|
|
14068
14054
|
var isNonEmptyArray = (value) => isArray2(value) && value.length > 0;
|
|
14069
|
-
var
|
|
14070
|
-
var isNotFunction = (value) => !
|
|
14071
|
-
var
|
|
14072
|
-
var isNotBoolean = (value) => !
|
|
14055
|
+
var isFunction2 = (value) => isNotNil2(value) && typeof value === "function";
|
|
14056
|
+
var isNotFunction = (value) => !isFunction2(value);
|
|
14057
|
+
var isBoolean2 = (value) => isNotNil2(value) && typeof value === "boolean";
|
|
14058
|
+
var isNotBoolean = (value) => !isBoolean2(value);
|
|
14073
14059
|
var isVoid = (value) => value === void 0;
|
|
14074
14060
|
var isNotVoid = (value) => !isVoid(value);
|
|
14075
14061
|
var isError = (value) => {
|
|
14076
|
-
return
|
|
14062
|
+
return isNotNil2(value) && value instanceof Error;
|
|
14077
14063
|
};
|
|
14078
|
-
var isFalsy = (value) =>
|
|
14079
|
-
var isTruthy = (value) => !
|
|
14064
|
+
var isFalsy = (value) => FALSY_VALUES2.includes(value) || Number.isNaN(value);
|
|
14065
|
+
var isTruthy = (value) => !FALSY_VALUES2.includes(value) && !Number.isNaN(value);
|
|
14080
14066
|
var hasKey = (value, key) => isNonEmptyRecord2(value) && key in value;
|
|
14081
14067
|
}
|
|
14082
14068
|
)
|
|
@@ -14140,6 +14126,7 @@ var init_wistia_player = __esm({
|
|
|
14140
14126
|
/* harmony export */
|
|
14141
14127
|
});
|
|
14142
14128
|
preact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__2(5181);
|
|
14129
|
+
_wistia_type_guards__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__2(9814);
|
|
14143
14130
|
_utilities_gradients_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__2(4372);
|
|
14144
14131
|
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__2(5509);
|
|
14145
14132
|
_components_PreloadThumbnail_tsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__2(9804);
|
|
@@ -14148,7 +14135,7 @@ var init_wistia_player = __esm({
|
|
|
14148
14135
|
_utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__2(6462);
|
|
14149
14136
|
_appHostname_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__2(787);
|
|
14150
14137
|
_utilities_assets_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__2(7209);
|
|
14151
|
-
|
|
14138
|
+
_utilities_coinFlip_ts__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__2(7323);
|
|
14152
14139
|
_utilities_detect_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__2(7231);
|
|
14153
14140
|
_utilities_dynamicImport_ts__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__2(7157);
|
|
14154
14141
|
_utilities_embedOptionStore_ts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__2(3280);
|
|
@@ -14158,10 +14145,10 @@ var init_wistia_player = __esm({
|
|
|
14158
14145
|
_utilities_hosts_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__2(5857);
|
|
14159
14146
|
_utilities_inferPageUrl_ts__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__2(5393);
|
|
14160
14147
|
_utilities_judy_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__2(438);
|
|
14161
|
-
|
|
14148
|
+
_utilities_roundedPlayerDefaults_ts__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__2(3123);
|
|
14162
14149
|
_utilities_runScript_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__2(1248);
|
|
14163
14150
|
_utilities_seqid_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__2(1224);
|
|
14164
|
-
|
|
14151
|
+
_utilities_shouldEnableMux_ts__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__2(7211);
|
|
14165
14152
|
_utilities_simpleMetrics_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__2(1161);
|
|
14166
14153
|
_utilities_trackingConsentApi_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__2(4755);
|
|
14167
14154
|
_utilities_url_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__2(2671);
|
|
@@ -14260,6 +14247,7 @@ var init_wistia_player = __esm({
|
|
|
14260
14247
|
_handlePreloadThumbnailClick = /* @__PURE__ */ new WeakMap();
|
|
14261
14248
|
WistiaPlayer = /* @__PURE__ */ function(_HTMLElement) {
|
|
14262
14249
|
function WistiaPlayer3() {
|
|
14250
|
+
var _Wistia$wistia;
|
|
14263
14251
|
var _this2;
|
|
14264
14252
|
_classCallCheck(this, WistiaPlayer3);
|
|
14265
14253
|
_this2 = _callSuper(this, WistiaPlayer3);
|
|
@@ -14315,9 +14303,7 @@ var init_wistia_player = __esm({
|
|
|
14315
14303
|
_this2.paddingTop = getComputedStyle(_this2).paddingTop;
|
|
14316
14304
|
_classPrivateFieldSet(_logger, _this2, _utilities_wlog_js__WEBPACK_IMPORTED_MODULE_22__.ct.getPrefixedFunctions("WistiaPlayer"));
|
|
14317
14305
|
_classPrivateFieldSet(_playerData, _this2, new _utilities_PlayerDataHandler_ts__WEBPACK_IMPORTED_MODULE_5__.I());
|
|
14318
|
-
|
|
14319
|
-
_wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.wistia = Date.now();
|
|
14320
|
-
}
|
|
14306
|
+
(_Wistia$wistia = _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.wistia) !== null && _Wistia$wistia !== void 0 ? _Wistia$wistia : _wistia_namespace_ts__WEBPACK_IMPORTED_MODULE_2__.s.wistia = Date.now();
|
|
14321
14307
|
return _this2;
|
|
14322
14308
|
}
|
|
14323
14309
|
_inherits(WistiaPlayer3, _HTMLElement);
|
|
@@ -14467,6 +14453,8 @@ var init_wistia_player = __esm({
|
|
|
14467
14453
|
var _classPrivateFieldGet12;
|
|
14468
14454
|
(_classPrivateFieldGet12 = _classPrivateFieldGet(_api, this)) === null || _classPrivateFieldGet12 === void 0 ? void 0 : _classPrivateFieldGet12.captionsEnabled(enabled);
|
|
14469
14455
|
}
|
|
14456
|
+
// the public api has a different syntax for setting the captionsLanguage and getting it
|
|
14457
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
14470
14458
|
}, {
|
|
14471
14459
|
key: "captionsLanguage",
|
|
14472
14460
|
get: function get() {
|
|
@@ -14611,6 +14599,8 @@ var init_wistia_player = __esm({
|
|
|
14611
14599
|
* NOTE: This attribute will impact the entire page and is not scoped to the player.
|
|
14612
14600
|
* @returns {string | undefined}
|
|
14613
14601
|
*/
|
|
14602
|
+
// the public api doesn't allow for unsetting an email, so we don't wan to allow the setter
|
|
14603
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
14614
14604
|
}, {
|
|
14615
14605
|
key: "email",
|
|
14616
14606
|
get: function get() {
|
|
@@ -14629,6 +14619,8 @@ var init_wistia_player = __esm({
|
|
|
14629
14619
|
* Internal use only.
|
|
14630
14620
|
* @returns {string | null | undefined}
|
|
14631
14621
|
*/
|
|
14622
|
+
// we don't want to allow for unsetting this option
|
|
14623
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
14632
14624
|
}, {
|
|
14633
14625
|
key: "embedHost",
|
|
14634
14626
|
get: function get() {
|
|
@@ -14658,7 +14650,7 @@ var init_wistia_player = __esm({
|
|
|
14658
14650
|
}
|
|
14659
14651
|
/**
|
|
14660
14652
|
* Returns the current end video behavior value
|
|
14661
|
-
* @returns {
|
|
14653
|
+
* @returns {'default' | 'loop' | 'reset'}
|
|
14662
14654
|
*/
|
|
14663
14655
|
}, {
|
|
14664
14656
|
key: "endVideoBehavior",
|
|
@@ -14738,6 +14730,8 @@ var init_wistia_player = __esm({
|
|
|
14738
14730
|
var _classPrivateFieldGet33, _classPrivateFieldGet34;
|
|
14739
14731
|
return (_classPrivateFieldGet33 = (_classPrivateFieldGet34 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet34 === void 0 ? void 0 : _classPrivateFieldGet34.isInstantHls()) !== null && _classPrivateFieldGet33 !== void 0 ? _classPrivateFieldGet33 : false;
|
|
14740
14732
|
}
|
|
14733
|
+
// the publicApi returns a language object, but you are not allowed to pass that object as a type when setting the language
|
|
14734
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
14741
14735
|
}, {
|
|
14742
14736
|
key: "language",
|
|
14743
14737
|
get: function get() {
|
|
@@ -14785,6 +14779,8 @@ var init_wistia_player = __esm({
|
|
|
14785
14779
|
* Returns the language of the media stream.
|
|
14786
14780
|
* @returns {Localization | undefined}
|
|
14787
14781
|
*/
|
|
14782
|
+
// the publicApi returns a Localization object, but you are not allowed to pass that object as a type when setting the localization
|
|
14783
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
14788
14784
|
}, {
|
|
14789
14785
|
key: "mediaLanguage",
|
|
14790
14786
|
get: function get() {
|
|
@@ -14942,12 +14938,16 @@ var init_wistia_player = __esm({
|
|
|
14942
14938
|
}
|
|
14943
14939
|
/**
|
|
14944
14940
|
* Returns the player color gradient object.
|
|
14945
|
-
* @returns {Gradient
|
|
14941
|
+
* @returns {Gradient}
|
|
14946
14942
|
*/
|
|
14947
14943
|
}, {
|
|
14948
14944
|
key: "playerColorGradient",
|
|
14949
14945
|
get: function get() {
|
|
14950
|
-
|
|
14946
|
+
var value = _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "playerColorGradient");
|
|
14947
|
+
if ((0, _types_gradient_ts__WEBPACK_IMPORTED_MODULE_28__.b)(value)) {
|
|
14948
|
+
return value;
|
|
14949
|
+
}
|
|
14950
|
+
return void 0;
|
|
14951
14951
|
},
|
|
14952
14952
|
set: function set(gradient) {
|
|
14953
14953
|
var _classPrivateFieldGet60;
|
|
@@ -14962,6 +14962,8 @@ var init_wistia_player = __esm({
|
|
|
14962
14962
|
* Internal use only.
|
|
14963
14963
|
* @returns {Players | undefined}
|
|
14964
14964
|
*/
|
|
14965
|
+
// This will return undefined if it's not set, but you are not allowed to set it to undefined
|
|
14966
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
14965
14967
|
}, {
|
|
14966
14968
|
key: "playerForce",
|
|
14967
14969
|
get: function get() {
|
|
@@ -15144,6 +15146,8 @@ var init_wistia_player = __esm({
|
|
|
15144
15146
|
* Returns how the popover content will render.
|
|
15145
15147
|
* @returns {PopoverContentSettings | string | undefined}
|
|
15146
15148
|
*/
|
|
15149
|
+
// This will return undefined if it's not set, but you are not allowed to set it to undefined
|
|
15150
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
15147
15151
|
}, {
|
|
15148
15152
|
key: "popoverContent",
|
|
15149
15153
|
get: function get() {
|
|
@@ -15246,7 +15250,7 @@ var init_wistia_player = __esm({
|
|
|
15246
15250
|
key: "preload",
|
|
15247
15251
|
get: function get() {
|
|
15248
15252
|
var _ref11, _classPrivateFieldGet63, _classPrivateFieldGet64;
|
|
15249
|
-
return (_ref11 = (_classPrivateFieldGet63 = (_classPrivateFieldGet64 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet64 === void 0 ? void 0 : _classPrivateFieldGet64.preloadValue()) !== null && _classPrivateFieldGet63 !== void 0 ? _classPrivateFieldGet63 : this.embedOptions.preload) !== null && _ref11 !== void 0 ? _ref11 :
|
|
15253
|
+
return (_ref11 = (_classPrivateFieldGet63 = (_classPrivateFieldGet64 = _classPrivateFieldGet(_impl, this)) === null || _classPrivateFieldGet64 === void 0 ? void 0 : _classPrivateFieldGet64.preloadValue()) !== null && _classPrivateFieldGet63 !== void 0 ? _classPrivateFieldGet63 : this.embedOptions.preload) !== null && _ref11 !== void 0 ? _ref11 : "metadata";
|
|
15250
15254
|
},
|
|
15251
15255
|
set: function set(preloadValue) {
|
|
15252
15256
|
var prevVal = this.preload;
|
|
@@ -15315,7 +15319,8 @@ var init_wistia_player = __esm({
|
|
|
15315
15319
|
}, {
|
|
15316
15320
|
key: "resumable",
|
|
15317
15321
|
get: function get() {
|
|
15318
|
-
|
|
15322
|
+
var _assertClassBrand$cal;
|
|
15323
|
+
return (_assertClassBrand$cal = _assertClassBrand(_WistiaPlayer_brand, this, _getSyncedEmbedOption).call(this, "resumable")) !== null && _assertClassBrand$cal !== void 0 ? _assertClassBrand$cal : "auto";
|
|
15319
15324
|
},
|
|
15320
15325
|
set: function set(resumableState) {
|
|
15321
15326
|
var _classPrivateFieldGet70;
|
|
@@ -15432,6 +15437,8 @@ var init_wistia_player = __esm({
|
|
|
15432
15437
|
* Returns the stats url for the player.
|
|
15433
15438
|
* @returns {string | null}
|
|
15434
15439
|
*/
|
|
15440
|
+
// This will return undefined if it's not set, but you are not allowed to set it to undefined
|
|
15441
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
15435
15442
|
}, {
|
|
15436
15443
|
key: "statsUrl",
|
|
15437
15444
|
get: function get() {
|
|
@@ -15445,6 +15452,8 @@ var init_wistia_player = __esm({
|
|
|
15445
15452
|
* Internal use only.
|
|
15446
15453
|
* @returns {boolean | undefined}
|
|
15447
15454
|
*/
|
|
15455
|
+
// This will return undefined if it's not set, but you are not allowed to set it to undefined
|
|
15456
|
+
// eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs
|
|
15448
15457
|
}, {
|
|
15449
15458
|
key: "swatch",
|
|
15450
15459
|
get: function get() {
|
|
@@ -16536,6 +16545,7 @@ var init_WistiaPlayerWrapper = __esm({
|
|
|
16536
16545
|
"src/WistiaPlayerWrapper.tsx"() {
|
|
16537
16546
|
"use client";
|
|
16538
16547
|
import_react = require("react");
|
|
16548
|
+
init_dist();
|
|
16539
16549
|
init_camelCaseToKebabCase();
|
|
16540
16550
|
init_getMergedEmbedOption();
|
|
16541
16551
|
init_swatch();
|
|
@@ -16543,12 +16553,13 @@ var init_WistiaPlayerWrapper = __esm({
|
|
|
16543
16553
|
WistiaPlayerWrapper = (0, import_react.forwardRef)(
|
|
16544
16554
|
(props, ref) => {
|
|
16545
16555
|
const { aspect, className, embedHost, id, mediaId, roundedPlayer, swatch, style } = props;
|
|
16546
|
-
const
|
|
16556
|
+
const mergedEmbedHost = getMergedEmbedOption(mediaId, "embedHost", embedHost ?? void 0);
|
|
16557
|
+
const finalEmbedHost = isString(mergedEmbedHost) ? mergedEmbedHost : "fast.wistia.com";
|
|
16547
16558
|
const player = (0, import_react.useRef)(null);
|
|
16548
16559
|
const [swatchAspectRatio, setSwatchAspectRatio] = (0, import_react.useState)(aspect);
|
|
16549
16560
|
const [isWistiaPlayerDefined, setIsWistiaPlayerDefined] = (0, import_react.useState)(false);
|
|
16550
16561
|
(0, import_react.useEffect)(() => {
|
|
16551
|
-
if (swatch !== false && swatchAspectRatio === void 0) {
|
|
16562
|
+
if (swatch !== false && swatchAspectRatio === void 0 && isString(finalEmbedHost)) {
|
|
16552
16563
|
void getSwatchAspectRatio(mediaId, finalEmbedHost).then((ratio) => {
|
|
16553
16564
|
setSwatchAspectRatio(ratio);
|
|
16554
16565
|
});
|
|
@@ -16563,8 +16574,10 @@ var init_WistiaPlayerWrapper = __esm({
|
|
|
16563
16574
|
Object.entries(props).forEach(([key, value]) => {
|
|
16564
16575
|
if (key.startsWith("on") && key[2] === key[2].toUpperCase()) {
|
|
16565
16576
|
const formattedKey = camelCaseToKebabCase(key).slice(3);
|
|
16566
|
-
|
|
16567
|
-
|
|
16577
|
+
if (isFunction(value)) {
|
|
16578
|
+
eventProps[formattedKey] = value;
|
|
16579
|
+
}
|
|
16580
|
+
} else if (isValidEmbedOption(value)) {
|
|
16568
16581
|
embedOptionProps[camelCaseToKebabCase(key)] = value;
|
|
16569
16582
|
}
|
|
16570
16583
|
});
|
|
@@ -16620,6 +16633,7 @@ __export(WistiaPlayer_exports, {
|
|
|
16620
16633
|
});
|
|
16621
16634
|
module.exports = __toCommonJS(WistiaPlayer_exports);
|
|
16622
16635
|
var import_react2 = require("react");
|
|
16636
|
+
init_dist();
|
|
16623
16637
|
init_getMergedEmbedOption();
|
|
16624
16638
|
init_swatch();
|
|
16625
16639
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
@@ -16631,7 +16645,8 @@ var WistiaPlayerWrapper2 = (0, import_react2.lazy)(
|
|
|
16631
16645
|
var WistiaPlayer2 = (0, import_react2.forwardRef)(
|
|
16632
16646
|
(props, ref) => {
|
|
16633
16647
|
const { aspect, embedHost, mediaId, swatch, style } = props;
|
|
16634
|
-
const
|
|
16648
|
+
const mergedEmbedHost = getMergedEmbedOption(mediaId, "embedHost", embedHost ?? void 0);
|
|
16649
|
+
const finalEmbedHost = isString(mergedEmbedHost) ? mergedEmbedHost : "fast.wistia.com";
|
|
16635
16650
|
const shouldDisplaySwatch = aspect !== void 0;
|
|
16636
16651
|
const styleBlock = wistiaPlayerStyleBlock({
|
|
16637
16652
|
mediaId,
|
|
@@ -16659,3 +16674,14 @@ var WistiaPlayer2 = (0, import_react2.forwardRef)(
|
|
|
16659
16674
|
*
|
|
16660
16675
|
* This source code is unlicensed, all rights reserved.
|
|
16661
16676
|
*/
|
|
16677
|
+
/*! Bundled license information:
|
|
16678
|
+
|
|
16679
|
+
@wistia/type-guards/dist/index.mjs:
|
|
16680
|
+
(*
|
|
16681
|
+
* @license @wistia/type-guards v0.9.1
|
|
16682
|
+
*
|
|
16683
|
+
* Copyright (c) 2023-2025, Wistia, Inc. and its affiliates.
|
|
16684
|
+
*
|
|
16685
|
+
* This source code is unlicensed, all rights reserved.
|
|
16686
|
+
*)
|
|
16687
|
+
*/
|