|
@@ -1120,10 +1120,14 @@ JitsiConference.prototype.replaceTrack = function(oldTrack, newTrack) {
|
1120
|
1120
|
if (oldTrack) {
|
1121
|
1121
|
this.onLocalTrackRemoved(oldTrack);
|
1122
|
1122
|
}
|
|
1123
|
+
|
|
1124
|
+ // Send 'VideoTypeMessage' on the bridge channel for the new track.
|
1123
|
1125
|
if (newTrack) {
|
1124
|
|
- // Now handle the addition of the newTrack at the
|
1125
|
|
- // JitsiConference level
|
|
1126
|
+ // Now handle the addition of the newTrack at the JitsiConference level
|
1126
|
1127
|
this._setupNewTrack(newTrack);
|
|
1128
|
+ newTrack.isVideoTrack() && this.rtc.setVideoType(newTrack.videoType);
|
|
1129
|
+ } else {
|
|
1130
|
+ oldTrack && oldTrack.isVideoTrack() && this.rtc.setVideoType(VideoType.NONE);
|
1127
|
1131
|
}
|
1128
|
1132
|
|
1129
|
1133
|
return Promise.resolve();
|
|
@@ -1229,20 +1233,20 @@ JitsiConference.prototype._addLocalTrackAsUnmute = function(track) {
|
1229
|
1233
|
if (this.jvbJingleSession) {
|
1230
|
1234
|
addAsUnmutePromises.push(this.jvbJingleSession.addTrackAsUnmute(track));
|
1231
|
1235
|
} else {
|
1232
|
|
- logger.info(
|
1233
|
|
- 'Add local MediaStream as unmute -'
|
1234
|
|
- + ' no JVB Jingle session started yet');
|
|
1236
|
+ logger.debug('Add local MediaStream as unmute - no JVB Jingle session started yet');
|
1235
|
1237
|
}
|
1236
|
1238
|
|
1237
|
1239
|
if (this.p2pJingleSession) {
|
1238
|
1240
|
addAsUnmutePromises.push(this.p2pJingleSession.addTrackAsUnmute(track));
|
1239
|
1241
|
} else {
|
1240
|
|
- logger.info(
|
1241
|
|
- 'Add local MediaStream as unmute -'
|
1242
|
|
- + ' no P2P Jingle session started yet');
|
|
1242
|
+ logger.debug('Add local MediaStream as unmute - no P2P Jingle session started yet');
|
1243
|
1243
|
}
|
1244
|
1244
|
|
1245
|
|
- return Promise.all(addAsUnmutePromises);
|
|
1245
|
+ return Promise.allSettled(addAsUnmutePromises)
|
|
1246
|
+ .then(() => {
|
|
1247
|
+ // Signal the video type to the bridge.
|
|
1248
|
+ track.isVideoTrack() && this.rtc.setVideoType(track.videoType);
|
|
1249
|
+ });
|
1246
|
1250
|
};
|
1247
|
1251
|
|
1248
|
1252
|
/**
|
|
@@ -1256,21 +1260,21 @@ JitsiConference.prototype._removeLocalTrackAsMute = function(track) {
|
1256
|
1260
|
const removeAsMutePromises = [];
|
1257
|
1261
|
|
1258
|
1262
|
if (this.jvbJingleSession) {
|
1259
|
|
- removeAsMutePromises.push(
|
1260
|
|
- this.jvbJingleSession.removeTrackAsMute(track));
|
|
1263
|
+ removeAsMutePromises.push(this.jvbJingleSession.removeTrackAsMute(track));
|
1261
|
1264
|
} else {
|
1262
|
|
- logger.info(
|
1263
|
|
- 'Remove local MediaStream - no JVB JingleSession started yet');
|
|
1265
|
+ logger.debug('Remove local MediaStream - no JVB JingleSession started yet');
|
1264
|
1266
|
}
|
1265
|
1267
|
if (this.p2pJingleSession) {
|
1266
|
|
- removeAsMutePromises.push(
|
1267
|
|
- this.p2pJingleSession.removeTrackAsMute(track));
|
|
1268
|
+ removeAsMutePromises.push(this.p2pJingleSession.removeTrackAsMute(track));
|
1268
|
1269
|
} else {
|
1269
|
|
- logger.info(
|
1270
|
|
- 'Remove local MediaStream - no P2P JingleSession started yet');
|
|
1270
|
+ logger.debug('Remove local MediaStream - no P2P JingleSession started yet');
|
1271
|
1271
|
}
|
1272
|
1272
|
|
1273
|
|
- return Promise.all(removeAsMutePromises);
|
|
1273
|
+ return Promise.allSettled(removeAsMutePromises)
|
|
1274
|
+ .then(() => {
|
|
1275
|
+ // Signal the video type to the bridge.
|
|
1276
|
+ track.isVideoTrack() && this.rtc.setVideoType(VideoType.NONE);
|
|
1277
|
+ });
|
1274
|
1278
|
};
|
1275
|
1279
|
|
1276
|
1280
|
/**
|