quivr
quivr copied to clipboard
[Bug]: Absence of Controls and Autoplay Feature in Web Version Demo Video
What happened?
A bug happened!
Relevant log output
No response
Twitter / LinkedIn details
No response
🤖
Hello @hempun10!
I'm Dosu, a friendly bot here to assist you while awaiting the arrival of a human maintainer. My purpose is to help you navigate issues, answer questions, and guide you on your journey towards becoming a contributor.
Let's delve into the world of code together!
Thank you for reporting this issue. Based on the information provided, it seems like the bug you're experiencing is related to the absence of traditional video playback controls and an autoplay feature in the demo video of the Quivr web version.
From the information available in the repository, the current implementation of the video playback in Quivr is designed to automatically play when the video is visible on the screen and pause when it is not. This is achieved by adding a scroll event listener to the window object. Here is the relevant code:
useEffect(() => {
const videoElement = videoRef.current;
const handleScroll = () => {
if (!videoElement) {
return;
}
const videoRect = videoElement.getBoundingClientRect();
const isVideoVisible =
videoRect.top >= 0 &&
videoRect.bottom <= window.innerHeight &&
videoElement.checkVisibility();
if (isVideoVisible && videoElement.paused) {
void videoElement.play();
} else if (!isVideoVisible && !videoElement.paused) {
videoElement.pause();
}
};
window.addEventListener("scroll", handleScroll);
return () => {
window.removeEventListener("scroll", handleScroll);
};
}, []);
This code can be found in the VideoPlayer.tsx file.
However, there are no traditional playback controls like play/pause buttons, progress bar, volume control, etc. The video is also set to loop and is muted.
If you're suggesting the addition of traditional video controls and an option to disable autoplay, this would be a feature request rather than a bug. Unfortunately, I'm unable to create issues or pull requests. I would recommend you to create a new issue detailing your feature request.
If you're experiencing a different issue, could you please provide more details? Specifically, it would be helpful to know the exact nature of the bug, the steps to reproduce it, and any error messages or logs you might have. This will help in diagnosing and addressing the issue more effectively.
Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.