PrivMX Endpoint v2.8.0
Loading...
Searching...
No Matches
privmx::endpoint::stream::ProxyWebRTC Class Reference
Inheritance diagram for privmx::endpoint::stream::ProxyWebRTC:
Collaboration diagram for privmx::endpoint::stream::ProxyWebRTC:

Public Member Functions

 ProxyWebRTC (privmx_endpoint_stream_WebRTCInterface webRTCInterface)
std::string createOfferAndSetLocalDescription (const std::string &streamRoomId, const std::string &connectionType) override
std::string createAnswerAndSetDescriptions (const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType) override
void setAnswerAndSetRemoteDescription (const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType) override
void updateSessionId (const std::string &streamRoomId, const int64_t sessionId, const std::string &connectionType) override
void closeAll (const std::string &streamRoomId) override
void close (const std::string &streamRoomId, const std::string &connectionType) override
void updateKeys (const std::string &streamRoomId, const std::vector< Key > &keys) override

Additional Inherited Members

Protected Member Functions inherited from privmx::endpoint::stream::WebRTCInterface
virtual ~WebRTCInterface ()=default

Member Function Documentation

◆ close()

void privmx::endpoint::stream::ProxyWebRTC::close ( const std::string & streamRoomId,
const std::string & connectionType )
overridevirtual

Closes a single PeerConnection of the given Stream Room.

Parameters
streamRoomIdID of the Stream Room the connection belongs to
connectionTypetype of the connection to close ("publisher" or "subscriber")

Implements privmx::endpoint::stream::WebRTCInterface.

◆ closeAll()

void privmx::endpoint::stream::ProxyWebRTC::closeAll ( const std::string & streamRoomId)
overridevirtual

Closes all PeerConnections of the given Stream Room.

Parameters
streamRoomIdID of the Stream Room to close the connections of

Implements privmx::endpoint::stream::WebRTCInterface.

◆ createAnswerAndSetDescriptions()

std::string privmx::endpoint::stream::ProxyWebRTC::createAnswerAndSetDescriptions ( const std::string & streamRoomId,
const std::string & sdp,
const std::string & type,
const std::string & connectionType )
overridevirtual

Sets the given session description as the remote description of the PeerConnection, creates an answer to it and sets that answer as the PeerConnection's local description.

Parameters
streamRoomIdID of the Stream Room the connection belongs to
sdpreceived session description in the SDP format
typetype of the received session description ("offer" or "answer")
connectionTypetype of the connection ("publisher" or "subscriber")
Returns
created answer SDP

Implements privmx::endpoint::stream::WebRTCInterface.

◆ createOfferAndSetLocalDescription()

std::string privmx::endpoint::stream::ProxyWebRTC::createOfferAndSetLocalDescription ( const std::string & streamRoomId,
const std::string & connectionType )
overridevirtual

Creates an SDP offer for the given PeerConnection and sets it as its local description.

Parameters
streamRoomIdID of the Stream Room the connection belongs to
connectionTypetype of the connection ("publisher" or "subscriber")
Returns
created offer SDP

Implements privmx::endpoint::stream::WebRTCInterface.

◆ setAnswerAndSetRemoteDescription()

void privmx::endpoint::stream::ProxyWebRTC::setAnswerAndSetRemoteDescription ( const std::string & streamRoomId,
const std::string & sdp,
const std::string & type,
const std::string & connectionType )
overridevirtual

Sets the received answer as the remote description of the PeerConnection.

Parameters
streamRoomIdID of the Stream Room the connection belongs to
sdpreceived session description in the SDP format
typetype of the received session description ("offer" or "answer")
connectionTypetype of the connection ("publisher" or "subscriber")

Implements privmx::endpoint::stream::WebRTCInterface.

◆ updateKeys()

void privmx::endpoint::stream::ProxyWebRTC::updateKeys ( const std::string & streamRoomId,
const std::vector< Key > & keys )
overridevirtual

Replaces the keys used to encrypt and decrypt the data sent over the publisher and subscriber Streams.

Parameters
streamRoomIdID of the Stream Room to update the keys of
keysnew set of encryption keys

Implements privmx::endpoint::stream::WebRTCInterface.

◆ updateSessionId()

void privmx::endpoint::stream::ProxyWebRTC::updateSessionId ( const std::string & streamRoomId,
const int64_t sessionId,
const std::string & connectionType )
overridevirtual

Assigns the media server session to the PeerConnection. The session ID is needed to send the PeerConnection's ICE candidates (using trickle) to the server.

Parameters
streamRoomIdID of the Stream Room the connection belongs to
sessionIdID of the media server session assigned to the connection
connectionTypetype of the connection ("publisher" or "subscriber")

Implements privmx::endpoint::stream::WebRTCInterface.


The documentation for this class was generated from the following file: