提交 6fce108d authored 作者: José Luis Millán's avatar José Luis Millán

getStats: fix notification message

上级 dd4b1029
...@@ -365,9 +365,9 @@ class Producer extends EnhancedEventEmitter ...@@ -365,9 +365,9 @@ class Producer extends EnhancedEventEmitter
return; return;
this.getStats() this.getStats()
.then((data) => .then((stats) =>
{ {
this.emit('@notify', 'producerStats', data); this.emit('@notify', 'producerStats', { id: this.id, stats });
}) })
.catch((error) => .catch((error) =>
{ {
......
...@@ -195,9 +195,9 @@ class WebRtcTransport extends EnhancedEventEmitter ...@@ -195,9 +195,9 @@ class WebRtcTransport extends EnhancedEventEmitter
this._statsInterval = setInterval(() => this._statsInterval = setInterval(() =>
{ {
this.getStats() this.getStats()
.then((data) => .then((stats) =>
{ {
this.emit('@notify', 'transportStats', data); this.emit('@notify', 'transportStats', { id: this.id, stats });
}) })
.catch((error) => .catch((error) =>
{ {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论