putMediaStream method

String? putMediaStream(
  1. String id,
  2. MediaStream stream, [
  3. MimeType? mimeType
])

Put an asset id of value stream.

Implementation

String? putMediaStream(String id, MediaStream stream, [MimeType? mimeType]) {
  if (id.isEmpty) return null;
  var objURL = Url.createObjectUrlFromStream(stream);
  _assets[id] = _AssetObjectURL(objURL, mimeType);
  return objURL;
}