Voximplant allows sharing the screen when making calls. This functionality is enabled by the shareScreen method of the Web SDK. Please note that it works in Chrome and Firefox as they both have native support of screen sharing.
First thing first – you have to check if screen sharing is possible at the moment. There is a screenSharingSupported method allowing to do so:
You can set true for the showLocalView parameter of the method to make a screen sharing preview visible locally in the same way as it's done for video calls. It is false by default.
IMPORTANT: Safari browser for iOS requires a user interface for playing a video during a call. It should be an interactive element like an HTML "button" with the "onclick" handler that calls the "play" method on the "video" HTML element.
To stop sharing the screen immediately, use the stopSharingScreen method. It will stop sharing for all windows/screens.
Learn more about screen sharing in the sharing tutorial. There you'll find out how to create a demo with buttons and everything.