# Video Calling

Set up video calls with the Sinch JavaScript Voice and Video SDK.

## Setting up a video call

Video calls follow the same flow as audio calls.
Use [CallClient.callUserVideo()](https://download.sinch.com/js/latest/reference/interfaces/CallClient.html#calluservideo)
to start a video call with a specific user.
You’ll receive the same callbacks as for audio: progressing, ringing,
answered, and established. For lifecycle details, see
[Audio calling](/docs/in-app-calling/js/calling).

## Showing the video streams

Once you have a `Call`, you can access two MediaStreams:

- `incomingStream` — remote stream sent to your app
- `outgoingStream` — your local stream sent to the other party


Access them via
[Call.incomingStream](https://download.sinch.com/js/latest/reference/interfaces/Call.html#incomingstream)
and
[Call.outgoingStream](https://download.sinch.com/js/latest/reference/interfaces/Call.html#outgoingstream).

Bind the appropriate stream to a `<video>` element by setting `srcObject`:


```javascript
const videoElement = document.getElementById(`${direction}-video`);
videoElement.srcObject = call.incomingStream;
```

### Pausing and resuming a video stream

Use [Call.pauseVideo()](https://download.sinch.com/js/latest/reference/interfaces/Call.html#pausevideo)
to temporarily stop sending your local video (for privacy or to save
bandwidth). Use
[Call.resumeVideo](https://download.sinch.com/js/latest/reference/interfaces/Call.html#resumevideo)
to start sending it again. Audio continues unless you mute it separately.

## Switching capturing device

To select a specific camera, set the `deviceId` constraint via
[CallClient.setVideoTrackConstraints()](https://download.sinch.com/js/latest/reference/interfaces/CallClient.html#setvideotrackconstraints).


```javascript
sinchClient.callClient.setVideoTrackConstraints({
  deviceId: { exact: <yourVideoDeviceId> },
});
```

For a full sample of input/output device selection, see the
[reference app](https://github.com/sinch/rtc-reference-applications/tree/master/javascript/samples).