VlcPlayerController.file constructor

VlcPlayerController.file(
  1. File file, {
  2. bool autoInitialize = true,
  3. bool allowBackgroundPlayback = true,
  4. HwAcc hwAcc = HwAcc.auto,
  5. bool autoPlay = true,
  6. VlcPlayerOptions? options,
  7. @Deprecated('Please, use the addOnInitListener method instead.') VoidCallback? onInit,
  8. @Deprecated('Please, use the addOnRendererEventListener method instead.') RendererCallback? onRendererHandler,
})

Constructs a VlcPlayerController playing a video from a file.

This will load the file from the file-URI given by: 'file://${file.path}'.

Implementation

VlcPlayerController.file(
  File file, {
  this.autoInitialize = true,
  this.allowBackgroundPlayback = true,
  this.hwAcc = HwAcc.auto,
  this.autoPlay = true,
  this.options,
  @Deprecated('Please, use the addOnInitListener method instead.')
  VoidCallback? onInit,
  @Deprecated('Please, use the addOnRendererEventListener method instead.')
  RendererCallback? onRendererHandler,
}) : dataSource = 'file://${file.path}',
     package = null,
     _dataSourceType = DataSourceType.file,
     _onInit = onInit,
     _onRendererHandler = onRendererHandler,
     super(VlcPlayerValue(duration: Duration.zero));