Skip to content

BenWeekes/agora-network-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgoraRTCNetEx.js

This javascript module provides an accurate network monitor to work along side AgoraRTC 4.x SDK.
It is able to report the true uplink/downlink status of each host in the channel.
It does not revert to 'Excellent' if the packet loss reduces when the bitrate is lowered in either Full Path Feedback or Dual Stream failover modes.
It does not confuse Host A downlink with Host B uplink quality or vice versa.

Include the javascript:

<script src="./AgoraRTCNetEx.js"></script>

Call the method

Before publishing your video to the channel, call the optimizeNetworkControl() method.
Pass in the min and max bit rates that you wish the high stream encoder to move between and which match those of your selected profile.

Initlialize

AgoraRTCNetEx.monitorNetwork(client, targetBitrate);

client         The AgoraRTC client object returned from createClient method.     
targetBitrate  The target/max bitrate a client will publish video at. 

Usage

You can either call the methods

AgoraRTCNetEx.getNetworkStats();      
AgoraRTCNetEx.getRemoteNetworkStats();

Or subscribe to events

AgoraRTCNetExEvents.on("NetworkUpdate",networkUpdate);

Web Demo

https://sa-utils.agora.io/agora-network-monitor/index.html

Demo Videos

https://drive.google.com/file/d/1QZmDAyezjHv0JrJqv5HCcl2FRG3N-bKm/view?usp=sharing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published