If you want to give your user the ability of terminating a screen sharing session unilaterally, you can call the following function:

Upscope('stopSession');

The onSessionStop callback will be called regularly.

Did this answer your question?