-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[camera_web] Release the camera stream of each available video input device #4621
[camera_web] Release the camera stream of each available video input device #4621
Conversation
….availableCameras
…n.availableCameras
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's give this a shot!
|
(PS: the |
|
This pull request is not suitable for automatic merging in its current state.
|
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this fell through the cracks on getting a second reviewer, sorry about that. LGTM with one nit.
|
@bselwe Could you fix the conflict (and nit) here so that we can land this? |
…available-video-input-devices
|
Thanks @ditman for taking care of this one! |
|
No problem @bselwe! Thanks for the OG fix! |
Accessing available cameras fetches the video stream of each video input device from MediaDevices.enumerateDevices. Those video streams are now released when the camera metadata is created. This should solve a
cameraNotReadableerror thrown when initializing a camera that is already in use.The solution was proposed by @leandroveronezi in flutter/flutter#90881 (comment), thanks!
Closes flutter/flutter#90881.
Pre-launch Checklist
dart format.)[shared_preferences]///).