Skip to content

cameraManager.stopVideoRecording doesn't triggering callback #266

@hiteshcmarix

Description

@hiteshcmarix

Sometimes, cameraManager.stopVideoRecording seems work perfection in lower duration recording, but when try to do more recording then it will not return completion block, it was not going in below condition because runningMovieOutput.isRecording returning false (in CameraManager.swift) and didn't get callback :

if let runningMovieOutput = movieOutput,
         runningMovieOutput.isRecording {
         videoCompletion = completion
        runningMovieOutput.stopRecording()
} 

I also tried different ways from given feedback like
1.) Moving cameraManager.cameraOutputMode in the "record" button method just before calling
cameraManager.startRecordingVideo()
but, this is not working.

2.) By checking and changing cameraOutputMode before start recording and after stop recording
Before start recording :
```
if cameraManager.cameraOutputMode == .stillImage {
print("Camera output is stillImage, switching to videoWithMic")
cameraManager.cameraOutputMode = .videoWithMic
}
cameraManager.startRecordingVideo()


      _After stop recording :_

        ```
cameraManager.stopVideoRecording { (URL, error) in
             print("Video Recording URL: ", URL!);
    
             if cameraManager.cameraOutputMode == .videoWithMic {
                     cameraManager.cameraOutputMode = .stillImage
             }
        }

I tried above solutions but none of these are working for me. 🙁
I am using CameraManager cocoapod (version 5.1.3)

Could you please help me out of this issue?
Waiting for your response...😌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions