AudioContext produces an audible pop, and shows evidence of a full native audio-session teardown/rebuild (not just suspension), when the device is locked while audio is playing inside a WKWebView.

Summary

AudioContext produces an audible pop, when the device is locked while audio is playing inside a WKWebView.

Environment

Device: iPhone 13

Host: Reddit iOS app, embedding web content via WKWebView (not standalone Mobile Safari)

This is a game built on Reddit's Devvit platform (Reddit's developer platform for building interactive apps/games that run embedded inside the Reddit app itself, rendered via WKWebView).

Web Audio library: @pixi/sound

Steps to Reproduce

Start audio playback via a user gesture (tap) inside the WKWebView. Lock the device screen while audio is actively playing. Listen at the moment of locking (and/or unlocking). Expected Result

Audio should mute/pause cleanly with no audible artifact, matching a normal, clean audio session interruption (e.g. a phone call taking the audio session).

Actual Result

An audible pop/sweep artifact plays on the device speaker at this transition.

AudioContext produces an audible pop, and shows evidence of a full native audio-session teardown/rebuild (not just suspension), when the device is locked while audio is playing inside a WKWebView.
 
 
Q