getConstraints method
Returns media constraints for the selected video quality.
Implementation
Map<String, dynamic> getConstraints(String deviceId) {
final constraints = <String, dynamic>{"deviceId": deviceId};
if (width != null) {
constraints["width"] = {"ideal": width};
}
if (height != null) {
constraints["height"] = {"ideal": height};
}
if (frameRate != null) {
constraints["frameRate"] = {"ideal": frameRate};
}
return constraints;
}