Skip to content

When the camera is paused and start() is executed the isPaused flag is not set false #1513

@kev95p

Description

@kev95p

I found this issue for android platform when I pause the camera await cameraController.pause() and after a while I start the camera await cameraController.start() everything is working but If I pause again the camera isn't paused I saw the code and found that isPaused flag is not set to false when the camera start so if I call pause the method throw AlreadyPaused() exception

    fun pause(force: Boolean = false) {
        if (!force) {
            if (isPaused) {
                throw AlreadyPaused()
            } else if (isStopped()) {
                throw AlreadyStopped()
            }
        }

        pauseCamera()
    }

I was able to solve it by setting the isPaused flag to false when the start method is called, but I have doubts about whether this is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions