doubts regarding micAudioMode property

svm_agilis
svm_agilis Member
edited January 20 in Q&A 🤔

Hi

I read in the docs that, "by using micAudioMode property we can configure sender's audio tracks(audio or screenAudio)". I want to have default configuation for audio and change configuation for only screenAudio of a specific person in a call.

Can it be possible? If it is possible, can please explain how to do so?

also I see that we can choose mono or stereo by setting key stereo: true , what its value in default configuration? is it stereo: true or streo: false by default?

Tagged:

Answers

  • Dom
    Dom Dailynista
    edited January 20

    Hello 👋

    Sure, so I think you've noticed that when you enable micAudioMode with music mode set, your microphone and screenshare will become stereo and high quality.

    What you can do is:

    1. If you want to keep your microphone low quality I would leave micAudioMode to the default settings.
    2. You can use our startCustomTrack and stopCustomTrack API to send screen audio (and video if you wanted) yourself rather than use the startScreenShare API.
    3. You can get the screen share yourself using getDisplayMedia, get the track from there, and then pass it through to the startCustomTrack method. The downside of this is you cant rely on Daily to get any error events for the browser and pass it along to you using our events API.
    4. I will make sure to pass along a feature request to allow you to set something similar to custom tracks when starting a screenshare.
    5. The default value is mono and the browser defaults. Which last time we checked on Chrome and Safari is around 40 kbs.
    6. In this code snippet below, you can see how you'd use startCustomTrack . Just pass through the track from getDisplayMedia to the track argument, and then the micAudioMode settings to the mode argument. You can optionally set a trackName. Then you'd subscribe to the custom track with the custom track name you've given it.

    Hope that helps!

    // Example: Starting with a trackName
    const trackName = await callObject.startCustomTrack({
      track: customTrack,
      mode: micAudioModeSettings
      trackName: 'testA',
    });