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..16e295efc 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.