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

Feature android UI lock #82

Closed 0Franky closed 1 year ago

0Franky commented 1 year ago

Related to #78

0Franky commented 1 year ago

This is still a draft, I refactored a bit the GestureController. I hope this is the right way.

abdelaziz-mahdy commented 1 year ago

The refactoring makes it better, but I will check the logic just in case something gets missed or confused,

For the logic I think the ui can be a button with lock and unlock icons , and the default placement should be bottom right, and people can override that placement by providing their own lock widget wrapped with positioned widget,

Let me know what you think of it

0Franky commented 1 year ago

I'll try tomorrow. Thanks for the advice :smile: I would also implement an overlay that when the user taps the screen when locked, a lock icon appears to remind the user that they have the UI locked. but i'm still thinking about it.

0Franky commented 1 year ago

I've added the button and fixed the logic. I need to know how to handle the unlock. Should a button show up? Where?

abdelaziz-mahdy commented 1 year ago

The lock and and unlock button should be the button and same location, only the icon change

When the the controls are locked they are shown, and only the unlock button should be available

abdelaziz-mahdy commented 1 year ago

I am busy these days, but thank you very much for your work, and I will check it ASAP

abdelaziz-mahdy commented 1 year ago

can you check the changes that i made , i think most players with lock does it like that

only remaining the enable lock in enabled controls

abdelaziz-mahdy commented 1 year ago

i think we have to make sure all controls are disabled when locked? or just not showing the buttons is enough? what do you think

0Franky commented 1 year ago

I think we need to disable all interactions if it's locked. This is because if I try to drag horizontally/vertically on mobile it changes the timeline/brightness/volume. This should be avoided.

0Franky commented 1 year ago

can you check the changes that i made , i think most players with lock does it like that

only remaining the enable lock in enabled controls

I'll check it ASAP. I'm a bit busy in these days