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

Implement RTCRtpSender.getCapabilities method #3737

Merged
merged 6 commits into from
Dec 8, 2023

Conversation

logist322
Copy link
Contributor

This PR adds spec compliant getCapabilities method for RTCRtpSender. Also adds the RTCRtpCapabilities dictionary and thecodec and scalabilityMode fields for the RTCRtpEncodingParameters.

@logist322 logist322 marked this pull request as ready for review December 7, 2023 10:50
Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

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

Could you specify your source more clearly here?
I can't seem to find your additions in the spec you linked.

In general though, we should obviously follow the spec.

@@ -74,6 +81,7 @@ interface RTCRtpSender {
RTCRtpParameters getParameters();
Promise<undefined> replaceTrack(MediaStreamTrack? withTrack);
Promise<RTCStatsReport> getStats();
static RTCRtpCapabilities getCapabilities(DOMString kind);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
static RTCRtpCapabilities getCapabilities(DOMString kind);
static RTCRtpCapabilities? getCapabilities(DOMString kind);

Comment on lines 71 to 74
dictionary RTCRtpCapabilities {
sequence<RTCRtpCodecParameters> codecs;
sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where exactly did you get this from?

Suggested change
dictionary RTCRtpCapabilities {
sequence<RTCRtpCodecParameters> codecs;
sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
};
dictionary RTCRtpCapabilities {
required sequence<RTCRtpCodecCapability> codecs;
required sequence<RTCRtpHeaderExtensionCapability> headerExtensions;
};

Comment on lines 41 to 42
DOMString scalabilityMode;
RTCRtpCodecParameters codec;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
DOMString scalabilityMode;
RTCRtpCodecParameters codec;

This whole type seems to be wrong, but where did you get these added fields from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding these bindings seems fine to me, but they would have to be added as unstable as far as I can see.

@logist322 logist322 requested a review from daxpedda December 8, 2023 16:33
@daxpedda daxpedda merged commit a5d2539 into rustwasm:main Dec 8, 2023
25 checks passed
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.

2 participants