fix: native video fullscreen, window dragging, quality picker, spinner

Enable WKWebView's elementFullscreenEnabled at startup. It is off by
default in a Tauri window, which is why the native player had no
full-screen button and why right-click 'Enter Full Screen' did nothing.
With it on, WebKit's own control appears on the video and gives the real
system fullscreen player, so the app-level workaround is gone.

Restore window dragging: data-tauri-drag-region needs
core:window:allow-start-dragging, which was missing, leaving the
title-bar strip inert.

Download quality is now a resolution picker (best/2160/1440/1080/720/
480) instead of a two-way toggle; every selector still pins AAC audio
because Opus in MP4 is silent in WebKit.

Tile titles truncate to a single line so rows stay uniform, and the
player shows a spinner while the video buffers, not just while the
stream URL resolves.
This commit is contained in:
vincent
2026-08-29 10:38:35 +02:00
parent 359873cff1
commit 61db10b2c8
11 changed files with 143 additions and 106 deletions
+18 -14
View File
@@ -3,7 +3,7 @@ import {
checkPrereqs, importTakeoutCsv, pickLibraryFolder, pickTakeoutFile, previewTakeoutImport,
} from "../api";
import { APPEARANCE_MODES, type Appearance } from "../hooks/useAppearance";
import type { ImportPreview, Prereqs, Quality } from "../types";
import { QUALITIES, type ImportPreview, type Prereqs, type Quality } from "../types";
import TakeoutGuide from "./TakeoutGuide";
import {
BTN_CHROME, BTN_PRIMARY, Dialog, HELP, LABEL, SectionHeading, Segmented, SUBPANEL,
@@ -126,22 +126,26 @@ export default function Settings({
<section className="border-b border-slate-200 px-5 py-4 dark:border-slate-800">
<SectionHeading>Download quality</SectionHeading>
<p className={`mt-1.5 ${HELP}`}>
<b>Best</b> takes the highest resolution available, up to 4K above 1080p
that means VP9 or AV1, which your Mac decodes but older ones may not, and
the files are several times larger. <b>Compatible</b> caps at 1080p H.264,
which plays anywhere. Audio is AAC either way.
Above 1080p YouTube only serves VP9 and AV1. Those play here, but the
files are several times larger and older Macs may struggle. Pick 1080p
for H.264, which plays anywhere. Audio is AAC at every setting.
</p>
<div className="mt-2 flex items-center justify-between gap-3">
<label className="mt-2 grid grid-cols-[92px_1fr] items-center gap-2">
<span className={LABEL}>Quality</span>
<Segmented
<select
value={quality}
onChange={onQuality}
options={[
{ value: "best", label: "Best (4K)" },
{ value: "compatible", label: "Compatible" },
]}
/>
</div>
onChange={(e) => onQuality(e.target.value as Quality)}
className="w-full rounded-lg border border-slate-300 bg-white px-2 py-1.5
text-[13px] outline-none cursor-pointer
dark:border-slate-700 dark:bg-slate-800"
>
{QUALITIES.map((q) => (
<option key={q.value} value={q.value}>
{q.label}
</option>
))}
</select>
</label>
</section>
<section className="border-b border-slate-200 px-5 py-4 dark:border-slate-800">