Fixes problem with resetting focusedVideoInfo when participant leaves the room. Fixes error when display name is processed after participant has left.

This commit is contained in:
paweldomas 2015-06-02 17:25:10 +02:00
parent 797036e888
commit b038d276c9
3 changed files with 18615 additions and 18627 deletions

View File

@ -19,7 +19,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=81"></script>
<script src="libs/app.bundle.js?v=82"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=7"/>
<link rel="stylesheet" href="css/toastr.css?v=1">

File diff suppressed because it is too large Load Diff

View File

@ -186,6 +186,13 @@ function getCameraVideoSize(videoWidth,
* Sets the display name for the given video span id.
*/
function setDisplayName(videoSpanId, displayName, key) {
if (!$('#' + videoSpanId).length) {
console.warn(
"Unable to set displayName - " + videoSpanId + " does not exist");
return;
}
var nameSpan = $('#' + videoSpanId + '>span.displayname');
var defaultLocalDisplayName = APP.translation.generateTranslatonHTML(
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
@ -2281,7 +2288,8 @@ var VideoLayout = (function (my) {
my.participantLeft = function (jid) {
// Unlock large video
if (focusedVideoInfo && focusedVideoInfo.jid === jid)
var resourceJid = Strophe.getResourceFromJid(jid);
if (focusedVideoInfo && focusedVideoInfo.resourceJid === resourceJid)
{
console.info("Focused video owner has left the conference");
focusedVideoInfo = null;