@mottosports/motto-video-player 1.0.1-rc.73 → 1.0.1-rc.74
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/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1245,7 +1245,7 @@ var supportsWidevinePersistentLicenses = () => {
|
|
|
1245
1245
|
var import_mux_data_shakaplayer = __toESM(require("@mux/mux-data-shakaplayer"));
|
|
1246
1246
|
|
|
1247
1247
|
// package.json
|
|
1248
|
-
var version = "1.0.1-rc.
|
|
1248
|
+
var version = "1.0.1-rc.74";
|
|
1249
1249
|
|
|
1250
1250
|
// src/utils/licenseCache.ts
|
|
1251
1251
|
var PERSISTENT_LICENSE_PREFIX = "motto_lic_";
|
|
@@ -1409,7 +1409,8 @@ var useShakaPlayer = ({
|
|
|
1409
1409
|
onMuxDataUpdate,
|
|
1410
1410
|
publicKey,
|
|
1411
1411
|
mottoToken,
|
|
1412
|
-
hasAds = false
|
|
1412
|
+
hasAds = false,
|
|
1413
|
+
hasSystem73 = false
|
|
1413
1414
|
}) => {
|
|
1414
1415
|
const playerRef = (0, import_react.useRef)(null);
|
|
1415
1416
|
const [isRetrying, setIsRetrying] = (0, import_react.useState)(false);
|
|
@@ -1714,7 +1715,7 @@ var useShakaPlayer = ({
|
|
|
1714
1715
|
if (playerRef.current === player) playerRef.current = null;
|
|
1715
1716
|
return;
|
|
1716
1717
|
}
|
|
1717
|
-
if (!hasAds) {
|
|
1718
|
+
if (!hasAds && !hasSystem73) {
|
|
1718
1719
|
await player.load(manifestUrl);
|
|
1719
1720
|
}
|
|
1720
1721
|
onPlayerReady?.(player);
|
|
@@ -4134,7 +4135,8 @@ var Player = (0, import_react13.forwardRef)(
|
|
|
4134
4135
|
onMuxDataUpdate: events?.onMuxDataUpdate,
|
|
4135
4136
|
publicKey,
|
|
4136
4137
|
mottoToken: auth?.mottoToken,
|
|
4137
|
-
hasAds: !!imaConfig?.adTagUrl
|
|
4138
|
+
hasAds: !!imaConfig?.adTagUrl,
|
|
4139
|
+
hasSystem73: !!system73Config?.apiKey
|
|
4138
4140
|
});
|
|
4139
4141
|
const {
|
|
4140
4142
|
initializeMux,
|
|
@@ -4206,7 +4208,6 @@ var Player = (0, import_react13.forwardRef)(
|
|
|
4206
4208
|
if (!system73Config?.apiKey || !window.S73ShakaPlayerWrapper) {
|
|
4207
4209
|
return null;
|
|
4208
4210
|
}
|
|
4209
|
-
console.log("Initializing System73 SDK...");
|
|
4210
4211
|
try {
|
|
4211
4212
|
const s73Config = {
|
|
4212
4213
|
apiKey: system73Config.apiKey,
|
|
@@ -4215,7 +4216,6 @@ var Player = (0, import_react13.forwardRef)(
|
|
|
4215
4216
|
};
|
|
4216
4217
|
const wrapper = window.S73ShakaPlayerWrapper(s73Config, { shaka: import_shaka_player4.default });
|
|
4217
4218
|
wrapper.wrapPlayerConfig(playerConfig);
|
|
4218
|
-
console.log("System73 SDK initialized with config:", s73Config);
|
|
4219
4219
|
return wrapper;
|
|
4220
4220
|
} catch (error) {
|
|
4221
4221
|
console.error("Error initializing System73 SDK:", error);
|
|
@@ -4309,7 +4309,9 @@ var Player = (0, import_react13.forwardRef)(
|
|
|
4309
4309
|
await initializePlayer(video);
|
|
4310
4310
|
if (system73Wrapper && playerRef.current) {
|
|
4311
4311
|
system73Wrapper.wrapPlayer(playerRef.current);
|
|
4312
|
-
|
|
4312
|
+
if (!imaConfig?.adTagUrl) {
|
|
4313
|
+
await loadManifest();
|
|
4314
|
+
}
|
|
4313
4315
|
}
|
|
4314
4316
|
setupEventListeners();
|
|
4315
4317
|
const cleanupQuality = setupQualityTracking();
|
|
@@ -5040,7 +5042,6 @@ var Event = ({
|
|
|
5040
5042
|
const [activePlaylist, setActivePlaylist] = (0, import_react16.useState)();
|
|
5041
5043
|
const [activeVideoId, setActiveVideoId] = (0, import_react16.useState)();
|
|
5042
5044
|
const videoIds = eventData?.videoIds ?? [];
|
|
5043
|
-
console.log("adsEnabled", adsEnabled);
|
|
5044
5045
|
const {
|
|
5045
5046
|
data: videosData,
|
|
5046
5047
|
isLoading: videosIsLoading,
|
|
@@ -5055,7 +5056,6 @@ var Event = ({
|
|
|
5055
5056
|
retry: queryOptions.retry ?? 3,
|
|
5056
5057
|
retryDelay: queryOptions.retryDelay ?? ((attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 3e4))
|
|
5057
5058
|
});
|
|
5058
|
-
console.log("videosData", videosData);
|
|
5059
5059
|
const [loadingApisState, setLoadingApisState] = (0, import_react16.useState)(true);
|
|
5060
5060
|
(0, import_react16.useEffect)(() => {
|
|
5061
5061
|
if (videosData !== void 0) {
|
|
@@ -5173,7 +5173,7 @@ var Event = ({
|
|
|
5173
5173
|
containerClassName: "w-full h-full",
|
|
5174
5174
|
publicKey,
|
|
5175
5175
|
auth,
|
|
5176
|
-
...adsEnabled && activeVideo
|
|
5176
|
+
...adsEnabled && activeVideo ? { imaConfig: { adTagUrl: activeVideo?.ad?.adTagUrl } } : {}
|
|
5177
5177
|
}
|
|
5178
5178
|
) }),
|
|
5179
5179
|
!hideTitle && eventData && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|