To add a video in your product gallery at first you need to open the image into the media library. once you open it you can see a new field for adding video URL. Just paste your video link (YouTube, Vimeo, or self-host) and the video will set with that image.