diff --git a/openvidu-js-java/src/main/resources/static/app.js b/openvidu-js-java/src/main/resources/static/app.js index 0d045aef..c9d01512 100644 --- a/openvidu-js-java/src/main/resources/static/app.js +++ b/openvidu-js-java/src/main/resources/static/app.js @@ -1,10 +1,11 @@ var OV; -var userName; var session; -var sessionName; -var participantName; + var sessionId; var token; +var nickName; +var userName; +var sessionName; /* OPENVIDU METHODS */ @@ -30,7 +31,7 @@ function joinSession() { // When the HTML video has been appended to DOM... subscriber.on('videoElementCreated', function (event) { - // Add a new

element for the user's name and nickname just below its video + // Add a new HTML element for the user's name and nickname over its video appendUserData(event.element, subscriber.stream.connection); }); }); @@ -44,7 +45,7 @@ function joinSession() { // --- 3) Connect to the session passing the retrieved token and some more data from // the client (in this case a JSON with the nickname chosen by the user) --- - session.connect(token, '{"clientData": "' + participantName + '"}', function (error) { + session.connect(token, '{"clientData": "' + nickName + '"}', function (error) { // If the connection is successful, initialize a publisher and publish to the session if (!error) { @@ -66,7 +67,7 @@ function joinSession() { // When our HTML video has been added to DOM... publisher.on('videoElementCreated', function (event) { // Init the main video with ours and append our data - var userData = {nickName: participantName, userName: userName}; + var userData = {nickName: nickName, userName: userName}; initMainVideo(event.element, userData); appendUserData(event.element, userData); }); @@ -78,7 +79,7 @@ function joinSession() { } else { console.warn('You don\'t have permissions to publish'); - initMainVideoThumbnail(); + initMainVideoThumbnail(); // Show SUBSCRIBER message in main video } } else { console.warn('There was an error connecting to the session:', error.code, error.message); @@ -142,7 +143,7 @@ function logOut() { } function getSessionIdAndToken(callback) { - participantName = $("#participantName").val(); + nickName = $("#participantName").val(); sessionName = $("#sessionName").val(); var jsonBody = JSON.stringify({ 'session': sessionName diff --git a/openvidu-js-java/src/main/resources/static/index.html b/openvidu-js-java/src/main/resources/static/index.html index 1a09c903..fe335107 100644 --- a/openvidu-js-java/src/main/resources/static/index.html +++ b/openvidu-js-java/src/main/resources/static/index.html @@ -42,15 +42,13 @@

- - +

- - +

- +

diff --git a/openvidu-js-node/public/app.js b/openvidu-js-node/public/app.js index 0d045aef..c9d01512 100644 --- a/openvidu-js-node/public/app.js +++ b/openvidu-js-node/public/app.js @@ -1,10 +1,11 @@ var OV; -var userName; var session; -var sessionName; -var participantName; + var sessionId; var token; +var nickName; +var userName; +var sessionName; /* OPENVIDU METHODS */ @@ -30,7 +31,7 @@ function joinSession() { // When the HTML video has been appended to DOM... subscriber.on('videoElementCreated', function (event) { - // Add a new

element for the user's name and nickname just below its video + // Add a new HTML element for the user's name and nickname over its video appendUserData(event.element, subscriber.stream.connection); }); }); @@ -44,7 +45,7 @@ function joinSession() { // --- 3) Connect to the session passing the retrieved token and some more data from // the client (in this case a JSON with the nickname chosen by the user) --- - session.connect(token, '{"clientData": "' + participantName + '"}', function (error) { + session.connect(token, '{"clientData": "' + nickName + '"}', function (error) { // If the connection is successful, initialize a publisher and publish to the session if (!error) { @@ -66,7 +67,7 @@ function joinSession() { // When our HTML video has been added to DOM... publisher.on('videoElementCreated', function (event) { // Init the main video with ours and append our data - var userData = {nickName: participantName, userName: userName}; + var userData = {nickName: nickName, userName: userName}; initMainVideo(event.element, userData); appendUserData(event.element, userData); }); @@ -78,7 +79,7 @@ function joinSession() { } else { console.warn('You don\'t have permissions to publish'); - initMainVideoThumbnail(); + initMainVideoThumbnail(); // Show SUBSCRIBER message in main video } } else { console.warn('There was an error connecting to the session:', error.code, error.message); @@ -142,7 +143,7 @@ function logOut() { } function getSessionIdAndToken(callback) { - participantName = $("#participantName").val(); + nickName = $("#participantName").val(); sessionName = $("#sessionName").val(); var jsonBody = JSON.stringify({ 'session': sessionName diff --git a/openvidu-js-node/public/index.html b/openvidu-js-node/public/index.html index 1f099055..564685d8 100644 --- a/openvidu-js-node/public/index.html +++ b/openvidu-js-node/public/index.html @@ -42,15 +42,13 @@

- - +

- - +

- +

diff --git a/openvidu-mvc-java/src/main/resources/templates/dashboard.html b/openvidu-mvc-java/src/main/resources/templates/dashboard.html index 02bc6ef8..dbe9abc4 100644 --- a/openvidu-mvc-java/src/main/resources/templates/dashboard.html +++ b/openvidu-mvc-java/src/main/resources/templates/dashboard.html @@ -43,14 +43,14 @@

- +

- +

- +

diff --git a/openvidu-mvc-java/src/main/resources/templates/index.html b/openvidu-mvc-java/src/main/resources/templates/index.html index 259c119f..045080d8 100644 --- a/openvidu-mvc-java/src/main/resources/templates/index.html +++ b/openvidu-mvc-java/src/main/resources/templates/index.html @@ -41,14 +41,14 @@

- +

- +

- +

diff --git a/openvidu-mvc-java/src/main/resources/templates/session.html b/openvidu-mvc-java/src/main/resources/templates/session.html index b0d1d136..807af9c1 100644 --- a/openvidu-mvc-java/src/main/resources/templates/session.html +++ b/openvidu-mvc-java/src/main/resources/templates/session.html @@ -38,7 +38,8 @@ - +
@@ -61,10 +62,11 @@