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
|
chromeExtensionId: 'diibjkoicjeejcmhdnailmkgecihlobk', // Id of desktop streamer Chrome extension
|
||||||
desktopSharingSources: ['screen', 'window'],
|
desktopSharingSources: ['screen', 'window'],
|
||||||
minChromeExtVersion: '0.1', // Required version of Chrome extension
|
minChromeExtVersion: '0.1', // Required version of Chrome extension
|
||||||
enableRtpStats: true, // Enables RTP stats processing
|
|
||||||
openSctp: true, // Toggle to enable/disable SCTP channels
|
openSctp: true, // Toggle to enable/disable SCTP channels
|
||||||
|
disableStats: false,
|
||||||
|
disableAudioLevels: false,
|
||||||
channelLastN: -1, // The default value of the channel attribute last-n.
|
channelLastN: -1, // The default value of the channel attribute last-n.
|
||||||
adaptiveLastN: false,
|
adaptiveLastN: false,
|
||||||
adaptiveSimulcast: false,
|
adaptiveSimulcast: false,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
|
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
|
||||||
<meta itemprop="image" content="/images/jitsilogo.png"/>
|
<meta itemprop="image" content="/images/jitsilogo.png"/>
|
||||||
<script src="libs/jquery-2.1.1.min.js"></script>
|
<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.min.js?v=1"></script>
|
||||||
<script src="libs/strophe/strophe.disco.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>
|
<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/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||||
<script src="interface_config.js?v=5"></script>
|
<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 -->
|
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
||||||
<link rel="stylesheet" href="css/font.css?v=6"/>
|
<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.
|
* Starts the collecting the statistics.
|
||||||
*/
|
*/
|
||||||
LocalStatsCollector.prototype.start = function () {
|
LocalStatsCollector.prototype.start = function () {
|
||||||
if (!window.AudioContext)
|
if (config.disableAudioLevels || !window.AudioContext)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var context = new AudioContext();
|
var context = new AudioContext();
|
||||||
|
|
|
@ -219,20 +219,18 @@ StatsCollector.prototype.errorCallback = function (error)
|
||||||
StatsCollector.prototype.start = function ()
|
StatsCollector.prototype.start = function ()
|
||||||
{
|
{
|
||||||
var self = this;
|
var self = this;
|
||||||
|
if(!config.disableAudioLevels) {
|
||||||
this.audioLevelsIntervalId = setInterval(
|
this.audioLevelsIntervalId = setInterval(
|
||||||
function ()
|
function () {
|
||||||
{
|
|
||||||
// Interval updates
|
// Interval updates
|
||||||
self.peerconnection.getStats(
|
self.peerconnection.getStats(
|
||||||
function (report)
|
function (report) {
|
||||||
{
|
|
||||||
var results = null;
|
var results = null;
|
||||||
if(!report || !report.result || typeof report.result != 'function')
|
if (!report || !report.result ||
|
||||||
{
|
typeof report.result != 'function') {
|
||||||
results = report;
|
results = report;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
results = report.result();
|
results = report.result();
|
||||||
}
|
}
|
||||||
//console.error("Got interval report", results);
|
//console.error("Got interval report", results);
|
||||||
|
@ -246,32 +244,30 @@ StatsCollector.prototype.start = function ()
|
||||||
},
|
},
|
||||||
self.audioLevelsIntervalMilis
|
self.audioLevelsIntervalMilis
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!config.disableStats) {
|
||||||
this.statsIntervalId = setInterval(
|
this.statsIntervalId = setInterval(
|
||||||
function () {
|
function () {
|
||||||
// Interval updates
|
// Interval updates
|
||||||
self.peerconnection.getStats(
|
self.peerconnection.getStats(
|
||||||
function (report)
|
function (report) {
|
||||||
{
|
|
||||||
var results = null;
|
var results = null;
|
||||||
if(!report || !report.result || typeof report.result != 'function')
|
if (!report || !report.result ||
|
||||||
{
|
typeof report.result != 'function') {
|
||||||
//firefox
|
//firefox
|
||||||
results = report;
|
results = report;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
//chrome
|
//chrome
|
||||||
results = report.result();
|
results = report.result();
|
||||||
}
|
}
|
||||||
//console.error("Got interval report", results);
|
//console.error("Got interval report", results);
|
||||||
self.currentStatsReport = results;
|
self.currentStatsReport = results;
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
self.processStatsReport();
|
self.processStatsReport();
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e) {
|
||||||
{
|
|
||||||
console.error("Unsupported key:" + e, e);
|
console.error("Unsupported key:" + e, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +278,7 @@ StatsCollector.prototype.start = function ()
|
||||||
},
|
},
|
||||||
self.statsIntervalMilis
|
self.statsIntervalMilis
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (config.logStats) {
|
if (config.logStats) {
|
||||||
this.gatherStatsIntervalId = setInterval(
|
this.gatherStatsIntervalId = setInterval(
|
||||||
|
|
|
@ -33,8 +33,6 @@ function stopRemote()
|
||||||
}
|
}
|
||||||
|
|
||||||
function startRemoteStats (peerconnection) {
|
function startRemoteStats (peerconnection) {
|
||||||
if (config.enableRtpStats)
|
|
||||||
{
|
|
||||||
if(rtpStats)
|
if(rtpStats)
|
||||||
{
|
{
|
||||||
rtpStats.stop();
|
rtpStats.stop();
|
||||||
|
@ -45,8 +43,6 @@ function startRemoteStats (peerconnection) {
|
||||||
rtpStats.start();
|
rtpStats.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function onStreamCreated(stream)
|
function onStreamCreated(stream)
|
||||||
{
|
{
|
||||||
if(stream.getOriginalStream().getAudioTracks().length === 0)
|
if(stream.getOriginalStream().getAudioTracks().length === 0)
|
||||||
|
|
Loading…
Reference in New Issue