mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-02 00:36:20 +08:00
committed by
GitHub
parent
0460030a2b
commit
ed2bd069ee
@@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
@@ -473,14 +474,14 @@ class _PostPanelState extends State<PostPanel>
|
||||
await videoCtr.play();
|
||||
}
|
||||
final delay = start - seek;
|
||||
if (delay > 0) {
|
||||
await Future.delayed(Duration(milliseconds: delay));
|
||||
}
|
||||
videoCtr.seek(
|
||||
Duration(
|
||||
milliseconds: (item.segment.second * 1000).round(),
|
||||
),
|
||||
Future<void> seekTo() => videoCtr.seek(
|
||||
Duration(milliseconds: (item.segment.second * 1000).round()),
|
||||
);
|
||||
if (delay > 0) {
|
||||
Timer(Duration(milliseconds: delay), seekTo);
|
||||
} else {
|
||||
seekTo();
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user