Class RtpTransceiver
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java version of webrtc::RtpTransceiverDirection - the ordering must be kept in sync.static final class
Tracks webrtc::RtpTransceiverInit. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
dispose()
The current_direction attribute indicates the current direction negotiated for this transceiver.The direction attribute indicates the preferred direction of this transceiver, which will be used in calls to CreateOffer and CreateAnswer.Media type of the transceiver.getMid()
The mid attribute is the mid negotiated and present in the local and remote descriptions.The receiver attribute exposes the RtpReceiver corresponding to the RTP media that may be received with the transceiver's mid.The sender attribute exposes the RtpSender corresponding to the RTP media that may be sent with the transceiver's mid.boolean
The stopped attribute indicates that the sender of this transceiver will no longer send, and that the receiver will no longer receive.private static RtpTransceiver.RtpTransceiverDirection
nativeCurrentDirection
(long rtpTransceiver) private static RtpTransceiver.RtpTransceiverDirection
nativeDirection
(long rtpTransceiver) private static MediaStreamTrack.MediaType
nativeGetMediaType
(long rtpTransceiver) private static String
nativeGetMid
(long rtpTransceiver) private static RtpReceiver
nativeGetReceiver
(long rtpTransceiver) private static RtpSender
nativeGetSender
(long rtpTransceiver) private static boolean
nativeSetDirection
(long rtpTransceiver, RtpTransceiver.RtpTransceiverDirection rtpTransceiverDirection) private static void
nativeStopInternal
(long rtpTransceiver) private static boolean
nativeStopped
(long rtpTransceiver) private static void
nativeStopStandard
(long rtpTransceiver) 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
The StopInternal method stops the RtpTransceiver, like Stop, but goes immediately to Stopped state.void
The StopStandard method irreversibly stops the RtpTransceiver.
-
Field Details
-
nativeRtpTransceiver
private long nativeRtpTransceiver -
cachedSender
-
cachedReceiver
-
-
Constructor Details
-
RtpTransceiver
protected RtpTransceiver(long nativeRtpTransceiver)
-
-
Method Details
-
getMediaType
Media type of the transceiver. Any sender(s)/receiver(s) will have this type as well. -
getMid
The mid attribute is the mid negotiated and present in the local and remote descriptions. Before negotiation is complete, the mid value may be null. After rollbacks, the value may change from a non-null value to null. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-mid -
getSender
The sender attribute exposes the RtpSender corresponding to the RTP media that may be sent with the transceiver's mid. The sender is always present, regardless of the direction of media. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-sender -
getReceiver
The receiver attribute exposes the RtpReceiver corresponding to the RTP media that may be received with the transceiver's mid. The receiver is always present, regardless of the direction of media. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-receiver -
isStopped
public boolean isStopped()The stopped attribute indicates that the sender of this transceiver will no longer send, and that the receiver will no longer receive. It is true if either stop has been called or if setting the local or remote description has caused the RtpTransceiver to be stopped. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stopped -
getDirection
The direction attribute indicates the preferred direction of this transceiver, which will be used in calls to CreateOffer and CreateAnswer. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction -
getCurrentDirection
The current_direction attribute indicates the current direction negotiated for this transceiver. If this transceiver has never been represented in an offer/answer exchange, or if the transceiver is stopped, the value is null. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-currentdirection -
setDirection
Sets the preferred direction of this transceiver. An update of directionality does not take effect immediately. Instead, future calls to CreateOffer and CreateAnswer mark the corresponding media descriptions as sendrecv, sendonly, recvonly, or inactive. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction -
stop
public void stop()The Stop method will for the time being call the StopInternal method. After a migration procedure, stop() will be equivalent to StopStandard. -
stopInternal
public void stopInternal()The StopInternal method stops the RtpTransceiver, like Stop, but goes immediately to Stopped state. -
stopStandard
public void stopStandard()The StopStandard method irreversibly stops the RtpTransceiver. The sender of this transceiver will no longer send, the receiver will no longer receive.The transceiver will enter Stopping state and signal NegotiationNeeded. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop
-
dispose
public void dispose() -
checkRtpTransceiverExists
private void checkRtpTransceiverExists() -
nativeGetMediaType
-
nativeGetMid
-
nativeGetSender
-
nativeGetReceiver
-
nativeStopped
private static boolean nativeStopped(long rtpTransceiver) -
nativeDirection
-
nativeCurrentDirection
-
nativeStopInternal
private static void nativeStopInternal(long rtpTransceiver) -
nativeStopStandard
private static void nativeStopStandard(long rtpTransceiver) -
nativeSetDirection
private static boolean nativeSetDirection(long rtpTransceiver, RtpTransceiver.RtpTransceiverDirection rtpTransceiverDirection)
-