*** id: 6852f9f1-b716-44ff-89d4-53e185eb9ec4 title: setMemberPosition slug: /node/reference/video/room-session/set-member-position description: setMemberPosition method for the RoomSession class. max-toc-depth: 3 ---------------- [roomsession-41]: /docs/server-sdk/v4/node/reference/video/room-session ### setMemberPosition * **setMemberPosition**(`params`): `Promise` Assigns a position in the layout to the specified member. #### Parameters Object containing the parameters of the method. ID of the member to affect. Position to assign in the layout. #### Returns `Promise` #### Example In this example, we wait for a room to start and then set the roomlayout to `"6x6"`. When a second member joins the room, we set the position of that member to `"off-canvas"`. This example assumes that there is a [`RoomSession`][roomsession-41] already active and that members are joining the room. ```js import { SignalWire } from "@signalwire/realtime-api"; // Initialize the SignalWire client const client = await SignalWire({ project: "ProjectID Here", token: "Token Here" }); // Access video client from the main client const videoClient = client.video; // Setup listener for when a room starts await videoClient.listen({ onRoomStarted: async (roomsession) => { // Set the layout of the room roomsession.setLayout({ name: "6x6", }); // listens for when a member joins the room await roomsession.listen({ onMemberJoined: async (member) => { console.log("Member joined", member.name); // Set position for the member roomsession.setMemberPosition({ memberId: member.id, position: "off-canvas" }); }, onMemberUpdated: async (member) => { console.log(`Updated ${member.name} position`); }, onRoomUpdated: async (room) => { console.log(`Room updated to ${room.layoutName}`); }, }); } }) ```