VlcPlayerController.asset constructor

VlcPlayerController.asset(
  1. String dataSource, {
  2. bool autoInitialize = true,
  3. String? package,
  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,
})

The name of the asset is given by the dataSource argument and must not be null. The package argument must be non-null when the asset comes from a package and null otherwise.

Implementation

VlcPlayerController.asset(
  this.dataSource, {
  this.autoInitialize = true,
  this.package,
  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,
})  : _dataSourceType = DataSourceType.asset,
      _onInit = onInit,
      _onRendererHandler = onRendererHandler,
      super(VlcPlayerValue(duration: Duration.zero));