Updated mediasoup, and handle plaintransport in homer.js

This commit is contained in:
Håvar Aambø Fosstveit
2018-11-21 11:32:09 +01:00
parent 6a30cf9526
commit a3556785e1
2 changed files with 15 additions and 12 deletions
+14 -11
View File
@@ -155,17 +155,20 @@ function handleTransport(transport, baseEvent, stream)
const statsInterval = setInterval(() =>
{
transport.getStats()
.then((stats) =>
{
emit(
Object.assign({}, baseEvent,
{
event : 'transport.stats',
stats : stats
}),
stream);
});
if (typeof transport.getStats === 'function')
{
transport.getStats()
.then((stats) =>
{
emit(
Object.assign({}, baseEvent,
{
event : 'transport.stats',
stats : stats
}),
stream);
});
}
}, STATS_INTERVAL);
transport.on('close', (originator) =>