PipFlutterPlayerDataSource.network constructor

PipFlutterPlayerDataSource.network(
  1. String url, {
  2. List<PipFlutterPlayerSubtitlesSource>? subtitles,
  3. bool? liveStream,
  4. Map<String, String>? headers,
  5. bool? useAsmsSubtitles,
  6. bool? useAsmsTracks,
  7. bool? useAsmsAudioTracks,
  8. Map<String, String>? qualities,
  9. PipFlutterPlayerCacheConfiguration? cacheConfiguration,
  10. PipFlutterPlayerNotificationConfiguration notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false),
  11. Duration? overriddenDuration,
  12. PipFlutterPlayerVideoFormat? videoFormat,
  13. PipFlutterPlayerDrmConfiguration? drmConfiguration,
  14. Widget? placeholder,
  15. 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,
  );
}