Skip to content

Commit

Permalink
refactor: add comments to the MediaStreamManagement
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Sep 27, 2023
1 parent a3dade6 commit 13b0541
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type MediaDevicesInitialState = {

/**
*
* Provides `MediaStreamManagementContextAPI` that allow the integrators to handle:
* Provides `MediaStreamManagement` wrapper that allow the integrators to handle:
* 1. the initial device state enablement (for example in a custom lobby component)
* 2. media stream publishing
* @param params
Expand Down Expand Up @@ -50,6 +50,7 @@ export const MediaStreamManagement = ({

const settings = useCallSettings();

// Apply SDK settings to set the initial audio/video enabled state
useEffect(() => {
setInitialDeviceState((prev) => {
let initAudio = prev.initialAudioEnabled;
Expand All @@ -69,7 +70,7 @@ export const MediaStreamManagement = ({
}, [propInitialAudioEnabled, propInitialVideoEnabled]);

// Use backend settings to set initial audio/video enabled state
// ONLY if the prop was undefined -- meaning user did not provide any value
// It is applied only if the prop was undefined -- meaning user did not provide any value
useEffect(() => {
if (!settings) {
return;
Expand Down

0 comments on commit 13b0541

Please sign in to comment.