The connection notification callback (pctConnectionQualityChange)
The pctConnectionQualityChangeCallback
function is set with the on() functionality. The callback is invoked when the precall tests are finished for all the TURN credentials given in startPrecallTest()
. Connection notification gives the insight in plain english. The following table provides the list of parameters incorporated in pctConnectionQualityChange
callback functoin:
Params | Type | Description |
---|---|---|
clearNotification | bool | boolean value, when true means that notification should be cleared on UI |
timestamp | double | timestamp of the notification |
notificationID | string | represents the hash of a notification, makes it easy to reference |
connectivityCode | int | see connectivity table below |
connectivity | string | see connectivity table below |
statusCode | int | see status table below |
status | string | see status table below |
summaryCode | int | see summary table below |
summary | string | see summary table below |
notificationCode | int | A code that ties to the notification. This allows you to override the notification text for your use-case. See notification table |
notification | string | Insight on connection quality in English. See notification table |
networkType | string | RTCNetworkType enum |
localIp | string | IP address associated with the userID, related to address in webrtc-stats. FIXME: call this consistently |
csjs.on('pctConnectionQualityChange', results => {
console.log(results);
})
//console log output
{
"clearNotification": true
"timestamp": "405241500"
"notificationID": "766172756e6c6f76657363616c6c7374617473"
"connectivityCode": 3
"connectivity": "success"
"statusCode": 4
"status": "good"
"summaryCode": 75
"summary": "connection is Good, Fair bandwidth (good audio, poor video)"
"notificationCode": 700
"notification": "Current bandwidth is enough for good audio quality, but poor video quality or screen sharing"
"networkType": "wifi"
"localIp": "194.110.84.59"
}
SCT notification messages
Smart Connectivity Test module (SCT) of callstats.js API is now equipped with a machine learning pipeline. ML pipeline generates notifications about the abnormal changes in the network parameters and alerts the user about his/her network condition before joining a call. Each SCT notification message generated by callstats.js API consists of four groups of information: Connectivity, Status, Summary and Message. The following tables represent underlying messages of each group and the codes.
Connectivity
If the connection has been successful or not
Connectivity Code | Description |
---|---|
1 | no connection |
2 | no media device |
3 | success |
Status
Overall condition of network
Status Code | Description |
---|---|
1 | bad |
2 | poor |
3 | fair |
4 | good |
5 | excellent |
Summary
Summary of the situation that can be used for listing and history reporting. You can map the codes to colors.
Summary Code | Color | Description |
---|---|---|
10 | red | bad connection |
20 | red | High packet loss |
30 | red | high latency |
40 | red | insufficient bandwidth |
50 | amber fair | connection is Fair with minor issues, Poor bandwidth (audio-only and thumbnail video) |
55 | amber fair | connection is Fair with minor issues, Fair bandwidth (good audio, poor video) |
60 | amber fair | connection is Fair with minor issues, Good bandwidth (good audio and fair video) |
65 | amber fair | connection is Fair with minor issues (bandwidth excellent) |
70 | amber good | connection is Good, Poor bandwidth (audio-only and thumbnail video) |
75 | amber good | connection is Good, Fair bandwidth (good audio, poor video) |
80-89 | reserved | - |
90 | green | connection and bandwidth are both good |
95 | green | excellent network |
Notification
The main message that appears as a notification on the application
Notification Code | Description |
---|---|
100 | We expect your call quality to be very poor |
200 | You have poor network conditions (lossy network) |
300 | Your round trip time seems to be too high for good quality calls, but it might be because you are located far from our test servers |
400 | Your bandwidth is insufficient for both audio and video calls |
500 | With current bandwidth you can have audio-only and thumbnail video. Your network is unstable and you might experience minor issues |
550 | Current bandwidth is enough for good audio quality, but poor video quality or screen sharing. Your network is unstable and you might experience minor issues |
600 | Your bandwidth is enough for good audio and fair video quality, but not enough for screen sharing quality. Your network is unstable and you might experience minor issues |
650 | Your network is unstable and you might experience minor issues |
700 | With current bandwidth you can have audio-only and thumbnail video |
750 | Current bandwidth is enough for good audio quality, but poor video quality or screen sharing |
800-899 | reserved |
900 | Your bandwidth is enough for good audio and fair video quality, but not enough for screen sharing quality |
950 | You are in a good network condition |
In order to suppress or send the messages on the UI side, message codes should be considered. For example, to avoid overwhelming the users with repetitive notifications, the notification codes must be tracked. For example, if the current notification code is 100 and is the same as the previous one, the notification could be suppressed.
Updated 11 months ago