public abstract class IceWebRtcEndpoint extends Object
WebRtcEndpoint wrapper that supports buffering of
IceCandidates until the WebRtcEndpoint is created.
Connections to other peers are opened using the corresponding method of the
internal endpoint.| Modifier and Type | Field and Description |
|---|---|
protected org.kurento.client.WebRtcEndpoint |
endpoint |
| Constructor and Description |
|---|
IceWebRtcEndpoint(Participant owner,
String endpointName,
org.kurento.client.MediaPipeline pipeline,
org.slf4j.Logger log)
Constructor to set the owner, the endpoint's name and the media pipeline.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addIceCandidate(org.kurento.client.IceCandidate candidate)
Add a new
IceCandidate received gathered by the remote peer of
this WebRtcEndpoint. |
org.kurento.client.WebRtcEndpoint |
createEndpoint(CountDownLatch endpointLatch)
If this object doesn't have a
WebRtcEndpoint, it is created in a
thread-safe way using the internal MediaPipeline. |
protected void |
gatherCandidates()
Instructs the internal
WebRtcEndpoint to start gathering
IceCandidates. |
org.kurento.client.WebRtcEndpoint |
getEndpoint() |
String |
getEndpointName() |
Participant |
getOwner() |
org.kurento.client.MediaPipeline |
getPipeline() |
protected void |
internalEndpointInitialization(CountDownLatch endpointLatch)
Create the endpoint and any other additional elements (if needed).
|
protected String |
processOffer(String offer)
Orders the internal
WebRtcEndpoint to process the offer String. |
protected org.kurento.client.ListenerSubscription |
registerElemErrListener(org.kurento.client.MediaElement element)
Registers a listener for when the
MediaElement triggers an
ErrorEvent. |
protected void |
registerOnIceCandidateEventListener()
Registers a listener for when the
WebRtcEndpoint gathers a new
IceCandidate and sends it to the remote User Agent as a
notification using the messaging capabilities of the Participant. |
void |
setEndpointName(String endpointName)
Sets the endpoint's name (as indicated by the browser).
|
void |
setMediaPipeline(org.kurento.client.MediaPipeline pipeline)
Sets the
MediaPipeline used to create the internal
WebRtcEndpoint. |
protected void |
unregisterElementErrListener(org.kurento.client.MediaElement element,
org.kurento.client.ListenerSubscription subscription)
Unregisters the error listener from the media element using the provided
subscription.
|
void |
unregisterErrorListeners()
Unregisters all error listeners created for media elements owned by this
instance.
|
public IceWebRtcEndpoint(Participant owner, String endpointName, org.kurento.client.MediaPipeline pipeline, org.slf4j.Logger log)
owner - endpointName - pipeline - public Participant getOwner()
public org.kurento.client.WebRtcEndpoint getEndpoint()
WebRtcEndpointpublic org.kurento.client.WebRtcEndpoint createEndpoint(CountDownLatch endpointLatch)
WebRtcEndpoint, it is created in a
thread-safe way using the internal MediaPipeline. Otherwise no
actions are taken. It also registers an error listener for the endpoint
and for any additional media elements.endpointLatch - latch whose countdown is performed when the
asynchronous call to build the WebRtcEndpoint returnspublic org.kurento.client.MediaPipeline getPipeline()
public void setMediaPipeline(org.kurento.client.MediaPipeline pipeline)
MediaPipeline used to create the internal
WebRtcEndpoint.pipeline - the MediaPipelinepublic String getEndpointName()
public void setEndpointName(String endpointName)
endpointName - the namepublic void addIceCandidate(org.kurento.client.IceCandidate candidate)
IceCandidate received gathered by the remote peer of
this WebRtcEndpoint.candidate - the remote candidatepublic void unregisterErrorListeners()
protected void internalEndpointInitialization(CountDownLatch endpointLatch)
endpointLatch - protected void registerOnIceCandidateEventListener()
throws RoomException
WebRtcEndpoint gathers a new
IceCandidate and sends it to the remote User Agent as a
notification using the messaging capabilities of the Participant.RoomException - if thrown, unable to register the listenerWebRtcEndpoint.addOnIceCandidateListener(org.kurento.client.EventListener),
Participant.sendIceCandidate(String, IceCandidate)protected org.kurento.client.ListenerSubscription registerElemErrListener(org.kurento.client.MediaElement element)
MediaElement triggers an
ErrorEvent. Notifies the owner with the error.element - the MediaElementListenerSubscription that can be used to deregister the
listenerprotected void unregisterElementErrListener(org.kurento.client.MediaElement element,
org.kurento.client.ListenerSubscription subscription)
element - the MediaElementsubscription - the associated ListenerSubscriptionprotected String processOffer(String offer)
WebRtcEndpoint to process the offer String.offer - String with the Sdp offerSdpEndpoint.processOffer(String)protected void gatherCandidates()
WebRtcEndpoint to start gathering
IceCandidates.Copyright © 2015 Kurento. All rights reserved.