*** id: b70aad19-7344-429d-a9d3-6e4b68459fa6 title: updateMicrophone slug: /js/reference/video/room-session-device/update-microphone description: updateMicrophone method for the RoomSessionDevice class. max-toc-depth: 3 ---------------- ### updateMicrophone ▸ **updateMicrophone**(`constraints`): `Promise` Replaces the current microphone 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 roomDevice.updateMicrophone({ deviceId: "/o4ZeWzroh+8q0Ds/CFfmn9XpqaHzmW3L/5ZBC22CRg=", }); ```