Skip to content

Commit

Permalink
fix: execution exception for empty video src (#772)
Browse files Browse the repository at this point in the history
Co-authored-by: can.chen <[email protected]>
  • Loading branch information
Can-Chen and can.chen authored Dec 25, 2024
1 parent 7b9b92c commit 1541738
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/handlePrintWindowOnLoad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ export function handlePrintWindowOnLoad(
} else {
if (videoNode.readyState >= 2) { // Check if the video has already loaded a frame
markLoaded(videoNode);
} else {
} else if (!videoNode.src) {
markLoaded(videoNode, ["video src empty", videoNode, "Error"]);
} else{
videoNode.onloadeddata = () => {
markLoaded(videoNode)
};
Expand Down

0 comments on commit 1541738

Please sign in to comment.