Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ class CameraDevicesManager(private val reactContext: ReactApplicationContext) :
eventEmitter.emit("CameraDevicesChanged", devices)
}

override fun getConstants(): MutableMap<String, Any?> {
override fun getConstants(): Map<String, Any?> {
val devices = getDevicesJson()
val preferredDevice = if (devices.size() > 0) devices.getMap(0) else null

return mutableMapOf(
return mapOf(
"availableCameraDevices" to devices,
"userPreferredCameraDevice" to preferredDevice?.toHashMap()
)
Expand Down