diff --git a/app.js b/app.js
index ed83638da..2c1748241 100644
--- a/app.js
+++ b/app.js
@@ -92,6 +92,11 @@ function init() {
}
function connect(jid, password) {
+ var localAudio, localVideo;
+ if (connection && connection.jingle) {
+ localAudio = connection.jingle.localAudio;
+ localVideo = connection.jingle.localVideo;
+ }
connection = new Strophe.Connection(document.getElementById('boshURL').value || config.bosh || '/http-bind');
if (nickname) {
@@ -107,6 +112,8 @@ function connect(jid, password) {
if (!connection.jingle.pc_constraints.optional) connection.jingle.pc_constraints.optional = [];
connection.jingle.pc_constraints.optional.push({googIPv6: true});
}
+ if (localAudio) connection.jingle.localAudio = localAudio;
+ if (localVideo) connection.jingle.localVideo = localVideo;
if(!password)
password = document.getElementById('password').value;
@@ -144,16 +151,10 @@ function connect(jid, password) {
}
/**
- * HTTPS only:
- * We first ask for audio and video combined stream in order to get permissions and not to ask twice.
- * Then we dispose the stream and continue with separate audio, video streams(required for desktop sharing).
+ * We ask for audio and video combined stream in order to get permissions and
+ * not to ask twice.
*/
function obtainAudioAndVideoPermissions(callback) {
- // This makes sense only on https sites otherwise we'll be asked for permissions every time
- if (location.protocol !== 'https:') {
- callback();
- return;
- }
// Get AV
getUserMediaWithConstraints(
['audio', 'video'],
@@ -204,9 +205,11 @@ function doJoin() {
if (path.length > 1) {
roomnode = path.substr(1).toLowerCase();
} else {
- roomnode = Math.random().toString(36).substr(2, 20);
+ var word = RoomNameGenerator.generateRoomWithoutSeparator(3);
+ roomnode = word.toLowerCase();
+
window.history.pushState('VideoChat',
- 'Room: ' + roomnode, window.location.pathname + roomnode);
+ 'Room: ' + word, window.location.pathname + word);
}
}
@@ -641,14 +644,9 @@ $(document).bind('joined.muc', function (event, jid, info) {
// Once we've joined the muc show the toolbar
Toolbar.showToolbar();
- var displayName = '';
if (info.displayName)
- displayName = info.displayName + ' (me)';
- else
- displayName = "Me";
-
- $(document).trigger('displaynamechanged',
- ['localVideoContainer', displayName]);
+ $(document).trigger('displaynamechanged',
+ ['localVideoContainer', info.displayName + ' (me)']);
});
$(document).bind('entered.muc', function (event, jid, info, pres) {
@@ -1077,24 +1075,60 @@ function getCameraVideoSize(videoWidth,
}
$(document).ready(function () {
+ document.title = brand.appName;
if(config.enableWelcomePage && window.location.pathname == "/" &&
(!window.localStorage.welcomePageDisabled || window.localStorage.welcomePageDisabled == "false"))
{
$("#videoconference_page").hide();
+ $("#domain_name").text(window.location.protocol + "//" + window.location.host + "/");
+ $("span[name='appName']").text(brand.appName);
+ function enter_room()
+ {
+ var val = $("#enter_room_field").val();
+ if(!val)
+ val = $("#enter_room_field").attr("room_name");
+ window.location.pathname = "/" + val;
+ }
$("#enter_room_button").click(function()
{
- var val = Util.escapeHtml($("#enter_room_field").val());
- window.location.pathname = "/" + val;
+ enter_room();
});
$("#enter_room_field").keydown(function (event) {
if (event.keyCode === 13) {
- var val = Util.escapeHtml(this.value);
- window.location.pathname = "/" + val;
+ 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() {
+ 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);
+
+ }
+ update_roomname();
+
$("#disable_welcome").click(function () {
window.localStorage.welcomePageDisabled = $("#disable_welcome").is(":checked");
});
@@ -1401,10 +1435,17 @@ function hangup() {
$.prompt("Session Terminated",
{
- title: "You hang up the call",
+ title: "You hung up the call",
persistent: true,
- buttons: {},
- closeText: ''
+ buttons: {
+ "Join again": true
+ },
+ closeText: '',
+ submit: function(event, value, message, formVals)
+ {
+ window.location.reload();
+ return false;
+ }
}
);
diff --git a/brand.js b/brand.js
new file mode 100644
index 000000000..7a81a7e41
--- /dev/null
+++ b/brand.js
@@ -0,0 +1,4 @@
+var brand =
+{
+ appName: "Jitsi Meet"
+}
diff --git a/css/font.css b/css/font.css
index c03b02c0b..e9fe8c2c7 100755
--- a/css/font.css
+++ b/css/font.css
@@ -99,3 +99,7 @@
.icon-hangup:before {
content: "\e617";
}
+
+.icon-reload:before {
+ content: "\e618";
+}
diff --git a/css/welcome_page.css b/css/welcome_page.css
index 4289ad276..43936adb6 100644
--- a/css/welcome_page.css
+++ b/css/welcome_page.css
@@ -3,59 +3,78 @@
display:none;
}
+.disable_welcome_position
+{
+ margin: -139px auto 0px auto;
+ padding-left: 39px;
+ padding-top: 7px;
+ width: 269px;
+ height: 31px;
+ display:block;
+}
+
#disable_welcome + label
{
background-image: url(../images/welcome_page/disable-welcome.png);
- display:inline-block;
- position:absolute;
- margin-left: 323px;
- height: 54px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
background-repeat: no-repeat;
- padding-left: 62px;
- padding-top: 19px;
font-weight: 500;
font-family: Helvetica;
font-size: 16px;
color: #acacac;
+ z-index: 2;
}
#disable_welcome:checked + label
{
background-image: url(../images/welcome_page/disable-welcome-selected.png);
- display:inline-block;
- position:absolute;
- margin-left: 323px;
- height: 54px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
background-repeat: no-repeat;
- padding-left: 62px;
- padding-top: 19px;
font-weight: 500;
font-family: Helvetica;
font-size: 16px;
color: #acacac;
+ z-index: 2;
}
-
-#enter_room_field {
+#enter_room_form {
border-radius: 10px;
- font-size: 16px;
- padding: 15px 55px 10px 30px;
+ background-color: #FFFFFF;
border: none;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-webkit-appearance: none;
- width: 318px;
height: 55px;
- position:absolute;
+ box-shadow: none;
+ float: left;
+}
+
+#domain_name
+{
+ float: left;
+ padding: 20px 0px 10px 20px;
+ font-size: 18px;
+ font-weight: 500;
+ font-family: Helvetica;
+}
+
+#enter_room_field {
+ font-size: 18px;
+ padding: 15px 0px 10px 10px;
+ border: none;
+ -webkit-appearance: none;
+ width: 228px;
+ height: 55px;
font-weight: 500;
font-family: Helvetica;
box-shadow: none;
+ float: left;
+ background-color: #FFFFFF;
+ position: relative;
z-index: 2;
}
@@ -63,24 +82,29 @@
width: 73px;
height: 45px;
background-color: #16a8fe;
- moz-border-radius: 15px;
- -webkit-border-radius: 15px;
+ moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
color: #ffffff;
font-weight: 600;
border: none;
- position:absolute;
- margin-left: 240px;
margin-top: 5px;
font-size: 19px;
font-family: Helvetica;
padding-top: 6px;
- z-index: 2;
outline: none;
+ float:left;
+ position: relative;
+ z-index: 2;
}
-#enter_room {
+#enter_room_container {
margin: 70px auto 0px auto;
- width:318px;
+ display: table;
+}
+
+#enter_room{
+ float:left;
+ padding-right: 5px;
}
#welcome_page_header
@@ -101,8 +125,10 @@
#jitsi_logo
{
- background-image:url(../images/welcome_page/jitsi-logo.png);
+ background-image:url(../images/watermark.png);
background-repeat: no-repeat;
+ background-size: contain;
+ background-position: center left;
width: 186px;
height: 74px;
position: absolute;
@@ -112,7 +138,10 @@
#brand_logo
{
- background-image:url(../images/welcome_page/brand-logo.png);
+ background-image:url(../images/rightwatermark.png);
+ background-repeat: no-repeat;
+ background-size: contain;
+ background-position: center left;
width: 215px;
height: 55px;
position: absolute;
@@ -124,24 +153,20 @@
#brand_header
{
background-image:url(../images/welcome_page/header-big.png);
- position:absolute;
width: 583px;
height: 274px;
- left: 340px;
- top:15px;
+ margin: -110px auto 0px auto;
}
#header_text
{
- position: absolute;
- left: 200px;
- top: 150px;
width: 885px;
height: 100px;
color: #ffffff;
font-family: Helvetica;
font-size: 24px;
text-align: center;
+ margin: 0px auto 0px auto;
}
#features
@@ -164,6 +189,7 @@
float:left;
width: 169px;
padding-left: 75px;
+ padding-bottom: 30px;
}
.feature_icon
@@ -178,16 +204,28 @@
/*font-weight: bold;*/
text-align: center;
display: table-cell;
- padding: 50px 29px 0px 17px;
+ padding: 50px 26px 0px 20px;
}
.feature_description
{
- width: 169px;
+ width: 190px;
font-family: Helvetica;
color: #ffffff;
font-size: 16px;
padding-top: 30px;
line-height: 22px;
font-weight: 200;
+}
+
+#reload_roomname
+{
+ width: 30px;
+ height: 19px;
+ color: #acacac;
+ margin-top: 22px;
+ z-index: 3;
+ float: left;
+ cursor: pointer;
+ text-align: center;
}
\ No newline at end of file
diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst
index 27337f532..d212637ea 100644
--- a/debian/jitsi-meet-prosody.postinst
+++ b/debian/jitsi-meet-prosody.postinst
@@ -23,12 +23,20 @@ case "$1" in
. /etc/default/jitsi-videobridge
- if [ -x /etc/prosody/prosody.cfg.lua ]; then
- mv /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
+ PROSODY_CONFIG_PRESENT="true"
+ if [ ! -f /etc/prosody/prosody.cfg.lua ]; then
+ PROSODY_CONFIG_PRESENT="false"
+ gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
fi
- gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
- sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
- sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
+
+ if [ ! grep "VirtualHost \"$JVB_HOSTNAME\"" /etc/prosody/prosody.cfg.lua > /dev/null ]; then
+ if [ "PROSODY_CONFIG_PRESENT" = "true" ]; then
+ mv /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
+ fi
+ sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
+ sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
+ fi
+
if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then
HOST="$( (hostname -s; echo localhost) | head -n 1)"
DOMAIN="$( (hostname -d; echo localdomain) | head -n 1)"
diff --git a/debian/jitsi-meet-prosody.postrm b/debian/jitsi-meet-prosody.postrm
index 330d19fcf..7dcfc26cd 100644
--- a/debian/jitsi-meet-prosody.postrm
+++ b/debian/jitsi-meet-prosody.postrm
@@ -23,13 +23,13 @@ set -e
case "$1" in
- purge|remove)
+ remove)
if [ -x "/etc/init.d/prosody" ]; then
invoke-rc.d nginx reload
fi
;;
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
diff --git a/debian/jitsi-meet.postinst b/debian/jitsi-meet.postinst
index eab06e568..015541dca 100644
--- a/debian/jitsi-meet.postinst
+++ b/debian/jitsi-meet.postinst
@@ -23,15 +23,14 @@ case "$1" in
# nginx conf
. /etc/default/jitsi-videobridge
- cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf
- if [ ! -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf ]; then
- ln -s /etc/nginx/sites-available/$JVB_HOSTNAME.conf /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
- fi
- sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /etc/nginx/sites-available/$JVB_HOSTNAME.conf
- # FIXME do we need the default?
- if [ ! -f /etc/nginx/sites-enabled/default ]; then
- ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
+ if [ ! -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf ]; then
+ cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf
+ if [ ! -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf ]; then
+ ln -s /etc/nginx/sites-available/$JVB_HOSTNAME.conf /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
+ fi
+ sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /etc/nginx/sites-available/$JVB_HOSTNAME.conf
fi
+
if grep "# server_names_hash_bucket_size 64" /etc/nginx/nginx.conf > /dev/null; then
sed -i "s/#\ server_names_hash_bucket_size\ 64/\ server_names_hash_bucket_size\ 64/" /etc/nginx/nginx.conf
fi
@@ -40,9 +39,9 @@ case "$1" in
chown -R www-data:www-data /usr/share/jitsi-meet/
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /usr/share/jitsi-meet/config.js
# enable turn
- if grep "// useStunTurn: true," /usr/share/jitsi-meet/config.js > /dev/null; then
- sed -i "s/\/\/\ \ useStunTurn:\ true,/\ \ \ \ useStunTurn:\ true,/" /usr/share/jitsi-meet/config.js
- fi
+ #if grep "// useStunTurn: true," /usr/share/jitsi-meet/config.js > /dev/null; then
+ # sed -i "s/\/\/\ \ useStunTurn:\ true,/\ \ \ \ useStunTurn:\ true,/" /usr/share/jitsi-meet/config.js
+ #fi
invoke-rc.d nginx restart
;;
diff --git a/debian/jitsi-meet.postrm b/debian/jitsi-meet.postrm
index 89619fa24..69de75d3a 100644
--- a/debian/jitsi-meet.postrm
+++ b/debian/jitsi-meet.postrm
@@ -23,13 +23,13 @@ set -e
case "$1" in
- purge|remove)
+ remove)
if [ -x "/etc/init.d/nginx" ]; then
invoke-rc.d nginx reload
fi
;;
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
diff --git a/fonts/jitsi.eot b/fonts/jitsi.eot
index 9aafd530f..fe5029e8a 100755
Binary files a/fonts/jitsi.eot and b/fonts/jitsi.eot differ
diff --git a/fonts/jitsi.svg b/fonts/jitsi.svg
index 2e319a98a..6f504253b 100755
--- a/fonts/jitsi.svg
+++ b/fonts/jitsi.svg
@@ -31,4 +31,5 @@