VideoPlayerController.asset constructor
VideoPlayerController.asset(
- String dataSource, {
- String? package,
- Future<
ClosedCaptionFile> ? closedCaptionFile, - VideoPlayerOptions? videoPlayerOptions,
Constructs a VideoPlayerController playing a video from an asset.
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
VideoPlayerController.asset(
this.dataSource, {
this.package,
this.closedCaptionFile,
this.videoPlayerOptions,
}) : dataSourceType = DataSourceType.asset,
formatHint = null,
httpHeaders = const <String, String>{},
drmConfigs = null,
playerOptions = const <String, dynamic>{},
streamingProperty = null,
super(VideoPlayerValue(
duration: DurationRange(Duration.zero, Duration.zero)));