resolve merge conflicts in tv page (merge password + quality/subtitle features)
This commit is contained in:
@@ -132,10 +132,10 @@ export function useStreamUrl(
|
||||
slotId: string | undefined,
|
||||
channelPassword?: string,
|
||||
blockPassword?: string,
|
||||
quality?: string,
|
||||
bitrateBps?: number,
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: ["stream-url", channelId, slotId, channelPassword, blockPassword, quality],
|
||||
queryKey: ["stream-url", channelId, slotId, channelPassword, blockPassword, bitrateBps],
|
||||
queryFn: async (): Promise<string | null> => {
|
||||
const params = new URLSearchParams();
|
||||
if (token) params.set("token", token);
|
||||
@@ -151,8 +151,8 @@ export function useStreamUrl(
|
||||
const msg = body?.error ?? `Stream resolve failed: ${res.status}`;
|
||||
throw new Error(msg);
|
||||
}
|
||||
const { url } = await res.json();
|
||||
return url as string;
|
||||
const { url } = (await res.json()) as { url: string };
|
||||
return bitrateBps ? `${url}&VideoBitRate=${bitrateBps}` : url;
|
||||
},
|
||||
enabled: !!channelId && !!slotId,
|
||||
staleTime: Infinity,
|
||||
|
||||
Reference in New Issue
Block a user