VlcPlayerController.asset constructor

VlcPlayerController.asset(
  1. String dataSource, {
  2. bool autoInitialize = true,
  3. bool allowBackgroundPlayback = false,
  4. String? package,
  5. HwAcc hwAcc = HwAcc.auto,
  6. bool autoPlay = true,
  7. VlcPlayerOptions? options,
  8. @Deprecated('Please, use the addOnInitListener method instead.') VoidCallback? onInit,
  9. @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.allowBackgroundPlayback = false,
  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));