Web Audio output slows down and stops after 20–190 min of playback (AudioContext.currentTime < 1× real time), only backgrounding the app recovers it – webOS 6, 50UP75006LF

Hello,

we are developing a web app for webOS TV (a music visualizer for internet radio, WebGL 2 + Web Audio) and are seeing a reproducible failure of the Web Audio output on a 2021 TV after long playback. Nothing we can do inside the app recovers it; sending the app to the background does. We would like to know whether this is a known platform issue and whether there is a supported way to recover from it.

ENVIRONMENT

  • TV: LG 50UP75006LF (2021), board LM21A_DVB_EU, OTA ID HE_DTV_W21A_AFADATAA
  • Software: webOS 6.0 (SDK version 6.6.0), firmware 03.60.96 (from ares-device -i)
  • Browser engine: Chromium 79 (the webOS 6.0 web engine)
  • App type: packaged web app (.ipk via ares-install, Developer Mode), launched normally from the launcher
  • No

AUDIO PIPELINE

  • One AudioContext for the app’s lifetime, default sample rate (48000 Hz on this TV). An earlier build forced
    44100 Hz; the failure is the same at both rates.
  • The stream is fetched with fetch() (ReadableStream), decoded to PCM in JavaScript/WebAssembly (MP3; AAC via decodeAudioData on chunks), and played as a chain of AudioBufferSourceNodes scheduled back to back, about 4–5 s ahead of currentTime.
  • Graph: AudioBufferSourceNode → GainNode (per station) → GainNode (output) → destination,
    plus AnalyserNodes / a ChannelSplitter fed from the output gain (for the visuals).
  • Rendering: WebGL 2 canvas, requestAnimationFrame, 50–60 fps.

HOW WE MEASURE

Once per second we compare AudioContext.currentTime with performance.now() over a sliding 20 s window.
Normally the ratio is 0.995–1.003. The app sends these numbers to our server, so we have a minute-by-minute record of every session.

SYMPTOM

After 20 to 188 minutes of continuous playback (about ten occurrences between 2026-11-26 and 2026-11-29, on a single station as well as across station changes, counted from app launch or from the last recovery):

  1. The ratio drops suddenly to about 0.85–0.89 within a few seconds.
  2. Within the next minutes it falls further (0.70×, 0.42×, 0.20×, 0.17× seen), and in several sessions to 0 (currentTime stops advancing).
  3. AudioContext.state stays “running” throughout; no exception, no “statechange” event, no console error.
  4. Audibly: the audio plays slowly / rumbles, then stops. Our scheduled buffers pile up, because currentTime no longer advances at real time.
  5. Once it has happened, it stays that way until the app leaves the foreground (see below).

The JS heap stays between about 30 and 180 MB with no growth trend (33 MB at the 20-minute onset); frame rate is unaffected. Switching off the TV’s power-saving options made no difference.

WHAT DOES NOT RECOVER IT

  • audioContext.suspend(), then resume() after 1 s or 5 s.
  • audioContext.close(), waiting 3 s, then creating a new AudioContext and rebuilding the graph: the new context’s currentTime runs at the same reduced rate from its very first second (we measured 0.85× and 0.70× on two occasions, matching the old context just before it was closed).
  • Creating a second AudioContext while the first is still open: its clock is stuck as well.
  • location.reload() of the app.
  • A larger output buffer: AudioContext({latencyHint: ‘playback’}) (baseLatency 42.7 ms = 2048 frames at 48 kHz) failed after 77 minutes.
  • Reducing GPU load: a whole session with the canvas at 25 % resolution and only light visuals (steady 50–60 fps) failed after 87 minutes, the same as with full load.

WHAT RECOVERS IT

  • Pressing Home, waiting a few seconds, then opening the app again from the launcher (the app is not restarted: same page, same AudioContext). currentTime runs at 1.00× again immediately. This worked every time.
  • Calling webOSSystem.deactivate() from the app has the same effect once the user reopens the app. However, webOSSystem.activate() called from a setTimeout 5 s after deactivate() never brought the app back to the foreground; the user had to reopen it.

Our reading is that the per-app audio output path below the renderer (not the AudioContext itself)
slows down and stalls, and that it is released and re-created when the app loses and regains the
foreground.

QUESTIONS

  1. Is this a known issue on webOS 6 (or this model / SoC), and is it fixed in a later firmware or webOS version?
  2. Is there a supported way for a web app to reset its audio output without leaving the foreground (an API, an appinfo.json setting, a Luna service)?
  3. Is webOSSystem.activate() expected to work for an app that put itself in the background with deactivate()? If not, is there a supported way for an app to come back to the foreground by itself?
  4. Is there anything we can collect in Developer Mode (logs, a debug flag) that would help you look into it?

We can provide the minute-by-minute measurements of any of these sessions, and a test build.

Thank you.ps or post questions regarding Web app development.

Thank you.

Update, with a workaround and some more findings (same TV: 50UP75006LF, webOS 6, firmware 03.60.96).

  1. The TV’s media pipeline is not affected. We played the same station through a plain < audio src > while the Web Audio graph kept running muted beside it. When AudioContext.currentTime fell to 0.36x real time (after 80 minutes), the < audio > element kept advancing at 1.00x (232 s of media in 232 s), with no waiting/stalled events and no errors.

  2. The hang outlives the app. A build installed and launched (ares-install / ares-launch) while the output was hung started with its AudioContext clock already standing still. Home and back then freed the clock, but AnalyserNodes in that session returned only zeros while the sound played, through two more visits to Home; only closing the app and starting it again brought them back.

  3. Our workaround: no Web Audio output at all on webOS. Everything is played through one < audio > element on a MediaSource. The first overnight run played 9 h 20 min without the fault (with Web Audio it had failed in every run, after 20-190 minutes).

  4. Two things we ran into along the way that may be worth checking on your side, both on webOS 6:

    • MediaSource.isTypeSupported(‘audio/mpeg’) returns true, the SourceBuffer accepts MP3 data, but playback fails with MEDIA_ERR_SRC_NOT_SUPPORTED “DECODER_ERROR_NOT_SUPPORTED”. MP3 in fragmented MP4 (‘audio/mp4; codecs=“mp3”’ / “mp4a.6B” / “mp4a.69”) is reported as unsupported. A plain < audio src > with the same MP3 stream plays.
    • isTypeSupported(‘audio/mp4; codecs=“flac”’) returns true, but playback fails with
      “PIPELINE_ERROR_DECODE”, also for a file made by ffmpeg. AAC (ADTS, ‘audio/aac’), AAC in MP4 and Opus (WebM and MP4) play fine through MSE, so for MP3 streams we
      now decode in the app and re-encode to Opus.

Our questions from the first post still stand, especially whether the Web Audio hang is known and fixed in a later firmware, and whether isTypeSupported is expected to report MP3 and FLAC as supported for MSE on this platform.