video_cache_server library
Classes
- ByteRangeStream
-
Take a range of bytes from a
Stream<List<int>>
. - CacheFragment
- CacheInfo
- M3u8
- RequestRange
- Parse and hold a range header value. If more than one range set present, only the first one is used.
- ResponseRange
-
Parse and hold a content-range header value. Care unit in bytes only, and
<unit> */<size>
is not supported(416 Range Not Satisfiable) - VideoCacheServer
- This plugin starts a local HttpServer, handles requests with particular urls:
Extensions
-
IterableExtension
on Iterable<
T>
Constants
- mimeTypeM3u8VndApple → const String
- mimeTypeM3u8X → const String
Functions
-
isM3u8(
String? contentType, Uri? uri) → bool - Determines if it is a m3u8 resource.
-
isM3u8MimeType(
String? mimeType) → bool -
proxyM3u8Content(
String content, String proxy(String raw), Uri uri) → M3u8 -
According to the rfc8216
URI
attribute values in#EXT-X-I-FRAME-STREAM-INF
or#EXT-X-MEDIA
tags are replaced by the absolute and proxied ones.
Typedefs
- BadCertificateCallback = bool Function(X509Certificate cert, String host, int port)
-
DataFetcher
= Future<
CacheFragment> Function(int begin, int end, StreamController<List< receiver)int> > -
PassThrough
= FutureOr<
bool> Function(ProxyRequest serverRequest, CacheInfo? cacheInfo) - Return true to pass through the request
-
PostRemoteRequestHandler
= FutureOr<
bool> Function(Uri uri, IOStreamedResponse remoteResponse, HttpResponse response, VideoCacheServer videoCacheServer, String owner) -
Return true if the response is finished in this handler.
owner
is thecacheKey
this uri's cachebelongTo
or owned -
RequestHeaderInterceptor
= void Function(Map<
String, String> headers) -
SubscriptionSetter
= void Function(StreamSubscription<
List< subscription)int> >