|
|
@@ -5,6 +5,7 @@ import BridgeVideoType from '../../service/RTC/BridgeVideoType';
|
|
5
|
5
|
import * as MediaType from '../../service/RTC/MediaType';
|
|
6
|
6
|
import RTCEvents from '../../service/RTC/RTCEvents';
|
|
7
|
7
|
import browser from '../browser';
|
|
|
8
|
+import FeatureFlags from '../flags/FeatureFlags';
|
|
8
|
9
|
import Statistics from '../statistics/statistics';
|
|
9
|
10
|
import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
|
|
10
|
11
|
import Listenable from '../util/Listenable';
|
|
|
@@ -149,7 +150,12 @@ export default class RTC extends Listenable {
|
|
149
|
150
|
this._updateAudioOutputForAudioTracks
|
|
150
|
151
|
= this._updateAudioOutputForAudioTracks.bind(this);
|
|
151
|
152
|
|
|
152
|
|
- // The default video type assumed by the bridge.
|
|
|
153
|
+ /**
|
|
|
154
|
+ * The default video type assumed by the bridge.
|
|
|
155
|
+ * @deprecated this will go away with multiple streams support
|
|
|
156
|
+ * @type {BridgeVideoType}
|
|
|
157
|
+ * @private
|
|
|
158
|
+ */
|
|
153
|
159
|
this._videoType = BridgeVideoType.NONE;
|
|
154
|
160
|
|
|
155
|
161
|
// Switch audio output device on all remote audio tracks. Local audio
|
|
|
@@ -256,10 +262,12 @@ export default class RTC extends Listenable {
|
|
256
|
262
|
logError(error, 'LastNChangedEvent', this._lastN);
|
|
257
|
263
|
}
|
|
258
|
264
|
}
|
|
259
|
|
- try {
|
|
260
|
|
- this._channel.sendVideoTypeMessage(this._videoType);
|
|
261
|
|
- } catch (error) {
|
|
262
|
|
- logError(error, 'VideoTypeMessage', this._videoType);
|
|
|
265
|
+ if (!FeatureFlags.isSourceNameSignalingEnabled()) {
|
|
|
266
|
+ try {
|
|
|
267
|
+ this._channel.sendVideoTypeMessage(this._videoType);
|
|
|
268
|
+ } catch (error) {
|
|
|
269
|
+ logError(error, 'VideoTypeMessage', this._videoType);
|
|
|
270
|
+ }
|
|
263
|
271
|
}
|
|
264
|
272
|
|
|
265
|
273
|
this.removeListener(RTCEvents.DATA_CHANNEL_OPEN, this._channelOpenListener);
|
|
|
@@ -384,6 +392,17 @@ export default class RTC extends Listenable {
|
|
384
|
392
|
}
|
|
385
|
393
|
}
|
|
386
|
394
|
|
|
|
395
|
+ /**
|
|
|
396
|
+ * Sends the track's video type to the JVB.
|
|
|
397
|
+ * @param {SourceName} sourceName - the track's source name.
|
|
|
398
|
+ * @param {BridgeVideoType} videoType - the track's video type.
|
|
|
399
|
+ */
|
|
|
400
|
+ sendSourceVideoType(sourceName, videoType) {
|
|
|
401
|
+ if (this._channel && this._channel.isOpen()) {
|
|
|
402
|
+ this._channel.sendSourceVideoTypeMessage(sourceName, videoType);
|
|
|
403
|
+ }
|
|
|
404
|
+ }
|
|
|
405
|
+
|
|
387
|
406
|
/**
|
|
388
|
407
|
* Elects the participants with the given ids to be the selected
|
|
389
|
408
|
* participants in order to always receive video for this participant (even
|