ARVideoKit icon indicating copy to clipboard operation
ARVideoKit copied to clipboard

App freezes for a moment when starting recording

Open nazdream opened this issue 2 years ago • 4 comments

I am trying to record ARSKView with RecordAR. The problem I am facing is that every time I call RecordAR.record() the app freezes for a moment. Also, text-to-speech pronunciation is very laggy if I call it right after the record function.

Is there any way to avoid this issue? I couldn't find any possible way to prevent this issue in docs and in the internet. Any feedback is highly appreciated, thank you!

nazdream avatar Feb 08 '22 18:02 nazdream

Did you try dispatching record() call to background queue? I'm having same issue with freeze, that's first thing I wanna try.

hypafrag avatar Apr 09 '22 13:04 hypafrag

Try to call record with viewDidLoad. It's work for me. Issue looks like specific initialisation when first time starting record.

let recThread = Thread() { self.recorder?.record() sleep(1) self.recorder?.stop() } recThread.name = "rec" recThread.start()

Ashes1st avatar May 05 '22 09:05 Ashes1st

I am trying to record ARSKView with RecordAR. The problem I am facing is that every time I call RecordAR.record() the app freezes for a moment. Also, text-to-speech pronunciation is very laggy if I call it right after the record function.

Is there any way to avoid this issue? I couldn't find any possible way to prevent this issue in docs and in the internet. Any feedback is highly appreciated, thank you!

I have the same problem did you find something ? @nazdream

CaglarDemirci avatar Dec 10 '22 14:12 CaglarDemirci

self.showLoading() DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1), execute: { self.startTimer(recoder: record) DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3), execute: { print("done") self.resetCoudown() self.showView() isFirstApp = false }) })

I also had the same problem and solved it by adding the above code after I initialized RecordAR @nazdream

DangHung301 avatar Aug 28 '23 11:08 DangHung301