getMediaItemFromUrl method
Produce media item from URL.
Implementation
MediaItem getMediaItemFromUrl({
required String videoUrl,
String? extra,
String? title,
int? position,
}) {
return MediaItem(
title: title ?? videoUrl,
mediaIdentifier: videoUrl,
mediaSourceIdentifier: uniqueKey,
mediaTypeIdentifier: mediaType.uniqueKey,
extra: extra,
position: position ?? 0,
duration: 0,
canEdit: false,
canDelete: false,
);
}