-
- All Implemented Interfaces:
public class IceSdpUtilsA number of utility methods that WebRTC or SIP applications may find useful in case they are also fine with using jain-sdp
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringICE_UFRAGpublic final static StringICE_PWDpublic final static StringICE_OPTIONSpublic final static StringICE_OPTION_TRICKLEpublic final static StringMID
-
Method Summary
Modifier and Type Method Description static voidsetIceCredentials(SessionDescription sDes, String uFrag, String pwd)Sets the specified ICE user fragment and password as attributes of the specified session description. static voidinitMediaDescription(MediaDescription mediaDescription, IceMediaStream iceMediaStream)Reflects the candidates from the various components in iceMediaStream into the specified m-line. static voidinitSessionDescription(SessionDescription sDes, Agent agent)Sets ice credentials, ICE options, media lines and candidates from agent, on the specified session description. static Collection<Attribute>createTrickleUpdate(Collection<LocalCandidate> localCandidates)Generates and returns a set of attributes that can be used for a trickle update, such as a SIP INFO, with the specified localCandidates. -
-
Method Detail
-
setIceCredentials
static void setIceCredentials(SessionDescription sDes, String uFrag, String pwd)
Sets the specified ICE user fragment and password as attributes of the specified session description.
- Parameters:
sDes- the session description where we'd like to set a user fragment and a password.uFrag- the ICE user name fragment that we'd like to set on the session descriptionpwd- the ICE password that we'd like to set on the session description
-
initMediaDescription
static void initMediaDescription(MediaDescription mediaDescription, IceMediaStream iceMediaStream)
Reflects the candidates from the various components in iceMediaStream into the specified m-line. Also sets default candidates into m= lines and c= lines. This method uses media level c= lines. They override session level making them pointless. This shouldn't be causing problems, but for good taste, make sure you don't include session level ones and avoid duplication.
- Parameters:
mediaDescription- the media descriptions that we'd like to add candidates to.iceMediaStream- the media stream where we should extract candidates from.
-
initSessionDescription
static void initSessionDescription(SessionDescription sDes, Agent agent)
Sets ice credentials, ICE options, media lines and candidates from agent, on the specified session description.
- Parameters:
sDes- the SessionDescription that we'd like to setup as per the specified agent.agent- the Agent that we need to use when initializing the session description.
-
createTrickleUpdate
static Collection<Attribute> createTrickleUpdate(Collection<LocalCandidate> localCandidates)
Generates and returns a set of attributes that can be used for a trickle update, such as a SIP INFO, with the specified localCandidates.
- Parameters:
localCandidates- the list of LocalCandidates that we'd like to generate the update for.
-
-
-
-