Skip to content

Commit b1be538

Browse files
authored
Merge branch 'master' into RTCStatsCollector
2 parents 314f6a3 + ab804f8 commit b1be538

File tree

7 files changed

+743
-619
lines changed

7 files changed

+743
-619
lines changed

JitsiConference.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1429,9 +1429,10 @@ export default class JitsiConference extends Listenable {
14291429
}, {
14301430
reason,
14311431
reasonDescription,
1432-
sendSessionTerminate: this.room
1432+
sendSessionTerminate: Boolean(this.room
14331433
&& this.getParticipantById(
14341434
Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid))
1435+
)
14351436
});
14361437

14371438
this.p2pJingleSession = null;

modules/RTC/TraceablePeerConnection.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default class TraceablePeerConnection {
230230
* media direction will be adjusted to 'inactive' in order to suspend
231231
* the transmission.
232232
* @type {boolean}
233-
* @private
233+
* @internal
234234
*/
235235
this.audioTransferActive = !(options.startSilent === true);
236236

@@ -266,7 +266,7 @@ export default class TraceablePeerConnection {
266266
* media direction will be adjusted to 'inactive' in order to suspend
267267
* the transmission.
268268
* @type {boolean}
269-
* @private
269+
* @internal
270270
*/
271271
this.videoTransferActive = true;
272272

@@ -1232,7 +1232,7 @@ export default class TraceablePeerConnection {
12321232
* @return {string} one of the SDP direction constants ('sendrecv, 'recvonly' etc.)
12331233
* which should be used when setting
12341234
* local description on the peerconnection.
1235-
* @private
1235+
* @internal
12361236
*/
12371237
getDesiredMediaDirection(mediaType: MediaType, isAddOperation = false): MediaDirection {
12381238
return this.tpcUtils.getDesiredMediaDirection(mediaType, isAddOperation);
@@ -2047,7 +2047,7 @@ export default class TraceablePeerConnection {
20472047
* @param {RTCSessionDescription} - The local description to be used.
20482048
* @returns {Array}
20492049
*/
2050-
getConfiguredVideoCodecs(description: RTCSessionDescription): CodecMimeType[] {
2050+
getConfiguredVideoCodecs(description?: RTCSessionDescription): CodecMimeType[] {
20512051
return this.tpcUtils.getConfiguredVideoCodecs(description?.sdp);
20522052
}
20532053

@@ -2543,7 +2543,7 @@ export default class TraceablePeerConnection {
25432543
* sender associated with the video source.
25442544
* @returns {Promise} promise that will be resolved when the operation is successful and rejected otherwise.
25452545
*/
2546-
setSenderVideoConstraints(frameHeight: number, localVideoTrack: JitsiLocalTrack, preferredCodec: Optional<CodecMimeType>): Promise<void> {
2546+
setSenderVideoConstraints(frameHeight: number, localVideoTrack: JitsiLocalTrack, preferredCodec?: Optional<CodecMimeType>): Promise<void> {
25472547
if (frameHeight < 0 || !isValidNumber(frameHeight)) {
25482548
throw new Error(`Invalid frameHeight: ${frameHeight}`);
25492549
}
@@ -2575,7 +2575,7 @@ export default class TraceablePeerConnection {
25752575
* @returns {Promise} - A promise that is resolved when the change is succesful on all the senders, rejected
25762576
* otherwise.
25772577
*/
2578-
setMediaTransferActive(enable: boolean, mediaType: Optional<MediaType>): Promise<void> {
2578+
setMediaTransferActive(enable: boolean, mediaType?: Optional<MediaType>): Promise<void> {
25792579
logger.info(`${this} ${enable ? 'Resuming' : 'Suspending'} media transfer.`);
25802580

25812581
const senders = this.peerconnection.getSenders()

modules/sdp/SDPUtil.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ const SDPUtil = {
257257
* @param {string} haystack - The SDP string to search.
258258
* @param {string} needle - The line prefix to find.
259259
* @param {string} sessionpart - The session part to search within.
260-
* @returns {string|boolean} - The found line or false if not found.
260+
* @returns {Optional<string>} - The found line or false if not found.
261261
*/
262262
findLine(haystack, needle, sessionpart) {
263263
let lines = haystack.split('\r\n');
@@ -268,7 +268,7 @@ const SDPUtil = {
268268
}
269269
}
270270
if (!sessionpart) {
271-
return false;
271+
return undefined;
272272
}
273273

274274
// search session part
@@ -279,7 +279,7 @@ const SDPUtil = {
279279
}
280280
}
281281

282-
return false;
282+
return undefined;
283283
},
284284

285285
/**

0 commit comments

Comments
 (0)