frontend: align types to backend, playout HLS, rm Jellyfin proxy (#12)
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import type { LogoPosition } from "@/lib/types";
|
||||
|
||||
function logoPositionClass(pos?: LogoPosition) {
|
||||
function logoPositionClass(pos?: string) {
|
||||
switch (pos) {
|
||||
case "top_left":
|
||||
return "top-0 left-0";
|
||||
@@ -15,7 +13,7 @@ function logoPositionClass(pos?: LogoPosition) {
|
||||
|
||||
interface LogoWatermarkProps {
|
||||
logo: string;
|
||||
position?: LogoPosition;
|
||||
position?: string;
|
||||
opacity?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,6 @@ function TvPageContent() {
|
||||
error: broadcastError,
|
||||
} = useCurrentBroadcast(channel?.id ?? "", passwords.channelPassword);
|
||||
|
||||
const blockPassword = passwords.getBlockPassword(broadcast?.slot.id);
|
||||
|
||||
const { data: epgSlots } = useEpg(
|
||||
channel?.id ?? "",
|
||||
undefined,
|
||||
@@ -102,14 +100,7 @@ function TvPageContent() {
|
||||
const volume = useVolume(videoRef, isCasting);
|
||||
const subtitles = useSubtitlePicker(channelIdx, broadcast?.slot.id);
|
||||
|
||||
const { data: streamUrl, error: streamUrlError } = useStreamUrl(
|
||||
channel?.id,
|
||||
token,
|
||||
broadcast?.slot.id,
|
||||
passwords.channelPassword,
|
||||
blockPassword,
|
||||
quality.quality,
|
||||
);
|
||||
const { data: streamUrl, error: streamUrlError } = useStreamUrl(channel?.id);
|
||||
|
||||
const channelCount = channels?.length ?? 0;
|
||||
|
||||
@@ -176,13 +167,6 @@ function TvPageContent() {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [broadcastError]);
|
||||
|
||||
useEffect(() => {
|
||||
if ((streamUrlError as Error)?.message === "password_required") {
|
||||
passwords.setShowBlockPasswordModal(true);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [streamUrlError]);
|
||||
|
||||
// Clear transient states when slot changes
|
||||
useEffect(() => {
|
||||
setStreamError(false);
|
||||
|
||||
Reference in New Issue
Block a user