Add a skip forward button with the code controller.seekTo(videoPosition + Duration(seconds: 10));
Jump to the end of the video by pressing the skip button a couple of times
"Video finished" text will be printed to the console more then once
*Example code
Paste here your minimal reproducible code. This code should be ready to copy-paste-run.
Expected behavioraddEventsListener should call the event function only once with BetterPlayerEventType.finished
Screenshots
If applicable, add screenshots to help explain your problem.
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.2, on Ubuntu 23.04 6.3.6-060306-generic, locale en_IL)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2021.3)
[✓] VS Code
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Better Player version
Version: 0.0.83 from the main package
Smartphone (please complete the following information):
Android emulator
Additional context
Add any other context about the problem here.
Describe the bug
The value
BetterPlayerEventType.finished
arrives twice in the callbackaddEventsListener
when video is completed usingskeepTo
functionTo Reproduce Steps to reproduce the behavior:
controller.addEventsListener(myFunction);
for the videocontroller.seekTo(videoPosition + Duration(seconds: 10));
*Example code Paste here your minimal reproducible code. This code should be ready to copy-paste-run.
Expected behavior
addEventsListener
should call the event function only once withBetterPlayerEventType.finished
Screenshots If applicable, add screenshots to help explain your problem.
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.10.2, on Ubuntu 23.04 6.3.6-060306-generic, locale en_IL) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2022.2) [✓] Android Studio (version 2021.3) [✓] VS Code [✓] Connected device (3 available) [✓] Network resources
• No issues found!
Better Player version
0.0.83
from the main packageSmartphone (please complete the following information): Android emulator
Additional context Add any other context about the problem here.