@mottosports/motto-video-player 1.0.1-rc.50 → 1.0.1-rc.52
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.d.mts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +36 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -233,6 +233,10 @@ interface PlayerProps extends Omit<HTMLAttributes<HTMLVideoElement>, 'src' | 'on
|
|
|
233
233
|
* Mux Analytics configuration
|
|
234
234
|
*/
|
|
235
235
|
muxConfig?: MuxAnalyticsConfig;
|
|
236
|
+
/**
|
|
237
|
+
* System73 SDK configuration
|
|
238
|
+
*/
|
|
239
|
+
system73Config?: System73Config;
|
|
236
240
|
/**
|
|
237
241
|
* IMA (Interactive Media Ads) configuration
|
|
238
242
|
*/
|
|
@@ -398,6 +402,36 @@ interface MuxAnalyticsConfig {
|
|
|
398
402
|
*/
|
|
399
403
|
metadata?: MuxMetadata;
|
|
400
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* System73 SDK configuration
|
|
407
|
+
*/
|
|
408
|
+
interface System73Config {
|
|
409
|
+
/**
|
|
410
|
+
* System73 API key (required for authentication)
|
|
411
|
+
*/
|
|
412
|
+
apiKey: string;
|
|
413
|
+
/**
|
|
414
|
+
* Content steering endpoint URI (optional)
|
|
415
|
+
*/
|
|
416
|
+
contentSteeringEndpoint?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Channel identifier (optional)
|
|
419
|
+
*/
|
|
420
|
+
channelId?: string;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* System73 SDK wrapper interface
|
|
424
|
+
*/
|
|
425
|
+
declare global {
|
|
426
|
+
interface Window {
|
|
427
|
+
S73ShakaPlayerWrapper?: (config: System73Config, shakaInstance: {
|
|
428
|
+
shaka: any;
|
|
429
|
+
}) => {
|
|
430
|
+
wrapPlayerConfig: (config: any) => void;
|
|
431
|
+
wrapPlayer: (player: any) => void;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
}
|
|
401
435
|
|
|
402
436
|
declare global {
|
|
403
437
|
namespace google {
|
package/dist/index.d.ts
CHANGED
|
@@ -233,6 +233,10 @@ interface PlayerProps extends Omit<HTMLAttributes<HTMLVideoElement>, 'src' | 'on
|
|
|
233
233
|
* Mux Analytics configuration
|
|
234
234
|
*/
|
|
235
235
|
muxConfig?: MuxAnalyticsConfig;
|
|
236
|
+
/**
|
|
237
|
+
* System73 SDK configuration
|
|
238
|
+
*/
|
|
239
|
+
system73Config?: System73Config;
|
|
236
240
|
/**
|
|
237
241
|
* IMA (Interactive Media Ads) configuration
|
|
238
242
|
*/
|
|
@@ -398,6 +402,36 @@ interface MuxAnalyticsConfig {
|
|
|
398
402
|
*/
|
|
399
403
|
metadata?: MuxMetadata;
|
|
400
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* System73 SDK configuration
|
|
407
|
+
*/
|
|
408
|
+
interface System73Config {
|
|
409
|
+
/**
|
|
410
|
+
* System73 API key (required for authentication)
|
|
411
|
+
*/
|
|
412
|
+
apiKey: string;
|
|
413
|
+
/**
|
|
414
|
+
* Content steering endpoint URI (optional)
|
|
415
|
+
*/
|
|
416
|
+
contentSteeringEndpoint?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Channel identifier (optional)
|
|
419
|
+
*/
|
|
420
|
+
channelId?: string;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* System73 SDK wrapper interface
|
|
424
|
+
*/
|
|
425
|
+
declare global {
|
|
426
|
+
interface Window {
|
|
427
|
+
S73ShakaPlayerWrapper?: (config: System73Config, shakaInstance: {
|
|
428
|
+
shaka: any;
|
|
429
|
+
}) => {
|
|
430
|
+
wrapPlayerConfig: (config: any) => void;
|
|
431
|
+
wrapPlayer: (player: any) => void;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
}
|
|
401
435
|
|
|
402
436
|
declare global {
|
|
403
437
|
namespace google {
|
package/dist/index.js
CHANGED
|
@@ -1157,6 +1157,7 @@ html[dir=rtl] .shaka-overflow-menu .shaka-overflow-button .material-svg-icon:fir
|
|
|
1157
1157
|
|
|
1158
1158
|
// src/Player.tsx
|
|
1159
1159
|
var import_react12 = require("react");
|
|
1160
|
+
var import_shaka_player4 = __toESM(require("shaka-player/dist/shaka-player.ui"));
|
|
1160
1161
|
|
|
1161
1162
|
// src/hooks/useShakaPlayer.ts
|
|
1162
1163
|
var import_react = require("react");
|
|
@@ -1210,7 +1211,7 @@ var supportsWidevinePersistentLicenses = () => {
|
|
|
1210
1211
|
var import_mux_data_shakaplayer = __toESM(require("@mux/mux-data-shakaplayer"));
|
|
1211
1212
|
|
|
1212
1213
|
// package.json
|
|
1213
|
-
var version = "1.0.1-rc.
|
|
1214
|
+
var version = "1.0.1-rc.52";
|
|
1214
1215
|
|
|
1215
1216
|
// src/utils/licenseCache.ts
|
|
1216
1217
|
var PERSISTENT_LICENSE_PREFIX = "motto_lic_";
|
|
@@ -3612,6 +3613,7 @@ var Player = (0, import_react12.forwardRef)(
|
|
|
3612
3613
|
shakaConfig,
|
|
3613
3614
|
drmConfig,
|
|
3614
3615
|
muxConfig,
|
|
3616
|
+
system73Config,
|
|
3615
3617
|
imaConfig,
|
|
3616
3618
|
chromecastConfig,
|
|
3617
3619
|
qualityConfig,
|
|
@@ -3621,6 +3623,7 @@ var Player = (0, import_react12.forwardRef)(
|
|
|
3621
3623
|
containerClassName,
|
|
3622
3624
|
...videoProps
|
|
3623
3625
|
}, ref) => {
|
|
3626
|
+
console.log("system73Config", system73Config);
|
|
3624
3627
|
const videoRef = (0, import_react12.useRef)(null);
|
|
3625
3628
|
const containerRef = (0, import_react12.useRef)(null);
|
|
3626
3629
|
(0, import_react12.useImperativeHandle)(ref, () => videoRef.current, []);
|
|
@@ -3689,6 +3692,26 @@ var Player = (0, import_react12.forwardRef)(
|
|
|
3689
3692
|
showPulseAnimation: true,
|
|
3690
3693
|
liveThresholdSeconds: 15
|
|
3691
3694
|
});
|
|
3695
|
+
const initializeSystem73 = (0, import_react12.useCallback)((playerConfig) => {
|
|
3696
|
+
if (!system73Config?.apiKey || !window.S73ShakaPlayerWrapper) {
|
|
3697
|
+
return null;
|
|
3698
|
+
}
|
|
3699
|
+
console.log("Initializing System73 SDK...");
|
|
3700
|
+
try {
|
|
3701
|
+
const s73Config = {
|
|
3702
|
+
apiKey: system73Config.apiKey,
|
|
3703
|
+
contentSteeringEndpoint: system73Config.contentSteeringEndpoint,
|
|
3704
|
+
channelId: system73Config.channelId
|
|
3705
|
+
};
|
|
3706
|
+
const wrapper = window.S73ShakaPlayerWrapper(s73Config, { shaka: import_shaka_player4.default });
|
|
3707
|
+
wrapper.wrapPlayerConfig(playerConfig);
|
|
3708
|
+
console.log("System73 SDK initialized with config:", s73Config);
|
|
3709
|
+
return wrapper;
|
|
3710
|
+
} catch (error) {
|
|
3711
|
+
console.error("Error initializing System73 SDK:", error);
|
|
3712
|
+
return null;
|
|
3713
|
+
}
|
|
3714
|
+
}, [system73Config]);
|
|
3692
3715
|
const initializeAds = (0, import_react12.useCallback)(() => {
|
|
3693
3716
|
if (!imaConfig?.adTagUrl || !playerRef.current || !videoRef.current || !uiRef.current) {
|
|
3694
3717
|
return;
|
|
@@ -3720,7 +3743,19 @@ var Player = (0, import_react12.forwardRef)(
|
|
|
3720
3743
|
if (!video) return;
|
|
3721
3744
|
const initialize = async () => {
|
|
3722
3745
|
try {
|
|
3746
|
+
let system73Wrapper = null;
|
|
3747
|
+
if (system73Config?.apiKey) {
|
|
3748
|
+
const playerConfig = { ...shakaConfig };
|
|
3749
|
+
system73Wrapper = initializeSystem73(playerConfig);
|
|
3750
|
+
if (system73Wrapper) {
|
|
3751
|
+
shakaConfig = playerConfig;
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3723
3754
|
await initializePlayer(video);
|
|
3755
|
+
if (system73Wrapper && playerRef.current) {
|
|
3756
|
+
system73Wrapper.wrapPlayer(playerRef.current);
|
|
3757
|
+
console.log("System73 player wrapper applied");
|
|
3758
|
+
}
|
|
3724
3759
|
setupEventListeners();
|
|
3725
3760
|
const cleanupQuality = setupQualityTracking();
|
|
3726
3761
|
configureQuality();
|