Events Listener for BetterPlayerPlaylist #1248
Unanswered
marshallaxum
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could someone help with showing how to add events listener for BetterPlayerPlaylist.
i wish to know when a video at a specified index finishes so I can pause or stop player, display a different page/widget, then come back to the player page to resume with the next video
i have tried this in initState, but both don't work
_betterPlayerController =
BetterPlayerController(_betterPlayerConfiguration);
_betterPlayerController.addEventsListener(_handleEvent);
OR THIS
_betterPlayerPlaylistController!.betterPlayerController!.addEventsListener(_handleEvent);
Here's the _handleEvent code. Nothing is printing. i have debugged and it's not even coming in here.
void _handleEvent(BetterPlayerEvent event) {
events.insert(0, event);
}
Beta Was this translation helpful? Give feedback.
All reactions