feat(tv-page): add subtitle track toggle functionality
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user