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
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.Loggerprotected PeerConnectionprotected PeerConnectionFactoryprivate MediaConstraintsprivate jakarta.websocket.Sessionprivate Stringprotected WebSocketCommunityHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.websocket.SessionvoidonAddStream(MediaStream stream) Triggered when media is received on a new stream from remote peer.voidonAddTrack(RtpReceiver receiver, MediaStream[] mediaStreams) Triggered when a new track is signaled by the remote peer, as a result of setRemoteDescription.voidonCreateFailure(String error) Called on error of Create{Offer,Answer}().voidCalled on success of Create{Offer,Answer}().voidonDataChannel(DataChannel dataChannel) Triggered when a remote peer opens a DataChannel.voidonIceCandidate(IceCandidate candidate) Triggered when a new ICE candidate has been found.voidonIceCandidatesRemoved(IceCandidate[] candidates) Triggered when some ICE candidates have been removed.voidTriggered when the IceConnectionState changes.voidonIceConnectionReceivingChange(boolean receiving) Triggered when the ICE connection receiving status changes.voidTriggered when the IceGatheringState changes.voidonRemoveStream(MediaStream stream) Triggered when a remote peer close a stream.voidTriggered when renegotiation is necessary.voidonSetFailure(String error) Called on error of Set{Local,Remote}Description().voidCalled on success of Set{Local,Remote}Description().voidTriggered when the SignalingState changes.voidsetPeerConnection(PeerConnection peerConnection) voidsetPeerConnectionFactory(PeerConnectionFactory peerConnectionFactory) voidsetSdpMediaConstraints(MediaConstraints sdpMediaConstraints) voidsetSession(jakarta.websocket.Session session) voidsetStreamId(String streamId) abstract voidstart()abstract voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.ObserverTriggered when the SignalingState changes.- Specified by:
onSignalingChangein interfacePeerConnection.Observer
-
onIceConnectionChange
Description copied from interface:PeerConnection.ObserverTriggered when the IceConnectionState changes.- Specified by:
onIceConnectionChangein interfacePeerConnection.Observer
-
onIceConnectionReceivingChange
public void onIceConnectionReceivingChange(boolean receiving) Description copied from interface:PeerConnection.ObserverTriggered when the ICE connection receiving status changes.- Specified by:
onIceConnectionReceivingChangein interfacePeerConnection.Observer
-
onIceGatheringChange
Description copied from interface:PeerConnection.ObserverTriggered when the IceGatheringState changes.- Specified by:
onIceGatheringChangein interfacePeerConnection.Observer
-
onIceCandidate
Description copied from interface:PeerConnection.ObserverTriggered when a new ICE candidate has been found.- Specified by:
onIceCandidatein interfacePeerConnection.Observer
-
onIceCandidatesRemoved
Description copied from interface:PeerConnection.ObserverTriggered when some ICE candidates have been removed.- Specified by:
onIceCandidatesRemovedin interfacePeerConnection.Observer
-
onAddStream
Description copied from interface:PeerConnection.ObserverTriggered when media is received on a new stream from remote peer.- Specified by:
onAddStreamin interfacePeerConnection.Observer
-
onRemoveStream
Description copied from interface:PeerConnection.ObserverTriggered when a remote peer close a stream.- Specified by:
onRemoveStreamin interfacePeerConnection.Observer
-
onDataChannel
Description copied from interface:PeerConnection.ObserverTriggered when a remote peer opens a DataChannel.- Specified by:
onDataChannelin interfacePeerConnection.Observer
-
onRenegotiationNeeded
public void onRenegotiationNeeded()Description copied from interface:PeerConnection.ObserverTriggered when renegotiation is necessary.- Specified by:
onRenegotiationNeededin interfacePeerConnection.Observer
-
onAddTrack
Description copied from interface:PeerConnection.ObserverTriggered when a new track is signaled by the remote peer, as a result of setRemoteDescription.- Specified by:
onAddTrackin interfacePeerConnection.Observer
-
onCreateSuccess
Description copied from interface:SdpObserverCalled on success of Create{Offer,Answer}().- Specified by:
onCreateSuccessin interfaceSdpObserver
-
onSetSuccess
public void onSetSuccess()Description copied from interface:SdpObserverCalled on success of Set{Local,Remote}Description().- Specified by:
onSetSuccessin interfaceSdpObserver
-
onCreateFailure
Description copied from interface:SdpObserverCalled on error of Create{Offer,Answer}().- Specified by:
onCreateFailurein interfaceSdpObserver
-
onSetFailure
Description copied from interface:SdpObserverCalled on error of Set{Local,Remote}Description().- Specified by:
onSetFailurein interfaceSdpObserver
-
getSdpMediaConstraints
-
setSdpMediaConstraints
-
setPeerConnectionFactory
-
setSession
public void setSession(jakarta.websocket.Session session) -
getSession
public jakarta.websocket.Session getSession() -
getStreamId
-
setStreamId
-