function loadMeetingFromJson(fileName, callback) {
  // load a meeting template with given name
  const xmlhttp = new XMLHttpRequest();
  const url = `meetings/${fileName}.json`;

  xmlhttp.onreadystatechange = function() {
    if(this.readyState == 1) {
      load(true);
    }
    if (this.readyState == 4 && this.status == 200) {
      const res = JSON.parse(this.responseText);
      meeting = new Meeting(res.title, res.sequences);

      if(!callback) {
        setPage();
      } else {
        callback();
      }

      load(false);
    }
  };

  xmlhttp.open("GET", url, true);
  xmlhttp.send();
}
/**
 * Load a meeting template JSON
 * : If callback, launch it instead of refreshing the page directly
 * @param {string} fileName
 * @param {function} callback
 */
Load a meeting template JSON
: If callback, launch it instead of refreshing the page directly
@param {string} fileName
@param {function} callback
Load a meeting template JSON : If callback launch it instead of refreshing the page directly @param { string } fileName @param { function } callback
function loadMeetingFromJson(fileName, callback) {
  const xmlhttp = new XMLHttpRequest();
  const url = `meetings/${fileName}.json`;
  xmlhttp.onreadystatechange = function() {
    if(this.readyState == 1) {
      load(true);
    }
    if (this.readyState == 4 && this.status == 200) {
      const res = JSON.parse(this.responseText);
      meeting = new Meeting(res.title, res.sequences);
      if(!callback) {
        setPage();
      } else {
        callback();
      }
      load(false);
    }
  };
  xmlhttp.open("GET", url, true);
  xmlhttp.send();
}
function loadMeetingFromJson ( fileName , callback ) { const xmlhttp = new XMLHttpRequest ( ) ; const url = ` ${ fileName } ` ; xmlhttp . onreadystatechange = function ( ) { if ( this . readyState == 1 ) { load ( true ) ; } if ( this . readyState == 4 && this . status == 200 ) { const res = JSON . parse ( this . responseText ) ; meeting = new Meeting ( res . title , res . sequences ) ; if ( ! callback ) { setPage ( ) ; } else { callback ( ) ; } load ( false ) ; } } ; xmlhttp . open ( "GET" , url , true ) ; xmlhttp . send ( ) ; }
Load a meeting template JSON
 : If callback, launch it instead of refreshing the page directly
 @param {string} fileName
 @param {function} callback
Load a meeting template JSON : If callback launch it instead of refreshing the page directly @param { string } fileName @param { function } callback
// load a meeting template with given name