bigbluebutton-Github/bigbluebutton-client/resources/prod/lib/3rd-party.js

66 lines
1.7 KiB
JavaScript
Raw Normal View History

2012-10-25 03:28:24 +08:00
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("userHasJoinedVoiceConference", function(bbbEvent) {
console.log("Received userHasJoinedVoiceConference event");
});
2012-10-25 03:28:24 +08:00
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();
}
2012-10-05 05:24:10 +08:00
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);
});
}
2012-10-05 05:24:10 +08:00
2012-10-06 04:54:45 +08:00
var muteMe = function() {
BBB.muteMe();
}
var unmuteMe = function() {
BBB.unmuteMe();
}
2012-10-06 05:07:22 +08:00
var muteAll = function() {
BBB.muteAll();
}
var unmuteAll = function() {
BBB.unmuteAll();
2012-10-18 22:17:12 +08:00
}
var switchLayout = function(newLayout) {
BBB.switchLayout(newLayout);
}
2012-10-25 03:28:24 +08:00
var sendPublicChat = function () {
var message = "Hello from the Javascript API";
BBB.sendPublicChatMessage('0x7A7A7A', "en", message);
}
2012-10-25 03:28:24 +08:00
var sendPrivateChat = function () {
var message = "ECHO: " + bbbEvent.message;
BBB.sendPrivateChatMessage(bbbEvent.fromColor, bbbEvent.fromLang, message, bbbEvent.fromUserID);
}