RE: Add a "knocking" feature to a custom Daily video call app

Jess really did a great job explaining how to add knocking to a custom video call. Her well written blog actually motivated us to implement it in our application. Nonetheless, I seem not to be very comfortable with how it was implemented.

Look at this scenario: "A participant is requesting access to join my call, first I will let the participant join the call before deciding to allow or decline the request."

That's really the current implementation. The participant should not join the call before any decision is made.

My suggestion is that the implementation should be revisited. The video and/or audio of the "knocking" participant should not be started before a decision is reached by the organizer (owner).

1 votes

Active · Last Updated


  • Lazer
    Lazer Dailynista

    Hi @jekwempu,

    Glad you found the tutorial helpful, thanks for the feedback!

    Regarding your concerns with the knocking flow: if I understand correctly, you are talking about the fact that the guest has to call join() before calling requestAccess(). Is that correct?

    When the guest calls join(), if they are trying to enter a private room and knocking is enabled, they don't actually join with the kind of access that lets anyone see their media (or lets them see anyone else). You'll see in the code that they get specifically 'lobby' access only. They require this lobby access to then be able to call requestAccess()

    Regarding starting the camera and microphone - this is pretty common when building something like a pre-join UI, where a user can test their camera before joining the call. Call controls were of scope to implement for this demo, so we are just using the room's default configuration (which lets you specify whether you want cams and mics started automatically or not):

    If in your implementation you'd like to have cameras and microphones off by default, you could change this setting in your dashboard or alternatively use the startVideoOff and startAudioOff properties in the code.

    Does that make sense?

  • Thanks Lazer for the feedback. Your perspective makes sense to me.