Hooks up participant pinning into lastN functionality.

This commit is contained in:
George Politis 2014-11-20 16:51:05 +01:00
parent de7cc0b52b
commit 1ac99309e7
2 changed files with 27 additions and 0 deletions

24
app.js
View File

@ -1560,6 +1560,30 @@ $(document).bind("selectedendpointchanged", function(event, userJid) {
onSelectedEndpointChanged(userJid);
});
function onPinnedEndpointChanged(userJid)
{
console.log('pinned endpoint changed: ', userJid);
if (_dataChannels && _dataChannels.length != 0)
{
_dataChannels.some(function (dataChannel) {
if (dataChannel.readyState == 'open')
{
dataChannel.send(JSON.stringify({
'colibriClass': 'PinnedEndpointChangedEvent',
'pinnedEndpoint': (!userJid || userJid == null)
? null : Strophe.getResourceFromJid(userJid)
}));
return true;
}
});
}
}
$(document).bind("pinnedendpointchanged", function(event, userJid) {
onPinnedEndpointChanged(userJid);
});
function callSipButtonClicked()
{
var defaultNumber

View File

@ -263,6 +263,7 @@ var VideoLayout = (function (my) {
}
}
$(document).trigger("pinnedendpointchanged");
return;
}
@ -275,6 +276,8 @@ var VideoLayout = (function (my) {
{
var container = getParticipantContainer(userJid);
container.addClass("videoContainerFocused");
$(document).trigger("pinnedendpointchanged", [userJid]);
}
// Triggers a "video.selected" event. The "false" parameter indicates