createStream method
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;
}