Merge branch 'lib-jitsi-meet' of github.com:jitsi/jitsi-meet into lib-jitsi-meet

This commit is contained in:
hristoterezov 2016-01-12 15:59:10 -06:00
commit c69fa7b1f6
3 changed files with 28 additions and 12 deletions

View File

@ -1578,6 +1578,7 @@ function DataChannels(peerConnection, emitter) {
DataChannels.prototype.onDataChannel = function (event) {
var dataChannel = event.channel;
var self = this;
var lastSelectedEndpoint = null;
dataChannel.onopen = function () {
logger.info("Data channel opened by the Videobridge!", dataChannel);
@ -1589,6 +1590,12 @@ DataChannels.prototype.onDataChannel = function (event) {
//dataChannel.send(new ArrayBuffer(12));
self.eventEmitter.emit(RTCEvents.DATA_CHANNEL_OPEN);
// when the data channel becomes available, tell the bridge about video
// selections so that it can do adaptive simulcast,
// we want the notification to trigger even if userJid is undefined,
// or null.
this.handleSelectedEndpointEvent(this.lastSelectedEndpoint);
};
dataChannel.onerror = function (error) {
@ -1679,6 +1686,7 @@ DataChannels.prototype.onDataChannel = function (event) {
};
DataChannels.prototype.handleSelectedEndpointEvent = function (userResource) {
this.lastSelectedEndpoint = userResource;
this._onXXXEndpointChanged("selected", userResource);
}

24
lib-jitsi-meet.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -50,6 +50,7 @@ function DataChannels(peerConnection, emitter) {
DataChannels.prototype.onDataChannel = function (event) {
var dataChannel = event.channel;
var self = this;
var lastSelectedEndpoint = null;
dataChannel.onopen = function () {
logger.info("Data channel opened by the Videobridge!", dataChannel);
@ -61,6 +62,12 @@ DataChannels.prototype.onDataChannel = function (event) {
//dataChannel.send(new ArrayBuffer(12));
self.eventEmitter.emit(RTCEvents.DATA_CHANNEL_OPEN);
// when the data channel becomes available, tell the bridge about video
// selections so that it can do adaptive simulcast,
// we want the notification to trigger even if userJid is undefined,
// or null.
this.handleSelectedEndpointEvent(this.lastSelectedEndpoint);
};
dataChannel.onerror = function (error) {
@ -151,6 +158,7 @@ DataChannels.prototype.onDataChannel = function (event) {
};
DataChannels.prototype.handleSelectedEndpointEvent = function (userResource) {
this.lastSelectedEndpoint = userResource;
this._onXXXEndpointChanged("selected", userResource);
}