From 1ca0c2b67d06c0a42b55a9acb2d1fc17c81357c7 Mon Sep 17 00:00:00 2001 From: Gav Richards Date: Tue, 18 Aug 2026 21:55:29 +0100 Subject: [PATCH 1/2] feat(ios): support isLiveStream in PlaybackNotificationInfo Adds an isLiveStream flag to PlaybackNotificationInfo, mapped to MPNowPlayingInfoPropertyIsLiveStream on iOS. This drives the system "Live" label on the lock screen and CarPlay Now Playing UI for content with no fixed duration (e.g. live radio), matching the isLiveStream concept already found in other RN audio libraries. iOS only: the new key is added to the existing NOW_PLAYING_INFO_KEYS map in PlaybackNotification.mm, so it flows through the same generic show()/update() path every other metadata field already uses -- no native module signature or codegen changes needed. Android has no equivalent system-level indicator, so this is a no-op there. --- .../docs/system/playback-notification-manager.mdx | 9 +++++++++ .../ios/system/notification/PlaybackNotification.mm | 3 ++- .../src/system/notification/types.ts | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/audiodocs/docs/system/playback-notification-manager.mdx b/packages/audiodocs/docs/system/playback-notification-manager.mdx index b84cf25d7..3073e17cb 100644 --- a/packages/audiodocs/docs/system/playback-notification-manager.mdx +++ b/packages/audiodocs/docs/system/playback-notification-manager.mdx @@ -171,6 +171,9 @@ interface PlaybackNotificationInfo { state?: 'playing' | 'paused'; skipInterval?: number; + + // IOS only: shows the system "Live" indicator on the lock screen and CarPlay Now Playing UI + isLiveStream?: boolean; } ``` @@ -183,6 +186,12 @@ interface PlaybackNotificationInfo { - Pass `skipInterval` in the same `show()` call (or earlier) before enabling skip controls, so the interval is applied when controls are first set up. - On Android, skip action icons show `15` when `skipInterval` is `15` (default); otherwise generic skip icons without a number are used. +#### `isLiveStream` + +- Marks the current item as a live stream (e.g. live radio) rather than a track with a known duration. +- iOS only: maps to `MPNowPlayingInfoPropertyIsLiveStream`, which drives the "Live" label shown on the lock screen and CarPlay Now Playing UI. +- No effect on Android — there is no equivalent system-level indicator to map it to. + ### `PlaybackControlName`
diff --git a/packages/react-native-audio-api/ios/audioapi/ios/system/notification/PlaybackNotification.mm b/packages/react-native-audio-api/ios/audioapi/ios/system/notification/PlaybackNotification.mm index b9181a218..1293ef4f5 100644 --- a/packages/react-native-audio-api/ios/audioapi/ios/system/notification/PlaybackNotification.mm +++ b/packages/react-native-audio-api/ios/audioapi/ios/system/notification/PlaybackNotification.mm @@ -9,7 +9,8 @@ @"duration" : MPMediaItemPropertyPlaybackDuration, \ @"elapsedTime" : MPNowPlayingInfoPropertyElapsedPlaybackTime, \ @"speed" : MPNowPlayingInfoPropertyPlaybackRate, \ - @"artwork" : MPMediaItemPropertyArtwork \ + @"artwork" : MPMediaItemPropertyArtwork, \ + @"isLiveStream" : MPNowPlayingInfoPropertyIsLiveStream \ } // Must match PlaybackNotification.DEFAULT_SKIP_INTERVAL_SECONDS on Android. diff --git a/packages/react-native-audio-api/src/system/notification/types.ts b/packages/react-native-audio-api/src/system/notification/types.ts index 3f1060233..878033f36 100644 --- a/packages/react-native-audio-api/src/system/notification/types.ts +++ b/packages/react-native-audio-api/src/system/notification/types.ts @@ -37,6 +37,14 @@ export interface PlaybackNotificationInfo { state?: 'playing' | 'paused'; /** Skip interval in seconds for skipForward/skipBackward. Default: 15 */ skipInterval?: number; + /** + * Marks the current item as a live stream (e.g. live radio) rather than + * a track with a known duration. iOS-only: maps to + * `MPNowPlayingInfoPropertyIsLiveStream`, which drives the "Live" label + * the system shows on the lock screen and CarPlay Now Playing UI. Has no + * effect on Android, which has no equivalent system indicator. + */ + isLiveStream?: boolean; } /// Available playback control actions. From 7447c89600ce0185151c9cd06cf186a34994273f Mon Sep 17 00:00:00 2001 From: michal Date: Wed, 19 Aug 2026 15:47:55 +0200 Subject: [PATCH 2/2] fix: lint --- .../src/system/notification/types.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native-audio-api/src/system/notification/types.ts b/packages/react-native-audio-api/src/system/notification/types.ts index 878033f36..16e295efc 100644 --- a/packages/react-native-audio-api/src/system/notification/types.ts +++ b/packages/react-native-audio-api/src/system/notification/types.ts @@ -38,11 +38,11 @@ export interface PlaybackNotificationInfo { /** Skip interval in seconds for skipForward/skipBackward. Default: 15 */ skipInterval?: number; /** - * Marks the current item as a live stream (e.g. live radio) rather than - * a track with a known duration. iOS-only: maps to - * `MPNowPlayingInfoPropertyIsLiveStream`, which drives the "Live" label - * the system shows on the lock screen and CarPlay Now Playing UI. Has no - * effect on Android, which has no equivalent system indicator. + * Marks the current item as a live stream (e.g. live radio) rather than a + * track with a known duration. iOS-only: maps to + * `MPNowPlayingInfoPropertyIsLiveStream`, which drives the "Live" label the + * system shows on the lock screen and CarPlay Now Playing UI. Has no effect + * on Android, which has no equivalent system indicator. */ isLiveStream?: boolean; }