mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
feat: new shortcuts to increase and decrease playback rate
This commit is contained in:
parent
ee0fb85eb5
commit
838c5b3485
5 changed files with 27 additions and 0 deletions
|
|
@ -69,6 +69,15 @@ class VideoPlayerSettingsProviderNotifier extends StateNotifier<VideoPlayerSetti
|
|||
ref.read(videoPlayerProvider).setVolume(value);
|
||||
}
|
||||
|
||||
void steppedSpeed(double i) {
|
||||
final value = double.parse(
|
||||
((ref.read(playbackRateProvider) + i).clamp(0.25, 3))
|
||||
.toStringAsFixed(2),
|
||||
);
|
||||
ref.read(playbackRateProvider.notifier).state = value;
|
||||
ref.read(videoPlayerProvider).setSpeed(value);
|
||||
}
|
||||
|
||||
void toggleOrientation(Set<DeviceOrientation>? orientation) =>
|
||||
state = state.copyWith(allowedOrientations: orientation);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue