fix: Fix Video codec
, bitRate
and flash
being ignored on iOS (#2113)
* fix: Fix VIdeo `codec`, `bitRate` and `flash` being ignored on iOS * Update RecordVideoOptions.swift
This commit is contained in:
parent
4c9a707866
commit
cc65ec26a9
@ -26,5 +26,23 @@ struct RecordVideoOptions {
|
|||||||
}
|
}
|
||||||
fileType = parsed
|
fileType = parsed
|
||||||
}
|
}
|
||||||
|
// Flash
|
||||||
|
if let flashOption = dictionary["flash"] as? String {
|
||||||
|
guard let parsed = try? Torch(jsValue: flashOption) else {
|
||||||
|
throw CameraError.parameter(.invalid(unionName: "flash", receivedValue: flashOption))
|
||||||
|
}
|
||||||
|
flash = parsed
|
||||||
|
}
|
||||||
|
// Codec
|
||||||
|
if let codecOption = dictionary["codec"] as? String {
|
||||||
|
guard let parsed = try? AVVideoCodecType(withString: codecOption) else {
|
||||||
|
throw CameraError.parameter(.invalid(unionName: "codec", receivedValue: codecOption))
|
||||||
|
}
|
||||||
|
codec = parsed
|
||||||
|
}
|
||||||
|
// BitRate
|
||||||
|
if let parsed = dictionary["bitRate"] as? Double {
|
||||||
|
bitRate = parsed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user