Swiping play the previous slide video #315
-
Hi :) When swiping a video slide, it makes it playing in the background. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
Are you using custom video implementation? The Video plugin that comes with this library stops video playback in this case. |
Beta Was this translation helpful? Give feedback.
-
I do use a custom video implementation, but I can see it also behave like explained in the demo page here https://yet-another-react-lightbox.com/plugins/video 🤔 |
Beta Was this translation helpful? Give feedback.
Ah, I was finally able to reproduce. It never occurred to me to click-and-drag the video element itself. I was either using touchpad to swipe left / right, or clicking and dragging the blank space outside the video element. I can see the issue now.
Here's what's going on here:
offset === 0
)videoRef.current.pause()
does not get calledoffset !== 0
)I don't believe your workaround would break anything, so it should be a viable option. The only downside is that …