fluttercommunity / chewie

The video player for Flutter with a heart of gold
MIT License
1.94k stars 1k forks source link

How do I interact with the overlay widget #371

Open SampatDixit opened 4 years ago

SampatDixit commented 4 years ago

How do I interact with the overlay widget. It does not seem to respond to any click events. Below is my sample code:

Future initVideoPlayer() async { await _controller.initialize(); setState(() { _chewieController = ChewieController( videoPlayerController: _controller,
aspectRatio: _controller.value.aspectRatio,
autoInitialize: true, fullScreenByDefault: true, overlay: overlayWidget(), showControls: true, placeholder: buildPlaceholderImage());
});
}

overlayWidget() { return IconButton( icon: Icon(Icons.edit), color: Colors.yellow, onPressed: () { //this is never called, how I get this working print('icon clicked'); }, ); }

tigrenok00 commented 2 years ago

@SampatDixit Did you find any solution? I need this too

novas1r1 commented 2 years ago

Same problem. Also tried to add GestureDetector on top of the Player Widget but all my input is ignored as soon as VideoPlayer is playing. Could only trigger it using an IgnorePointer on Videoplayer which is obviously not what I want.

ameer-nevrontv commented 1 year ago

Any Update regarding to this?