> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# ScreenShareAlreadyActiveError

> Thrown when startScreenShare() is called while the call is already sharing a screen.

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()`](/docs/browser-sdk/v4/reference/self-participant/stop-screen-share) first to replace it.

## **Extends**

* `Error`

## **Constructors**

### Constructor

```ts
new ScreenShareAlreadyActiveError(screenShareId, options?): ScreenShareAlreadyActiveError
```

### Parameters

**`screenShareId`** `string` — required

ID of the screen share leg that is already active.

---

**`options`** `ErrorOptions`

Standard `ErrorOptions`, e.g. `{ cause }`.

---

## **Properties**

**`screenShareId`** `string` — required

ID of the screen share leg that is already active.

---

## **Examples**

```ts
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**

* [`startScreenShare`](/docs/browser-sdk/v4/reference/self-participant/start-screen-share).
* [`screenShareStatus$`](/docs/browser-sdk/v4/reference/self-participant/screen-share-status\$) — read it before calling, and treat `'starting'`/`'stopping'` as busy.