mirror of
https://github.com/Iconica-Development/flutter_media_picker.git
synced 2025-05-19 00:43:45 +02:00
14 lines
373 B
Dart
14 lines
373 B
Dart
|
// ignore: avoid_web_libraries_in_flutter
|
||
|
import 'dart:html';
|
||
|
import 'dart:typed_data';
|
||
|
|
||
|
import 'package:video_player/video_player.dart';
|
||
|
|
||
|
class VideoPlayerWrapper {
|
||
|
Future<VideoPlayerController> getController(Uint8List video) async {
|
||
|
final blob = Blob([video]);
|
||
|
final url = Url.createObjectUrlFromBlob(blob);
|
||
|
return VideoPlayerController.network(url);
|
||
|
}
|
||
|
}
|