Skip to content

Commit a3bc5b8

Browse files
authored
chore: incoming video selector for the bare join page (#2010)
Adds the incoming video quality selector to the bare join page.
1 parent 33554fc commit a3bc5b8

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

sample-apps/react/react-dogfood/components/IncomingVideoSettings.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ const IncomingVideoSettingsMenu = (props: {
8585
className={clsx('rd__button rd__button--align-left', {
8686
'rd__button--primary': value === props.value,
8787
})}
88+
type="button"
89+
data-testid={`incoming-video-resolution-${value}`}
8890
onClick={() => props.onChange(value as IncomingVideoSetting)}
8991
>
9092
<span className="str-video__dropdown-label">

sample-apps/react/react-dogfood/pages/bare/join/[callId].tsx

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import {
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

2434
export 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+
186229
export const getServerSideProps = getServerSideCredentialsProps;

0 commit comments

Comments
 (0)