openvidu-custom-ui 🔗

Check it on GitHub

openvidu-custom-ui tutorial shows how easily you can customize the UI of your openvidu-angular based application.

Running this tutorial 🔗

To run the tutorial you need the three components stated in OpenVidu application architecture: an OpenVidu deployment, your server application and your client application. In this order:

1. Run OpenVidu deployment 🔗

Using Docker Engine:

# WARNING: this container is not suitable for production deployments of OpenVidu
# Visit

docker run -p 4443:4443 --rm -e OPENVIDU_SECRET=MY_SECRET openvidu/openvidu-dev:2.23.0

2. Run your preferred server application sample 🔗

For more information visit Application server.

3. Run the client application tutorial 🔗

You need NPM and Angular CLI to serve the application. Check them with the following command:

npm -v
ng v

To serve the tutorial:

# Using the same repository openvidu-tutorials from step 2

cd openvidu-tutorials/openvidu-components/openvidu-custom-ui
npm install
ng serve

Go to http://localhost:4200 to test the app once the server is running.

To test the application with other devices in your network, visit this FAQ

Understanding the code 🔗

This is an Angular project generated with Angular CLI tool, and therefore you will see lots of configuration files and other stuff that doesn't really matter to us. We will focus on the following files under src/app/ folder:

  • app.module.ts: defines the AppComponent module where we import and configure the openvidu-angular library.
  • app.component.ts: defines AppComponent, main component of the app. It handles the request of OpenVidu tokens to pass them to the videoconference component, so it is able to connect to the OpenVidu session.

First, we need to install the openvidu-angular library. You can check how to do that here.

The VideoconferenceComponent needs the OpenVidu tokens to connect to the session. We request them on ngOnInit method. The VideoconferenceComponent will automatically use them to connect to the session when available.

<ov-videoconference [tokens]="tokens"></ov-videoconference>

app.component.ts declares the following properties and methods:

APPLICATION_SERVER_URL = 'http://localhost:5000/';

sessionId = 'openvidu-custom-ui';
tokens!: TokenModel;

constructor(private httpClient: HttpClient) { }

async ngOnInit() {
  this.tokens = {
    webcam: await this.getToken(),
    screen: await this.getToken(),

getToken() {
  // Requesting tokens to the server application


  • APPLICATION_SERVER_URL: URL to communicate the client application with the server application to request OpenVidu tokens.
  • sessionId: OpenVidu Session identifier. This is the session where the VideoconferenceComponent will connect to.
  • tokens: object where OpenVidu Tokens are stored. The VideoconferenceComponent uses this object to connect to the session.
  • constructor method with dependency injection.
  • ngOnInit method where OpenVidu Tokens are requested.

Customize the UI 🔗

With openvidu-angular you can customize the basic UI to suit your needs. You can modify the shape of buttons, panels and videos customization, the background color personalization of panels, buttons and videoconference and also you can change the text color.

Just modify the CSS styles of variables.scss file.

:root {
  --ov-primary-color: #303030;
  --ov-secondary-color: #3e3f3f;
  --ov-tertiary-color: #598eff;
  --ov-warn-color: #EB5144;
  --ov-accent-color: #ffae35;
  --ov-light-color: #e6e6e6;

  --ov-logo-background-color: #3e3f3f;

  --ov-text-color: #ffffff;

  --ov-panel-text-color: #1d1d1d;
  --ov-panel-background: #ffffff;

  --ov-buttons-radius: 50%;
  --ov-leave-button-radius: 10px;
  --ov-video-radius: 5px;
  --ov-panel-radius: 5px;

Moreover,you can change the branding logo which appears in the toolbar. Just add you own logo under /assets/images and name this file as logo.png.