PrivMX Endpoint v2.8.0
Loading...
Searching...
No Matches
privmx::endpoint::stream::WebRTCInterface Class Referenceabstract

#include <privmx/endpoint/stream/WebRTCInterface.hpp>

Inheritance diagram for privmx::endpoint::stream::WebRTCInterface:

Public Member Functions

virtual std::string createOfferAndSetLocalDescription (const std::string &streamRoomId, const std::string &connectionType)=0
virtual std::string createAnswerAndSetDescriptions (const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType)=0
virtual void setAnswerAndSetRemoteDescription (const std::string &streamRoomId, const std::string &sdp, const std::string &type, const std::string &connectionType)=0
virtual void updateSessionId (const std::string &streamRoomId, const int64_t sessionId, const std::string &connectionType)=0
virtual void closeAll (const std::string &streamRoomId)=0
virtual void close (const std::string &streamRoomId, const std::string &connectionType)=0
virtual void updateKeys (const std::string &streamRoomId, const std::vector< Key > &keys)=0

Protected Member Functions

virtual ~WebRTCInterface ()=default

Detailed Description

Interface of the WebRTC layer used by 'StreamApiLow'. An implementation has to be provided when joining a Stream Room and is responsible for managing the PeerConnections of that Stream Room - one for publishing ("publisher") and one for receiving ("subscriber") Streams.

Constructor & Destructor Documentation

◆ ~WebRTCInterface()

virtual privmx::endpoint::stream::WebRTCInterface::~WebRTCInterface ( )
protectedvirtualdefault

//doc-gen:ignore

Member Function Documentation

◆ close()

virtual void privmx::endpoint::stream::WebRTCInterface::close ( const std::string & streamRoomId,
const std::string & connectionType )
pure virtual

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")

Implemented in privmx::endpoint::stream::ProxyWebRTC.

◆ closeAll()

virtual void privmx::endpoint::stream::WebRTCInterface::closeAll ( const std::string & streamRoomId)
pure virtual

Closes all PeerConnections of the given Stream Room.

Parameters
streamRoomIdID of the Stream Room to close the connections of

Implemented in privmx::endpoint::stream::ProxyWebRTC.

◆ createAnswerAndSetDescriptions()

virtual std::string privmx::endpoint::stream::WebRTCInterface::createAnswerAndSetDescriptions ( const std::string & streamRoomId,
const std::string & sdp,
const std::string & type,
const std::string & connectionType )
pure virtual

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

Implemented in privmx::endpoint::stream::ProxyWebRTC.

◆ createOfferAndSetLocalDescription()

virtual std::string privmx::endpoint::stream::WebRTCInterface::createOfferAndSetLocalDescription ( const std::string & streamRoomId,
const std::string & connectionType )
pure virtual

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

Implemented in privmx::endpoint::stream::ProxyWebRTC.

◆ setAnswerAndSetRemoteDescription()

virtual void privmx::endpoint::stream::WebRTCInterface::setAnswerAndSetRemoteDescription ( const std::string & streamRoomId,
const std::string & sdp,
const std::string & type,
const std::string & connectionType )
pure virtual

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")

Implemented in privmx::endpoint::stream::ProxyWebRTC.

◆ updateKeys()

virtual void privmx::endpoint::stream::WebRTCInterface::updateKeys ( const std::string & streamRoomId,
const std::vector< Key > & keys )
pure virtual

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

Implemented in privmx::endpoint::stream::ProxyWebRTC.

◆ updateSessionId()

virtual void privmx::endpoint::stream::WebRTCInterface::updateSessionId ( const std::string & streamRoomId,
const int64_t sessionId,
const std::string & connectionType )
pure virtual

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")

Implemented in privmx::endpoint::stream::ProxyWebRTC.


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