setBackgroundAudioEnabled
Tells the media components whether the application is permitted and intended to continue audio processing while in the background.
Declaration
public func setBackgroundAudioEnabled(_ enabled: Bool)Overview
The setting is retained by STMediaRunner and is also propagated to already initialized audio-player and audio-recorder components.
Setting this value does not itself grant operating-system background-audio capability. The application must also be configured with the required platform permissions/capabilities.
Default framework behavior is disabled.
iOS background recording limitation
On iOS, enabling background audio does not permit starting a new microphone recording while the application is already in the background. Begin recording in the foreground. A recording already underway may continue in the background when properly configured. This also matters for speech-recognition operations that initiate microphone capture.