Init application

<void> init(<Object> config)

The method LViS.init() is used to initialize and connect the application. You need two pieces of data from your LViS Project:

  • project UUID

  • static host

  • (optional) forceSecure flag to forcibly use secure connection, by default false

All values can be found within LViS Studio project settings as illustrated here:


var projectId = '19a6e094-4ddf-4c8f-8483-7d5c37c87b70';
var host = '';
// shorthand
var addEvent = document.addEventListener;
// first detect the page has loaded
// via the DOMContentLoaded event,
// then initialise LViS
addEvent('DOMContentLoaded', function () {
project: projectId,
host: host,
forceSecure: true