Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Makes the generation of roomnames on the welcome page configurable and fixes some minor issues.

Boris Grozevc53cc032a010
diff --git a/app.js b/app.js
index 6102be6469..08707a5e34 100644
--- a/app.js
+++ b/app.js
@@ -209,7 +209,7 @@ function doJoin() {
if (path.length > 1) {
roomnode = path.substr(1).toLowerCase();
} else {
- var word = RoomNameGenerator.generateRoomWithoutSeparator(3);
+ var word = RoomNameGenerator.generateRoomWithoutSeparator();
roomnode = word.toLowerCase();
window.history.pushState('VideoChat',
@@ -1167,9 +1167,12 @@ $(document).ready(function () {
function enter_room()
{
var val = $("#enter_room_field").val();
- if(!val)
+ if(!val) {
val = $("#enter_room_field").attr("room_name");
- window.location.pathname = "/" + val;
+ }
+ if (val) {
+ window.location.pathname = "/" + val;
+ }
}
$("#enter_room_button").click(function()
{
@@ -1177,37 +1180,41 @@ $(document).ready(function () {
});
$("#enter_room_field").keydown(function (event) {
- if (event.keyCode === 13) {
+ if (event.keyCode === 13 /* enter */) {
enter_room();
}
});
- var updateTimeout;
- var animateTimeout;
- $("#reload_roomname").click(function () {
- clearTimeout(updateTimeout);
- clearTimeout(animateTimeout);
- update_roomname();
- });
- function animate(word) {
- var currentVal = $("#enter_room_field").attr("placeholder");
- $("#enter_room_field").attr("placeholder", currentVal + word.substr(0, 1));
- animateTimeout = setTimeout(function() {
+ if (interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE){
+ var updateTimeout;
+ var animateTimeout;
+ $("#reload_roomname").click(function () {
+ clearTimeout(updateTimeout);
+ clearTimeout(animateTimeout);
+ update_roomname();
+ });
+ $("#reload_roomname").show();
+
+ function animate(word) {
+ var currentVal = $("#enter_room_field").attr("placeholder");
+ $("#enter_room_field").attr("placeholder", currentVal + word.substr(0, 1));
+ animateTimeout = setTimeout(function() {
animate(word.substring(1, word.length))
}, 70);
- }
-
- function update_roomname()
- {
- var word = RoomNameGenerator.generateRoomWithoutSeparator();
- $("#enter_room_field").attr("room_name", word);
- $("#enter_room_field").attr("placeholder", "");
- animate(word);
- updateTimeout = setTimeout(update_roomname, 10000);
+ }
+ function update_roomname()
+ {
+ var word = RoomNameGenerator.generateRoomWithoutSeparator();
+ $("#enter_room_field").attr("room_name", word);
+ $("#enter_room_field").attr("placeholder", "");
+ clearTimeout(animateTimeout);
+ animate(word);
+ updateTimeout = setTimeout(update_roomname, 10000);
+ }
+ update_roomname();
}
- update_roomname();
$("#disable_welcome").click(function () {
window.localStorage.welcomePageDisabled
@@ -1544,7 +1551,6 @@ function hangup() {
disposeConference();
sessionTerminated = true;
connection.emuc.doLeave();
- var buttons = {};
if(config.enableWelcomePage)
{
setTimeout(function()
diff --git a/css/welcome_page.css b/css/welcome_page.css
index 3fd38b3d50..3b3c547961 100644
--- a/css/welcome_page.css
+++ b/css/welcome_page.css
@@ -201,4 +201,5 @@
float: left;
cursor: pointer;
text-align: center;
-}
\ No newline at end of file
+ display: none;
+}
diff --git a/interface_config.js b/interface_config.js
index 60077c3c4c..130a94866b 100644
--- a/interface_config.js
+++ b/interface_config.js
@@ -10,5 +10,6 @@ var interfaceConfig = {
JITSI_WATERMARK_LINK: "http://jitsi.org",
SHOW_BRAND_WATERMARK: false,
BRAND_WATERMARK_LINK: "",
- SHOW_POWERED_BY: false
+ SHOW_POWERED_BY: false,
+ GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true
};
diff --git a/roomname_generator.js b/roomname_generator.js
index 302d302175..2dfb61588e 100644
--- a/roomname_generator.js
+++ b/roomname_generator.js
@@ -166,9 +166,8 @@ var RoomNameGenerator = function(my) {
/**
* Generates new room name.
- * @param number_of_words ignored
*/
- RoomNameGeneratorProto.generateRoomWithoutSeparator = function(number_of_words)
+ RoomNameGeneratorProto.generateRoomWithoutSeparator = function()
{
// Note that if more than one pattern is available, the choice of 'name' won't be random (names from patterns
// with fewer options will have higher probability of being chosen that names from patterns with more options).