PipFlutterPlayerDataSource constructor
PipFlutterPlayerDataSource(
- PipFlutterPlayerDataSourceType type,
- String url, {
- List<
int> ? bytes, - List<
PipFlutterPlayerSubtitlesSource> ? subtitles, - bool? liveStream = false,
- Map<
String, String> ? headers, - bool? useAsmsSubtitles = true,
- bool? useAsmsTracks = true,
- bool? useAsmsAudioTracks = true,
- List<
String> ? asmsTrackNames, - Map<
String, String> ? resolutions, - PipFlutterPlayerCacheConfiguration? cacheConfiguration,
- PipFlutterPlayerNotificationConfiguration? notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false),
- Duration? overriddenDuration,
- PipFlutterPlayerVideoFormat? videoFormat,
- String? videoExtension,
- PipFlutterPlayerDrmConfiguration? drmConfiguration,
- Widget? placeholder,
- PipFlutterPlayerBufferingConfiguration bufferingConfiguration = const PipFlutterPlayerBufferingConfiguration(),
Implementation
PipFlutterPlayerDataSource(
this.type,
this.url, {
this.bytes,
this.subtitles,
this.liveStream = false,
this.headers,
this.useAsmsSubtitles = true,
this.useAsmsTracks = true,
this.useAsmsAudioTracks = true,
this.asmsTrackNames,
this.resolutions,
this.cacheConfiguration,
this.notificationConfiguration =
const PipFlutterPlayerNotificationConfiguration(
showNotification: false,
),
this.overriddenDuration,
this.videoFormat,
this.videoExtension,
this.drmConfiguration,
this.placeholder,
this.bufferingConfiguration =
const PipFlutterPlayerBufferingConfiguration(),
}) : assert(
(type == PipFlutterPlayerDataSourceType.network ||
type == PipFlutterPlayerDataSourceType.file) ||
(type == PipFlutterPlayerDataSourceType.memory &&
bytes?.isNotEmpty == true),
"Url can't be null in network or file data source | bytes can't be null when using memory data source");