Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds shared screen media type to presence. Removes unnecessary log msg.

paweldomasa1a0f5d4cf6a
diff --git a/app.js b/app.js
index ac50c54a06..effe0fd80c 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 cde73c4925..8da4b2af9e 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 {