InitializeSkype()

in WebPortal/Scripts/devicetest.js [48:96]


            InitializeSkype(config.serviceUrl).then(function (skypeClient) {
                window.skypeWebApp = skypeClient;
                window.skypeWebApp.signInManager.state.changed(function (state) {
                    console.log("Sign-In state changed to: ", state);
                    if (state == "SignedIn") {
                        SubscribeToDevices();

                        var result = null;
                        if (requiresPlugin()) {
                            result = checkPlugin();
                        } else {
                            result = new Promise(function (resolve, reject) {
                                pluginVerified = true;
                                document.getElementById("PluginStatus").innerHTML = "Plugin is not required.";
                                $("#PluginState").removeClass("question-icon").removeClass("cancel-icon").addClass("tick-icon");
                                $("#btnPluginOk").removeAttr("disabled");
                                resolve(pluginVerified);
                            });
                        }

                        if (result !== null) {
                            result.then(function () {
                                if (pluginVerified) {
                                    document.getElementById("WebCamStatus").innerHTML = "";
                                    document.getElementById("MicrophoneStatus").innerHTML = "";
                                    document.getElementById("SpeakerStatus").innerHTML = "";
                                    $("#WebCamShow").css("display", "block");
                                    $("#MicrophoneTab").css("display", "block");
                                    $("#SpeakerTab").css("display", "block");
                                }
                            });
                        }
                    }
                });

                if (config.isAuthenticated) {
                    return GetAuthenticatedSignInOptions();
                }
                else {
                    var joinUrl;

                    // Guest join to ad-hoc join
                    return GetAdhocMeeting().then(function (response) {
                        joinUrl = response.JoinUrl;
                        console.log("Got ad-hoc meeting details:", response);
                        return GetAnonymousSignInTokens(joinUrl).then(GetAnonymousSignInOptions);
                    });
                }
            }).then(SignInToSkype)