Skip to content

Commit

Permalink
playout-delay capability added for audio
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNegro committed Jun 25, 2024
1 parent cff3ed6 commit 734d620
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
7 changes: 7 additions & 0 deletions node/src/supportedRtpCapabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ const supportedRtpCapabilities: RtpCapabilities = {
preferredEncrypt: false,
direction: 'sendrecv',
},
{
kind: 'audio',
uri: 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay',
preferredId: 14,
preferredEncrypt: false,
direction: 'sendrecv',
},
],
};

Expand Down
12 changes: 12 additions & 0 deletions node/src/test/test-PipeTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ test('router.pipeToRouter() succeeds with audio', async () => {
encrypt: false,
parameters: {},
},
{
uri: 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay',
id: 14,
encrypt: false,
parameters: {},
},
]);
expect(pipeConsumer.type).toBe('pipe');
expect(pipeConsumer.paused).toBe(false);
Expand Down Expand Up @@ -313,6 +319,12 @@ test('router.pipeToRouter() succeeds with audio', async () => {
encrypt: false,
parameters: {},
},
{
uri: 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay',
id: 14,
encrypt: false,
parameters: {},
},
]);
expect(pipeProducer.paused).toBe(false);
}, 2000);
Expand Down
7 changes: 7 additions & 0 deletions rust/src/supported_rtp_capabilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,13 @@ pub fn get_supported_rtp_capabilities() -> RtpCapabilities {
preferred_encrypt: false,
direction: RtpHeaderExtensionDirection::SendRecv,
},
RtpHeaderExtension {
kind: MediaKind::Audio,
uri: RtpHeaderExtensionUri::PlayoutDelay,
preferred_id: 14,
preferred_encrypt: false,
direction: RtpHeaderExtensionDirection::SendRecv,
},
],
}
}
12 changes: 11 additions & 1 deletion rust/tests/integration/pipe_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ fn pipe_to_router_succeeds_with_audio() {
uri: RtpHeaderExtensionUri::AbsCaptureTime,
id: 13,
encrypt: false,
},
RtpHeaderExtensionParameters {
uri: RtpHeaderExtensionUri::PlayoutDelay,
id: 14,
encrypt: false,
}
],
);
Expand Down Expand Up @@ -395,7 +400,12 @@ fn pipe_to_router_succeeds_with_audio() {
uri: RtpHeaderExtensionUri::AbsCaptureTime,
id: 13,
encrypt: false,
}
},
RtpHeaderExtensionParameters {
uri: RtpHeaderExtensionUri::PlayoutDelay,
id: 14,
encrypt: false,
},
],
);
assert!(!pipe_producer.paused());
Expand Down

0 comments on commit 734d620

Please sign in to comment.