Continue playing podcasts, music, and audio streams uninterrupted when the app is backgrounded or screen is locked.
Continue playing audio streams uninterrupted when the app is in the background. Nativine embeds native iOS AVAudioSession (Audio, AirPlay, and Picture in Picture) and Android Foreground Service media bridges, enabling seamless podcast, music, and radio streaming.
Standard web browsers pause audio playback when users lock their screen or switch apps. Nativine's Background Audio plugin registers native OS background execution services:
To start background audio playback or update Now Playing lock screen metadata in JavaScript, call nativine.backgroundAudio.play():
nativine.backgroundAudio.play({
streamUrl: 'https://stream.yourstation.com/live.mp3',
title: 'Daily Tech Podcast - Ep 42',
artist: 'Tech News Network',
artworkUrl: 'https://cdn.yourstation.com/art.jpg',
callback: 'onAudioStarted'
});
// Update metadata dynamically
nativine.backgroundAudio.updateMetadata({
title: 'Next Track Title',
artist: 'New Artist'
});
| Parameter | Type | Description |
|---|---|---|
streamUrl | string | Required. Live audio stream or MP3/AAC file URL. |
title | string | Required. Track title string for lock screen display. |
No, as long as your application provides actual audio streaming functionality (podcasts, music, radio), which satisfies App Store Review Guidelines.
Yes. Native OS audio session handling automatically pauses audio during incoming phone calls and resumes when ended.