Custom hook for managing the Swiper video thumbnail gallery logic in the VideoGallery component.
Provides Swiper options and keyboard navigation using left/right arrow keys.
Remarks
Supports dynamic Swiper breakpoints using the Material UI theme.
Enables keyboard navigation (left/right arrows) through video thumbnails.
Automatically syncs the visible slide with the current index when navigating.
Param: currentIndex
The currently active video index.
Param: videosLength
Total number of videos in the gallery.
Param: handleCurrentIndex
Callback to update the active video index.
Returns
Swiper configuration and a ref to the Swiper instance.
Description
Custom hook for managing the Swiper video thumbnail gallery logic in the VideoGallery component. Provides Swiper options and keyboard navigation using left/right arrow keys.
Remarks
Param: currentIndex
The currently active video index.
Param: videosLength
Total number of videos in the gallery.
Param: handleCurrentIndex
Callback to update the active video index.
Returns
Swiper configuration and a ref to the Swiper instance.
Example