Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions fs42/fs42_server/static/remote.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<button class="remote-btn function-btn" data-key="exit">EXIT</button>
<button class="remote-btn function-btn" data-key="mute">MUTE</button>
<button class="remote-btn function-btn" data-key="info">INFO</button>
<!-- Cycle MPV tracks without changing channel playback. The player shows
the selected audio/subtitle track on MPV's on-screen display. -->
<button class="remote-btn function-btn" data-key="subtitles">SUBS</button>
<button class="remote-btn function-btn" data-key="audio">AUDIO</button>
</div>
</div>

Expand Down Expand Up @@ -428,6 +432,29 @@
case 'info':
toggleInfoMode();
break;
case 'subtitles':
try {
// Queue a non-interrupting MPV command; station_player.py
// cycles the selected subtitle track and displays its label.
await window.fs42Api.post('player/mpv/cycle-subtitles');
display.textContent = 'SUBTITLES';
console.log('Cycle subtitles command sent');
} catch (error) {
console.error('Cycle subtitles failed:', error);
display.textContent = 'ERROR';
}
break;
case 'audio':
try {
// Same path as subtitles, but cycling the active audio track.
await window.fs42Api.post('player/mpv/cycle-audio');
display.textContent = 'AUDIO';
console.log('Cycle audio command sent');
} catch (error) {
console.error('Cycle audio failed:', error);
display.textContent = 'ERROR';
}
break;
default:
display.textContent = key.toUpperCase();
}
Expand Down