mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Keep Radio Next and Previous from starting playback before Play
The Next and Previous buttons cycled stations with the layer's default autoplay, so a first press started buffering a broadcaster stream even though the panel says audio connects only after Play. Stepping now only selects until a stream is loading, buffering or playing; once one is, playback follows the new station so the old broadcaster does not keep playing under the new label. The compact Next fallback scenario in qa-radio.mjs started from a stopped stream and relied on the old behaviour, so it now starts from a playing station. Fixes HAL-722 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c434664549
commit
1ef9be2248
3 files changed
+52
-2
No files matched your search
@@ -338,9 +338,14 @@ export function bindRadioControls() {
|
||||
const pool = this._radioTunerPool.length
|
||||
? this._radioTunerPool
|
||||
: this._radioTunerStations;
|
||||
// Stepping only selects until the user has pressed Play; once a stream is
|
||||
// active it follows the selection so the old broadcaster does not keep
|
||||
// playing under a new station label.
|
||||
const { audioState } = this.radio.getUIState();
|
||||
const cycled = this.radio.cycleStation(direction, {
|
||||
rotate,
|
||||
stationIds: pool.map((station) => station.id),
|
||||
autoplay: ['loading', 'buffering', 'playing'].includes(audioState),
|
||||
origin: 'user',
|
||||
});
|
||||
if (!cycled) {
|
||||
|
||||
Reference in new issue
Block a user