feat(ios): support isLiveStream in PlaybackNotificationInfo - #1240
Merged
mdydek merged 2 commits intoAug 19, 2026
Merged
Conversation
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.
WPT non-regression comparisonPASS — no regressions · 1 improved section(s) · overall 2585 → 2589 (+4)
Unchanged sections (27)
Baseline: Workflow run · this comment is updated on every push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
isLiveStream?: booleantoPlaybackNotificationInfo. On iOS, it's mapped toMPNowPlayingInfoPropertyIsLiveStream, which drives the system "Live" label shown on the lock screenand in CarPlay's Now Playing UI for content with no fixed duration (live radio, live events, etc.).
No effect on Android — there's no equivalent system-level indicator there.
Why
For an app playing live radio streams alongside on-demand content, the lock screen currently has no
way to distinguish "live" from "has a real duration" —
duration/elapsedTimeare the only signals,and omitting them just means no scrubber, not an actual "Live" indicator. This is a small, additive
change that closes that gap using the same key-mapping mechanism every other
PlaybackNotificationInfofield already uses.
How
showNotification's native module signature already takes a generic, untyped options map(
OptionsMap = { [key: string]: string | boolean | number | undefined }inNativeAudioAPIModule.ts),so no TurboModule/codegen changes are needed on either platform — this follows the exact same path
title,duration,skipInterval, etc. already use.src/system/notification/types.ts— add theisLiveStream?: booleanfield.ios/.../PlaybackNotification.mm— add@"isLiveStream" : MPNowPlayingInfoPropertyIsLiveStreamtothe existing
NOW_PLAYING_INFO_KEYSmap.updateNowPlayingInfo:'s update loop already writes anykey present in that map generically, so this one line is the entire native change.
packages/audiodocs/docs/system/playback-notification-manager.mdx— documented the new fieldalongside the existing ones.
PlaybackNotification.kt's full show/update pathand found no rendering surface for a "Live" badge in Android's own
MediaStylenotification/lockscreen to map this to; happy to be corrected if there's a convention I'm missing.
Testing
I have not yet verified this on a real device — this is based on reading the source (the
NOW_PLAYING_INFO_KEYSmapping table and the generic update loop), not a device/simulator run againsta real lock screen or CarPlay session. Apple's docs note
MPNowPlayingInfoPropertyIsLiveStreamcanaffect how the system renders duration/elapsed time alongside it, which I haven't been able to confirm
interacts cleanly with
duration/elapsedTimestill being set. If this looks right in principle, I'dappreciate help confirming actual on-device behavior before merge, or pointers to an existing
test/example app flow I should run it through.
Notes on process
I know
CONTRIBUTING.mdasks that new-feature PRs be preceded by a design doc — given the change isadditive and small (one optional field, one native mapping entry, no API changes to anything existing),
I've folded the rationale into this description rather than opening a separate doc first. Happy to open
a discussion/issue instead if that's preferred for something this size.