micAudiomode is not working when written with join() method

svm_agilis
svm_agilis Member
edited January 2023 in Q&A

when I set property micAudioMode: 'music' while creating callObject, then it is working fine. I confirmed this is working by checking chrome webrtc-internals.

but when I set this property while joining the call, I cannot see this working. I confirmed this is not working by checking chrome webrtc-internals.

please see screenshots to check what I have done and let me know if I made any mistake.

How to set this property while joining the call, and make it work?


Tagged:

Answers

  • Tasha
    Tasha Community Manager, Dailynista admin

    Hi @svm_agilis

    I’m sorry that you can’t see the property micAudioMode: 'music' working when you join the call. Thanks for letting us know! We should be able to help you with this!

    First, can you let me know:

    • Is this thread related to what you are asking about here? Or is this something different?
    • Can you provide a larger code snippet so our engineers can take a closer look?
  • Hi @Tasha

    1. yes, it is related to this thread , but at that time I got to know that issue will be fixed in feature updates. now I have updted Daily-js but still getting that issue
    2. I have used the same code as in the attached screenshots. I didn't write any other code other than those related to micAudioMode

    please help!

  • mark_at_daily
    mark_at_daily Community Manager, Dailynista admin

    @svm_agilis thanks for the report! What you're doing looks correct to me. I just tested using micAudioMode both in creating the callObject and during join() and I can confirm this this works as expected. The one thing you'll want to confirm is that your call is in SFU mode. For now, micAudioMode only applies to SFU mode. You can check your mode using getNetworkTopology().

    If you're still having issues, if you can share more about how you're configuring things, we should be able to help.


  • Hi @mark_at_daily


    this is what I have written and it didn't work for me.

    const joinCall = async () => { 

    if (!callObject) return;


    // Disable join controls

    setJoining(true);


    // Set the local participants name

    await callObject.setUserName(userName);


    // Async request access (this will block until the call owner responds to the knock)

    const { access } = callObject.accessState();


    const isOwner = callObject.participants().local.owner;

    console.log("Access: ...", access);


    // set owner resolution to 1080p with framerate 30

    if (isOwner) {

    console.log("callObject.participants().local OWNER", callObject.participants().local);

    await callObject.join({

    url: url,

    dailyConfig: {

    micAudioMode: 'music',

    }

    });

    callObject.setBandwidth({

    kbs: 2180,

    });

    } else {

    await callObject.join();

    callObject.setBandwidth({

    kbs: 520,

    });

    }


    // If we we're in the lobby, wait for the owner to let us in

    if (access?.level === ACCESS_STATE_LOBBY) {

    setWaiting(true);

    const { granted } = await callObject.requestAccess({

    name: userName,

    access: {

    level: 'full',

    },

    });


    if (granted) {

    // Note: we don't have to do any thing here as the call state will mutate

    console.log('👋 Access granted');

    localStorage.setItem('PLUOT_PARTICIPANT_NAME', userName);

    } else {

    console.log('❌ Access denied');

    setDenied(true);

    }

    }

    await callObject.setNetworkTopology({ topology: "sfu" }).then(e => {

    console.log("topology changes to SFU: ", e)

    })

    };

  • mark_at_daily
    mark_at_daily Community Manager, Dailynista admin

    It looks like you have two `join()` paths in your code: one for an owner and one for a non-owner.

    if (isOwner) {
      console.log(
        'callObject.participants().local OWNER',
        callObject.participants().local
      );
    
      await callObject.join({
        url: url,
        dailyConfig: {
          micAudioMode: 'music',
        },
      });
    
      callObject.setBandwidth({
        kbs: 2180,
      });
    } else {
      await callObject.join();
      callObject.setBandwidth({
        kbs: 520,
      });
    }
    

    In your testing, can you confirm that your client is both an owner (set via a meeting token) and the call is in SFU mode?