-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
execution exception for empty video src #772
Conversation
Hi @Can-Chen, apologies for the delayed response here. I just tried testing this out with the local example and was not able to reproduce it. Are you able to share a Codesandbox or similar where I can see this issue? |
problems will occur when the src of the video element is empty. |
I'm not able to download files right now on the computer I have access to; could you please either use Codesandbox or post the code in the comment? Thank you |
Thanks! When I go to that example I do not see a problem. I am using Chrome 131. What browser are you using? Screen.Recording.2024-12-23.at.9.32.15.AM.mov |
after the page is rendered, the video element will trigger when it has never appeared in the viewport. 2024-12-24.mp4 |
Ah, I see now, thank you! |
I wonder if there is a way to make it work instead of having an error; I will look for a solution. If I cannot find one I will merge this PR |
ok |
Going to merge this while I look for a fix, I think this is good protection to have either way. Thank you!! |
I do wonder if this is an issue with |
Yeah, I believe the root issue is with the |
The properties "load" and "posterLoad" of the https://vidstack.io/docs/player/core-concepts/loading/?styling=default-theme#load-strategies |
Yeah, re-reading the spec, |
Published the fix in version |
when using vidstack/player to play videos, if the area where the video is rendered is not scrolled, the video src will be empty at this time. After calling reactToPrint, the browser's printing function will not be invoked and no errors will be thrown.