fix: Fix iOS not reading videoCodec and videoBitRate from options (#2202)

* fix: Fix iOS not reading `videoCodec` and `videoBitRate` from options

* Update AVVideoCodecType+descriptor.swift
This commit is contained in:
Marc Rousavy 2023-11-22 17:54:49 +01:00 committed by GitHub
parent cf8f3d05e3
commit da0067d9f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ extension AVVideoCodecType {
self = .hevc
return
default:
throw CameraError.parameter(.invalid(unionName: "codec", receivedValue: string))
throw CameraError.parameter(.invalid(unionName: "videoCodec", receivedValue: string))
}
}
}

View File

@ -28,11 +28,11 @@ struct RecordVideoOptions {
flash = try Torch(jsValue: flashOption)
}
// Codec
if let codecOption = dictionary["codec"] as? String {
if let codecOption = dictionary["videoCodec"] as? String {
codec = try AVVideoCodecType(withString: codecOption)
}
// BitRate
if let parsed = dictionary["bitRate"] as? Double {
if let parsed = dictionary["videoBitRate"] as? Double {
bitRate = parsed
}
}