Package tvi.webrtc

Class RtpTransceiver


  • public class RtpTransceiver
    extends java.lang.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 Summary

      Constructors 
      Modifier Constructor Description
      protected RtpTransceiver​(long nativeRtpTransceiver)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RtpTransceiver

        protected RtpTransceiver​(long nativeRtpTransceiver)
    • Method Detail

      • getMediaType

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

        public java.lang.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

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