PipFlutterPlayerDataSource.memory constructor

PipFlutterPlayerDataSource.memory(
  1. List<int> bytes, {
  2. String? videoExtension,
  3. List<PipFlutterPlayerSubtitlesSource>? subtitles,
  4. bool? useAsmsSubtitles,
  5. bool? useAsmsTracks,
  6. Map<String, String>? qualities,
  7. PipFlutterPlayerCacheConfiguration? cacheConfiguration,
  8. PipFlutterPlayerNotificationConfiguration? notificationConfiguration,
  9. Duration? overriddenDuration,
  10. Widget? placeholder,
})

Factory method to build network data source which uses bytes as data source. Url parameter is not used in this data source.

Implementation

factory PipFlutterPlayerDataSource.memory(
  List<int> bytes, {
  String? videoExtension,
  List<PipFlutterPlayerSubtitlesSource>? subtitles,
  bool? useAsmsSubtitles,
  bool? useAsmsTracks,
  Map<String, String>? qualities,
  PipFlutterPlayerCacheConfiguration? cacheConfiguration,
  PipFlutterPlayerNotificationConfiguration? notificationConfiguration,
  Duration? overriddenDuration,
  Widget? placeholder,
}) {
  return PipFlutterPlayerDataSource(
    PipFlutterPlayerDataSourceType.memory,
    "",
    videoExtension: videoExtension,
    bytes: bytes,
    subtitles: subtitles,
    useAsmsSubtitles: useAsmsSubtitles,
    useAsmsTracks: useAsmsTracks,
    resolutions: qualities,
    cacheConfiguration: cacheConfiguration,
    notificationConfiguration: notificationConfiguration =
        const PipFlutterPlayerNotificationConfiguration(
            showNotification: false),
    overriddenDuration: overriddenDuration,
    placeholder: placeholder,
  );
}