[GH-ISSUE #8618] [Issue]: Custom Music DJ shows persistent play() interruption warning after audio resumes #8426

Closed
opened 2026-11-07 16:42:53 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @psych0genesis on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8618

Originally assigned to: @SpicyMarinara on GitHub.

Summary

During Roleplay Custom/local Music DJ playback, the top-bar player showed an error title beginning "The play() request was interrupted by a c..." and subtitle "Playback needs attention", while music had resumed and the player was showing the pause control. The Music DJ agent's activity panel reported no agent failure.

This appears to be a browser media-playback interruption (possibly a play() promise rejected by a subsequent pause()) being displayed as an ongoing failure after playback succeeds. The screenshot truncates the exact browser exception text, so the precise suffix and reproduction frequency remain unverified.

Observation / likely sequence

  1. In a Roleplay chat, enable Music DJ with Custom source using a local audio folder and subfolders of supported .flac files.
  2. Generate a reply and let Music DJ select/play an audio track.
  3. On a later reply, the DJ selects another track and audio begins again.
  4. The top-bar title can display the interrupted play() error and "Playback needs attention" despite playback continuing.

The resulting UI makes a transient interruption look like a current failure, even though the agent itself succeeded.

Source-code findings

In packages/client/src/components/chat/LocalMusicPlayer.tsx:

  • New selections intentionally call audio.pause(), remove the existing src, call audio.load(), and then start a new asynchronous audio.play().
  • The async source-loading branch checks sourceLoadId before displaying a rejection, but togglePlay() has an unconditional .catch((err) => setError(...)), even if a newer track has since started.
  • setError(null) occurs when starting a new source selection, but the successful audio.play() completion does not clear a stale error.
  • displayTitle = error ? error : ... and displaySubtitle = error ? "Playback needs attention" : ... keep showing the error as long as error remains set.

Expected behavior

  • Treat an expected AbortError arising from deliberate audio pause/load/replacement as benign, when an old playback attempt was superseded.
  • Avoid allowing errors from earlier pending play() calls to overwrite a later, successful playback state.
  • Clear prior playback errors once the active track is confirmed playing, including manual resume.
  • Preserve genuine loading, decoding, access and unsupported-file errors.

Environment

Desktop Chromium browser, Custom Music DJ source, local/shared-folder FLAC tracks; exact browser build and app version not supplied.

Scope

This is a client-side player error-state report, not a claim that FLAC, Unicode filenames, nested folders, or the DJ selection agent are broken.

Originally created by @psych0genesis on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8618 Originally assigned to: @SpicyMarinara on GitHub. ## Summary During Roleplay Custom/local Music DJ playback, the top-bar player showed an error title beginning **"The play() request was interrupted by a c..."** and subtitle **"Playback needs attention"**, while music had resumed and the player was showing the pause control. The Music DJ agent's activity panel reported no agent failure. This appears to be a browser media-playback interruption (possibly a `play()` promise rejected by a subsequent `pause()`) being displayed as an ongoing failure after playback succeeds. The screenshot truncates the exact browser exception text, so the precise suffix and reproduction frequency remain unverified. ## Observation / likely sequence 1. In a Roleplay chat, enable Music DJ with **Custom** source using a local audio folder and subfolders of supported `.flac` files. 2. Generate a reply and let Music DJ select/play an audio track. 3. On a later reply, the DJ selects another track and audio begins again. 4. The top-bar title can display the interrupted `play()` error and **"Playback needs attention"** despite playback continuing. The resulting UI makes a transient interruption look like a current failure, even though the agent itself succeeded. ## Source-code findings In `packages/client/src/components/chat/LocalMusicPlayer.tsx`: - New selections intentionally call `audio.pause()`, remove the existing `src`, call `audio.load()`, and then start a new asynchronous `audio.play()`. - The async source-loading branch checks `sourceLoadId` before displaying a rejection, but `togglePlay()` has an unconditional `.catch((err) => setError(...))`, even if a newer track has since started. - `setError(null)` occurs when starting a new source selection, but the successful `audio.play()` completion does not clear a stale error. - `displayTitle = error ? error : ...` and `displaySubtitle = error ? "Playback needs attention" : ...` keep showing the error as long as `error` remains set. ## Expected behavior - Treat an expected `AbortError` arising from deliberate audio pause/load/replacement as benign, when an old playback attempt was superseded. - Avoid allowing errors from earlier pending `play()` calls to overwrite a later, successful playback state. - Clear prior playback errors once the active track is confirmed playing, including manual resume. - Preserve genuine loading, decoding, access and unsupported-file errors. ## Environment Desktop Chromium browser, Custom Music DJ source, local/shared-folder FLAC tracks; exact browser build and app version not supplied. ## Scope This is a **client-side player error-state** report, not a claim that FLAC, Unicode filenames, nested folders, or the DJ selection agent are broken.
bsakaguchi 2026-11-07 16:42:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8426
No description provided.