aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2019-07-12 15:45:26 -0300
committerJonas Smedegaard <dr@jones.dk>2019-07-12 15:45:26 -0300
commit6320a271a208e888dcdc347be6de7d8a083aa78d (patch)
tree0559dcfec00d786f034792b5fe7b719b2bea87f3 /website
parent3d6fc1f691ab7d790bfa76c199131affc28faecc (diff)
Hide username registration until stream is selected.
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});