applyConstraints method

  1. @override
Future<void> applyConstraints([
  1. Map<String, dynamic>? constraints
])
override

Applies a set of constraints to the track.

These constraints let the Web site or app establish ideal values and acceptable ranges of values for the constrainable properties of the track, such as frame rate, dimensions, echo cancelation, and so forth.

Implementation

@override
Future<void> applyConstraints([Map<String, dynamic>? constraints]) {
  if (constraints == null) return Future.value();

  var _current = getConstraints();
  if (constraints.containsKey('volume') &&
      _current['volume'] != constraints['volume']) {
    Helper.setVolume(constraints['volume'], this);
  }

  return Future.value();
}