juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
912 stars 524 forks source link

Can't close the camera on Web #1087

Open susu168k opened 6 months ago

susu168k commented 6 months ago

After call controller.stop() and controller.dispose(), the web still shows the camera is using. 图片

navaronbracke commented 6 months ago

Interesting, I had seen this as well when testing our WASM support.

What browser is this happening on? Safari has issues with stopping MediaStreams at least.

susu168k commented 6 months ago

Interesting, I had seen this as well when testing our WASM support.

What browser is this happening on? Safari has issues with stopping MediaStreams at least.

All browsers, like chrome, firefox, safari

nvbien2000 commented 5 months ago

I have same problem. Which ver are you using? I'm using 5.1.1;. 5.0.2 seems fine. [Chrome]

Kancheraj commented 2 months ago

Any update on this ??

navaronbracke commented 2 months ago

I cannot reproduce this on Chrome/Firefox/Safari, on the latest version of mobile_scanner. The camera properly closes when:

I'm going to need the exact browser info on the browsers that this is occurring: 1) Is this on a regular web app in Safari/Chrome/Firefox/Edge/Opera. If not, are you using a WebView to use mobile_scanner ? 2) What version of the browser are you using 3) What version of mobile_scanner are you using 4) Are you compiling to WASM or JS

alexandrim0 commented 2 months ago

I had face the same issue with latest Chrome on Android. Flutter 3.24.3 This occurs when controller provided as in example. But without external controller it works fine.

navaronbracke commented 2 months ago

@alexandrim0 "I had face the same issue with latest Chrome on Android. Flutter 3.24.3"

So this happens when mobile_scanner is used on Chrome on mobile devices, not when using Chrome on desktop? (i.e. MacOS / Windows)

alexandrim0 commented 2 months ago

My application works on Android \ iOS \ Web and can`t run on desktop.