diff --git a/app.js b/app.js index ac50c54a0..effe0fd80 100644 --- a/app.js +++ b/app.js @@ -483,7 +483,12 @@ $(document).bind('setLocalDescription.jingle', function (event, sid) { var i = 0; Object.keys(newssrcs).forEach(function (mtype) { i++; - connection.emuc.addMediaToPresence(i, mtype, newssrcs[mtype], directions[mtype]); + var type = mtype; + // Change video type to screen + if(mtype === 'video' && isUsingScreenStream) { + type = 'screen'; + } + connection.emuc.addMediaToPresence(i, type, newssrcs[mtype], directions[mtype]); }); if (i > 0) { connection.emuc.sendPresence(); @@ -597,8 +602,9 @@ $(document).bind('presence.muc', function (event, jid, info, pres) { //console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc')); ssrc2jid[ssrc.getAttribute('ssrc')] = jid; + var type = ssrc.getAttribute('type'); // might need to update the direction if participant just went from sendrecv to recvonly - if (ssrc.getAttribute('type') === 'video') { + if (type === 'video' || type === 'screen') { var el = $('#participant_' + Strophe.getResourceFromJid(jid) + '>video'); switch(ssrc.getAttribute('direction')) { case 'sendrecv': @@ -610,6 +616,14 @@ $(document).bind('presence.muc', function (event, jid, info, pres) { //checkChangeLargeVideo(el); break; } + // Camera video or shared screen ? + if (type === 'screen') { + // Shared screen + //console.info("Have screen ssrc from "+jid, ssrc); + } else { + // Camera video + //console.info("Have camera ssrc from "+jid, ssrc); + } } }); diff --git a/desktopsharing.js b/desktopsharing.js index cde73c492..8da4b2af9 100644 --- a/desktopsharing.js +++ b/desktopsharing.js @@ -120,7 +120,6 @@ function newStreamCreated(stream) { var conferenceHandler = getConferenceHandler(); if(conferenceHandler) { - console.info("Conference considered as started"); // FIXME: will block switchInProgress on true value in case of exception conferenceHandler.switchStreams(stream, oldStream, streamSwitchDone); } else {