createStream method
Implementation
Future<MediaStream> createStream(String media) async {
_logger.i("Peer :: Creating stream");
final Map<String, dynamic> mediaConstraints = {
'audio': true,
'video': false
};
MediaStream stream =
await navigator.mediaDevices.getUserMedia(mediaConstraints);
onLocalStream?.call(stream);
return stream;
}