Removes rtp stats option and adds options for disabling/enabling stats and audio levels.
This commit is contained in:
parent
b32acf0dfb
commit
d21f994eee
|
@ -20,8 +20,9 @@ var config = {
|
|||
chromeExtensionId: 'diibjkoicjeejcmhdnailmkgecihlobk', // Id of desktop streamer Chrome extension
|
||||
desktopSharingSources: ['screen', 'window'],
|
||||
minChromeExtVersion: '0.1', // Required version of Chrome extension
|
||||
enableRtpStats: true, // Enables RTP stats processing
|
||||
openSctp: true, // Toggle to enable/disable SCTP channels
|
||||
disableStats: false,
|
||||
disableAudioLevels: false,
|
||||
channelLastN: -1, // The default value of the channel attribute last-n.
|
||||
adaptiveLastN: false,
|
||||
adaptiveSimulcast: false,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
|
||||
<meta itemprop="image" content="/images/jitsilogo.png"/>
|
||||
<script src="libs/jquery-2.1.1.min.js"></script>
|
||||
<script src="config.js?v=5"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="config.js?v=6"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="libs/strophe/strophe.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.disco.min.js?v=1"></script>
|
||||
<script src="libs/strophe/strophe.caps.jsonly.min.js?v=1"></script>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||
<script src="interface_config.js?v=5"></script>
|
||||
<script src="libs/app.bundle.js?v=7"></script>
|
||||
<script src="libs/app.bundle.js?v=8"></script>
|
||||
|
||||
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
||||
<link rel="stylesheet" href="css/font.css?v=6"/>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -84,7 +84,7 @@ function LocalStatsCollector(stream, interval, statisticsService, eventEmitter)
|
|||
* Starts the collecting the statistics.
|
||||
*/
|
||||
LocalStatsCollector.prototype.start = function () {
|
||||
if (!window.AudioContext)
|
||||
if (config.disableAudioLevels || !window.AudioContext)
|
||||
return;
|
||||
|
||||
var context = new AudioContext();
|
||||
|
|
|
@ -219,20 +219,18 @@ StatsCollector.prototype.errorCallback = function (error)
|
|||
StatsCollector.prototype.start = function ()
|
||||
{
|
||||
var self = this;
|
||||
if(!config.disableAudioLevels) {
|
||||
this.audioLevelsIntervalId = setInterval(
|
||||
function ()
|
||||
{
|
||||
function () {
|
||||
// Interval updates
|
||||
self.peerconnection.getStats(
|
||||
function (report)
|
||||
{
|
||||
function (report) {
|
||||
var results = null;
|
||||
if(!report || !report.result || typeof report.result != 'function')
|
||||
{
|
||||
if (!report || !report.result ||
|
||||
typeof report.result != 'function') {
|
||||
results = report;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
results = report.result();
|
||||
}
|
||||
//console.error("Got interval report", results);
|
||||
|
@ -246,32 +244,30 @@ StatsCollector.prototype.start = function ()
|
|||
},
|
||||
self.audioLevelsIntervalMilis
|
||||
);
|
||||
}
|
||||
|
||||
if(!config.disableStats) {
|
||||
this.statsIntervalId = setInterval(
|
||||
function () {
|
||||
// Interval updates
|
||||
self.peerconnection.getStats(
|
||||
function (report)
|
||||
{
|
||||
function (report) {
|
||||
var results = null;
|
||||
if(!report || !report.result || typeof report.result != 'function')
|
||||
{
|
||||
if (!report || !report.result ||
|
||||
typeof report.result != 'function') {
|
||||
//firefox
|
||||
results = report;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
//chrome
|
||||
results = report.result();
|
||||
}
|
||||
//console.error("Got interval report", results);
|
||||
self.currentStatsReport = results;
|
||||
try
|
||||
{
|
||||
try {
|
||||
self.processStatsReport();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
catch (e) {
|
||||
console.error("Unsupported key:" + e, e);
|
||||
}
|
||||
|
||||
|
@ -282,6 +278,7 @@ StatsCollector.prototype.start = function ()
|
|||
},
|
||||
self.statsIntervalMilis
|
||||
);
|
||||
}
|
||||
|
||||
if (config.logStats) {
|
||||
this.gatherStatsIntervalId = setInterval(
|
||||
|
|
|
@ -33,8 +33,6 @@ function stopRemote()
|
|||
}
|
||||
|
||||
function startRemoteStats (peerconnection) {
|
||||
if (config.enableRtpStats)
|
||||
{
|
||||
if(rtpStats)
|
||||
{
|
||||
rtpStats.stop();
|
||||
|
@ -45,8 +43,6 @@ function startRemoteStats (peerconnection) {
|
|||
rtpStats.start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onStreamCreated(stream)
|
||||
{
|
||||
if(stream.getOriginalStream().getAudioTracks().length === 0)
|
||||
|
|
Loading…
Reference in New Issue