Skip to main content

 

ConnectWise

SC.launch.js

SC.launch.getJoinPanelDefinitionTreeRoot

Creates a structured object containing all possible profiles that may be used to join sessions from the browser, sorted by operating system.

Parameters

Name Type Description
none    

Return type

Returns a list containing the definitions of all possible join panels.

Example

When an attempt is made to join a session from the browser, a list of all possible operating systems, browsers, and user agents is created in order to provide as many options as possible to ensure that a user is able to connect to a session.

  var joinPanelDefinitionTreeRoot = SC.launch.getJoinPanelDefinitionTreeRoot();

 

SC.launch.getPanelDefinitionPath

A helper method to get the specific panel path to be rendered based upon which specific command was executed

Parameters

Name Type Description
stringPath String the full path of the specific panel selected
panelDefinitionTreeRoot DOM Array the full list of all possible panel definition profilesl

Return type

Returns the currently selected join panel definition

Example

When a user initiates the process of starting to join a session, the specific panel that’s currently selected is retrieved, stored and rendered.

 
var onExecuteCommandProc = function (eventArgs) {
    if (eventArgs.commandName == 'NavigateJoinPanel' || eventArgs.commandName == 'Load') {

        var panelDefinitionPath = SC.launch.getPanelDefinitionPath(eventArgs.commandArgument, joinPanelDefinitionTreeRoot);

        if (eventArgs.commandName == 'NavigateJoinPanel' && panelDefinitionPath !=
            null && panelDefinitionPath[panelDefinitionPath.length - 1].shouldRememberSelection) {
            var settings = SC.util.loadSettings();
            settings.joinPath = eventArgs.commandArgument;
            SC.util.saveSettings(settings);
        }
        renderJoinProc(panelDefinitionPath);
    }
};

 

SC.launch.getInitialJoinPanelDefinitionPath

A method to set the initially displayed join panel definition.  If the browser has been used to connect to a session previously then that method is returned otherwise the best fitting panel is returned 

Parameters

Name Type Description
joinPanelDefinitionTreeRoot  DOM array the full list of all possible panel definition profiles

Return type

Returns a path for a specific join panel definition

Example

If an instance of ScreenConnect    is configured to display a prompt before a Guest is allowed to join a Support or Meeting session, then when that prompt is ended the initial join panel definition is retrieved and rendered

  var endPromptProc = function () {
    getClientLaunchParametersFunc(
        userData,
        promptFieldMap,
        function (clientLaunchParameters) {
        joiningClientLaunchParameters = clientLaunchParameters;
        joinIfReady();
    },
        function (error) {
        SC.dialog.setButtonPanelError(buttonPanel, error);
    });
    var initialPanelDefinitionPath =
        SC.launch.getInitialJoinPanelDefinitionPath(joinPanelDefinitionTreeRoot);
    renderJoinProc(initialPanelDefinitionPath);
};

 

SC.launch.startJoinSession

A method that initiates the browser join session process and provides the ability to prompt the user for additional information using a definable modal prompt

Parameters

Name Type Description
userData Object Specific information relevant to the user. Unused at this time.
getClientLaunchParametersFunc function generates a valid list of client launch parameters based upon relevant user and session information
shouldShowPrompt boolean whether or not the joinPanelPrompt should be displayed
promptText String text to be displayed within the body of the joinPanelPrompt
promptFieldMap Dictionary DOM elements to be displayed and used to gather specific input
promptButtonText String text to be displayed on the button within the joinPanelPrompt

Return type

void

Example

On the Guest page, when a code is entered and the Join command executed:

  • The startJoinSession method is called
  • The client launch parameters are constructed, and
  • The prompt dialog is displayed if configured to do so
  
if (session && (SC.command.doesClickDispatch(eventArgs.commandElement) ||
!SC.util.isCapab1e(SC.uti1.Caps.InternetExplorer))) {
    SC.launch.start30in5ession(
        null,
        function (userData, promptFieldMap, onSuccess, onFailure) {
            onSuccess(
                SC.util.getClientLaunchParameters(
                    session.SessionID,
                    session.SessionType,
                    session.Name,
                    promptFieldMap.participantName.value,
                    hostAccessToken,
                    hostAccessToken ?
                    SC.types.ProcessType.Host : SC.types.ProcessType.Guest
                    )
        );
},
SC.util.getSessionTypeBooleanResource('JoinPanel.{0}PromptVisib1e',
session.SessionType),
SC.util.getSessionTypeResource('JoinPanel.{0}PromptMessage', session.SessionType),
    {
    participantName: {
    labelText:
    SC.util.getSessionTypeResource('JoinPanel.{0}ParticipantNameLabelText',session.SessionType),

value: '',

visible:
SC.util.getSessionTypeBooleanResource('JoinPanel.{0}PromptParticipantNameVisible',
session.SessionType),

    },
  
},

SC.util.getSessionTypeResource('JoinPanel.{0}PromptButtonText',
session.SessionType)
);
}

 

  • Was this article helpful?
Leave feedback