UrlMatcher class abstract

An abstract class that defines a set of methods for matching and identifying specific types of media-related URIs.

Implementations of this class should provide logic to:

  • Identify if a given URI points to an .m3u8 playlist file.
  • Identify if a given URI points to an .m3u8 encryption key.
  • Identify if a given URI points to an .m3u8 media segment (such as .ts files).
  • Identify if a given URI points to an .mp4 file.
  • Generate or extract a cache key from a given URI, which can be used for caching downloaded media resources.

This abstraction allows for flexible and testable URI matching logic, which can be customized for different streaming protocols or caching strategies.

Implementers

Constructors

UrlMatcher.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

matchCacheKey(Uri uri) Uri
Returns a Uri that represents the cache key for the given uri. This can be used to uniquely identify cached media resources.
matchM3u8(Uri uri) bool
Returns true if the given uri matches the .m3u8 playlist file format.
matchM3u8Key(Uri uri) bool
Returns true if the given uri matches the format of an .m3u8 encryption key.
matchM3u8Segment(Uri uri) bool
Returns true if the given uri matches the format of an .m3u8 media segment, such as a .ts file.
matchMp4(Uri uri) bool
Returns true if the given uri matches the .mp4 file format.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited