Skip to content

Commit 0a50a9d

Browse files
authored
Update call-readiness-tutorial-part-3-camera-and-microphone-setup.md
1 parent f7f6511 commit 0a50a9d

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

articles/communication-services/tutorials/call-readiness/call-readiness-tutorial-part-3-camera-and-microphone-setup.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Access the full code for this tutorial on [GitHub](https://github.com/Azure-Samp
2929
## Letting the user choose their camera, microphone and speaker
3030

3131
From the previous two parts of the tutorial, the user is on a supported browser, and they have given us permission to access their camera and microphone. We can now make sure the user can choose the correct microphone, camera and speaker they want to use for their call.
32-
We'll present the user with a rich interface to choose their camera, microphone and speaker. Our final device setup UI will look like this:
32+
We present the user with a rich interface to choose their camera, microphone and speaker. Our final device setup UI will look like this:
3333

3434
![Image of the device setup page](../media/call-readiness/device-setup-page.png)
3535

3636
### Creating a Configuration Screen
3737

38-
First we'll create a new file called `DeviceSetup.tsx` and add some setup code, with a callback that will return the users chosen devices back to the App:
38+
First we create a new file called `DeviceSetup.tsx` and add some setup code, with a callback that returns the users chosen devices back to the App:
3939

4040
`src/DeviceSetup.tsx`
4141

@@ -56,9 +56,9 @@ export const DeviceSetup = (props: {
5656

5757
We can then add this DeviceSetup to our App.
5858

59-
- When the PreCallChecksComponent completes, it will now forward the user to the `deviceSetup` state.
60-
- When the user is in the `deviceSetup` state, we'll render the `DeviceSetup` component.
61-
- When the device setup is complete, we'll forward the user to the `finished` state. In a production App, this forward is typically when you would move the user to a call screen.
59+
- When the PreCallChecksComponent completes, it forwards the user to the `deviceSetup` state.
60+
- When the user is in the `deviceSetup` state, we render the `DeviceSetup` component.
61+
- When the device setup is complete, we forward the user to the `finished` state. In a production App, this forward is typically when you would move the user to a call screen.
6262

6363
First import the DeviceSetup component we created:
6464

@@ -114,7 +114,7 @@ const App = (): JSX.Element => {
114114
/>
115115
)}
116116

117-
{/* After the device setup is complete, take the user to the call. For this sample we will just show a test complete page. */}
117+
{/* After the device setup is complete, take the user to the call. For this sample we show a test complete page. */}
118118
{testState === 'finished' && <TestComplete />}
119119
</CallClientProvider>
120120
</FluentThemeProvider>
@@ -125,10 +125,10 @@ const App = (): JSX.Element => {
125125
#### Retrieving and updating microphone, camera and speaker lists from the stateful client
126126

127127
To present a list of selectable cameras, microphones and speakers to the user we can use the stateful call client.
128-
Here we'll create a series of React hooks. These React hooks will use the call client to query for available devices.
129-
The hooks will also ensure our application re-renders anytime the list changes, for example, if a new camera is plugged into the user's machine.
130-
For these hooks, we'll create a file called `deviceSetupHooks.ts` and we'll create three hooks: `useMicrophones`, `useSpeakers` and `useCameras`.
131-
Each of these hooks will use `useCallClientStateChange` to update their lists anytime the user plugs/unplugs a device:
128+
Here we create a series of React hooks. These React hooks use the call client to query for available devices.
129+
The hooks ensure our application re-renders anytime the list changes, for example, if a new camera is plugged into the user's machine.
130+
For these hooks, we create a file called `deviceSetupHooks.ts` and we create three hooks: `useMicrophones`, `useSpeakers` and `useCameras`.
131+
Each of these hooks uses `useCallClientStateChange` to update their lists anytime the user plugs/unplugs a device:
132132

133133
`src/deviceSetupHooks.ts`
134134

@@ -222,10 +222,10 @@ const useCallClientStateChange = (): CallClientState => {
222222

223223
#### Creating dropdowns to choose devices
224224

225-
To allow the user to choose their camera, microphone and speaker, we'll use the `Dropdown` component from Fluent UI React.
226-
We'll create new components that will use the hooks we created in `deviceSetupHooks.tsx` to populate the dropdown and update
225+
To allow the user to choose their camera, microphone and speaker, we use the `Dropdown` component from Fluent UI React.
226+
We create new components that uses the hooks we created in `deviceSetupHooks.tsx` to populate the dropdown and update
227227
the chosen device when the user selects a different device from the dropdown.
228-
To house these new components, we'll create a file called `DeviceSelectionComponents.tsx` that will export three new components: `CameraSelectionDropdown`, `MicrophoneSelectionDropdown` and `SpeakerSelectionDropdown`.
228+
To house these new components, we create a file called `DeviceSelectionComponents.tsx` that export three new components: `CameraSelectionDropdown`, `MicrophoneSelectionDropdown` and `SpeakerSelectionDropdown`.
229229

230230
`src/DeviceSelectionComponents.tsx`
231231

@@ -321,7 +321,7 @@ First, import the new Dropdowns:
321321
import { CameraSelectionDropdown, MicrophoneSelectionDropdown, SpeakerSelectionDropdown } from './DeviceSelectionComponents';
322322
```
323323

324-
Then create a component called `DeviceSetup` that houses these dropdowns. This component will also hold the local video preview we will create later.
324+
Then create a component called `DeviceSetup` that houses these dropdowns. This component holds the local video preview we create later.
325325

326326
```ts
327327
export const DeviceSetup = (props: {
@@ -347,9 +347,9 @@ export const DeviceSetup = (props: {
347347

348348
#### Creating a local video preview
349349

350-
Beside the dropdowns, we'll create a local video preview to allow the user to see what their camera is capturing. It will contain a small call controls bar with camera and microphone buttons to toggle camera on/off and microphone mute/unmute.
350+
Beside the dropdowns, we create a local video preview to allow the user to see what their camera is capturing. It contains a small call controls bar with camera and microphone buttons to toggle camera on/off and microphone mute/unmute.
351351

352-
First we'll add a new hook to our `deviceSetupHooks.ts` called `useLocalPreview`. This hook will provide our react component with a localPreview to render and functions to start and stop the local preview:
352+
First we add a new hook to our `deviceSetupHooks.ts` called `useLocalPreview`. This hook provides our react component with a localPreview to render and functions to start and stop the local preview:
353353

354354
`src/deviceSetupHooks.ts`
355355

@@ -408,7 +408,7 @@ export const useLocalPreview = (): {
408408
}
409409
```
410410

411-
Then we'll create a new component called `LocalPreview.tsx` that will use that hook to display the local video preview to the user:
411+
Then we create a new component called `LocalPreview.tsx` that uses that hook to display the local video preview to the user:
412412

413413
`src/LocalPreview.tsx`
414414

0 commit comments

Comments
 (0)