Fix variable bitrate videos

This commit is contained in:
Zoe Roux 2023-06-06 01:37:27 +09:00
parent 039c644453
commit 206466f9cc
2 changed files with 5 additions and 2 deletions

View File

@ -55,7 +55,9 @@ export const fullscreenAtom = atom(
async (_, set, value: boolean) => {
try {
if (value) {
await document.body.requestFullscreen();
await document.body.requestFullscreen({
navigationUI: "hide",
});
set(privateFullscreen, true);
await screen.orientation.lock("landscape");
} else {

View File

@ -95,7 +95,8 @@ pub async fn identify(path: String) -> Result<MediaInfo, std::io::Error> {
quality: Quality::from_height(parse::<u32>(&v["Height"]).unwrap()),
width: parse::<u32>(&v["Width"]).unwrap(),
height: parse::<u32>(&v["Height"]).unwrap(),
bitrate: parse::<u32>(&v["BitRate"]).unwrap(),
bitrate: parse::<u32>(&v["BitRate"])
.unwrap_or(parse(&general["OverallBitRate"]).unwrap()),
}
},
audios: output["media"]["track"]