RtpTransceiver

tee3.webrtc

## 类 RtpTransceiver

- java.lang.Object
- - tee3.webrtc.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

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `RtpTransceiver.RtpTransceiverDirection` Java version of webrtc::RtpTransceiverDirection - the ordering must be kept in sync.
    `static class` | `RtpTransceiver.RtpTransceiverInit` Tracks webrtc::RtpTransceiverInit. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverinit A structure for initializing an RtpTransceiver in a call to addTransceiver.

  - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `RtpTransceiver(long nativeRtpTransceiver)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `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.
    `void` | `setDirection(RtpTransceiver.RtpTransceiverDirection rtpTransceiverDirection)` Sets the preferred direction of this transceiver.
    `void` | `stop()` The Stop method irreversibly stops the RtpTransceiver.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### RtpTransceiver

          protected RtpTransceiver(long nativeRtpTransceiver)

  - ### 方法详细资料

    - #### 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 void 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 irreversibly stops the RtpTransceiver. The sender of this transceiver will no longer send, the receiver will no longer receive. https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop

    - #### dispose

          public void dispose()