CachedVideoPlayerController.file constructor

CachedVideoPlayerController.file(
  1. File file, {
  2. Future<ClosedCaptionFile>? closedCaptionFile,
  3. VideoPlayerOptions? videoPlayerOptions,
})

Constructs a CachedVideoPlayerController playing a video from a file.

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

Implementation

CachedVideoPlayerController.file(File file,
    {this.closedCaptionFile, this.videoPlayerOptions})
    : dataSource = 'file://${file.path}',
      dataSourceType = DataSourceType.file,
      package = null,
      formatHint = null,
      httpHeaders = const {},
      super(CachedVideoPlayerValue(duration: Duration.zero));