PipFlutterPlayerDataSource.network constructor
PipFlutterPlayerDataSource.network(
- String url, {
- List<
PipFlutterPlayerSubtitlesSource> ? subtitles, - bool? liveStream,
- Map<
String, String> ? headers, - bool? useAsmsSubtitles,
- bool? useAsmsTracks,
- bool? useAsmsAudioTracks,
- Map<
String, String> ? qualities, - PipFlutterPlayerCacheConfiguration? cacheConfiguration,
- PipFlutterPlayerNotificationConfiguration notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false),
- Duration? overriddenDuration,
- PipFlutterPlayerVideoFormat? videoFormat,
- PipFlutterPlayerDrmConfiguration? drmConfiguration,
- Widget? placeholder,
- PipFlutterPlayerBufferingConfiguration bufferingConfiguration = const PipFlutterPlayerBufferingConfiguration(),
Factory method to build network data source which uses url as data source Bytes parameter is not used in this data source.
Implementation
factory PipFlutterPlayerDataSource.network(
String url, {
List<PipFlutterPlayerSubtitlesSource>? subtitles,
bool? liveStream,
Map<String, String>? headers,
bool? useAsmsSubtitles,
bool? useAsmsTracks,
bool? useAsmsAudioTracks,
Map<String, String>? qualities,
PipFlutterPlayerCacheConfiguration? cacheConfiguration,
PipFlutterPlayerNotificationConfiguration notificationConfiguration =
const PipFlutterPlayerNotificationConfiguration(
showNotification: false),
Duration? overriddenDuration,
PipFlutterPlayerVideoFormat? videoFormat,
PipFlutterPlayerDrmConfiguration? drmConfiguration,
Widget? placeholder,
PipFlutterPlayerBufferingConfiguration bufferingConfiguration =
const PipFlutterPlayerBufferingConfiguration(),
}) {
return PipFlutterPlayerDataSource(
PipFlutterPlayerDataSourceType.network,
url,
subtitles: subtitles,
liveStream: liveStream,
headers: headers,
useAsmsSubtitles: useAsmsSubtitles,
useAsmsTracks: useAsmsTracks,
useAsmsAudioTracks: useAsmsAudioTracks,
resolutions: qualities,
cacheConfiguration: cacheConfiguration,
notificationConfiguration: notificationConfiguration,
overriddenDuration: overriddenDuration,
videoFormat: videoFormat,
drmConfiguration: drmConfiguration,
placeholder: placeholder,
bufferingConfiguration: bufferingConfiguration,
);
}