Advanced Integration
Please see below for information on how to configure your integration for more advanced scenarios.
If you are adding the integration to multiple pages on your website to use for different purposes, please see the
        Per-Integration Customization Using Data-Param Attribute
        section below for information on how you can customize each integration by passing in additional configuration
        parameters in the data-param attribute of the code snippet.
Integration With Presenter And Viewer Joining From Same Page Website URL
You have two options for integrating with Screenleap if you will be using the same page on your website for both your presenter and viewer integrations.
Option 1
The simplest option, which does not require any programming on your part, is to include the
        viewer integration code snippet in the HTML for your integration
        page. When linking to your integration page for your presenters, you will need to include the query parameter
        screenleap-role=presenter in the URL, so that we know to load the presenter integration.
        No additional query parameter needs to be included when linking to your integration page for your viewers.
Option 2
The second option is more advanced and requires knowledge of programming, but it allows for server-side integration
        as well as more configuration flexibility as you can pass configuration overrides via the data-param
        attribute of the integration code.
The second option will require you to have some other way of knowing whether to load the presenter or viewer integration code snippet (for example, you users are logged into your website, so you know whether to include the presenter or viewer integration code snippet for each of them).
An example of a server-side integration in PHP:
Company Integration
In addition to support for integrating with your website for a single user, Screenleap also supports integrating
        with your website for all the users in your company using our company integration. A company integration allows
        all the users in your company with a Screenleap account to sign in from your presenter integration page on your
        website and start live-interaction sessions using their accounts. If you need to support the automatic
        or select viewer join method with your company integration, you will need to include a unique roomId
        in the data-param attribute of your integration code snippet for each set of users that you want to
        connect. Please see the instructions
        below for info on how to allow multiple presenters and viewers at the same integration URL to connect with each
        other automatically.
Per-Integration Customization Using Data-Param Attribute
If you are planning to add the integration to multiple pages on your website, you may want to be able to customize
        each of those integrations to use for different purposes. For example, you may want to integrate with your support
        page to allow your support agents to viewer your users' screens and with another page on your website to create
        meeting rooms that your colleagues can use to host your online meetings. To accomplish this, you will need to override the
        configuration you specified in your integration settings page by passing in additional parameters in the
        data-param attribute of the integration code snippet for that page.
The configuration settings that can be overridden via the data-param attribute are:
        allowPresenterSwap,
        shareSessionStartingRole,
        showLoginBox,
        showSessionLauncher,
        presenterFirstName,
        presenterLastName,
        useDefaultPresenterUI,
        screenSharingMode,
        videoMode,
        initialMediaSource,
        urlToOpenInNewTabAfterSessionStart,
        audioConferencingMethod,
        allowRecording,
        recordOnStart,
        allowPause,
        pauseOnStart,
        allowRectangleMode,
        enableRectangleModeOnStart,
        allowViewerMouse,
        enableViewerMouseOnJoin,
        allowRemoteControl,
        enableRemoteControlOnJoin,
        allowChat,
        showChatOnStart,
        presenterRedirectOnEndUrl,
        screenShareOptimizationPreference,
        viewerJoinMethod,
        viewerInfoToCapture,
        viewerFitToWindow, and
        viewerRedirectOnEndUrl.
    
When passing in parameters using the data-param attribute, please be sure that you
        URL-encode the values
        if they contain characters that are not allowed in URLs (such as spaces and other reserved characters).
Room ID
The roomId parameter needs to be added to the data-param attribute of your integration code snippet
    when:
- You need a way to automatically connect presenters and viewers who are at different integration URLs with each other.
- You need to support automatically connecting multiple presenters with different sets of viewers who are all at the same integration URL. A website URL is considered identical if the hostname and path are the same.
Please note that the roomId can be any arbitrary string and is not persisted anywhere in the Screenleap
    site. It is simply used as a way of connecting a specific presenter with a set of viewers. This means you can use
    any value you want as long as they are unique for each group of users that you want to automatically connect. All
    presenters and viewers who have the same roomId will be automatically connected when a share session
    with that roomId is started.
Connecting Presenters And Viewers At Different Integration URLs
If you need to automatically connect presenters and viewers who are at different integration URLs with each other,
    you can do so by providing the same roomId in the data-param attribute of the integration
    code snippet for the presenters and viewers that you would like to connect.
Allowing Multiple Presenters And Viewers At The Same Integration URL to Automatically Connect With Each Other
If you need to be support automatically connecting multiple presenters and viewers who are all at the same integration URL,
    you can do so by providing a unique roomId in the data-param attribute of the integration
    code snippet for each presenter and the set of viewers that need to connect with that specific presenter.
For example, if you have presenter 1 and presenter 2, and you want viewer 1 and viewer 2 to automatically join
    presenter 1's share session and viewer 3 and viewer 4 to automatically join presenter 2's share session, then you
    will need to pass one roomId in the integration page for presenter 1, viewer 1, and viewer 2 (i.e., presenter1) and a different roomId
    in the integration page for presenter 2, viewer 3, and viewer 4 (i.e., presenter2).
Auto-Login
If your integration will be from a page that requires your users authenticate themselves first, then it is possible to auto-login your users to your integration so that your users will be able to start share sessions without needing to log in to the integration manually.
To get started, you will need to create user accounts for each user that will need to access your integration. Each user
    account will have an auto-login token associated with the account. The email address used to create the account, along
    with the auto-login token for the account, can be passed to your integration via the data-param property
    to auto-login your user into your integration.
See auto-login tokens for users in your company »
Using the auto-login pages on unauthenticated pages in your website is not recommended as the auto-login tokens are exposed, which could pose a security risk and open the user account to misuse.

