initialize method

  1. @override
Future<void> initialize()
override

Implementation

@override
Future<void> initialize() async {
  final response = await WebRTC.invokeMethod('createVideoRenderer', {});
  _textureId = response['textureId'];
  _eventSubscription = EventChannel('FlutterWebRTC/Texture$textureId')
      .receiveBroadcastStream()
      .listen(eventListener, onError: errorListener);
}