loadAssets method

Future<void> loadAssets(
  1. String path, {
  2. int? bufferSize,
  3. MPVLogLevel? logLevel,
  4. Duration? initialDuration,
})

Implementation

Future<void> loadAssets(
  String path, {
  int? bufferSize,
  MPVLogLevel? logLevel,
  Duration? initialDuration,
}) async {
  filename = basename(path);
  await _initPlayer(
    bufferSize: bufferSize,
    logLevel: logLevel,
    initialDuration: initialDuration,
  );
  _initListeners();
  _isLoading = true;
  await _player.open(Media(path));
  _isInitialized = true;
  return Future.value();
}