modification to disable join button after click

This commit is contained in:
david 2021-05-31 16:49:49 +02:00
parent 122a0ab52b
commit c7491223bf
2 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,12 @@ var numVideos = 0;
/* OPENVIDU METHODS */
function joinSession() {
// --- 0) Change the button ---
document.getElementById("join-btn").disabled = true;
document.getElementById("join-btn").innerHTML = "Joining...";
getToken(function () {
// --- 1) Get an OpenVidu object ---
@ -178,6 +184,8 @@ function leaveSession() {
// --- 9) Leave the session by calling 'disconnect' method over the Session object ---
session.disconnect();
document.getElementById("join-btn").disabled = false;
document.getElementById("join-btn").innerHTML = "Join!";
}

View File

@ -9,6 +9,12 @@ var numVideos = 0;
/* OPENVIDU METHODS */
function joinSession() {
// --- 0) Change the button ---
document.getElementById("join-btn").disabled = true;
document.getElementById("join-btn").innerHTML = "Joining...";
getToken(function () {
// --- 1) Get an OpenVidu object ---
@ -178,6 +184,8 @@ function leaveSession() {
// --- 9) Leave the session by calling 'disconnect' method over the Session object ---
session.disconnect();
document.getElementById("join-btn").disabled = false;
document.getElementById("join-btn").innerHTML = "Join!";
}