|
@@ -84,10 +84,10 @@ DataChannels.prototype.onDataChannel = function(event) {
|
84
|
84
|
dataChannel,
|
85
|
85
|
e);
|
86
|
86
|
}
|
87
|
|
- if (('undefined' !== typeof obj) && (null !== obj)) {
|
|
87
|
+ if ((typeof obj !== 'undefined') && (obj !== null)) {
|
88
|
88
|
const colibriClass = obj.colibriClass;
|
89
|
89
|
|
90
|
|
- if ('DominantSpeakerEndpointChangeEvent' === colibriClass) {
|
|
90
|
+ if (colibriClass === 'DominantSpeakerEndpointChangeEvent') {
|
91
|
91
|
// Endpoint ID from the Videobridge.
|
92
|
92
|
const dominantSpeakerEndpoint = obj.dominantSpeakerEndpoint;
|
93
|
93
|
|
|
@@ -96,7 +96,7 @@ DataChannels.prototype.onDataChannel = function(event) {
|
96
|
96
|
dominantSpeakerEndpoint);
|
97
|
97
|
self.eventEmitter.emit(RTCEvents.DOMINANT_SPEAKER_CHANGED,
|
98
|
98
|
dominantSpeakerEndpoint);
|
99
|
|
- } else if ('InLastNChangeEvent' === colibriClass) {
|
|
99
|
+ } else if (colibriClass === 'InLastNChangeEvent') {
|
100
|
100
|
let oldValue = obj.oldValue;
|
101
|
101
|
let newValue = obj.newValue;
|
102
|
102
|
|
|
@@ -119,7 +119,7 @@ DataChannels.prototype.onDataChannel = function(event) {
|
119
|
119
|
}
|
120
|
120
|
|
121
|
121
|
self.eventEmitter.emit(RTCEvents.LASTN_CHANGED, oldValue, newValue);
|
122
|
|
- } else if ('LastNEndpointsChangeEvent' === colibriClass) {
|
|
122
|
+ } else if (colibriClass === 'LastNEndpointsChangeEvent') {
|
123
|
123
|
// The new/latest list of last-n endpoint IDs.
|
124
|
124
|
const lastNEndpoints = obj.lastNEndpoints;
|
125
|
125
|
// The list of endpoint IDs which are entering the list of
|
|
@@ -132,11 +132,11 @@ DataChannels.prototype.onDataChannel = function(event) {
|
132
|
132
|
lastNEndpoints, endpointsEnteringLastN, obj);
|
133
|
133
|
self.eventEmitter.emit(RTCEvents.LASTN_ENDPOINT_CHANGED,
|
134
|
134
|
lastNEndpoints, endpointsEnteringLastN, obj);
|
135
|
|
- } else if('EndpointMessage' === colibriClass) {
|
|
135
|
+ } else if(colibriClass === 'EndpointMessage') {
|
136
|
136
|
self.eventEmitter.emit(
|
137
|
137
|
RTCEvents.ENDPOINT_MESSAGE_RECEIVED, obj.from,
|
138
|
138
|
obj.msgPayload);
|
139
|
|
- } else if ('EndpointConnectivityStatusChangeEvent' === colibriClass) {
|
|
139
|
+ } else if (colibriClass === 'EndpointConnectivityStatusChangeEvent') {
|
140
|
140
|
const endpoint = obj.endpoint;
|
141
|
141
|
const isActive = obj.active === 'true';
|
142
|
142
|
|