Skip to content

feat(SearchVideos): modify Lightbox to pause the prev video when sliding #531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hacking-racoon
Copy link
Contributor

@hacking-racoon hacking-racoon commented Dec 25, 2024

Summary

  • When you're watching a video in the Lightbox and slide to the next one, the previous video keeps playing.
  • The sound doesn’t stop either, which gets in the way of the new video.

Solution

  • Added logic to manage the video iframe's index and ref using useState and useRef, ensuring the previous video stops playing when sliding to the next one.

@ItzCrazyKns Merry Christmas!

…ng to next one, preventing interference with new video.
@hacking-racoon hacking-racoon changed the title feat(SearchVideos): 6odify Lightbox to pau6 feat(SearchVideos): modify Lightbox to pause the prev video when moving Dec 25, 2024
@hacking-racoon hacking-racoon changed the title feat(SearchVideos): modify Lightbox to pause the prev video when moving feat(SearchVideos): modify Lightbox to pause the prev video when sliding Dec 25, 2024
@ItzCrazyKns
Copy link
Owner

Happy belated new year! Hope you had great holidays, I certainly did. The changes looks good to me. Thank you very much!

@ItzCrazyKns ItzCrazyKns merged commit ec90ea1 into ItzCrazyKns:master Jan 7, 2025
epaybe pushed a commit to epaybe/Perplexica that referenced this pull request Jan 21, 2025
…de-stop

feat(SearchVideos): modify Lightbox to pause the prev video when sliding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants