Parse-SDK-ts
Parse-SDK-ts copied to clipboard
[feat]RxAVClient 支持多 app 切换
static currentApp: RxAVApp;
static remotes: Array<RxAVApp> = [];
static add(app: RxAVApp, replace?: boolean) {
RxAVClient.remotes.push(app);
if (replace) {
RxAVClient.currentApp = app;
}
}
static switch(shortname: string) {
let tempApp = RxAVClient.remotes.find(app => {
return app.shortname == shortname;
});
if (tempApp) {
RxAVClient.currentApp = tempApp;
}
}
export class RxAVApp {
shortname: string;
appId: string;
appKey: string;
region?: string;
}