aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/mic.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/website/mic.js b/website/mic.js
index ecbd682..980d450 100644
--- a/website/mic.js
+++ b/website/mic.js
@@ -239,16 +239,6 @@ $(document).ready(function() {
$('#details').remove();
mixertest = pluginHandle;
Janus.log("Plugin attached! (" + mixertest.getPlugin() + ", id=" + mixertest.getId() + ")");
- // Prepare the username registration
- $('#audiojoin').removeClass('hide').show();
- $('#registernow').removeClass('hide').show();
- $('#register').click(registerUsername);
- $('#username').focus();
- $('#start').removeAttr('disabled').html("Stop")
- .click(function() {
- $(this).attr('disabled', true);
- janus.destroy();
- });
},
error: function(error) {
Janus.error(" -- Error attaching plugin...", error);
@@ -480,6 +470,7 @@ $(document).ready(function() {
});
function updateStreamsList() {
+ $('#audiojoin').hide();
$('#update-streams').unbind('click').addClass('fa-spin');
var body = { "request": "list" };
Janus.debug("Sending message (" + JSON.stringify(body) + ")");
@@ -532,9 +523,20 @@ function startStream() {
} else {
spinner.spin();
}
+ // Prepare the username registration
+ $('#audiojoin').removeClass('hide').show();
+ $('#registernow').removeClass('hide').show();
+ $('#register').click(registerUsername);
+ $('#username').focus();
+ $('#start').removeAttr('disabled').html("Stop")
+ .click(function() {
+ $(this).attr('disabled', true);
+ janus.destroy();
+ });
}
function stopStream() {
+ $('#audiojoin').hide();
$('#watch').attr('disabled', true).unbind('click');
var body = { "request": "stop" };
streaming.send({"message": body});