nativescript-camera-plus icon indicating copy to clipboard operation
nativescript-camera-plus copied to clipboard

Camera still capturing after navigtion - NS6 with Angular

Open ghost opened this issue 5 years ago • 2 comments

Hi, I'm using Nativescript 6.5.3 with Angular, After navigation to other page, the camera is still capturing, If I go back via page.frame.goBack() the camera indeed stopping, actually I noticed it thanks to IOS 14 which show a small dot when camera is on, So I tried to download https://play.google.com/store/apps/details?id=you.in.spark.access.dots and saw the problem happens in Android too,

How can I release the camera ?

Thanks !

ghost avatar Oct 27 '20 19:10 ghost

Did you find a solution @Arturiko ?

kriefsacha avatar Dec 20 '20 13:12 kriefsacha

Did you find a solution @Arturiko ?

Hi, I did : this._page.on(Page.unloadedEvent, () => { this.isCapturing = false; this.cam.disposeNativeView(); });

When cam is:

camLoaded(e: any): void { this.cam = e.object as CameraPlus; ... }

I think disposeNativeView is the secret..

arturikoX avatar Dec 20 '20 14:12 arturikoX