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

Update examples and tweak API #37

Merged
merged 1 commit into from
May 20, 2024
Merged

Update examples and tweak API #37

merged 1 commit into from
May 20, 2024

Conversation

pthatcher
Copy link
Collaborator

In particular, added these APIs:

  • writeable header extensions of RtpPacket
  • access to packetized (unsent) RTP packets via RtpReceiveStream
  • ability to alter received RTP packets, but then still receive them

Copy link
Contributor

@aboba aboba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make this available for review on the repo.

@aboba aboba merged commit 9fc476b into main May 20, 2024
2 checks passed
readonly attribute unsigned long long? remoteSendTimestamp;

// OPTIONAL: Extra information that may be useful to know
readonly attribute DOMHighResTimeStamp receivedTime;
readonly attribute unsigned long sequenceNumberRolloverCount;

void setHeaderExtension(RtpHeaderExtension);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make RtpPacket immutable and

let init = rtpPacket.init();
init.audioLevel = 10;
let mutatedRtpPacket = new RtpPacket(init);

or

let mutatedRtpPacket = new RtpPacket({
  audioLevel: 10,
  ..rtpPacket,
});

or

let builder= rtpPacket.mutate();
builder.setAudioLevel(10);
let mutatedRtpPacket = mutator.build();

But the 2nd might not work with seqnum, and the 1st needs better names (and can't have methods). And the 3rd requires a new interface (so we have RtpPacket, RtpPacketInit, and RtpPacketBuilder/Mutator).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we land #31, this will be a little simpler, as there will be fewer fields, and no issues with inconsistent updates between eg audioLevel & headerExtensions.

rtpReceiveStream.receiveRtp(rtpPacket);
}
}
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... might not work with the fact that we can't set seqnums

@aboba
Copy link
Contributor

aboba commented May 28, 2024

Related: #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants