Table of Contents

groupCallStat

groupCallStat contains status data of the individual calls used by the group call. Each group call participant sends a status update each time its call status changes. The status update is sent to the client who added this client to the group call. You can keep track of these messages using your own wrtc.onInviteGroupProgress() code - or use groupCallStat, that basically is a compilation of all received group call progress data.

wrtc.get("groupCallStat")

You acquire the group call state data by calling wrtc.get("groupCallStat"). It returns a JSON array containing one entry for each call.

groupCallStat structure

groupCallStat contains for each call:

Example

groupCallStat contents:

[{"from":"guest_828","to":"guest_579","state":"already talking"},
{"from":"guest_828","to":"guest_694","state":"already talking"},
{"from":"guest_579","to":"guest_694","state":"calling"}]

guest_828 was already connected to guest_579 and guest_694, but now as the group call is being set up guest_579 has been asked to call guest_694
Once the call has been established state "calling" will be changed to "talking".

Example code to display group call progress:

wrtc.onInviteGroupProgress = function(arg) {
	var statstr = "Group call progress:<br/>";
	var groupCallStat = wrtc.get("groupCallStat");
	if (groupCallStat.length == 0)
		return;
	groupCallStat.forEach(function (conn) {
		if (conn.error)
			statstr += conn.from + " &rarr; " + conn.to + ": ERROR " + conn.error + "<br/>";
		else
			statstr += conn.from + " &rarr; " + conn.to + ": " + conn.state + "<br/>";
	});
	document.getElementById("groupCallStatus").innerHTML = statstr;
}

See Also

wrtc.onInviteGroupProgress()