public class RtpTransceiver
extends java.lang.Object
The RTCRtpTransceiver maps to the RTCRtpTransceiver defined by the WebRTC specification. A transceiver represents a combination of an RTCRtpSender and an RTCRtpReceiver that share a common mid. As defined in JSEP, an RTCRtpTransceiver is said to be associated with a media description if its mid property is non-nil; otherwise, it is said to be disassociated. JSEP: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24
Note that RTCRtpTransceivers are only supported when using RTCPeerConnection with Unified Plan SDP.
WebRTC specification for RTCRtpTransceiver, the JavaScript analog: https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver
Modifier and Type | Class and Description |
---|---|
static class |
RtpTransceiver.RtpTransceiverDirection
Java version of webrtc::RtpTransceiverDirection - the ordering must be kept in sync.
|
static class |
RtpTransceiver.RtpTransceiverInit
Tracks webrtc::RtpTransceiverInit.
|
Modifier | Constructor and Description |
---|---|
protected |
RtpTransceiver(long nativeRtpTransceiver) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
RtpTransceiver.RtpTransceiverDirection |
getCurrentDirection()
The current_direction attribute indicates the current direction negotiated
for this transceiver.
|
RtpTransceiver.RtpTransceiverDirection |
getDirection()
The direction attribute indicates the preferred direction of this
transceiver, which will be used in calls to CreateOffer and CreateAnswer.
|
MediaStreamTrack.MediaType |
getMediaType()
Media type of the transceiver.
|
java.lang.String |
getMid()
The mid attribute is the mid negotiated and present in the local and
remote descriptions.
|
RtpReceiver |
getReceiver()
The receiver attribute exposes the RtpReceiver corresponding to the RTP
media that may be received with the transceiver's mid.
|
RtpSender |
getSender()
The sender attribute exposes the RtpSender corresponding to the RTP media
that may be sent with the transceiver's mid.
|
boolean |
isStopped()
The stopped attribute indicates that the sender of this transceiver will no
longer send, and that the receiver will no longer receive.
|
boolean |
setDirection(RtpTransceiver.RtpTransceiverDirection rtpTransceiverDirection)
Sets the preferred direction of this transceiver.
|
void |
stop()
The Stop method will for the time being call the StopInternal method.
|
void |
stopInternal()
The StopInternal method stops the RtpTransceiver, like Stop, but goes
immediately to Stopped state.
|
void |
stopStandard()
The StopStandard method irreversibly stops the RtpTransceiver.
|
public MediaStreamTrack.MediaType getMediaType()
public java.lang.String getMid()
public RtpSender getSender()
public RtpReceiver getReceiver()
public boolean isStopped()
public RtpTransceiver.RtpTransceiverDirection getDirection()
public RtpTransceiver.RtpTransceiverDirection getCurrentDirection()
public boolean setDirection(RtpTransceiver.RtpTransceiverDirection rtpTransceiverDirection)
public void stop()
public void stopInternal()
public void stopStandard()
The transceiver will enter Stopping state and signal NegotiationNeeded. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop
public void dispose()
7.0.0