mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-15 13:43:56 +08:00
tweaks (#2032)
* fix: 1080p * opt: import export * opt: downloader * opt: skeleton * opt: parseColor * tweak * opt: sb seek * opt: rxn
This commit is contained in:
committed by
GitHub
parent
b7b40c557e
commit
f5dbfcec79
@@ -467,14 +467,21 @@ class _PostPanelState extends State<PostPanel>
|
||||
final player = plPlayerController.videoPlayerController;
|
||||
if (player != null) {
|
||||
final start = (item.segment.first * 1000).round();
|
||||
Future<void> seekTo() => player.seek(
|
||||
Duration(milliseconds: (item.segment.second * 1000).round()),
|
||||
);
|
||||
if (start <= 0) {
|
||||
seekTo();
|
||||
if (!player.state.playing) {
|
||||
await player.play();
|
||||
}
|
||||
return;
|
||||
}
|
||||
final seek = max(0, start - 2000);
|
||||
await player.seek(Duration(milliseconds: seek));
|
||||
if (!player.state.playing) {
|
||||
await player.play();
|
||||
}
|
||||
Future<void> seekTo() => player.seek(
|
||||
Duration(milliseconds: (item.segment.second * 1000).round()),
|
||||
);
|
||||
if (start > seek) {
|
||||
final posSub = player.stream.position.listen(
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user