VlcPlayerController.file constructor

VlcPlayerController.file(
  1. File file, {
  2. bool autoInitialize = true,
  3. HwAcc hwAcc = HwAcc.AUTO,
  4. bool autoPlay = true,
  5. VlcPlayerOptions? options,
  6. @Deprecated('Please, use the addOnInitListener method instead.') VoidCallback? onInit,
  7. @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.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));