feat(tv-page): add subtitle track toggle functionality

This commit is contained in:
2026-03-16 02:42:24 +01:00
parent abcf872d2d
commit b35054f23e
3 changed files with 177 additions and 14 deletions

View File

@@ -429,6 +429,14 @@ function TvPageContent() {
case "M":
toggleMute();
break;
case "c":
case "C":
if (subtitleTracks.length > 0) {
setActiveSubtitleTrack((prev) =>
prev === -1 ? subtitleTracks[0].id : -1,
);
}
break;
default: {
if (e.key >= "0" && e.key <= "9") {
setChannelInput((prev) => {
@@ -464,6 +472,7 @@ function TvPageContent() {
channelCount,
switchChannel,
resetIdle,
subtitleTracks,
]);
// ------------------------------------------------------------------