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):
- The ratio drops suddenly to about 0.85–0.89 within a few seconds.
- 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).
- AudioContext.state stays “running” throughout; no exception, no “statechange” event, no console error.
- Audibly: the audio plays slowly / rumbles, then stops. Our scheduled buffers pile up, because currentTime no longer advances at real time.
- 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
- Is this a known issue on webOS 6 (or this model / SoC), and is it fixed in a later firmware or webOS version?
- 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)?
- 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?
- 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.