mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Set answer as sendonly in case of a recvonly offer
When a local peer connection has a single transceiver with a sendrecv direction, and the remote has a transceiver with a recvonly direction, the local peer connection must change the transceiver direction to sendonly. When a local peer connection has a single transceiver with a recvonly direction, and the remote has a transceiver with a recvonly direction, the local peer connection must create another transceiver with a sendonly direction. A unit test is added to cover all possible cases.
This commit is contained in:
@@ -142,7 +142,7 @@ func satisfyTypeAndDirection(remoteKind RTPCodecType, remoteDirection RTPTransce
|
||||
case RTPTransceiverDirectionSendrecv:
|
||||
return []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly, RTPTransceiverDirectionSendrecv}
|
||||
case RTPTransceiverDirectionSendonly:
|
||||
return []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly, RTPTransceiverDirectionSendrecv}
|
||||
return []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly}
|
||||
case RTPTransceiverDirectionRecvonly:
|
||||
return []RTPTransceiverDirection{RTPTransceiverDirectionSendonly, RTPTransceiverDirectionSendrecv}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user