# Extending Rooms with Custom Code If you are using [video rooms with UI included](../creating-a-video-room/index.mdx), you dont need to write code: you get a basic video conference out-of-the-box. However, this doesnt stop you in case you need additional control via code. Lets see how. ## Obtaining a reference to the RoomSession The code snippet that you copy from your SignalWire Space looks like this: html Notice how the final part of the snippet is a call which takes a set of parameters that you can use to initialize the room session. Find the full list of parameters in the [documentation](sdks/reference/video-conference-appkit/index.mdx). Here we are interested in the setupRoomSession parameter: this is a callback which will be invoked when a [RoomSession][roomsession] object is ready. This normally happens right before the room is joined. html ## Using the RoomSession object Once you obtained the reference to the [RoomSession][roomsession] object, you can start subscribing to events and performing actions. Say we want to mute the user as soon as they join the room. First, we would subscribe to the [room.joined](sdks/reference/browser-sdk/video/video-roomsession.mdx#roomjoined) event, which will trigger right after the room has been joined. Then, we would invoke the [videoMute](sdks/reference/browser-sdk/video/video-roomsession.mdx#videomute) method to mute the local user. For example: html ## Wrap up In video rooms with prebuilt UI, you can use the setupRoomSession parameter to access the underlying API which gives you full control on the room. Use it to subscribe to events or to perform actions in the room. If, instead of a widget, you require a more advanced control on the room (such as a custom UI, or a custom authentication mechanism), take a look at [First steps with Video](../video-first-steps/index.mdx). It will show you how to write a custom video application from scratch using our lower level APIs. [roomsession]: sdks/reference/browser-sdk/video/video-roomsession.mdx