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:
parent
cf8f3d05e3
commit
da0067d9f7
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user