Skip to content

Commit

Permalink
fix Camera2Source openCameraId
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroSG94 committed Oct 22, 2024
1 parent bceb1dc commit 2dd78a0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ class Camera2Source(context: Context): VideoSource() {
fun getCurrentCameraId() = camera.getCurrentCameraId()

fun openCameraId(id: String) {
if (isRunning()) stop()
camera.openCameraId(id)
if (isRunning()) camera.reOpenCamera(id)
}

fun enableOpticalVideoStabilization(): Boolean {
Expand Down

0 comments on commit 2dd78a0

Please sign in to comment.