BetterPlayerDataSource.network constructor
BetterPlayerDataSource.network(
- String url, {
- List<
BetterPlayerSubtitlesSource> ? subtitles, - bool? liveStream,
- Map<
String, String> ? headers, - bool? useAsmsSubtitles,
- bool? useAsmsTracks,
- bool? useAsmsAudioTracks,
- Map<
String, String> ? qualities, - BetterPlayerCacheConfiguration? cacheConfiguration,
- BetterPlayerNotificationConfiguration notificationConfiguration = const BetterPlayerNotificationConfiguration(showNotification: false),
- Duration? overriddenDuration,
- BetterPlayerVideoFormat? videoFormat,
- BetterPlayerDrmConfiguration? drmConfiguration,
- Widget? placeholder,
- BetterPlayerBufferingConfiguration bufferingConfiguration = const BetterPlayerBufferingConfiguration(),
Factory method to build network data source which uses url as data source Bytes parameter is not used in this data source.
Implementation
factory BetterPlayerDataSource.network(
String url, {
List<BetterPlayerSubtitlesSource>? subtitles,
bool? liveStream,
Map<String, String>? headers,
bool? useAsmsSubtitles,
bool? useAsmsTracks,
bool? useAsmsAudioTracks,
Map<String, String>? qualities,
BetterPlayerCacheConfiguration? cacheConfiguration,
BetterPlayerNotificationConfiguration notificationConfiguration =
const BetterPlayerNotificationConfiguration(showNotification: false),
Duration? overriddenDuration,
BetterPlayerVideoFormat? videoFormat,
BetterPlayerDrmConfiguration? drmConfiguration,
Widget? placeholder,
BetterPlayerBufferingConfiguration bufferingConfiguration =
const BetterPlayerBufferingConfiguration(),
}) {
return BetterPlayerDataSource(
BetterPlayerDataSourceType.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,
);
}