Fixes issue with StatsCollector when the conference is recreated the peerconnection in the StatsCollector isn't updated.
This commit is contained in:
parent
cef26315c3
commit
a694d0fbdf
22
app.js
22
app.js
|
@ -469,7 +469,8 @@ function localStatsUpdated(statsCollector)
|
|||
*/
|
||||
function startRtpStatsCollector()
|
||||
{
|
||||
if (config.enableRtpStats && !statsCollector)
|
||||
stopRTPStatsCollector();
|
||||
if (config.enableRtpStats)
|
||||
{
|
||||
statsCollector = new StatsCollector(
|
||||
getConferenceHandler().peerconnection, 200, statsUpdated);
|
||||
|
@ -479,6 +480,19 @@ function startRtpStatsCollector()
|
|||
statsCollector.start();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the {@link StatsCollector}.
|
||||
*/
|
||||
function stopRTPStatsCollector()
|
||||
{
|
||||
if (statsCollector)
|
||||
{
|
||||
statsCollector.stop();
|
||||
statsCollector = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the {@link LocalStatsCollector} if the feature is enabled in config.js
|
||||
* @param stream the stream that will be used for collecting statistics.
|
||||
|
@ -1082,11 +1096,7 @@ function disposeConference(onUnload) {
|
|||
}
|
||||
handler.peerconnection.close();
|
||||
}
|
||||
if (statsCollector)
|
||||
{
|
||||
statsCollector.stop();
|
||||
statsCollector = null;
|
||||
}
|
||||
stopRTPStatsCollector();
|
||||
if(!onUnload) {
|
||||
startLocalRtpStatsCollector(connection.jingle.localAudio);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue