Skip to content

feat(android): user-selectable playback speed and open-in-external-app for media viewer - #2479

Open
MANICX100 wants to merge 1 commit into
DimensionDev:masterfrom
MANICX100:feature/media-playback-speed
Open

feat(android): user-selectable playback speed and open-in-external-app for media viewer#2479
MANICX100 wants to merge 1 commit into
DimensionDev:masterfrom
MANICX100:feature/media-playback-speed

Conversation

@MANICX100

Copy link
Copy Markdown

Summary

  • User-selectable playback speed: Videos in the media viewer now have a speed button in the player controls that reveals a slider allowing playback speeds from 1x to 4x in 0.1x increments, applied directly to the shared ExoPlayer.
  • Default playback speed setting: New app.media_playback_speed global appearance key (persisted and included in settings export/import) with a slider in Settings > Appearance > Media. The media viewer starts each video at this speed and resets to it when swiping between pages.
  • Open in external app: Any selected media item (image, video, GIF, audio) can be opened in an external app via a new top-bar button and a long-press sheet entry, using an ACTION_VIEW chooser with the appropriate MIME type.

Details

  • The existing long-press fast-playback gesture now restores the user-selected speed on release instead of always snapping back to 1x, and fast-plays at max(2x, selected speed).
  • The fast-playback badge and auto-shown bottom UI now key off actual fast-playback state rather than speed > 1x, so a custom default speed does not pin the UI open.
  • Android-only; shared module changes are limited to the new appearance key and GlobalAppearance field with a default value, so other platforms are unaffected.

Testing

  • Built :app:assembleDebug and verified on a physical device (speed selection, default speed applied on open and page change, fast-playback gesture restore, open-in-external-app for images and videos).

Videos support user-selectable playback speeds from 1x to 4x in
0.1 increments via a speed selector in the player controls, with
a configurable default speed in media settings. All media items
gain an open-in-external-app action in the viewer top bar and
long-press sheet.
Comment on lines +267 to +295
var playbackSpeedValue by remember(globalAppearance.mediaPlaybackSpeed) {
mutableFloatStateOf(globalAppearance.mediaPlaybackSpeed)
}
SegmentedListItem(
onClick = {},
shapes = ListItemDefaults.item(),
content = {
Text(text = stringResource(id = R.string.settings_media_playback_speed))
},
supportingContent = {
Column {
Text(text = stringResource(id = R.string.settings_media_playback_speed_description))
Slider(
value = playbackSpeedValue,
onValueChange = {
playbackSpeedValue = (it * 10).roundToInt() / 10f
},
onValueChangeFinished = {
state.update(AppearanceKeys.MediaPlaybackSpeed, playbackSpeedValue)
},
valueRange = 1f..4f,
steps = 29,
)
}
},
trailingContent = {
Text(text = "%.1fx".format(playbackSpeedValue))
},
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we need this in setting?

@MANICX100

MANICX100 commented Sep 4, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants