Hooks up participant pinning into lastN functionality.
This commit is contained in:
parent
de7cc0b52b
commit
1ac99309e7
24
app.js
24
app.js
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue