You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/tutorials/call-readiness/call-readiness-tutorial-part-3-camera-and-microphone-setup.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,13 @@ Access the full code for this tutorial on [GitHub](https://github.com/Azure-Samp
29
29
## Letting the user choose their camera, microphone and speaker
30
30
31
31
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:
33
33
34
34

35
35
36
36
### Creating a Configuration Screen
37
37
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:
- 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.
62
62
63
63
First import the DeviceSetup component we created:
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
227
227
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`.
229
229
230
230
`src/DeviceSelectionComponents.tsx`
231
231
@@ -321,7 +321,7 @@ First, import the new Dropdowns:
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.
351
351
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:
0 commit comments