diff --git a/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt b/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt index dd88db158..fb2870d75 100644 --- a/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt +++ b/android/src/main/java/io/agora/rtc/base/BeanCovertor.kt @@ -158,8 +158,8 @@ fun mapToLiveInjectStreamConfig(map: Map<*, *>): LiveInjectStreamConfig { fun mapToCameraCapturerConfiguration(map: Map<*, *>): CameraCapturerConfiguration { return CameraCapturerConfiguration( - intToCapturerOutputPreference(map["preference"] as Int), - intToCameraDirection(map["cameraDirection"] as Int) + intToCapturerOutputPreference((map["preference"] as Number).toInt()), + intToCameraDirection((map["cameraDirection"] as Number).toInt()) ) }