putMediaSource method

String? putMediaSource(
  1. String id,
  2. MediaSource source, [
  3. MimeType? mimeType
])

Put an asset id of value source.

Implementation

String? putMediaSource(String id, MediaSource source, [MimeType? mimeType]) {
  if (id.isEmpty) return null;
  var objURL = Url.createObjectUrlFromSource(source);
  _assets[id] = _AssetObjectURL(objURL, mimeType);
  return objURL;
}