Skip to content

Commit

Permalink
Merge branch 'v3' into add-and-remove-subchannel-methods
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
ibc committed Dec 12, 2023
2 parents d5d04a6 + eccc173 commit 48c45f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

### NEXT

* liburing: avoid extra memcpy on RTP ([PR #1258](https://github.com/versatica/mediasoup/pull/1258)).
* libsrtp: use our own fork ([PR #1260](https://github.com/versatica/mediasoup/pull/1260)).
* `DataConsumer`: Add `addSubchannel()` and `removeSubchannel()` methods ([PR #XXXX](https://github.com/versatica/mediasoup/pull/XXXX)).
* liburing: Avoid extra memcpy on RTP ([PR #1258](https://github.com/versatica/mediasoup/pull/1258)).
* libsrtp: Use our own fork ([PR #1260](https://github.com/versatica/mediasoup/pull/1260)).
* Fix Rust `DataConsumer` ([PR #1262](https://github.com/versatica/mediasoup/pull/1262)).
* `DataConsumer`: Add `addSubchannel()` and `removeSubchannel()` methods ([PR #1263](https://github.com/versatica/mediasoup/pull/1263)).


### 3.13.10
Expand Down
6 changes: 4 additions & 2 deletions node/src/tests/test-DataConsumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ test('transport.consumeData() succeeds', async () =>
expect(dataConsumer1.label).toBe('foo');
expect(dataConsumer1.protocol).toBe('bar');
expect(dataConsumer1.paused).toBe(false);
expect(dataConsumer1.subchannels.sort((a, b) => a - b)).toEqual([ 0, 1, 2, 100, 65535 ]);
expect(dataConsumer1.subchannels.sort((a, b) => a - b))
.toEqual([ 0, 1, 2, 100, 65535 ]);
expect(dataConsumer1.appData).toEqual({ baz: 'LOL' });

const dump = await router.dump();
Expand Down Expand Up @@ -134,7 +135,8 @@ test('dataConsumer.setSubchannels() succeeds', async () =>
{
await dataConsumer1.setSubchannels([ 999, 999, 998, 65536 ]);

expect(dataConsumer1.subchannels.sort((a, b) => a - b)).toEqual([ 0, 998, 999 ]);
expect(dataConsumer1.subchannels.sort((a, b) => a - b))
.toEqual([ 0, 998, 999 ]);
}, 2000);

test('dataConsumer.addSubchannel() and .removeSubchannel() succeed', async () =>
Expand Down
4 changes: 2 additions & 2 deletions rust/tests/integration/direct_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ fn send_with_subchannels_succeeds() {
}
};

let direct_data_consumer_2 = match &data_consumer_2 {
let _ = match &data_consumer_2 {
DataConsumer::Direct(direct_data_consumer) => direct_data_consumer,
_ => {
panic!("Expected direct data consumer")
Expand Down Expand Up @@ -514,7 +514,7 @@ fn send_with_subchannels_succeeds() {
let mut subchannels = data_consumer_2.subchannels();
subchannels.push(1);

direct_data_consumer_2
data_consumer_2
.set_subchannels(subchannels)
.await
.expect("Failed to set subchannels");
Expand Down

0 comments on commit 48c45f4

Please sign in to comment.