WebRTC App

photograph of the WebRTC appphotograph of the WebRTC app

This app supports one-to-one, one-to-many and many-to-many videoconferencing and screen sharing using the OVE framework. It is based on OpenVidu, a platform designed to facilitate the addition of WebRTC videoconferencing into existing web and mobile applications. An installation of OpenVidu is required to use the WebRTC app. More information on installing OpenVidu can be found in the OVE installation guide.

The WebRTC app depends on an environment variable named OPENVIDU_HOST, that provides the hostname and port number at which the OpenVidu instance runs. The OpenVidu Secret must be provided by setting the OPENVIDU_SECRET environment variable on the production server or by editing the config.json file which must reside only on the production server.

Seen above is an image of the WebRTC app displaying a shared screen with the Visualizing large knowledge graphs: A performance analysis publication by Gómez-Romero et al. and a vidoconferencing call initiated at the board room of the Imperial College Data Science Institute’s photographed at the Imperial College Data Science Institute’s Data Observatory.

Application State

The state of this app has a format similar to:

    "sessionId": "random",
    "maxSessions": 8

The sessionId property can be a new or existing OpenVidu session identifier: if it is set to random, then the controller will generate a random sessionId. It is also possible to provide a url property which contains the sessionId: in such situations, the controller will extract the last path segment and use this as the sessionId.

The optional maxSessions property defines the maximum number of external users that can connect to the session.

Launching the App

All OVE applications can be launched using the Launcher UI, the Python Client Library, and the OVE APIs. The API used to launch an application is the same for all applications, but the data that is passed into it is application-specific.

To launch the WebRTC app using the OVE APIs:


curl --header "Content-Type: application/json" --request POST --data '{"app": {"url": "http://OVE_CORE_HOST:PORT/app/webrtc","states": {"load": {"sessionId": "random"}}}, "space": "OVE_SPACE", "h": 500, "w": 500, "y": 0, "x": 0}' http://OVE_CORE_HOST:PORT/section


curl --header "Content-Type: application/json" --request POST --data "{\"app\": {\"url\": \"http://OVE_CORE_HOST:PORT/app/webrtc\", \"states\": {\"load\": {\"sessionId\": \"random\"}}}, \"space\": \"OVE_SPACE\", \"h\": 500, \"w\": 500, \"y\": 0, \"x\": 0}" http://OVE_CORE_HOST:PORT/section

Controlling the App

A vidoconferencing call must first be initialized using the controller, which is accessible at http://OVE_CORE_HOST:PORT/app/webrtc/control.html?oveSectionId=SECTION_ID.

Participants can then join this call by connecting to the OpenVidu client (accessible by opening OPENVIDU_HOST with a web browser) and providing the sessionId as the name of the call room.