·
40 commits
to main
since this release
Minor Changes
-
c42176d: feat: add auto-play functionality to gesture viewer with configurable interval
- add
autoPlay
andautoPlayInterval
props - when
autoPlay
is enabled, the viewer will automatically play the next item after the specified interval - when
enableLoop
is enabled, the viewer will loop back to the first item after the last item - when
enableLoop
is disabled, the viewer will stop at the last item - when there is only one item, auto-play is disabled
- interval must be a positive integer in milliseconds (values < 250ms are clamped to 250ms)
autoPlayInterval
is optional and defaults to 3000msautoPlay
is optional and defaults tofalse
- when zoom or rotate gestures are detected, the auto-play will be paused
import { GestureViewer } from "react-native-gesture-image-viewer"; function App() { return <GestureViewer autoPlay autoPlayInterval={3000} />; }
- add