Package tvi.webrtc

Enum PeerConnection.SdpSemantics

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PeerConnection.SdpSemantics>
    Enclosing class:
    PeerConnection

    public static enum PeerConnection.SdpSemantics
    extends java.lang.Enum<PeerConnection.SdpSemantics>
    Java version of webrtc::SdpSemantics. Configure the SDP semantics used by this PeerConnection. Note that the WebRTC 1.0 specification requires UNIFIED_PLAN semantics. The RtpTransceiver API is only available with UNIFIED_PLAN semantics.

    PLAN_B will cause PeerConnection to create offers and answers with at most one audio and one video m= section with multiple RtpSenders and RtpReceivers specified as multiple a=ssrc lines within the section. This will also cause PeerConnection to ignore all but the first m= section of the same media type.

    UNIFIED_PLAN will cause PeerConnection to create offers and answers with multiple m= sections where each m= section maps to one RtpSender and one RtpReceiver (an RtpTransceiver), either both audio or both video. This will also cause PeerConnection to ignore all but the first a=ssrc lines that form a Plan B stream.

    For users who wish to send multiple audio/video streams and need to stay interoperable with legacy WebRTC implementations, specify PLAN_B.

    For users who wish to send multiple audio/video streams and/or wish to use the new RtpTransceiver API, specify UNIFIED_PLAN.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PeerConnection.SdpSemantics valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PeerConnection.SdpSemantics[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static PeerConnection.SdpSemantics[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PeerConnection.SdpSemantics c : PeerConnection.SdpSemantics.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PeerConnection.SdpSemantics valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null