Skip to main content

Interface: MediaSessionConfig

Defined in: packages/media-session/src/specs/media-session.nitro.ts:588

Both platform halves optional — supply only the platform you care about. The cross-platform options sit at the top level.

Properties

android?

optional android?: AndroidMediaSessionConfig;

Defined in: packages/media-session/src/specs/media-session.nitro.ts:589


ios?

optional ios?: IosMediaSessionConfig;

Defined in: packages/media-session/src/specs/media-session.nitro.ts:590


jumpBackwardSeconds

jumpBackwardSeconds: number;

Defined in: packages/media-session/src/specs/media-session.nitro.ts:623

How far the rewind control jumps, in seconds. See jumpForwardSeconds.

The shared default is 15, not media3's 5. Picked deliberately: 15/15 is what RNTP V4 (forwardJumpInterval/backwardJumpInterval) and RNTP V5 (forwardInterval/backwardInterval) both default to, it is what this package already did on iOS, and a symmetric pair is the only default that cannot surprise someone who sets one and forgets the other. Podcast and audiobook apps then set 30/15 or 30/30 explicitly, which is the whole point.

Default

15

jumpForwardSeconds

jumpForwardSeconds: number;

Defined in: packages/media-session/src/specs/media-session.nitro.ts:609

How far the fastForward control jumps, in seconds.

Cross-platform on purpose, and the reason this option exists at all: before it, the two platforms disagreed from the same JS call. iOS pinned 15 s in both directions (RemoteCommandBinding.skipInterval) while Android set neither increment and therefore inherited media3's defaults — C.DEFAULT_SEEK_BACK_INCREMENT_MS = 5000, C.DEFAULT_SEEK_FORWARD_INCREMENT_MS = 15000 (verified by javap on the shipped media3 1.11.0 AAR) — so the same app skipped back 5 s on Android and 15 s on iOS.

Android: SimpleBasePlayer.State.Builder.setSeekForwardIncrementMs(long), which is what COMMAND_SEEK_FORWARD resolves against before it reaches us as an absolute seek. iOS: MPSkipIntervalCommand.preferredIntervals.

Default

15