提交 279a60b4 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Fix spy stuff

上级 c87ad9f1
......@@ -82,6 +82,11 @@ class Peer extends EnhancedEventEmitter
return this._data.rtpCapabilities;
}
get spy()
{
return this._data.spy;
}
/**
* Get an array with all the WebRtcTransports.
*
......
......@@ -320,8 +320,6 @@ class Room extends EnhancedEventEmitter
else if (this._peers.has(peerName))
throw new Error(`duplicated Peer [peerName:"${peerName}"]`);
spy = Boolean(spy);
// Ensure that the given capabilties are a subset of the Room capabilities.
// NOTE: This may throw.
ortc.assertCapabilitiesSubset(rtpCapabilities, this.rtpCapabilities);
......@@ -335,7 +333,7 @@ class Room extends EnhancedEventEmitter
const data =
{
rtpCapabilities,
spy
spy : Boolean(spy)
};
const sandbox =
......@@ -360,7 +358,7 @@ class Room extends EnhancedEventEmitter
peer.appData = appData;
// Store the Peer and remove it when closed. Also notify allthe other Peers
// Store the Peer and remove it when closed. Also notify all other Peers
// (unless it's a spy peer).
this._peers.set(peer.name, peer);
peer.on('@close', (appData2) =>
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论