jeudi 13 juillet 2017

How do I use Jitsi Meet in an EmberJS app

In my Ember app I'm using ember-inject-script which I installed: npm install --save-dev ember-inject-script

The controller.js file for my page looks like this:

import Ember from 'ember';
import injectScript from 'ember-inject-script';

export default Ember.Controller.extend({
  init: function() {
    this._super();
    var url = "http://ift.tt/2bdeC8K";
    injectScript(url);
    var domain = "meet.jit.si";
    var room = "JitsiMeetAPIExample";
    var width = 700;
    var height = 700;
    var htmlElement = document.querySelector('#meet');
    var api = new JitsiMeetExternalAPI(domain, room, width, height, 
              htmlElement);
  }
});

The Template is this:

<h2>Jitsi Meet</h2>
<div id="meet"></div>


Yet I get a console error: Error while processing route: projects.index JitsiMeetExternalAPI is not defined ReferenceError: JitsiMeetExternalAPI is not defined




Aucun commentaire:

Enregistrer un commentaire