mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 18:08:40 +00:00
fix #181
This commit is contained in:
parent
511e304f20
commit
d561ce647e
1 changed files with 10 additions and 5 deletions
|
|
@ -228,14 +228,19 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
videoController?.setLooping(content.maxShowTime == gMediaShowInfinite);
|
||||
videoController?.initialize().then((_) {
|
||||
videoController!.play();
|
||||
if (content.maxShowTime != gMediaShowInfinite) {
|
||||
videoController?.addListener(() {
|
||||
videoController?.addListener(() {
|
||||
setState(() {
|
||||
progress = 1 -
|
||||
videoController!.value.position.inSeconds /
|
||||
videoController!.value.duration.inSeconds;
|
||||
});
|
||||
if (content.maxShowTime != gMediaShowInfinite) {
|
||||
if (videoController?.value.position ==
|
||||
videoController?.value.duration) {
|
||||
nextMediaOrExit();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
setState(() {
|
||||
videoPath = videoPathTmp.path;
|
||||
});
|
||||
|
|
@ -560,7 +565,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
),
|
||||
),
|
||||
),
|
||||
if (canBeSeenUntil != null)
|
||||
if (canBeSeenUntil != null || progress >= 0)
|
||||
Positioned(
|
||||
right: 20,
|
||||
top: 27,
|
||||
|
|
|
|||
Loading…
Reference in a new issue