var registerListeners = function() { BBB.listen("UserLeftEvent", function(bbbEvent) { console.log("User [" + bbbEvent.userID + "] has left."); }); BBB.listen("UserJoinedEvent", function(bbbEvent) { console.log("User [" + bbbEvent.userID + ", [" + bbbEvent.userName + "] has joined."); }); BBB.listen("UserJoinedVoiceEvent", function(bbbEvent) { console.log("Received userHasJoinedVoiceConference event"); }); BBB.listen("NewPublicChatEvent", function(bbbEvent) { console.log("Received NewPublicChatEvent [" + bbbEvent.message + "]"); }); BBB.listen("NewPrivateChatEvent", function(bbbEvent) { console.log("Received NewPrivateChatEvent event"); }); } var joinVoiceConference2 = function () { BBB.joinVoiceConference(); } var getMyRoleAsynch = function() { BBB.listen("GetMyRoleResponse", function(bbbEvent) { console.log("Received GetMyRoleResponse event"); }); BBB.getMyRole(); } var getMyRoleSynch = function() { BBB.getMyRole(function(myRole) { console.log("My role = " + myRole); }); } var muteMe = function() { BBB.muteMe(); } var unmuteMe = function() { BBB.unmuteMe(); } var muteAll = function() { BBB.muteAll(); } var unmuteAll = function() { BBB.unmuteAll(); } var switchLayout = function(newLayout) { BBB.switchLayout(newLayout); } var lockLayout = function(lock) { BBB.lockLayout(lock); } var sendPublicChat = function () { var message = "Hello from the Javascript API"; BBB.sendPublicChatMessage('0x7A7A7A', "en", message); } var sendPrivateChat = function () { var message = "ECHO: " + bbbEvent.message; BBB.sendPrivateChatMessage(bbbEvent.fromColor, bbbEvent.fromLang, message, bbbEvent.fromUserID); }