API: Windows App Installation Behavior - Screenleap/support GitHub Wiki
The initial installation process is as follows:
- The user initiates a screen share by clicking on a screen share button.
- The Windows Installer app is downloaded onto the user's computer.
- The user will need to click on the downloaded installer app to install it.
- After a configurable amount of delay, the screenleap.js automatically attempts to start the screen share using a custom protocol handler after 20 seconds. This can be problematic if the app has not yet been installed. As a result, we recommend you provide your users with a link that they can click to manually start the screen share using the custom protocol handler.
- Once the custom protocol handler is activated after the app has been installed, a dialog is shown to the user asking for permission to start the app using the custom protocol handler.
- After the user gives permission, the screen share is started.
- If the screen share has not started after a 20-second delay from the automatic attempt to start the screen share using custom protocol handler, then the screenShareStartError callback is called to show an error message to the user.
- The presenter app will delete the installer app in the background after the screen share has started.
How do I increase the delay before the download of the installer app and the automatic attempt to start the screen share using the custom protocol handler?
The default delay from the initial download of the installer app and the automatic attempt to start screen share using the custom protocol handler is 20 seconds. You can change the delay to 12 seconds by making the following JavaScript call before starting the screen share:
screenleap.setOptions({delayAfterDownloadBeforeCallingCustomProtocolHandler: 12000});
How do I disable the automatic attempt to start the screen share using the custom protocol handler after a delay after the installer app is downloaded?
You can disable the automatic attempt to start the screen share by making the following JavaScript call before starting the screen share:
screenleap.setOptions({delayAfterDownloadBeforeCallingCustomProtocolHandler: screenleap.DISABLE_CUSTOM_PROTOCOL_AUTO_START});
How do I change the delay before the start error is triggered?
You can change the delay from the time of the automatic attempt to start the screen share using the custom protocol handler and the error message being displayed by making the following JavaScript call:
screenleap.setOptions({showScreenShareStartErrorDelay:20000});
How can I tell if a screen share start attempt is being made using ClickOnce?
If you look in the screenleapstart.log or screensharestart.log, you will see C:\Users[username]\AppData\Local\Apps\2.0\ around the second line of the log file.
How can I separate out the download/installation process from the start process?
If you want to have a discrete download/installation step followed by a discrete start step, you can do the following:
-
Start the download by calling:
screenleap.downloadNativeApp();
-
After the user has downloaded and installed the app, make the following call to start the screen share:
screenleap.startSharing(...);
If you have already initiated the download in a previous call, you can force the download to not happen during the
screenleap.startSharing(...)
call by passing{appInstalled: true}
for theoptions
parameter.screenleap.startSharing('NATIVE', screenShareData, callbacks, {appInstalled: true});