Glazzes / react-native-zoom-toolkit

Zoom anything you want! Most complete pinch to zoom utilities for React Native
https://glazzes.github.io/react-native-zoom-toolkit/
MIT License
193 stars 11 forks source link

[Gallery]: How to use Gallery with video? #35

Closed NadyaKuts closed 4 months ago

NadyaKuts commented 4 months ago

Summary

How to use gallery with video? Are there examples of use or is this component just for Images? Because the item's gestures overlap the video player's gestures

Glazzes commented 4 months ago

Videos are just like regular views, they're not special at all, however every touch will be taken over by Gesture Handler because that's what it is, a common pattern you'll see in apps is that the controls are not attached to the video component itself, they are more like a transparent absolute positioned view overlayed in top of the gallery, Telegram has this behaviour for instance.

Even if touches were not intercepted by Gesture Handler, video's controls would be scaled along with the video providing a poor user experience.

As of today you've gotta find your way around what you need as I rework the gallery example into a mixed one, I'll leave this issue open until the rework is done.

Glazzes commented 4 months ago

I've modified the gallery example into a mix of both images and videos, however building your own controls is an annoying task and it has to be this be this way because of what I said on my last comment about video views, so yeah using native controls is a not a realistic option for any type of gallery.

You can try it out yourself on the example app.

NadyaKuts commented 4 months ago

Thank you