Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for playout-delay extension #1412

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
},
DavidNegro marked this conversation as resolved.
Show resolved Hide resolved
],
};

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,
},
DavidNegro marked this conversation as resolved.
Show resolved Hide resolved
],
}
}
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
Loading