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

onLongPressStart and onLongPressEnd #86

Closed JieNengi closed 1 year ago

JieNengi commented 1 year ago

go full screen,I need the relevant callback methods for onLongPressStart and onLongPressEnd, but I couldn't find. Can we increase support?

abdelaziz-mahdy commented 1 year ago

On video player long press? What is it for? And on desktop or mobile?

Did you try to wrap the video player with a gesture detector and implement those functions by yourself? (Note: I think the hit behavior should be translucent)

JieNengi commented 1 year ago

On video player long press? What is it for? And on desktop or mobile?

Did you try to wrap the video player with a gesture detector and implement those functions by yourself? (Note: I think the hit behavior should be translucent)

on mobile,Users usually do this: 1.onLongPressStart:video will 2x speed play 2.onLongPressEnd:video returns to normal speed I tried to use stack and add gesture to the topmost layer of flutter_meedu_videoplayer, but it didn't work.

abdelaziz-mahdy commented 1 year ago

On video player long press? What is it for? And on desktop or mobile?

Did you try to wrap the video player with a gesture detector and implement those functions by yourself? (Note: I think the hit behavior should be translucent)

on mobile,Users usually do this: 1.onLongPressStart:video will 2x speed play 2.onLongPressEnd:video returns to normal speed I tried to use stack and add gesture to the topmost layer of flutter_meedu_videoplayer, but it didn't work.

No need for stack just a gesture detector and the video player is the child

JieNengi commented 1 year ago

On video player long press? What is it for? And on desktop or mobile? Did you try to wrap the video player with a gesture detector and implement those functions by yourself? (Note: I think the hit behavior should be translucent)

on mobile,Users usually do this: 1.onLongPressStart:video will 2x speed play 2.onLongPressEnd:video returns to normal speed I tried to use stack and add gesture to the topmost layer of flutter_meedu_videoplayer, but it didn't work.

No need for stack just a gesture detector and the video player is the child

AspectRatio( aspectRatio: 16 / 9, child: GestureDetector( behavior: HitTestBehavior.opaque, onLongPressStart: (details) { }, onLongPressEnd: (details) { }, child: MeeduVideoPlayer( controller: _controller, ), ), )

The code is not valid when going to full screen playback.

abdelaziz-mahdy commented 1 year ago

yes, okay i will add this to the main package and let you know how to enable it,

i think it should work on mobile, not desktop right?

most probably i will work on it tommorow

JieNengi commented 1 year ago

Yes, onLongPressStart and onLongPressEnd are very useful in mobile. thanks!

abdelaziz-mahdy commented 1 year ago

published in 4.2.11-dev