abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
132 stars 69 forks source link

onDoubleTap should add pause playback and resume playback #152

Closed JieNengi closed 10 months ago

JieNengi commented 11 months ago

I tried to use it, but it doesn't work when going to full screen.

AspectRatio( aspectRatio: 16 / 9, child: GestureDetector( onDoubleTap: () { if (_controller.playerStatus.playing) { _controller.pause(); } else { _controller.play(); } }, child: MeeduVideoPlayer( controller: _controller, ), ), )

abdelaziz-mahdy commented 11 months ago

I tried to use it, but it doesn't work when going to full screen.

AspectRatio( aspectRatio: 16 / 9, child: GestureDetector( onDoubleTap: () { if (_controller.playerStatus.playing) { _controller.pause(); } else { _controller.play(); } }, child: MeeduVideoPlayer( controller: _controller, ), ), )

You are wrapping the main screen not the Fullscreen too,

abdelaziz-mahdy commented 10 months ago

in 4.2.24 you can add the overlay like this, will work on both fullscreen and normal mode

 MeeduVideoPlayer(
            controller: _meeduPlayerController,
            videoOverlay: (context, controller, responsive) => Container(
              color: Colors.red,
              child: SizedBox(
                height: 50,
                width: 50,
              ),
            ),
            header: (context, controller, responsive) => header,
          ),