fix: eac3 codec support
This commit is contained in:
2 files changed
+30
-28
No files matched your search
@@ -38,7 +38,7 @@ import { useApi } from "../../utils/store/api";
|
|||||||
import { setBackdrop } from "../../utils/store/backdrop";
|
import { setBackdrop } from "../../utils/store/backdrop";
|
||||||
|
|
||||||
import { FormControl, TextField } from "@mui/material";
|
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 workerUrl from "jassub/dist/jassub-worker.js?url";
|
||||||
import wasmUrl from "jassub/dist/jassub-worker.wasm?url";
|
import wasmUrl from "jassub/dist/jassub-worker.wasm?url";
|
||||||
|
|
||||||
@@ -1121,22 +1121,23 @@ const VideoPlayer = () => {
|
|||||||
selectedSubtitle !== "nosub" &&
|
selectedSubtitle !== "nosub" &&
|
||||||
showSubtitles
|
showSubtitles
|
||||||
) {
|
) {
|
||||||
fetchFonts().then((uint8) => {
|
// fetchFonts().then((uint8) => {
|
||||||
const subtitleRendererRaw = new JASSUB({
|
// const subtitleRendererRaw = new JASSUB({
|
||||||
video: player.current.getInternalPlayer(),
|
// video: player.current.getInternalPlayer(),
|
||||||
subUrl: `${api.basePath}/Videos/${item?.Id}/${item?.Id}/Subtitles/${selectedSubtitle}/Stream.ass?api_key=${api.accessToken}`,
|
// subUrl: `${api.basePath}/Videos/${item?.Id}/${item?.Id}/Subtitles/${selectedSubtitle}/Stream.ass?api_key=${api.accessToken}`,
|
||||||
workerUrl,
|
// workerUrl,
|
||||||
wasmUrl,
|
// wasmUrl,
|
||||||
availableFonts: { "noto sans": uint8 },
|
// availableFonts: { "noto sans": uint8 },
|
||||||
fallbackFont: "Noto Sans",
|
// fallbackFont: "Noto Sans",
|
||||||
});
|
// });
|
||||||
setSubtitleRenderer(subtitleRendererRaw);
|
// setSubtitleRenderer(subtitleRendererRaw);
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}, [showSubtitles, selectedSubtitle]);
|
}, [showSubtitles, selectedSubtitle]);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
setPlaying(true);
|
setPlaying(true);
|
||||||
|
console.log(progress);
|
||||||
}, [item?.Id]);
|
}, [item?.Id]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import {
|
|||||||
type DirectPlayProfile,
|
type DirectPlayProfile,
|
||||||
DlnaProfileType
|
DlnaProfileType
|
||||||
} from '@jellyfin/sdk/lib/generated-client';
|
} from '@jellyfin/sdk/lib/generated-client';
|
||||||
import { getSupportedMP4VideoCodecs } from './helpers/mp4-video-formats';
|
import { getSupportedAudioCodecs } from "./helpers/audio-formats";
|
||||||
import { getSupportedMP4AudioCodecs } from './helpers/mp4-audio-formats';
|
import { getSupportedMP4AudioCodecs } from "./helpers/mp4-audio-formats";
|
||||||
|
import { getSupportedMP4VideoCodecs } from "./helpers/mp4-video-formats";
|
||||||
import { hasMkvSupport } from './helpers/transcoding-formats';
|
import { hasMkvSupport } from './helpers/transcoding-formats';
|
||||||
import { getSupportedWebMAudioCodecs } from './helpers/webm-audio-formats';
|
import { getSupportedWebMAudioCodecs } from './helpers/webm-audio-formats';
|
||||||
import { getSupportedWebMVideoCodecs } from './helpers/webm-video-formats';
|
import { getSupportedWebMVideoCodecs } from "./helpers/webm-video-formats";
|
||||||
import { getSupportedAudioCodecs } from './helpers/audio-formats';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a valid DirectPlayProfile for the current platform.
|
* Returns a valid DirectPlayProfile for the current platform.
|
||||||
@@ -58,18 +58,19 @@ export function getDirectPlayProfiles(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const supportedAudio = [
|
const supportedAudio = [
|
||||||
'opus',
|
"opus",
|
||||||
'mp3',
|
"mp3",
|
||||||
'mp2',
|
"mp2",
|
||||||
'aac',
|
"aac",
|
||||||
'flac',
|
"flac",
|
||||||
'alac',
|
"alac",
|
||||||
'webma',
|
"webma",
|
||||||
'wma',
|
"wma",
|
||||||
'wav',
|
"wav",
|
||||||
'ogg',
|
"ogg",
|
||||||
'oga'
|
"oga",
|
||||||
];
|
"eac3",
|
||||||
|
];
|
||||||
|
|
||||||
for (const audioFormat of supportedAudio.filter(format =>
|
for (const audioFormat of supportedAudio.filter(format =>
|
||||||
getSupportedAudioCodecs(format)
|
getSupportedAudioCodecs(format)
|
||||||
|
|||||||
Reference in new issue
Block a user