init method

Future<void> init(
  1. void setState(
    1. void (
        )
      )
    )

    Implementation

    Future<void> init(void Function(void Function()) setState) async {
      mediaStream = await createLocalMediaStream('mediaStream_$id');
      isAudioMuted = false;
      isVideoMuted = false;
      videoRenderer.onResize = () {
        setState(() {});
      };
      await videoRenderer.initialize();
      videoRenderer.srcObject = mediaStream;
    }