@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.
@@ -1044,18 +1044,27 @@ function DialtribePlayer({
1044
1044
  const wasLiveStream = initialPlaybackTypeRef.current === "hls";
1045
1045
  const playerConfig = react.useMemo(
1046
1046
  () => ({
1047
- file: {
1048
- forceHLS: playbackType === "hls",
1049
- hlsOptions: isLiveStream ? {
1050
- maxLoadingDelay: 10,
1051
- minAutoBitrate: 0,
1052
- lowLatencyMode: true,
1053
- enableWorker: true
1054
- } : {}
1055
- }
1056
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1047
+ hls: isLiveStream ? {
1048
+ // Performance
1049
+ enableWorker: true,
1050
+ lowLatencyMode: true,
1051
+ // Live edge synchronization - start close to live, not at beginning
1052
+ liveSyncDurationCount: 3,
1053
+ // Start 3 segments behind live edge
1054
+ liveMaxLatencyDurationCount: 10,
1055
+ // Seek to live if >10 segments behind
1056
+ maxLiveSyncPlaybackRate: 1.5,
1057
+ // Speed up to catch up to live edge
1058
+ // Buffer settings
1059
+ maxLoadingDelay: 4,
1060
+ maxBufferLength: 30,
1061
+ maxBufferSize: 60 * 1e3 * 1e3,
1062
+ // 60MB
1063
+ // Bandwidth estimation
1064
+ minAutoBitrate: 0
1065
+ } : void 0
1057
1066
  }),
1058
- [playbackType, isLiveStream]
1067
+ [isLiveStream]
1059
1068
  );
1060
1069
  const formatTimestamp = (seconds) => {
1061
1070
  if (!seconds || isNaN(seconds) || !isFinite(seconds)) return "00:00:00";