chewie
chewie copied to clipboard
Listener callBack is not being invoked.
I am trying to detect when a Chewie video is playing, and when it is not playing, so I can add a text overlay to the video only when it is not playing. I am using the built in chewie video controls UI.
I have added a listener by calling addListener() on the ChewieController...
_controller.addListener(() {
if (_isPlaying != _controller.isPlaying) {
setState(() { _isPlaying = _controller.isPlaying; });
}
});
This call back is not being invoked when the video state changes (play button is push, or pause button is pushed).
It will only get invoked when you hook your listener to the VideoController instead. Adding listener to ChewieController won't work.