feat: add mic gain set and get methods
This commit is contained in:
parent
a740475d56
commit
7608d79d64
8 changed files with 83 additions and 8 deletions
|
|
@ -90,4 +90,10 @@ class LiblinphoneFlutter {
|
|||
|
||||
Future<bool> stopCallService() async =>
|
||||
LiblinphoneFlutterPlatform.instance.stopCallService();
|
||||
|
||||
Future<bool> setMicGain(double level) async =>
|
||||
LiblinphoneFlutterPlatform.instance.setMicGain(level);
|
||||
|
||||
Future<double> getMicGain() async =>
|
||||
LiblinphoneFlutterPlatform.instance.getMicGain();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,4 +117,17 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
|||
Future<bool> stopCallService() async {
|
||||
return (await methodChannel.invokeMethod<bool>('stopCallService'))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> setMicGain(double level) async {
|
||||
return (await methodChannel.invokeMethod<bool>(
|
||||
'setMicGain',
|
||||
<String, dynamic>{'level': level},
|
||||
))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<double> getMicGain() async {
|
||||
return (await methodChannel.invokeMethod<double>('getMicGain'))!;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,4 +97,12 @@ abstract class LiblinphoneFlutterPlatform extends PlatformInterface {
|
|||
Future<bool> stopCallService() async {
|
||||
throw UnimplementedError('stopCallService() has not been implemented.');
|
||||
}
|
||||
|
||||
Future<bool> setMicGain(double level) async {
|
||||
throw UnimplementedError('setMicGain() has not been implemented.');
|
||||
}
|
||||
|
||||
Future<double> getMicGain() async {
|
||||
throw UnimplementedError('getMicGain() has not been implemented.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue