Skip to content

Commit ad87071

Browse files
author
leo
committed
stop video capture after UIViewController popped on iOS
1 parent 892a13f commit ad87071

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)