*** id: b9ef519e-5df7-4835-87c0-f5e985a11066 title: updateCamera slug: /js/reference/video/room-session-screen-share/update-camera description: updateCamera method for the RoomSessionScreenShare class. max-toc-depth: 3 ---------------- ### updateCamera ▸ **updateCamera**(`constraints`): `Promise` Replaces the current camera stream with the one coming from a different device. #### Parameters Specify the constraints that the device should satisfy. See [MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints). #### Returns `Promise` #### Example ```javascript await screenShareObj.updateCamera({ deviceId: "/o4ZeWzroh+8q0Ds/CFfmn9XpqaHzmW3L/5ZBC22CRg=", }); ```