mirror of
https://github.com/nini22P/iris.git
synced 2026-06-21 07:16:04 +08:00
fix: backward and forward issue
This commit is contained in:
@@ -289,13 +289,17 @@ FvpPlayer useFvpPlayer(BuildContext context) {
|
||||
}
|
||||
|
||||
Future<void> stepBackward() async {
|
||||
await controller.step(frames: -1);
|
||||
logger('Step backward');
|
||||
if (file?.type == ContentType.video) {
|
||||
await controller.step(frames: -1);
|
||||
logger('Step backward');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> stepForward() async {
|
||||
await controller.step(frames: 1);
|
||||
logger('Step forward');
|
||||
if (file?.type == ContentType.video) {
|
||||
await controller.step(frames: 1);
|
||||
logger('Step forward');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> saveProgress() async {
|
||||
|
||||
@@ -302,11 +302,15 @@ MediaKitPlayer useMediaKitPlayer(BuildContext context) {
|
||||
: await player.seek(newPosition);
|
||||
|
||||
Future<void> backward(int seconds) async {
|
||||
await seekTo(Duration(seconds: position.value.inSeconds - seconds));
|
||||
if (file?.type == ContentType.video) {
|
||||
await seekTo(Duration(seconds: position.value.inSeconds - seconds));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> forward(int seconds) async {
|
||||
await seekTo(Duration(seconds: position.value.inSeconds + seconds));
|
||||
if (file?.type == ContentType.video) {
|
||||
await seekTo(Duration(seconds: position.value.inSeconds + seconds));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> stepBackward() async {
|
||||
|
||||
Reference in New Issue
Block a user