setVolume static method
Implementation
static Future<void> setVolume(double volume, MediaStreamTrack track) async {
if (track.kind == 'audio') {
if (kIsWeb) {
final constraints = track.getConstraints();
constraints['volume'] = volume;
await track.applyConstraints(constraints);
} else {
await WebRTC.invokeMethod(
'setVolume',
<String, dynamic>{'trackId': track.id, 'volume': volume},
);
}
}
return Future.value();
}