rx-player
Version:
Canal+ HTML5 Video Player
29 lines • 951 B
TypeScript
declare global {
interface Uint8Array {
toBase64(options?: {
alphabet?: "base64" | "base64url";
omitPadding?: boolean;
}): string;
}
interface Uint8ArrayConstructor {
fromBase64(base64: string, options?: {
alphabet?: "base64" | "base64url";
lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
}): Uint8Array<ArrayBuffer>;
}
}
/**
* Convert an array of bytes into a base64 string.
* @param {Array.<number>|Uint8Array} bytes
* @returns {string}
*/
export declare function bytesToBase64(bytes: Uint8Array): string;
/**
* Convert a base64 string into the corresponding Uint8Array containing its
* corresponding binary data.
* /!\ Can throw if an invalid base64 string was given.
* @param {string} str
* @returns {string}
*/
export declare function base64ToBytes(str: string): Uint8Array<ArrayBuffer>;
//# sourceMappingURL=base64.d.ts.map