代码拉取完成,页面将自动刷新
package webrtc
// RTPTransceiverDirection indicates the direction of the RTPTransceiver.
type RTPTransceiverDirection int
const (
// RTPTransceiverDirectionSendrecv indicates the RTPSender will offer
// to send RTP and RTPReceiver the will offer to receive RTP.
RTPTransceiverDirectionSendrecv RTPTransceiverDirection = iota + 1
// RTPTransceiverDirectionSendonly indicates the RTPSender will offer
// to send RTP.
RTPTransceiverDirectionSendonly
// RTPTransceiverDirectionRecvonly indicates the RTPReceiver the will
// offer to receive RTP.
RTPTransceiverDirectionRecvonly
// RTPTransceiverDirectionInactive indicates the RTPSender won't offer
// to send RTP and RTPReceiver the won't offer to receive RTP.
RTPTransceiverDirectionInactive
)
// This is done this way because of a linter.
const (
rtpTransceiverDirectionSendrecvStr = "sendrecv"
rtpTransceiverDirectionSendonlyStr = "sendonly"
rtpTransceiverDirectionRecvonlyStr = "recvonly"
rtpTransceiverDirectionInactiveStr = "inactive"
)
// NewRTPTransceiverDirection defines a procedure for creating a new
// RTPTransceiverDirection from a raw string naming the transceiver direction.
func NewRTPTransceiverDirection(raw string) RTPTransceiverDirection {
switch raw {
case rtpTransceiverDirectionSendrecvStr:
return RTPTransceiverDirectionSendrecv
case rtpTransceiverDirectionSendonlyStr:
return RTPTransceiverDirectionSendonly
case rtpTransceiverDirectionRecvonlyStr:
return RTPTransceiverDirectionRecvonly
case rtpTransceiverDirectionInactiveStr:
return RTPTransceiverDirectionInactive
default:
return RTPTransceiverDirection(Unknown)
}
}
func (t RTPTransceiverDirection) String() string {
switch t {
case RTPTransceiverDirectionSendrecv:
return rtpTransceiverDirectionSendrecvStr
case RTPTransceiverDirectionSendonly:
return rtpTransceiverDirectionSendonlyStr
case RTPTransceiverDirectionRecvonly:
return rtpTransceiverDirectionRecvonlyStr
case RTPTransceiverDirectionInactive:
return rtpTransceiverDirectionInactiveStr
default:
return ErrUnknownType.Error()
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。