Added JitsiConference.leave() when the hangup button is pressed

This commit is contained in:
hristoterezov 2016-04-18 17:02:34 -05:00
parent 2b7ae5c167
commit 73b4ad5a63
1 changed files with 7 additions and 7 deletions

View File

@ -123,15 +123,15 @@ function muteLocalVideo (muted) {
* @param {boolean} [requestFeedback=false] if user feedback should be requested
*/
function hangup (requestFeedback = false) {
let promise = Promise.resolve();
if (requestFeedback) {
promise = APP.UI.requestFeedback();
}
promise.then(function () {
APP.conference._room.leave().then(() => {
connection.disconnect();
let promise = Promise.resolve();
if (requestFeedback) {
promise = APP.UI.requestFeedback();
}
return promise;
}).then(function () {
if (!config.enableWelcomePage) {
return;
}