How to customize layout in OpenTok.js?


We have several ways to customize the layout in the JS app as below. Please note there are no pre-defined layouts in OpenTok.js such as for composed archives and live streaming broadcasts. You need to customize it programmatically or use Video Express which has some predefined layout options.

Applies To

  • Video API
  • OpenTok.js


  1. Set position and dimensions of a video programmatically. Please find some sample code here:
  2. Copy a CSS-based predefined layout for Archive and Broadcast into your own CSS and use the class names. Please find the predefined layouts in at the foot of the page.
  3. Use Vonage Video Express. There are predefined layouts: grid and active-speaker. Please find the developer's reference at

Additional Information

Some more layout samples are available on GitHub:

A bit more about Vonage Video Express:


Have more questions? Submit a request