(function(window) {
$('#form').submit(function() {
$('#form-container').hide();
$('#loading-container').show();
const domain = "clinic-prod-6865-7.meet.vsee.com";
const conferenceID = $('#roomName').val();
const iframeNode = window.document.querySelector("#vseeBrowserCall");
const userName = $('#userName').val();
const authToken = $('#authToken').val();
const options = {
roomName: conferenceID,
noSsl: false,
parentNode: iframeNode,
userName: userName,
authToken: authToken,
onload: function() {
$('#vsee-container').hide();
$('#vseeBrowserCall').show();
}
};
const conferenceObject = new JitsiMeetExternalAPI(domain, options);
// listen to "participantJoined" event
/* e.g "participantJoined", {
displayName: "New guest 24",
formattedDisplayName: "New guest 24",
id: "41b24d0d"
} */
conferenceObject.addListener("participantJoined", function(data) {
console.log("participantJoined", data);
});
// change display name for the current user
conferenceObject.executeCommand('displayName', 'New guest ' + Math.floor(Math.random() * 100));
})
})(window);
|