FS-8300 [verto_communicator] Fixing reload bug, no need to do two times now.

This commit is contained in:
Italo Rossi 2015-10-05 23:09:54 -03:00
parent 85f9244dc3
commit cb2588d88c
1 changed files with 10 additions and 1 deletions

View File

@ -528,7 +528,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
cleanShareCall(that);
} else {
stopConference();
cleanCall();
if (!that.reloaded) {
cleanCall();
}
}
break;
default:
@ -571,6 +573,13 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
iceServers: storage.data.useSTUN
}, callbacks);
// We need to know when user reloaded page and not react to
// verto events in order to not stop the reload and redirect user back
// to the dialpad.
that.reloaded = false;
jQuery.verto.unloadJobs.push(function() {
that.reloaded = true;
});
data.instance.deviceParams({
useCamera: storage.data.selectedVideo,
useMic: storage.data.selectedAudio,