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;
|
||||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue