-
Notifications
You must be signed in to change notification settings - Fork 14
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
Video flickers/updates when state outside of <video> updates #1
Comments
Hi, thanks for posting this issue! Are the callbacks passed to the I should investigate, but think that they should be as it currently stands. Although it does makes sense to change this behavior. |
Released in version 1.0.4, please try it out and see if it works! |
Hey @nomadoda, This doesn't work (flickering bug appearing):
This works (flickering fixed):
Cheers! |
Basically the flickering is due to the reader restarting when given a new const hints = new Map();
hints.set("POSSIBLE_FORMATS", ["CODE_128"]);
const Component = () => {
const { ref } = useZxing({ hints });
return <>{ /* ... */ }</>;
}; Or, in the rare case that hints would be dynamic, use I'm not very confident about this design decision, so please let me know if you think it makes sense to change this behavior too! |
@nomadoda oh, thx for the clarification. For me it is fine as it is. Let's see if more people are running into the same problem, then you could still change it. Thx! |
Hey,
so whenever my state outside of the
<video>
updates, also the<video>
updates, so I see a quick flickering and it resets the height of the video, video goes black and reloads. Is this normal? Maybe it has something to do with theref
being passed to<video ref={ref} />
, but I don't get it? Does the default example have the same problem for you, cause it also has a state?Cheers
The text was updated successfully, but these errors were encountered: