Skip to content

Commit 25769e9

Browse files
Merge pull request #182 from lpylpyleo/ios_fix
stop video capture after UIViewController popped on iOS
2 parents 892a13f + ad87071 commit 25769e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ios/Classes/SwiftFlutterBarcodeScannerPlugin.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ class BarcodeScannerViewController: UIViewController {
221221
super.viewWillAppear(animated)
222222
self.moveVertically()
223223
}
224+
225+
override public func viewDidDisappear(_ animated: Bool){
226+
// Stop video capture
227+
captureSession.stopRunning()
228+
}
224229

225230
// Init UI components needed
226231
func initUIComponents(){

0 commit comments

Comments
 (0)