Class: Screen


Screen class is used for representing the display of the computer. It can be used to capture the contents of the entire screen or a portion thereof (such as a window of an application or a tab of the browser). Screen class implements MediaStreamVideoSupplier interface, so it can be used as a source of video for local MediaStream.

let screen = MindSDK.getScreen();
if (screen) {
    let mySecondaryStream = MindSDK.createMediaStream(null, screen);
    screen.acquire().catch(function(error) {
        alert("Screen can't be acquired: " + error);
} else {
    alert("Screen capturing isn't supported");




acquire() → {Promise}

Starts screen capturing. This is an asynchronous operation which assumes prompting the user to select and grant permission to capture the contents of a screen or portion thereof (such as a window) and distributing screen's video among all consumers. This method returns a Promise that resolves with no value (if the screen capturing starts successfully) or rejects with an Error (if the user didn't grant permission to access the screen or canceled the operation). If screen capturing has been already started, this method returns already resolved Promise.


The promise that either resolves with no value or rejects with an Error.



Stops screen capturing. This is a synchronous operation which assumes revoking previously distributed screen's video. The stopping is idempotent: the method does nothing if the screen is not acquired.


Sets frame rate which the screen should use for capturing video. The frame rate can be set at any moment regardless whether the screen is acquired or not.

Name Type Description
fps Number

The frame rate which the screen should capture video at.


Sets the listener which should be notified of all events related to the screen.

Name Type Description
listener ScreenListener

The listener which should be notified of all events related to the screen.