ServerConfiguration/Calla/Calla-Lib/basic/index.js
/**
 * We need a "user gesture" to create AudioContext objects. The user clicking
 * on the login button is the most natural place for that.
 **/
We need a "user gesture" to create AudioContext objects. The user clicking
on the login button is the most natural place for that.
We need a " user gesture " to create AudioContext objects . The user clicking on the login button is the most natural place for that .
function connect() {
    const roomName = controls.roomName.value;
    const userName = controls.userName.value;
    let message = "";
    if (roomName.length === 0) {
        message += "\n   Room name is required";
    }
    if (userName.length === 0) {
        message += "\n   User name is required";
    }
    if (message.length > 0) {
        message = "Required fields missing:" + message;
        alert(message);
        return;
    }
    controls.roomName.disabled = true;
    controls.userName.disabled = true;
    controls.connect.disabled = true;
    client.startAudio();
    client.join(roomName, userName);
}
function connect ( ) { const roomName = controls . roomName . value ; const userName = controls . userName . value ; let message = "" ; if ( roomName . length === 0 ) { message += "\n   Room name is required" ; } if ( userName . length === 0 ) { message += "\n   User name is required" ; } if ( message . length > 0 ) { message = "Required fields missing:" + message ; alert ( message ) ; return ; } controls . roomName . disabled = true ; controls . userName . disabled = true ; controls . connect . disabled = true ; client . startAudio ( ) ; client . join ( roomName , userName ) ; }
We need a "user gesture" to create AudioContext objects.
We need a " user gesture " to create AudioContext objects .
// Validate the user input values... // initialize the audio. // and start the connection.