@dialtribe/react-sdk 0.1.4 → 0.1.7

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.mjs CHANGED
@@ -1060,18 +1060,27 @@ function DialtribePlayer({
1060
1060
  const wasLiveStream = initialPlaybackTypeRef.current === "hls";
1061
1061
  const playerConfig = useMemo(
1062
1062
  () => ({
1063
- file: {
1064
- forceHLS: playbackType === "hls",
1065
- hlsOptions: isLiveStream ? {
1066
- maxLoadingDelay: 10,
1067
- minAutoBitrate: 0,
1068
- lowLatencyMode: true,
1069
- enableWorker: true
1070
- } : {}
1071
- }
1072
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1063
+ hls: isLiveStream ? {
1064
+ // Performance
1065
+ enableWorker: true,
1066
+ lowLatencyMode: true,
1067
+ // Live edge synchronization - start close to live, not at beginning
1068
+ liveSyncDurationCount: 3,
1069
+ // Start 3 segments behind live edge
1070
+ liveMaxLatencyDurationCount: 10,
1071
+ // Seek to live if >10 segments behind
1072
+ maxLiveSyncPlaybackRate: 1.5,
1073
+ // Speed up to catch up to live edge
1074
+ // Buffer settings
1075
+ maxLoadingDelay: 4,
1076
+ maxBufferLength: 30,
1077
+ maxBufferSize: 60 * 1e3 * 1e3,
1078
+ // 60MB
1079
+ // Bandwidth estimation
1080
+ minAutoBitrate: 0
1081
+ } : void 0
1073
1082
  }),
1074
- [playbackType, isLiveStream]
1083
+ [isLiveStream]
1075
1084
  );
1076
1085
  const formatTimestamp = (seconds) => {
1077
1086
  if (!seconds || isNaN(seconds) || !isFinite(seconds)) return "00:00:00";