setMaxSpatialLayer method

Future<void> setMaxSpatialLayer(
  1. int spatialLayer
)

Sets the video max spatial layer to be sent.

Implementation

Future<void> setMaxSpatialLayer(int spatialLayer) async {
  if (closed)
    throw 'closed';
  else if (kind != 'video') throw 'not a video Producer';

  if (spatialLayer == maxSpatialLayer) return;

  await safeEmitAsFuture('@setmaxspatiallayer', {
    'spatialLayer': spatialLayer,
  });

  maxSpatialLayer = spatialLayer;
}