window.peer5 && peer5.showStats();
Peer5 provides live visualization of playback (Such as FPS & rebuffers count) & traffic (Such as download speeds) statistics right on top of the player.
This API is useful for debugging purposes of the Peer5 integration, as it shows both HTTP & P2P statistics.
Using the API¶
The API itself is really simple. A single call to
peer5.showStats() will enable the visualization which will show up on top of the player, like in the image below:
Lets go over the stats shows in the box:
# of Rebuffer- Number of times the playback stalled for rebuffering.
FPS (actual/video)- The number on the right side is the frame rate of the video source, and the number on the left is the actual frame rate being played. If the actual number is lower, it means frame processing is too slow and frames are being dropped.
Frames (drop/total)- The number on the right side is the total number of frames played, and the number of the left is the number of frames dropped (Weren't played).
HTTP Speed- The HTTP download speed.
P2P Speed- The P2P download speed.
Peers- The number of peers you are currently connected to.
Render Method- The video rendering method. Can be one of "HTML5" or "Flash".
Total HTTP Downloaded- The total number of bytes that were downloaded through HTTP.
Total P2P (%)- The percentage of P2P out of the total bytes downloaded (From both HTTP & P2P).
Total P2P Downloaded- The total number of bytes that were downloaded through P2P.
Device Id- The unique identifier for the current device playing the video (Corporate webcast only).
Customer Id- The account token currently being used to connect with Peer5 services.
Below the stats you will see a live chart showing the HTTP & P2P speed over the past 1 minute.
Other ways to see the stats:¶
- Clicking the video frame and pressing the key combination of:
- Adding to the page url the following query param
?peer5_show_stats=true, see more in Peer5 Stats Overlay