> 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. # addVideoInputDevice > Adds or replaces the primary video input device with optional constraints or stream. ```ts addVideoInputDevice(__namedParameters?): Promise ``` Adds or replaces the primary video input device with optional constraints or stream. ## **Parameters** **`__namedParameters`** `{ constraints?: MediaTrackConstraints; stream?: MediaStream; }` Capture options: either explicit `constraints` or a pre-acquired `stream`. See [`MediaTrackConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints) and [`MediaStream`](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream). --- ## **Returns** `Promise` ## **Examples** ```ts await selfParticipant.addVideoInputDevice(__namedParameters); ``` > Adds or replaces the primary video input device with optional constraints or stream.