Package io.antmedia.webrtc.adaptor
Class Adaptor
java.lang.Object
io.antmedia.webrtc.adaptor.Adaptor
- All Implemented Interfaces:
PeerConnection.Observer
,SdpObserver
- Direct Known Subclasses:
RTMPAdaptor
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final org.slf4j.Logger
protected PeerConnection
protected PeerConnectionFactory
private MediaConstraints
private jakarta.websocket.Session
private String
protected WebSocketCommunityHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.websocket.Session
void
onAddStream
(MediaStream stream) Triggered when media is received on a new stream from remote peer.void
onAddTrack
(RtpReceiver receiver, MediaStream[] mediaStreams) Triggered when a new track is signaled by the remote peer, as a result of setRemoteDescription.void
onCreateFailure
(String error) Called on error of Create{Offer,Answer}().void
Called on success of Create{Offer,Answer}().void
onDataChannel
(DataChannel dataChannel) Triggered when a remote peer opens a DataChannel.void
onIceCandidate
(IceCandidate candidate) Triggered when a new ICE candidate has been found.void
onIceCandidatesRemoved
(IceCandidate[] candidates) Triggered when some ICE candidates have been removed.void
Triggered when the IceConnectionState changes.void
onIceConnectionReceivingChange
(boolean receiving) Triggered when the ICE connection receiving status changes.void
Triggered when the IceGatheringState changes.void
onRemoveStream
(MediaStream stream) Triggered when a remote peer close a stream.void
Triggered when renegotiation is necessary.void
onSetFailure
(String error) Called on error of Set{Local,Remote}Description().void
Called on success of Set{Local,Remote}Description().void
Triggered when the SignalingState changes.void
setPeerConnection
(PeerConnection peerConnection) void
setPeerConnectionFactory
(PeerConnectionFactory peerConnectionFactory) void
setSdpMediaConstraints
(MediaConstraints sdpMediaConstraints) void
setSession
(jakarta.websocket.Session session) void
setStreamId
(String streamId) abstract void
start()
abstract void
stop()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.webrtc.PeerConnection.Observer
onConnectionChange, onIceCandidateError, onRemoveTrack, onSelectedCandidatePairChanged, onStandardizedIceConnectionChange, onTrack
-
Field Details
-
peerConnection
-
sdpMediaConstraints
-
peerConnectionFactory
-
webSocketCommunityHandler
-
streamId
-
session
private jakarta.websocket.Session session -
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
Adaptor
-
-
Method Details
-
start
public abstract void start() -
stop
public abstract void stop() -
setPeerConnection
-
getPeerConnection
-
onSignalingChange
Description copied from interface:PeerConnection.Observer
Triggered when the SignalingState changes.- Specified by:
onSignalingChange
in interfacePeerConnection.Observer
-
onIceConnectionChange
Description copied from interface:PeerConnection.Observer
Triggered when the IceConnectionState changes.- Specified by:
onIceConnectionChange
in interfacePeerConnection.Observer
-
onIceConnectionReceivingChange
public void onIceConnectionReceivingChange(boolean receiving) Description copied from interface:PeerConnection.Observer
Triggered when the ICE connection receiving status changes.- Specified by:
onIceConnectionReceivingChange
in interfacePeerConnection.Observer
-
onIceGatheringChange
Description copied from interface:PeerConnection.Observer
Triggered when the IceGatheringState changes.- Specified by:
onIceGatheringChange
in interfacePeerConnection.Observer
-
onIceCandidate
Description copied from interface:PeerConnection.Observer
Triggered when a new ICE candidate has been found.- Specified by:
onIceCandidate
in interfacePeerConnection.Observer
-
onIceCandidatesRemoved
Description copied from interface:PeerConnection.Observer
Triggered when some ICE candidates have been removed.- Specified by:
onIceCandidatesRemoved
in interfacePeerConnection.Observer
-
onAddStream
Description copied from interface:PeerConnection.Observer
Triggered when media is received on a new stream from remote peer.- Specified by:
onAddStream
in interfacePeerConnection.Observer
-
onRemoveStream
Description copied from interface:PeerConnection.Observer
Triggered when a remote peer close a stream.- Specified by:
onRemoveStream
in interfacePeerConnection.Observer
-
onDataChannel
Description copied from interface:PeerConnection.Observer
Triggered when a remote peer opens a DataChannel.- Specified by:
onDataChannel
in interfacePeerConnection.Observer
-
onRenegotiationNeeded
public void onRenegotiationNeeded()Description copied from interface:PeerConnection.Observer
Triggered when renegotiation is necessary.- Specified by:
onRenegotiationNeeded
in interfacePeerConnection.Observer
-
onAddTrack
Description copied from interface:PeerConnection.Observer
Triggered when a new track is signaled by the remote peer, as a result of setRemoteDescription.- Specified by:
onAddTrack
in interfacePeerConnection.Observer
-
onCreateSuccess
Description copied from interface:SdpObserver
Called on success of Create{Offer,Answer}().- Specified by:
onCreateSuccess
in interfaceSdpObserver
-
onSetSuccess
public void onSetSuccess()Description copied from interface:SdpObserver
Called on success of Set{Local,Remote}Description().- Specified by:
onSetSuccess
in interfaceSdpObserver
-
onCreateFailure
Description copied from interface:SdpObserver
Called on error of Create{Offer,Answer}().- Specified by:
onCreateFailure
in interfaceSdpObserver
-
onSetFailure
Description copied from interface:SdpObserver
Called on error of Set{Local,Remote}Description().- Specified by:
onSetFailure
in interfaceSdpObserver
-
getSdpMediaConstraints
-
setSdpMediaConstraints
-
setPeerConnectionFactory
-
setSession
public void setSession(jakarta.websocket.Session session) -
getSession
public jakarta.websocket.Session getSession() -
getStreamId
-
setStreamId
-