Parse-SDK-ts icon indicating copy to clipboard operation
Parse-SDK-ts copied to clipboard

[feat]RxAVClient 支持多 app 切换

Open wujun4code opened this issue 7 years ago • 0 comments

    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;
    }

wujun4code avatar May 11 '17 01:05 wujun4code