Adds shared screen media type to presence. Removes unnecessary log msg.
This commit is contained in:
parent
5efe0cb2f9
commit
a1a0f5d4cf
18
app.js
18
app.js
|
@ -483,7 +483,12 @@ $(document).bind('setLocalDescription.jingle', function (event, sid) {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
Object.keys(newssrcs).forEach(function (mtype) {
|
Object.keys(newssrcs).forEach(function (mtype) {
|
||||||
i++;
|
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) {
|
if (i > 0) {
|
||||||
connection.emuc.sendPresence();
|
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'));
|
//console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
|
||||||
ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
|
ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
|
||||||
|
|
||||||
|
var type = ssrc.getAttribute('type');
|
||||||
// might need to update the direction if participant just went from sendrecv to recvonly
|
// 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');
|
var el = $('#participant_' + Strophe.getResourceFromJid(jid) + '>video');
|
||||||
switch(ssrc.getAttribute('direction')) {
|
switch(ssrc.getAttribute('direction')) {
|
||||||
case 'sendrecv':
|
case 'sendrecv':
|
||||||
|
@ -610,6 +616,14 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
|
||||||
//checkChangeLargeVideo(el);
|
//checkChangeLargeVideo(el);
|
||||||
break;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,6 @@ function newStreamCreated(stream) {
|
||||||
|
|
||||||
var conferenceHandler = getConferenceHandler();
|
var conferenceHandler = getConferenceHandler();
|
||||||
if(conferenceHandler) {
|
if(conferenceHandler) {
|
||||||
console.info("Conference considered as started");
|
|
||||||
// FIXME: will block switchInProgress on true value in case of exception
|
// FIXME: will block switchInProgress on true value in case of exception
|
||||||
conferenceHandler.switchStreams(stream, oldStream, streamSwitchDone);
|
conferenceHandler.switchStreams(stream, oldStream, streamSwitchDone);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue