11import {
22 Call ,
3- CallControls ,
43 CallingState ,
4+ CancelCallButton ,
55 Icon ,
6+ OwnCapability ,
67 PreferredCodec ,
8+ ReactionsButton ,
9+ RecordCallButton ,
10+ Restricted ,
11+ ScreenShareButton ,
712 SpeakerLayout ,
13+ SpeakingWhileMutedNotification ,
814 StreamCall ,
915 StreamVideo ,
1016 StreamVideoClient ,
17+ ToggleAudioPublishingButton ,
18+ ToggleVideoPublishingButton ,
1119 useCall ,
1220 useCallStateHooks ,
1321} from '@stream-io/video-react-sdk' ;
@@ -20,6 +28,8 @@ import {
2028 getServerSideCredentialsProps ,
2129 ServerSideCredentialsProps ,
2230} from '../../../lib/getServerSideCredentialsProps' ;
31+ import { IncomingVideoSettingsButton } from '../../../components/IncomingVideoSettings' ;
32+ import appTranslations from '../../../translations' ;
2333
2434export default function BareCallRoom ( props : ServerSideCredentialsProps ) {
2535 const { apiKey, userToken, user } = props ;
@@ -100,7 +110,11 @@ export default function BareCallRoom(props: ServerSideCredentialsProps) {
100110 < meta name = "viewport" content = "initial-scale=1.0, width=device-width" />
101111 </ Head >
102112
103- < StreamVideo client = { client } >
113+ < StreamVideo
114+ client = { client }
115+ language = "en"
116+ translationsOverrides = { appTranslations }
117+ >
104118 < StreamCall call = { call } >
105119 < Stage />
106120 </ StreamCall >
@@ -183,4 +197,33 @@ const Lobby = (props: { onJoin: () => void }) => {
183197 ) ;
184198} ;
185199
200+ const CallControls = ( ) => (
201+ < div className = "str-video__call-controls" >
202+ < Restricted requiredGrants = { [ OwnCapability . SEND_AUDIO ] } >
203+ < SpeakingWhileMutedNotification >
204+ < ToggleAudioPublishingButton />
205+ </ SpeakingWhileMutedNotification >
206+ </ Restricted >
207+ < Restricted requiredGrants = { [ OwnCapability . SEND_VIDEO ] } >
208+ < ToggleVideoPublishingButton />
209+ </ Restricted >
210+ < Restricted requiredGrants = { [ OwnCapability . CREATE_REACTION ] } >
211+ < ReactionsButton />
212+ </ Restricted >
213+ < Restricted requiredGrants = { [ OwnCapability . SCREENSHARE ] } >
214+ < ScreenShareButton />
215+ </ Restricted >
216+ < Restricted
217+ requiredGrants = { [
218+ OwnCapability . START_RECORD_CALL ,
219+ OwnCapability . STOP_RECORD_CALL ,
220+ ] }
221+ >
222+ < RecordCallButton />
223+ </ Restricted >
224+ < IncomingVideoSettingsButton />
225+ < CancelCallButton />
226+ </ div >
227+ ) ;
228+
186229export const getServerSideProps = getServerSideCredentialsProps ;
0 commit comments