exportCachedMp4 static method

Future<File?> exportCachedMp4(
  1. String url, {
  2. Map<String, Object>? headers,
  3. Duration timeout = const Duration(seconds: 30),
  4. bool downloadMissingSegments = true,
  5. int priority = 5,
})

Exports the cached MP4 ranges for url into one complete local file.

Existing playback cache segments are reused. When downloadMissingSegments is true, only missing ranges are downloaded before joining the file, and the whole export is bounded by timeout.

Implementation

static Future<File?> exportCachedMp4(
  String url, {
  Map<String, Object>? headers,
  Duration timeout = const Duration(seconds: 30),
  bool downloadMissingSegments = true,
  int priority = 5,
}) {
  return Mp4CacheExporter().export(
    url,
    headers: headers,
    timeout: timeout,
    downloadMissingSegments: downloadMissingSegments,
    priority: priority,
  );
}