Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroSG94 committed Mar 6, 2025
2 parents baef1bf + e2c3fa4 commit 29f89d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Camera2Source(context: Context): VideoSource() {
}

@RequiresApi(Build.VERSION_CODES.P)
fun physicalCamerasAvailable() = camera.physicalCamerasAvailable
fun physicalCamerasAvailable() = camera.getPhysicalCamerasAvailable()

@RequiresApi(Build.VERSION_CODES.P)
fun openPhysicalCamera(id: String?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ class Camera2ApiManager(context: Context) : CameraDevice.StateCallback() {
}

@RequiresApi(Build.VERSION_CODES.P)
val physicalCamerasAvailable = cameraCharacteristics?.physicalCameraIds?.toList() ?: emptyList()
fun getPhysicalCamerasAvailable(): List<String> {
return cameraCharacteristics?.physicalCameraIds?.toList() ?: emptyList()
}

@RequiresApi(Build.VERSION_CODES.P)
fun setPhysicalCamera(id: String?) {
Expand Down

0 comments on commit 29f89d8

Please sign in to comment.