Compare commits

..

No commits in common. "3d2d53b30758ecc8f97d82e1f8e6babafb974082" and "d29639a9c58a845a7931a0081ecc07fd81d2cc71" have entirely different histories.

3 changed files with 3 additions and 18 deletions

View File

@ -47,8 +47,8 @@ guide to switching back to the official build once the upstream fix lands.
./build-ytdlp.sh
docker buildx build --platform linux/amd64 \
--build-arg VERSION=1.27 \
-t 192.168.2.212:3000/tigeren/metube:1.27 \
--build-arg VERSION=1.26 \
-t 192.168.2.212:3000/tigeren/metube:1.26 \
--push .
```

View File

@ -216,9 +216,7 @@
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<video class="player-video" [src]="playerUrl" controls autoplay
(keydown.escape)="closePlayer()"
(focusin)="onVideoFocusIn($event)"></video>
<video class="player-video" [src]="playerUrl" controls autoplay></video>
</div>
<app-toasts></app-toasts>

View File

@ -180,23 +180,10 @@ export class AppComponent implements OnInit, OnDestroy {
private onPlayerKeydown = (event: KeyboardEvent): void => {
if (event.key === 'Escape' && this.playerUrl) {
// The native video controls (shadow DOM) would otherwise consume the
// key after a seek — stop it so the player closes cleanly instead of
// only highlighting the progress bar.
event.preventDefault();
event.stopPropagation();
this.closePlayer();
}
};
onVideoFocusIn(event: FocusEvent): void {
// The native media controls live in a closed UA shadow root; once one of
// them (e.g. the progress bar after seeking) holds focus, the browser
// consumes Escape internally and no DOM keydown reaches the page. Blur
// the video so focus returns to the document and Escape can close it.
(event.currentTarget as HTMLVideoElement).blur();
}
// ---------- Library (媒体库) ----------
setMode(mode: 'downloads' | 'library'): void {