i dont want to display the screen shair button &l...
# ask-ai
b
i dont want to display the screen shair button <RoomContext.Provider value={room}> <div data-lk-theme="default" style={{ height: '100vh' }}> {/* <MyVideoConference /> */} <RoomAudioRenderer /> <ControlBar /> </div> </RoomContext.Provider>
t
Thanks for reaching out, Aman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
If you'd like to hide the screen share button in the LiveKit
ControlBar
component, a simple way is to set the
screenShare
property to
false
within the
controls
prop when you render the
ControlBar
. Here's a little example to help you out:
Copy code
<ControlBar controls={{ screenShare: false }} />
This will make sure the screen share button doesn’t show up. If you have any questions or need more help, please feel free to ask—I’m here for you! Sources: packages/react/CHANGELOG.md
b
<ControlBar controls={{ screenShare: false, camera: false }} /> i want the start audio to be true as default
t
To help you get audio to start automatically by default, you’ll want to configure the
LiveKitRoom
component. Simply set the
audio
prop to
true
like this:
Copy code
<LiveKitRoom serverUrl={serverUrl} token={token} connect={true} audio={true} video={false}>
  <RoomAudioRenderer />
  <ControlBar />
</LiveKitRoom>
This way, the microphone will be enabled right when the connection is made. Just a quick heads-up: some modern browsers might block automatic audio playback because of autoplay policies. To work around this, you can use the
StartAudio
component to kindly ask the user to interact:
Copy code
<StartAudio label="Click to enable audio playback" />
If you have any questions or need a hand with anything else, feel free to ask—I’m here to help! Sources: app/assistant/index.tsx | web/src/components/room-component.tsx | web/src/components/room-component.tsx | src/components/LiveKitRoom.tsx | examples/nextjs/pages/audio-only.tsx