.getStats() API¶
Peer5 provides live statistics through a javascript SDK.
By using this API you'll be able to receive various metrics relating to the performance of the p2p network, and the video playback.
This API is especially usable if you'd like to merge Peer5's analytics into your own analytics flow.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Video loading time¶
The amount of time a video took to start playing first frame since the player initiated playback logic.
1 2 3 4 5 |
|
Usually the array will have 1 item. But if there were several videos loading at the same page it can be higher than 1.
Video rebuffering¶
Get the duration of rebuffer events that took place in the session.
1 2 3 4 5 |
|
Each element in the array represents the duration in milliseconds of a rebuffer event that has ended.
Video seeks¶
Get the duration of seek events that took place in the session.
1 2 3 4 5 |
|
Each element in the array represents the duration in milliseconds that a seek event lasted.
Number of peers¶
Get the number of peers currently connected to the client.
1 2 3 4 5 |
|
Note: this metric is not aggregated, but represents the current state.
HTTP data¶
Get the total amount of bytes downloaded in http so far in the session.
1 2 3 4 5 |
|
P2P data¶
Get the total amount of bytes downloaded in p2p so far in the session.
1 2 3 4 5 |
|