Skip to content

Commit 0e5a036

Browse files
authored
Add backoffMax search param to lvpr.tv (#585)
1 parent e01f14c commit 0e5a036

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livepeer/core": patch
3+
---
4+
5+
Decrease the minimal value of backoffMax from 10s to 1s

apps/lvpr-tv/src/app/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type PlayerSearchParams = {
2424
muted?: Muted;
2525
loop?: Loop;
2626
lowLatency?: LowLatency;
27+
backoffMax?: number;
2728
objectFit?: ObjectFit;
2829
constant?: Constant;
2930
clipLength?: ClipLength;
@@ -51,6 +52,7 @@ export default async function PlayerPage({
5152
searchParams?.lowLatency === "force"
5253
? "force"
5354
: coerceToBoolean(searchParams?.lowLatency, true),
55+
backoffMax: searchParams?.backoffMax ?? null,
5456
objectFit: searchParams?.objectFit ?? "contain",
5557
clipLength: searchParams?.clipLength
5658
? (Number(searchParams.clipLength) as ClipLength)

apps/lvpr-tv/src/components/player/Player.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type PlayerProps = Partial<{
3030
muted: boolean;
3131
loop: boolean;
3232
lowLatency: boolean | "force";
33+
backoffMax: number | null;
3334
objectFit: "cover" | "contain";
3435
constant: boolean;
3536
clipLength: ClipLength | null;
@@ -97,6 +98,7 @@ export async function PlayerWithControls(props: PlayerProps) {
9798
autoPlay={props.autoplay}
9899
volume={props.muted ? 0 : undefined}
99100
lowLatency={props.lowLatency}
101+
backoffMax={props.backoffMax ?? undefined}
100102
clipLength={props.clipLength ?? null}
101103
playbackRate={props.constant ? "constant" : undefined}
102104
jwt={props.jwt}

packages/core/src/media/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ export const createControllerStore = ({
643643
aspectRatio: initialProps?.aspectRatio ?? null,
644644
autoPlay: initialProps.autoPlay ?? false,
645645
backoff: Math.max(initialProps.backoff ?? 500, 100),
646-
backoffMax: Math.max(initialProps.backoffMax ?? 30000, 10000),
646+
backoffMax: Math.max(initialProps.backoffMax ?? 30000, 1000),
647647
clipLength: initialProps.clipLength ?? null,
648648
cacheWebRTCFailureMs: initialProps.cacheWebRTCFailureMs ?? null,
649649
hotkeys: initialProps?.hotkeys ?? true,

0 commit comments

Comments
 (0)