Skip to content

Commit 0275d4c

Browse files
committed
add mediasoup-client version in remote SDP
1 parent 1bd7206 commit 0275d4c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/handlers/sdp/RemoteSdp.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import type {
1616
import type { ProducerCodecOptions } from '../../Producer';
1717
import type { MediaKind, RtpParameters } from '../../RtpParameters';
1818
import type { SctpParameters } from '../../SctpParameters';
19+
import { version as mediasoupClientVersion } from '../../';
1920

20-
const DD_CODECS = ['av1', 'h264'];
21+
const DependencyDescriptorCodecs = ['av1', 'h264'];
2122

2223
const logger = new Logger('RemoteSdp');
2324

@@ -67,7 +68,7 @@ export class RemoteSdp {
6768
netType: 'IN',
6869
sessionId: '10000',
6970
sessionVersion: 0,
70-
username: 'mediasoup-client',
71+
username: `mediasoup-client-v${mediasoupClientVersion}`,
7172
},
7273
name: '-',
7374
timing: { start: 0, stop: 0 },
@@ -179,7 +180,7 @@ export class RemoteSdp {
179180
// Remove Dependency Descriptor extension unless there is support for
180181
// the codec in mediasoup.
181182
const ddCodec = mediaObject.rtp.find(rtp =>
182-
DD_CODECS.includes(rtp.codec.toLowerCase())
183+
DependencyDescriptorCodecs.includes(rtp.codec.toLowerCase())
183184
);
184185

185186
if (!ddCodec) {

0 commit comments

Comments
 (0)