提交 4ffa624e authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Minor changes in RTCPeerConnection.js

上级 ecde0e49
......@@ -356,7 +356,13 @@ class RTCPeerConnection extends EventEmitter
case 'audio':
case 'video':
{
// TODO: this would fail if a=recvonly or there is no media.ssrcs
// Ignore if this is not a sending media section.
switch (media.direction)
{
case 'recvonly':
case 'inactive':
return;
}
// Media kind.
let kind = media.type;
......@@ -1318,8 +1324,10 @@ class RTCPeerConnection extends EventEmitter
let kind = rtpHandler.kind;
let isClosedRtpSender = false;
if (rtpHandler.isRtpSender() &&
(rtpHandler.closed || !rtpHandler.available))
if (
rtpHandler.isRtpSender() &&
(rtpHandler.closed || !rtpHandler.available)
)
{
isClosedRtpSender = true;
}
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论