0

I'm attempting to integrate lib-jitsi-meet into an Angular (version 7) application and, when calling initJitsiConference with an established JitsiConnection, am receiving a compile error at the xmpp.js level. The source is taken directly from the example repo, with no modifications made, and can be found here.

AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property 'substr' of null
at t.value (xmpp.js:409)
at X._init (JitsiConference.js:240)
at new X (JitsiConference.js:118)
at c.initJitsiConference (JitsiConnection.js:103)

The stack trace points to these function calls, at t.value (xmpp.js:409) and at new X (JitsiConference.js:118), respectively.

this.room = this.xmpp.createRoom(this.options.name, config);

and

return new JitsiConference({
    name,
    config: options,
    connection: this
});

Any feedback or advice would be greatly appreciated, thank you!

Drew Thompson
  • 56
  • 1
  • 8

1 Answers1

0

Double check your code about the roomname (first argument of initJitsiConference). It must be :

  • Not empty
  • Not null
  • Only lower case
/* const connection = ...YOUR_CONNECTION... */

const roomName = 'conference'
const roomOption = {}

const room = connection.initJitsiConference(roomName, roomOption);

You can find a simple example in the «Getting Started» of this page : https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/API.md

Sylchauf
  • 186
  • 1
  • 9