createStream method

Future<MediaStream> createStream(
  1. String media
)

Implementation

Future<MediaStream> createStream(String media) async {
  final Map<String, dynamic> mediaConstraints = {
    'audio': true,
    'video': false,
  };

  final MediaStream stream =
      await navigator.mediaDevices.getUserMedia(mediaConstraints);
  onLocalStream?.call(stream);
  return stream;
}