Table of Contents
Get maximum permissible Talker Count
To know the maximum permissible Active Talkers that you may receive and you can set, you may use window.EnxRtc.getMaxTalkers()
method.
Method: getMaxTalkers()
– without parameter
Event Listener: onMaxTalkerCount
– Gets maximum talker allowed in the room
window.EnxRtc.getMaxTalkers(); window.EnxRtc.addEventListner("onMaxTalkerCount", function (data) console.log(JSON.stringify(data.data)); });
Get Talker Count
It may be necessary to know how many talkers are expected to receive onActiveTalkerList
Event Listener, i.e. to know either the preset value of talkers or any custom value in effect which is either by the Application Developer or opted by End-Point User.
Method: getTalkerCount()
– without parameter
Event Listener: onGetTalkerCount
– Gets Talker count
window.EnxRtc.getTalkerCount(); window.EnxRtc.addEventListner("onGetTalkerCount", function (data) { console.log(JSON.stringify(data.data)); });
Set Talker Count
EnableX sets a maximum of 6 active talkers in the active talker-list with onActiveTalkerList
Active Talkers. However, you may opt to receive less talkers at a Client End Point if you so require. This may either be a predefined value, or this value may be set at run-time in a connected session. If needed, you can create UI for the connected user to opt for number of active-talkers the user wants to receive.
Method: setTalkerCount(numTalkers)
Parameters: @param {Number} numTalkers
– No. of talkers you want to receive. Range 0-6
- If you set
numTalkers
to any value from 1 to 6 – you will receive those many talkers in the list. - If you set
numTalkers
to 0 (zero), then list doesn’t become empty. Rather, you would start receiving 3 audio streams only. Video Streams will not be carried.
Event Listener: onSetTalkerCount
window.EnxRtc.setTalkerCount(4); window.EnxRtc.addEventListner("onSetTalkerCount", function (data) { console.log(JSON.stringify(data.data)); });