|
@@ -483,7 +483,12 @@ $(document).bind('setLocalDescription.jingle', function (event, sid) {
|
483
|
483
|
var i = 0;
|
484
|
484
|
Object.keys(newssrcs).forEach(function (mtype) {
|
485
|
485
|
i++;
|
486
|
|
- connection.emuc.addMediaToPresence(i, mtype, newssrcs[mtype], directions[mtype]);
|
|
486
|
+ var type = mtype;
|
|
487
|
+ // Change video type to screen
|
|
488
|
+ if(mtype === 'video' && isUsingScreenStream) {
|
|
489
|
+ type = 'screen';
|
|
490
|
+ }
|
|
491
|
+ connection.emuc.addMediaToPresence(i, type, newssrcs[mtype], directions[mtype]);
|
487
|
492
|
});
|
488
|
493
|
if (i > 0) {
|
489
|
494
|
connection.emuc.sendPresence();
|
|
@@ -597,8 +602,9 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
|
597
|
602
|
//console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
|
598
|
603
|
ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
|
599
|
604
|
|
|
605
|
+ var type = ssrc.getAttribute('type');
|
600
|
606
|
// might need to update the direction if participant just went from sendrecv to recvonly
|
601
|
|
- if (ssrc.getAttribute('type') === 'video') {
|
|
607
|
+ if (type === 'video' || type === 'screen') {
|
602
|
608
|
var el = $('#participant_' + Strophe.getResourceFromJid(jid) + '>video');
|
603
|
609
|
switch(ssrc.getAttribute('direction')) {
|
604
|
610
|
case 'sendrecv':
|
|
@@ -610,6 +616,14 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
|
610
|
616
|
//checkChangeLargeVideo(el);
|
611
|
617
|
break;
|
612
|
618
|
}
|
|
619
|
+ // Camera video or shared screen ?
|
|
620
|
+ if (type === 'screen') {
|
|
621
|
+ // Shared screen
|
|
622
|
+ //console.info("Have screen ssrc from "+jid, ssrc);
|
|
623
|
+ } else {
|
|
624
|
+ // Camera video
|
|
625
|
+ //console.info("Have camera ssrc from "+jid, ssrc);
|
|
626
|
+ }
|
613
|
627
|
}
|
614
|
628
|
});
|
615
|
629
|
|