bytes static method
- Uint8List bytes, {
- String? checksum,
- VideoPlayerOptions? videoPlayerOptions,
Creates a VideoPlayerController from the provided bytes
.
Implementation
static FutureOr<VideoPlayerController> bytes(
Uint8List bytes, {
String? checksum,
VideoPlayerOptions? videoPlayerOptions,
}) {
final blob = web.Blob(
[bytes.toJS].toJS,
web.BlobPropertyBag(type: 'video/mp4'),
);
final String url = web.URL.createObjectURL(blob);
return VideoPlayerController.networkUrl(
Uri.parse(url),
videoPlayerOptions: videoPlayerOptions,
);
}