unified-plugin
Version:
NPAW's Unified Plugin
36 lines (35 loc) • 1.09 kB
TypeScript
import Interceptors from './Interceptors/Interceptors';
import BalancerOptions from './Utils/Options';
import Emitter from './Utils/Emitter';
/**
* @class
* @description Core class for the p2p plugin. It includes the options, the websocket communication,
* @exports CdnBalancer
*/
export default class CdnBalancer extends Emitter {
interceptors: Interceptors;
options: BalancerOptions;
private loader;
private readonly _accountCode;
private isEnabled;
private defaultChunkDownloadTimeout;
private isBitmovin;
private isTheoplayer;
private responseHeader;
private allResponseHeader;
private abort;
private overrideMimeType;
private requestHeader;
private send;
private open;
/**
* Constructs CdnBalancer.
* @param {string} accountCode NPAW Suite account code
* @param {BalancerOptions} options JSON with the options to construct the balancer.
*/
constructor(accountCode: string, options?: BalancerOptions);
private openAndSend;
enable(): void;
disable(): void;
getIsEnabled(): boolean;
}