precache abstract method

Future<StreamController<Map>?> precache(
  1. String url,
  2. Map<String, Object>? headers,
  3. int cacheSegments,
  4. bool downloadNow,
  5. bool progressListen, [
  6. int priority = 1,
])

Pre-caches the video at the specified url.

url: The video URL to precache. headers: Optional HTTP headers to use for the request. cacheSegments: Number of segments to cache. downloadNow: Whether to start downloading immediately. progressListen: Whether to listen for download progress. priority: Download task priority. Higher values are scheduled first.

Returns a StreamController that emits progress or status updates, or null if precaching is not supported.

Implementation

Future<StreamController<Map>?> precache(
    String url,
    Map<String, Object>? headers,
    int cacheSegments,
    bool downloadNow,
    bool progressListen,
    [int priority = 1]);