fix: default to original audio, and pick tracks from the transport bar
YouTube marks an AI-dubbed audio track DEFAULT=YES on some videos and AVFoundation obeys the manifest, so a synthetic voice played over the original. The app now always serves its own rewritten master playlist — previously only when a quality cap was set — and marks the track whose language matches the video's own as the default, falling back to whichever track does not describe itself as dubbed. Every track is still listed, so switching remains possible. Adds an audio and subtitle picker to the transport bar, reading the video element's audioTracks and textTracks. Subtitles start off for the same reason the dub does: nothing translated is forced on. Also collapses the player's own title-bar strip in window fullscreen, which was leaving a stray bar above the player header.
This commit is contained in:
@@ -21,6 +21,8 @@ interface Props {
|
||||
/** Position in the current feed, for the "3 of 180" readout. */
|
||||
index: number;
|
||||
total: number;
|
||||
/** False in window fullscreen, where there are no traffic lights to clear. */
|
||||
titleBarInset: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +97,7 @@ const RESUME_EDGE_S = 5;
|
||||
*/
|
||||
export default function Player({
|
||||
item, path, onClose, onDelete, onPrev, onNext, onDownload, downloading,
|
||||
maxHeight, index, total,
|
||||
maxHeight, index, total, titleBarInset,
|
||||
}: Props) {
|
||||
const streaming = path === null;
|
||||
const [src, setSrc] = useState<string | null>(path ? fileUrl(path) : null);
|
||||
@@ -208,7 +210,7 @@ export default function Player({
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex flex-col bg-slate-100 dark:bg-slate-950">
|
||||
<div data-tauri-drag-region className="h-9 shrink-0" />
|
||||
{titleBarInset && <div data-tauri-drag-region className="h-9 shrink-0" />}
|
||||
<header
|
||||
className="flex items-center gap-2 border-b border-slate-200 bg-white px-4 py-3
|
||||
dark:border-slate-800 dark:bg-slate-900"
|
||||
|
||||
Reference in New Issue
Block a user