media-kit / media-kit

A cross-platform video player & audio player for Flutter & Dart.
https://github.com/media-kit/media-kit
MIT License
893 stars 126 forks source link

Wrap video in Inkwell, onTap not working #764

Closed hupo376787 closed 1 month ago

hupo376787 commented 1 month ago

Hi, I wrap the video widget in Inkwell, then I can't fire onTap event. So how to fix it, or get the event when click ton the video?

InkWell(
                    onTap: () {
                      debugPrint('onTap InkWell');
                      setState(() {
                        menuVisible = !menuVisible;
                      });
                    },
                    child: SizedBox(
                      width: MediaQuery.of(context).size.width,
                      height: MediaQuery.of(context).size.width * 9.0 / 16.0,
                      child: Video(
                        controller: controller,
                      ),
                    ),
                  )
hupo376787 commented 1 month ago

Seems AdaptiveVideoControls has overlayed all area. When I use NoVideoControls, onTap event works. image

sevenrats commented 1 month ago

your Inkwell's internal GestureDetector needs to have it's hittestbehavior set to translucent. i dont think it has anything to do with media-kit