DataSource constructor

DataSource({
  1. required DataSourceType sourceType,
  2. String? uri,
  3. VideoFormat? formatHint,
  4. String? asset,
  5. String? package,
  6. Map<String, String> httpHeaders = const <String, String>{},
  7. DrmConfigs? drmConfigs,
  8. Map<String, dynamic>? playerOptions,
  9. Map<StreamingPropertyType, String>? streamingProperty,
})

Constructs an instance of DataSource.

The sourceType is always required.

The uri argument takes the form of 'https://example.com/video.mp4' or 'file://${file.path}'.

The formatHint argument can be null.

The asset argument takes the form of 'assets/video.mp4'.

The package argument must be non-null when the asset comes from a package and null otherwise.

Implementation

DataSource({
  required this.sourceType,
  this.uri,
  this.formatHint,
  this.asset,
  this.package,
  this.httpHeaders = const <String, String>{},
  this.drmConfigs,
  this.playerOptions,
  this.streamingProperty,
});