Skip to main content

Creating the Vanilla JS Project

As this project is Vanilla JS, there are no specific make files to create the folder structure. It is recommended that the user creates a file and folder structure as per below.

📁 pexrtc-example
↳ 📁 assets
↳ 📁 css
↳ 📄 styles.css
↳ 📁 js
↳ 📄 call.js
↳ 📄 preflight.js
↳ 📄 ui.js
↳ 📄 index.html

styles.css

This file contains all of the CSS styles for the page.

call.js

This file contains all of the call-related methods and variables. These methods include callbacks from the PexRTC library that allow us to perform actions based on events coming from Pexip.

preflight.js

This file contains code related to the preflight. Preflight is the name used for the initial steps of setting up a call, selecting audio/video devices, URI to dial and a way to specify your name.

ui.js

This file contains code to control the UI, such as switching between different views to show the preflight or the video windows.

index.html

This file is used as a visual template to show the Pexip video frame inside the browser. It is standard HTML.