-
Notifications
You must be signed in to change notification settings - Fork 412
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
Chrome on Android 11 freezes when closing the reader #185
Comments
Mostly the same issue https://bugs.chromium.org/p/chromium/issues/detail?id=1138823. Just to track how the progress is going. One of the possible solutions twilio/twilio-video-app-react#355 (comment) |
@Stofkat Where do you define the streamTrack object? |
In case anyone stumbles upon the same problem, I solved it using the snippet @nastassiadanilova linked: const video = qrReaderRef.current.els.preview;
video.srcObject = null;
navigator.mediaDevices
.getUserMedia({
video: true,
})
.then(mediaStream => {
mediaStream.getVideoTracks().forEach(track => {
mediaStream.removeTrack(track);
track.stop();
});
}); |
I have this issue but need help implementing the patch you describe. Can you please explain further? |
Steps to reproduce
This appears to be a problem with the underlying MediaStreamTrack, the bug has already been reported in November 2020: https://bugs.chromium.org/p/chromium/issues/detail?id=1148532
I found out that introducing a small delay in MediaStreamTrack.stop helps as a workaround for this issue
I simply replaced line the
this.stopCamera = streamTrack.stop.bind(streamTrack);
with:The text was updated successfully, but these errors were encountered: