WebRTCStreamController constructor

WebRTCStreamController(
  1. SignallingClient _client, {
  2. required int reconnectionTimeoutMs,
  3. String? producerId,
  4. Duration keepAlive = const Duration(seconds: 30),
  5. Duration retryAfter = const Duration(seconds: 3),
})

Implementation

WebRTCStreamController(
  this._client, {
  required this.reconnectionTimeoutMs,
  this.producerId,
  this.keepAlive = const Duration(seconds: 30),
  this.retryAfter = const Duration(seconds: 3),
}) {
  _client.listen(
    connected: _onConnected,
    disconnected: _onDisconnected,
    producerAdded: (_) => _ensureSession(),
    producerRemoved: _onProducerRemoved,
  );
}