Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peerinsights #2014

Merged
merged 27 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
32bdcaf
RoomCodevsAuthToken
akankshat100ms Feb 6, 2024
7d460c1
position
akankshat100ms Feb 6, 2024
3616d3c
rctc
akankshat100ms Feb 15, 2024
dfc804f
updateroomauth
akankshat100ms Feb 15, 2024
934b0f7
newinsights
akankshat100ms Feb 18, 2024
28c33ef
pagename
akankshat100ms Feb 18, 2024
bf60b21
copy changes
akankshat100ms Feb 21, 2024
2b686c5
more changes
akankshat100ms Feb 21, 2024
44919fa
network performance
akankshat100ms Feb 22, 2024
91f795e
Release PR - update Web API reference (#2029)
KaustubhKumar05 Feb 23, 2024
4398f98
networkchanges
akankshat100ms Feb 24, 2024
71899db
changes
akankshat100ms Feb 25, 2024
2f27c4f
Delete docs/get-started/v2/get-started/authentication-token-versus-ro…
akankshat100ms Feb 26, 2024
87ddc1d
Merge branch 'main' into peerinsights
akankshat100ms Feb 26, 2024
4e1d787
Update network-performance.mdx
akankshat100ms Feb 26, 2024
1389c38
Update network-performance.mdx
akankshat100ms Feb 26, 2024
537b229
Update event-log.mdx
akankshat100ms Feb 26, 2024
0dbea28
Update network-performance.mdx
akankshat100ms Feb 26, 2024
0cf2ec2
Update connection-quality-score.mdx
akankshat100ms Feb 26, 2024
7f5d02c
Update connection-quality-score.mdx
akankshat100ms Feb 26, 2024
57c427a
Update network-performance.mdx
akankshat100ms Feb 26, 2024
7f9fb66
Update network-performance.mdx
akankshat100ms Feb 26, 2024
4d4ef3c
Update network-performance.mdx
akankshat100ms Feb 26, 2024
35c4ff5
Update peerinsights.mdx
akankshat100ms Feb 26, 2024
0fcf4b3
fix: exclude edia
KaustubhKumar05 Feb 26, 2024
31ab0c6
Update network-performance.mdx
akankshat100ms Feb 26, 2024
d1071fc
Update network-performance.mdx
akankshat100ms Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ nav: '2.5'

---

### POLLS_LIST

• **POLLS_LIST** = `"POLLS_LIST"`

---

### POLL_CREATED

• **POLL_CREATED** = `"POLL_CREATED"`
Expand Down
22 changes: 22 additions & 0 deletions docs/api-reference/javascript/v2/enums/HMSPollStates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: HMSPollStates
nav: '2.9'
---

## Enumeration Members

### CREATED

• **CREATED** = `"created"`

---

### STARTED

• **STARTED** = `"started"`

---

### STOPPED

• **STOPPED** = `"stopped"`
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: HMSRecordingState
nav: '2.9'
nav: '2.10'
---

## Enumeration Members
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/javascript/v2/enums/HMSRoomState.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: HMSRoomState
nav: '2.10'
nav: '2.11'
---

Check out internal-docs/RoomStateFlow.tldr for flow of room state
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: HMSSimulcastLayer
nav: '2.11'
nav: '2.12'
---

## Enumeration Members
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: HMSVideoPluginCanvasContextType
nav: '2.12'
nav: '2.13'
---

## Enumeration Members
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: HMSVideoPluginType
nav: '2.13'
nav: '2.14'
---

Specifies the type of the plugin a transforming plugin will get an output canvas to give the resulting
Expand Down
9 changes: 8 additions & 1 deletion docs/api-reference/javascript/v2/home/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ nav: '1.1'
- [HMSPlaylistType](/api-reference/javascript/v2/enums/HMSPlaylistType)
- [HMSPluginUnsupportedTypes](/api-reference/javascript/v2/enums/HMSPluginUnsupportedTypes)
- [HMSPollQuestionType](/api-reference/javascript/v2/enums/HMSPollQuestionType)
- [HMSPollStates](/api-reference/javascript/v2/enums/HMSPollStates)
- [HMSRecordingState](/api-reference/javascript/v2/enums/HMSRecordingState)
- [HMSRoomState](/api-reference/javascript/v2/enums/HMSRoomState)
- [HMSSimulcastLayer](/api-reference/javascript/v2/enums/HMSSimulcastLayer)
Expand Down Expand Up @@ -180,7 +181,7 @@ Renames and re-exports [HMSNotifications](/api-reference/javascript/v2/interface

### HMSNotificationMapping

Ƭ **HMSNotificationMapping**<`T`, `C`\>: { `CHANGE_MULTI_TRACK_STATE_REQUEST`: [`HMSChangeMultiTrackStateRequestNotification`](/api-reference/javascript/v2/interfaces/HMSChangeMultiTrackStateRequestNotification) ; `CHANGE_TRACK_STATE_REQUEST`: [`HMSChangeTrackStateRequestNotification`](/api-reference/javascript/v2/interfaces/HMSChangeTrackStateRequestNotification) ; `DEVICE_CHANGE_UPDATE`: [`HMSDeviceChangeEventNotification`](/api-reference/javascript/v2/interfaces/HMSDeviceChangeEventNotification) ; `ERROR`: [`HMSExceptionNotification`](/api-reference/javascript/v2/interfaces/HMSExceptionNotification) ; `HAND_RAISE_CHANGED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `METADATA_UPDATED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `NAME_UPDATED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `NEW_MESSAGE`: [`HMSMessageNotification`](/api-reference/javascript/v2/interfaces/HMSMessageNotification) ; `PEER_JOINED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `PEER_LEFT`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `PEER_LIST`: [`HMSPeerListNotification`](/api-reference/javascript/v2/interfaces/HMSPeerListNotification) ; `PLAYLIST_TRACK_ENDED`: [`HMSPlaylistItemNotification`](/api-reference/javascript/v2/interfaces/HMSPlaylistItemNotification)<`C`\> ; `POLL_CREATED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_STARTED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_STOPPED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_VOTES_UPDATED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `RECONNECTED`: [`HMSReconnectionNotification`](/api-reference/javascript/v2/interfaces/HMSReconnectionNotification) ; `RECONNECTING`: [`HMSReconnectionNotification`](/api-reference/javascript/v2/interfaces/HMSReconnectionNotification) ; `REMOVED_FROM_ROOM`: [`HMSLeaveRoomRequestNotification`](/api-reference/javascript/v2/interfaces/HMSLeaveRoomRequestNotification) ; `ROLE_UPDATED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `ROOM_ENDED`: [`HMSLeaveRoomRequestNotification`](/api-reference/javascript/v2/interfaces/HMSLeaveRoomRequestNotification) ; `TRACK_ADDED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_DEGRADED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_DESCRIPTION_CHANGED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_MUTED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_REMOVED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_RESTORED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_UNMUTED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) }[`T`]
Ƭ **HMSNotificationMapping**<`T`, `C`\>: { `CHANGE_MULTI_TRACK_STATE_REQUEST`: [`HMSChangeMultiTrackStateRequestNotification`](/api-reference/javascript/v2/interfaces/HMSChangeMultiTrackStateRequestNotification) ; `CHANGE_TRACK_STATE_REQUEST`: [`HMSChangeTrackStateRequestNotification`](/api-reference/javascript/v2/interfaces/HMSChangeTrackStateRequestNotification) ; `DEVICE_CHANGE_UPDATE`: [`HMSDeviceChangeEventNotification`](/api-reference/javascript/v2/interfaces/HMSDeviceChangeEventNotification) ; `ERROR`: [`HMSExceptionNotification`](/api-reference/javascript/v2/interfaces/HMSExceptionNotification) ; `HAND_RAISE_CHANGED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `METADATA_UPDATED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `NAME_UPDATED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `NEW_MESSAGE`: [`HMSMessageNotification`](/api-reference/javascript/v2/interfaces/HMSMessageNotification) ; `PEER_JOINED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `PEER_LEFT`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `PEER_LIST`: [`HMSPeerListNotification`](/api-reference/javascript/v2/interfaces/HMSPeerListNotification) ; `PLAYLIST_TRACK_ENDED`: [`HMSPlaylistItemNotification`](/api-reference/javascript/v2/interfaces/HMSPlaylistItemNotification)<`C`\> ; `POLLS_LIST`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_CREATED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_STARTED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_STOPPED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `POLL_VOTES_UPDATED`: [`HMSPollNotification`](/api-reference/javascript/v2/interfaces/HMSPollNotification) ; `RECONNECTED`: [`HMSReconnectionNotification`](/api-reference/javascript/v2/interfaces/HMSReconnectionNotification) ; `RECONNECTING`: [`HMSReconnectionNotification`](/api-reference/javascript/v2/interfaces/HMSReconnectionNotification) ; `REMOVED_FROM_ROOM`: [`HMSLeaveRoomRequestNotification`](/api-reference/javascript/v2/interfaces/HMSLeaveRoomRequestNotification) ; `ROLE_UPDATED`: [`HMSPeerNotification`](/api-reference/javascript/v2/interfaces/HMSPeerNotification) ; `ROOM_ENDED`: [`HMSLeaveRoomRequestNotification`](/api-reference/javascript/v2/interfaces/HMSLeaveRoomRequestNotification) ; `TRACK_ADDED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_DEGRADED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_DESCRIPTION_CHANGED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_MUTED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_REMOVED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_RESTORED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) ; `TRACK_UNMUTED`: [`HMSTrackNotification`](/api-reference/javascript/v2/interfaces/HMSTrackNotification) }[`T`]

#### Type parameters

Expand All @@ -203,6 +204,12 @@ Renames and re-exports [HMSNotifications](/api-reference/javascript/v2/interface

---

### HMSPollState

Ƭ **HMSPollState**: `"created"` \| `"started"` \| `"stopped"`

---

### HMSPreferredSimulcastLayer

Ƭ **HMSPreferredSimulcastLayer**: `Exclude`<[`HMSSimulcastLayer`](/api-reference/javascript/v2/enums/HMSSimulcastLayer), [`NONE`](/api-reference/javascript/v2/enums/HMSSimulcastLayer#none)\>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/javascript/v2/interfaces/HMSPoll.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ nav: '4.44'

### state

• `Optional` **state**: `HMSPollState`
• `Optional` **state**: [`HMSPollState`](/api-reference/javascript/v2/home/content#hmspollstate)

---

Expand Down
12 changes: 12 additions & 0 deletions docs/api-reference/javascript/v2/interfaces/HMSRoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,24 @@ nav: '4.63'

---

### isHipaaEnabled

• `Optional` **isHipaaEnabled**: `boolean`

---

### isLargeRoom

• `Optional` **isLargeRoom**: `boolean`

---

### isNoiseCancellationEnabled

• `Optional` **isNoiseCancellationEnabled**: `boolean`

---

### joinedAt

• `Optional` **joinedAt**: `Date`
Expand Down
15 changes: 15 additions & 0 deletions docs/api-reference/javascript/v2/react-hooks/home/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,21 @@ unblock the browser autoplay block

---

### useAwayNotifications

▸ **useAwayNotifications**(): `Object`

#### Returns

`Object`

| Name | Type |
| :------------------ | :--------------------------------------------------------------- |
| `requestPermission` | () => `Promise`<`void`\> |
| `showNotification` | (`title`: `string`, `options?`: `NotificationOptions`) => `void` |

---

### useCustomEvent

▸ **useCustomEvent**<`T`\>(`«destructured»`): [`useCustomEventResult`](/api-reference/javascript/v2/react-hooks/interfaces/useCustomEventResult)<`T`\>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Connection Quality Score
nav: 4.3
---

The Connection Quality Score (CQS) defines the overall network connectivity performance during a video call by synthesizing key underlying network metrics like bitrate, frame rate, packet loss, round trip time, jitter and CPU/Network limitations. These network components significantly influence the incoming and outgoing audio/video quality of a call. Understanding the interplay between these metrics can aid in faster troubleshooting and debugging of call quality issues.


<FlexContainer>
<Callout title="CQS Basics">
- Know how a call went for a peer; timeline view of their connection quality score; with corresponding network metrics for the entire session duration.
- These metrics are available immediately after the peer leaves the session.
- Check how changes in [network metrics impacts media quality](/get-started/v2/get-started/insights/network-performance)
</Callout>
</FlexContainer>



## Connection Quality Score(CQS) to measure network quality

CQS is calculated every fixed interval (currently configured at 30 seconds) based on the latest data points captured for certain network components. This applies to both outgoing (publisher) and incoming (subscriber) media quality. The Connection Quality Score assign varied weights to these attributes according to their relative impact on the perceived call quality. Following this, it calculates an indexed score ranging from 0 to 5.


<video loop="true" autoplay="true" id="vid" muted>
<source src="/docs/guides/CQS.mp4" type="video/mp4" />
</video>


### Tier 1 - Failed Call (Score 0-1)

The call fails to establish or is immediately dropped after connecting. It can happen due to severely impaired network connection that cannot support any level of real-time audio/video communication. Peers cannot communicate at all due to critical issues such as:

- Complete audio failure
- No incoming video
- Persistent video freezing


### Tier 2 - Poor (Score 1-2)

Experience is degraded across multiple dimensions. It can happen due to unstable, low-capacity connection struggling to support the demands of high-quality video calling. Peers can expect frequent problems like:

- Audio chopiness

Check failure on line 42 in docs/get-started/v2/get-started/insights/connection-quality-score.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/get-started/v2/get-started/insights/connection-quality-score.mdx#L42

[Vale.Spelling] Did you really mean 'chopiness'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'chopiness'?", "location": {"path": "docs/get-started/v2/get-started/insights/connection-quality-score.mdx", "range": {"start": {"line": 42, "column": 9}}}, "severity": "ERROR"}
- Artefacts in video
- Severe latency issues


### Tier 3 - Fair (Scores 3-4)

Experience is moderate but inconsistencies exist. It can happen due to borderline connection with fluctuations in bandwidth, RTTs, or packet loss causing intermittent impacts. Peers may experience minor issues like:

- Occasional audio blips
- Video resolution downgrades
- Bit of lag or video freezing


### Tier 4 - Excellent (Scores 4-5)

Users enjoy a high quality, reliable connection for uninterrupted communication. This happens because of an xcellent network environment with consistent high bandwidth availability, low latency, and minimal congestion or packet loss. Any issues would be rare and minor in nature. This enables an engaging video call with:

Check failure on line 58 in docs/get-started/v2/get-started/insights/connection-quality-score.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/get-started/v2/get-started/insights/connection-quality-score.mdx#L58

[Vale.Spelling] Did you really mean 'xcellent'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'xcellent'?", "location": {"path": "docs/get-started/v2/get-started/insights/connection-quality-score.mdx", "range": {"start": {"line": 58, "column": 109}}}, "severity": "ERROR"}

- Crisp, clear audio
- Smooth, HD-resolution video
- Real-time interactivity
28 changes: 28 additions & 0 deletions docs/get-started/v2/get-started/insights/event-log.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Event Log
nav: 4.2
---

Event Log for a peer is a visual representation of all peer events that occur from the moment a peer joins a video session until they leave. This graph is useful in understanding what events happened for a peer in a sequential form or in parallel, hence useful in drawing co-relations to what went in a call. All peer related events can be abstracted in the following event types:

1. **Audio** - event occurs when the peer turns on/off their mic
2. **Video** - event occurs when the peer turns on/off their camera
3. **Screen** - event when peer starts and stops sharing their screen
4. **Device** - occurs when an input and output audio/video device is selected at preview/join screen or switched during a session. It also shows the device type selected. This is available only on web platform.
5. **Error** - error events that happened for a peer during a session


<video loop="true" autoplay="true" id="vid" muted>
<source src="/docs/guides/event-log.mp4" type="video/mp4" />
</video>

## Error events log

The error error log captures events that occur on the client side, which can disrupt call experience a peer during a call:

Check failure on line 21 in docs/get-started/v2/get-started/insights/event-log.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/get-started/v2/get-started/insights/event-log.mdx#L21

[Vale.Repetition] 'error' is repeated!
Raw output
{"message": "[Vale.Repetition] 'error' is repeated!", "location": {"path": "docs/get-started/v2/get-started/insights/event-log.mdx", "range": {"start": {"line": 21, "column": 5}}}, "severity": "ERROR"}

| Error Event | Reason |
| --------| ------ |
| `client.disconnected` | The peer was disconnected due to network or websocket failure |

Check failure on line 25 in docs/get-started/v2/get-started/insights/event-log.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/get-started/v2/get-started/insights/event-log.mdx#L25

[Vale.Terms] Use 'WebSocket' instead of 'websocket'.
Raw output
{"message": "[Vale.Terms] Use 'WebSocket' instead of 'websocket'.", "location": {"path": "docs/get-started/v2/get-started/insights/event-log.mdx", "range": {"start": {"line": 25, "column": 71}}}, "severity": "ERROR"}
| `client.join.failed` | The peer could not join the call |
| `client.publish.failed` | The peer failed to publish their audio/video |
| `client.subscribe.failed` | The peer failed to subscribe to other peers’ audio/video |
Loading
Loading