# Background Audio

ByteArk Player SDK for iOS supports continuing audio playback while the app is backgrounded or the screen is locked, via enableBackgroundAudio() on the player instance.

# Background mode setup

In your Xcode project's Capabilities, enable Background Mode "Audio, AirPlay, and Picture in Picture".

# Enable via API

// Enable background audio
player.enableBackgroundAudio()
// Disable background audio
player.disableBackgroundAudio()
1
2
3
4
5

# Combine with Remote Control Center

When background audio is enabled, it's recommended to also enable the Remote Control Center so viewers can control playback from iOS Control Center and the Lock screen — see Remote Control.