Package tvi.webrtc

Class RtpTransceiver

java.lang.Object
tvi.webrtc.RtpTransceiver

public class RtpTransceiver extends Object
Java wrapper for a C++ RtpTransceiverInterface.

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

  • Constructor Details

    • RtpTransceiver

      protected RtpTransceiver(long nativeRtpTransceiver)
  • Method Details

    • getMediaType

      public MediaStreamTrack.MediaType getMediaType()
      Media type of the transceiver. Any sender(s)/receiver(s) will have this type as well.
    • getMid

      public String 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

      public RtpSender 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

      public RtpReceiver 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

      public RtpTransceiver.RtpTransceiverDirection 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

      public boolean setDirection(RtpTransceiver.RtpTransceiverDirection rtpTransceiverDirection)
      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()