ScreenShareAlreadyActiveError

View as MarkdownOpen in Claude

A call carries at most one screen share. Accepting a second one would overwrite the only reference the SDK holds to the first, leaving it capturing and sending with no way to stop it — so the second request is rejected and the live share is left untouched. Call stopScreenShare() first to replace it.

Extends

  • Error

Constructors

Constructor

new ScreenShareAlreadyActiveError(screenShareId, options?): ScreenShareAlreadyActiveError

Parameters

screenShareId
stringRequired

ID of the screen share leg that is already active.

options
ErrorOptions

Standard ErrorOptions, e.g. { cause }.

Properties

screenShareId
stringRequired

ID of the screen share leg that is already active.

Examples

import { ScreenShareAlreadyActiveError } from '@signalwire/js';
try {
await call.self.startScreenShare();
} catch (error) {
if (error instanceof ScreenShareAlreadyActiveError) {
await call.self.stopScreenShare();
await call.self.startScreenShare();
}
}

See