[expo-audio] Add support for disabling lock screen scrubbing in expo-audio setActiveForLockScreen
A
Andrew
The current setActiveForLockScreen API in expo-audio provides options to control lock screen media controls such as showSeekBackward and showSeekForward, but it does not expose a way to disable scrubbing (dragging the playback progress bar) from the system lock screen media player.
However, native media frameworks already support restricting or disabling this behavior. Exposing this capability in Expo would allow developers to have finer control over playback interactions on the lock screen.
Proposed enhancement:
Add a new option, for example: showScrubbing?: boolean or allowScrubbing?: boolean. Defaulting to true for backward compatibility.
Use case:
This feature is useful in scenarios where scrubbing should be restricted, for example:
- Advertisement playback where skipping or seeking must be prevented;
- Licensed or time-sensitive content where seeking is not allowed;
- Guided audio experiences (e.g., meditation, educational content) where linear playback is required.
Expected behavior:
When showScrubbing: false, the system lock screen media interface should not allow the user to drag or change the playback position, while still allowing basic controls like play/pause.
See the PR: https://github.com/expo/expo/pull/45038