diff --git a/src/routes/player/videoPlayer.tsx b/src/routes/player/videoPlayer.tsx index 4141949..b9fd100 100644 --- a/src/routes/player/videoPlayer.tsx +++ b/src/routes/player/videoPlayer.tsx @@ -38,7 +38,7 @@ import { useApi } from "../../utils/store/api"; import { setBackdrop } from "../../utils/store/backdrop"; import { FormControl, TextField } from "@mui/material"; -import JASSUB from "jassub"; +import type JASSUB from "jassub"; import workerUrl from "jassub/dist/jassub-worker.js?url"; import wasmUrl from "jassub/dist/jassub-worker.wasm?url"; @@ -1121,22 +1121,23 @@ const VideoPlayer = () => { selectedSubtitle !== "nosub" && showSubtitles ) { - fetchFonts().then((uint8) => { - const subtitleRendererRaw = new JASSUB({ - video: player.current.getInternalPlayer(), - subUrl: `${api.basePath}/Videos/${item?.Id}/${item?.Id}/Subtitles/${selectedSubtitle}/Stream.ass?api_key=${api.accessToken}`, - workerUrl, - wasmUrl, - availableFonts: { "noto sans": uint8 }, - fallbackFont: "Noto Sans", - }); - setSubtitleRenderer(subtitleRendererRaw); - }); + // fetchFonts().then((uint8) => { + // const subtitleRendererRaw = new JASSUB({ + // video: player.current.getInternalPlayer(), + // subUrl: `${api.basePath}/Videos/${item?.Id}/${item?.Id}/Subtitles/${selectedSubtitle}/Stream.ass?api_key=${api.accessToken}`, + // workerUrl, + // wasmUrl, + // availableFonts: { "noto sans": uint8 }, + // fallbackFont: "Noto Sans", + // }); + // setSubtitleRenderer(subtitleRendererRaw); + // }); } }, [showSubtitles, selectedSubtitle]); useLayoutEffect(() => { setPlaying(true); + console.log(progress); }, [item?.Id]); return ( diff --git a/src/utils/playback-profiles/directplay-profile.ts b/src/utils/playback-profiles/directplay-profile.ts index 04a9d59..51246ad 100644 --- a/src/utils/playback-profiles/directplay-profile.ts +++ b/src/utils/playback-profiles/directplay-profile.ts @@ -6,12 +6,12 @@ import { type DirectPlayProfile, DlnaProfileType } from '@jellyfin/sdk/lib/generated-client'; -import { getSupportedMP4VideoCodecs } from './helpers/mp4-video-formats'; -import { getSupportedMP4AudioCodecs } from './helpers/mp4-audio-formats'; +import { getSupportedAudioCodecs } from "./helpers/audio-formats"; +import { getSupportedMP4AudioCodecs } from "./helpers/mp4-audio-formats"; +import { getSupportedMP4VideoCodecs } from "./helpers/mp4-video-formats"; import { hasMkvSupport } from './helpers/transcoding-formats'; import { getSupportedWebMAudioCodecs } from './helpers/webm-audio-formats'; -import { getSupportedWebMVideoCodecs } from './helpers/webm-video-formats'; -import { getSupportedAudioCodecs } from './helpers/audio-formats'; +import { getSupportedWebMVideoCodecs } from "./helpers/webm-video-formats"; /** * Returns a valid DirectPlayProfile for the current platform. @@ -58,18 +58,19 @@ export function getDirectPlayProfiles( } const supportedAudio = [ - 'opus', - 'mp3', - 'mp2', - 'aac', - 'flac', - 'alac', - 'webma', - 'wma', - 'wav', - 'ogg', - 'oga' - ]; + "opus", + "mp3", + "mp2", + "aac", + "flac", + "alac", + "webma", + "wma", + "wav", + "ogg", + "oga", + "eac3", + ]; for (const audioFormat of supportedAudio.filter(format => getSupportedAudioCodecs(format)