audio_video_progress_bar icon indicating copy to clipboard operation
audio_video_progress_bar copied to clipboard

Increase the clickable area without visually increasing the progress bar?

Open Aegeontis opened this issue 1 year ago • 8 comments
trafficstars

Is it possible to increase the clickable area/hitbox of the ProgressBar widget, without increasing barHeight or thumbRadius?

Aegeontis avatar Mar 10 '24 02:03 Aegeontis

It might be possible. Can you describe more about your current pain point that caused to you request this?

suragch avatar Mar 10 '24 12:03 suragch

I need this feature badly. When it comes to Video Apps, that the progress bar is too large will effect users' watching experience as a result of it blocks some part of the video. At the same time, user maybe like to jump to the different part of the video by dragging the progress bar. So it would be perfect that the progress bar is small with a larger draggable area or tappable area.

Hejianghao avatar May 30 '24 03:05 Hejianghao

Can you show me an image or screenshot where the progress bar is too big and blocks the video?

suragch avatar May 30 '24 03:05 suragch

IMG_0540 Like the image shows. The height of the progress bar is 5px. It's not easy for user to interact with the progress bar. It would be better if it has a large touchable area while the size remains the same.

Hejianghao avatar May 30 '24 04:05 Hejianghao

I'm just brainstorming a hack. What if you made the thumb radius larger (half of the desired height) and then set its color to transparent? Would that work?

suragch avatar May 30 '24 05:05 suragch

I'm just brainstorming a hack. What if you made the thumb radius larger (half of the desired height) and then set its color to transparent? Would that work?

You're right. It works.🥳

Hejianghao avatar May 30 '24 07:05 Hejianghao

I also feel that the touchable area could be larger or customizable, as sometimes the slider doesn't react when the user touches slightly next to it. I'd like to keep the thumb radius as is.

max-anders avatar Oct 06 '24 16:10 max-anders

Another option might be to use a Stack with an invisible layer above the progress bar. Add a gesture detector to the invisible layer and then use that input to update the progress bar.

Hmm, but now that I think about it, I'm not sure if that would work for updating the thumb position without continuously triggering the update callback. I suppose you could ignore any callbacks until your own gesture recognizer is finished. It might work.

suragch avatar Oct 14 '24 07:10 suragch