Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]RxAVClient 支持多 app 切换 #20

Open
wujun4code opened this issue May 11, 2017 · 0 comments
Open

[feat]RxAVClient 支持多 app 切换 #20

wujun4code opened this issue May 11, 2017 · 0 comments

Comments

@wujun4code
Copy link
Member

    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;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant