Search code examples
webrtc

ApiRTC - Behaviour with meshModeEnabled and meshOnlyEnabled


I would like to know what is the exact behaviour of the Apizee PaaS when the meshModeEnabled and meshOnlyEnabled parameters are set to true ?

The documentation describes the usefulness of these 2 parameters but does not explain the behaviour in the Apizee application.

If we set the meshModeEnabled parameter to true and set the meshOnlyEnabled parameter to true, then this will prohibit ApiRTC from redirecting traffic to the SFU (to maintain a true Peer-To-peer).

My question is: by setting the two parameters mentioned above to true, the traffic will be exclusively P2P, which means that it is no longer possible to use the conversation recording system and the media retrieval with the API (because no passage to SFU)?

Thank you in advance

I have already used the 2 parameters but without any information on their technical behaviour on the Apizee PaaS side


Solution

  • Answer for the ApiRTC lib release 4.7.8

    If we set the meshModeEnabled parameter to true and set the meshOnlyEnabled parameter to true, then this will prohibit ApiRTC from redirecting traffic to the SFU (to maintain a true Peer-To-peer).

    You re right

    My question is: by setting the two parameters mentioned above to true, the traffic will be exclusively P2P, which means that it is no longer possible to use the conversation recording system and the media retrieval with the API (because no passage to SFU)?

    I confirm. The SFU is needed for any activity that needs to centralize all the streams (recording, bandwith optimisation,...)


    Beware that ApiRTC has a mecanism to choose the best stream routes depending of the use and of the bandwith quality of participant.

    If you enable mesh mode,the behavior of ApiRTC will be:

    • If < 5 participants AND session has not been in SFU mode before ==> roomMode = "mesh"
    • If >= 5 participant OR someone join the room in SIP OR recording OR someone hase a doggy upload link OR session has been in SFU mode before ==> roomMode = SFU

    Here are the default values if you don't specify any:

    • meshModeEnabled : false ==> so by default it doesn't use the ApiRTC stream routing optimisation
    • meshOnlyEnabled : false

    To get the current connection mode, you can use the apiCC.session.apiCCWebRTCClient.webRTCClient.MCUClient.sessionMCUs object in your browser console. (unsupported) watch for the roomModeChanged of the current Conversation to be fired when the mode changes from mesh to SFU.

    The roomMode attribute will show

    • "mesh" => mesh mode
    • or will not be defined => SFU mode