Component to manage coturn configuration.
In order to provide audio/video calling functionality, communication servers very often use an external server such as Coturn for implementing the STUN/TURN protocol. To use Coturn, the server needs to be configured with a set of URIs provided by Coturn along with a shared secret.
This component when added to an app allows the app to retrieve the current Coturn configuration and respond to any future configuration changes.
Initialize the component.
component_id should be a unique ID across all components of an app and across all components.
get_configuration() → plinth.modules.coturn.components.TurnConfiguration[source]¶
Return current coturn configuration.
Add or update STUN/TURN configuration.
Override this method and change app’s configuration.
TurnConfiguration(domain: Optional[str] = None, uris: list = <factory>, shared_secret: Optional[str] = None)[source]¶
Data class to hold TURN server configuration.
domain is the string representing the domain name with which Coturn has been configured. This is necessary to associate the correct TLS certificate with Coturn communication. STUN/TURN URIs are generated using this.
shared_secret is a string that must be used by a server to be accepted by Coturn server. This is the value set in Coturn configuration file.
uris are a list of strings that represent the full set of STUN/TURN URIs that must be used by a STUN/TURN client after advice from the server.