import Cdn from './../Loaders/Cdn'; export default class Utils { static getRouteAndFilename(stringUrl: string): { route: string; fileName: string; query: string; }; static getPath(stringUrl: string): { path: string; }; static delay(milliseconds: number): Promise; /** * High-resolution monotonic timestamp in milliseconds (sub-ms precision when * available). Mirrors Android `System.nanoTime()` usage from * plugin-android@feff14fd to escape the 1ms floor of `Date.now()`: a cached/ * LAN-proxy CDN can complete a chunk in <1ms, which previously saturated the * bandwidth estimate at `bytes * 8000`. Use this for elapsed-time math * (segment download time, bandwidth derivation). Falls back to `Date.now()` * on environments without `performance` (e.g. older WebViews, NWF). */ static nowMs(): number; static findPathMach(url: string, path: string, newCdn: Cdn): string; static sliceByFirstSpecial(str: string, splitBySpecial?: boolean): string; static isMedia(path: string): boolean; static isManifest(path: string, splitBySpecial?: boolean): boolean; static isAudio(path: string): boolean; static isInitialization(path: string): boolean; /** * An fMP4 / CMAF init segment: the `.m4i` extension, or a file name with `init` or `initialization` as a word * of its own (`init.mp4`, `video1_init.mp4`, `init-stream0.m4s`, `initialization.mp4`). It is media by extension * but carries no frames. Name only: an init segment named otherwise, or one that shares its URL with the media * (byte ranges), is not recognised. */ static isInitSegmentName(path: string): boolean; static isSubtitles(path: string): boolean; static bufferToString(b: ArrayBuffer): string; static returnRandom(a: string[]): string; static formatParameters(params: any): string; static ifByteArrayToString(data: any): string; /** * Bytes of a response body as the player received it: `byteLength` for an ArrayBuffer or a typed array, `size` * for a Blob, the UTF-8 length for text (a text response has no `byteLength`). Anything else counts 0. */ static responseByteLength(response: unknown): number; /** UTF-8 length of a string without encoding it (TextEncoder is missing on some TVs). */ private static utf8ByteLength; static isValidUrl(urlString: string): boolean; static isHeaderMatch(headerValue: string, headerInfo: cacheHeaderBehavior): boolean; /** * Removes a single query parameter from a URL without touching the encoding * of anything else. * * Deliberately string-based: `URL`/`URLSearchParams` re-serialize the whole * query, percent-encoding '=', '~' and '/', which silently corrupts CDN auth * tokens whose values embed those characters, e.g. Akamai's * `hdnts=st=…~acl=/*~hmac=…` (PGN-4826). */ static removeQueryParam(url: string, paramName: string): string; }