fix: oh wow, that was a silly mistake, huh
This commit is contained in:
parent
d0ccf08e05
commit
24fe745404
1 changed files with 3 additions and 5 deletions
|
|
@ -170,8 +170,7 @@ public class LiblinphoneFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
|
|
||||||
case "setMicGain":
|
case "setMicGain":
|
||||||
guard let args = call.arguments as? [String: Any],
|
guard let args = call.arguments as? [String: Any],
|
||||||
let levelStr = args["level"] as? String,
|
let level = args["level"] as? Float else {
|
||||||
let level = Float(levelStr) else {
|
|
||||||
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Missing or invalid 'level'", details: nil))
|
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Missing or invalid 'level'", details: nil))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -179,12 +178,11 @@ public class LiblinphoneFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
result(true)
|
result(true)
|
||||||
|
|
||||||
case "getMicGain":
|
case "getMicGain":
|
||||||
result(String(linphoneBridge.getMicGain()))
|
result(linphoneBridge.getMicGain())
|
||||||
|
|
||||||
case "setPlaybackGain":
|
case "setPlaybackGain":
|
||||||
guard let args = call.arguments as? [String: Any],
|
guard let args = call.arguments as? [String: Any],
|
||||||
let levelStr = args["level"] as? String,
|
let level = args["level"] as? Float else {
|
||||||
let level = Float(levelStr) else {
|
|
||||||
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Missing or invalid 'level'", details: nil))
|
result(FlutterError(code: "INVALID_ARGUMENTS", message: "Missing or invalid 'level'", details: nil))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue