-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get onClickListener for play button. #16
Comments
Hey, thanks for writing in. I'm not handling that case effectively. I mostly assumed with this plugin that you'd just use Chewie for playback, rather than providing additional controls outside of the widget, but it could be changed to support this. Traveling for the next couple weeks, but happy to accept a PR if you need this functionality sooner, or I'll try to take a look when I'm back in action! |
After looking at this one, rather than supplying an |
Hi @smzranz -- does the idea of listening to the play events from the videoPlayerController work for ya? Or would ya need the event handler to fire as soon as tapping the button? |
hi,
|
Ah, I was thinking of a slightly different use-case, sorry about that. Ok, I'm thinking of introducing a I'll try that path and see if it makes this a bit easier to work with |
I don't think there is much to do on our side. Adding play / pause can be easily done from the outside by using the play / pause methods of the controller. @smzranz instead of floatingActionButton: FloatingActionButton(
child: _controller.value.isPlaying
? Icon(Icons.pause)
: Icon(Icons.play_arrow),
onPressed: () {
if (_controller.value.isPlaying) {
setState(() {
_controller.pause();
});
} else {
setState(() {
_controller.play();
});
}
}), |
Am new to flutter and dart.
Is there any delegate method or any OnClickListener method when tapping play button.
On Pressed of floating button is not working properly.
I tried to add Gesture too.
The text was updated successfully, but these errors were encountered: