/** * @class * @description This class connect to cdn the cdb balancer api and hepls to get data * @exports TestProfilesBusinessObject */ import Cdn from './../Loaders/Cdn'; import Loader from './../Loaders/Loader'; import { VideoSegment } from './../Storage/VideoSegment'; import PingTimeBean from './../Beans/PingTimeBean'; export default class TestProfilesBusinessObject { private static _instance; pingsTime: Map; monitoring: Map; private loader?; private _isMonitoring; private _cdns; private lastDownloadedSegment?; private shouldMonitor; private probeOnlyOnBanned; private noProbing; private constructor(); static getInstance(loader?: Loader): TestProfilesBusinessObject; setLoader(loader: Loader): void; updateCdnList(cdns: Map): void; newDownloadedSegment(segment: VideoSegment): void; stopMonitor(): void; setHeadOnBannedOnly(onlyBanned?: boolean): void; setNoProbing(noProbing?: boolean): void; monitor(cdns: Map): Promise; private getNextProbingSegment; private _afterCheck; private testCdn; private _performGetCheck; private _performHeadCheck; /** A probe we sign ourselves: the CDN's auth is on, its probes are authenticated and a credential exists. */ private _probeIsSigned; private _hostOf; /** * `carriesReusedToken`: the probe carries a credential re-used from the player's request (an unsigned * probe to that credential's own host). The probe re-uses an older segment's URL, so the token can * have expired by now: its 403 neither bans nor samples. */ private _performCheck; }