Skip to content

Implement RTCRtpSender.getCapabilities method#3737

Merged
daxpedda merged 6 commits intowasm-bindgen:mainfrom
logist322:get-capabilities
Dec 8, 2023
Merged

Implement RTCRtpSender.getCapabilities method#3737
daxpedda merged 6 commits intowasm-bindgen:mainfrom
logist322:get-capabilities

Conversation

@logist322
Copy link
Copy Markdown
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
Copy Markdown
Member

@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.

RTCRtpParameters getParameters();
Promise<undefined> replaceTrack(MediaStreamTrack? withTrack);
Promise<RTCStatsReport> getStats();
static RTCRtpCapabilities getCapabilities(DOMString kind);
Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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
Copy Markdown
Member

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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

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 wasm-bindgen:main Dec 8, 2023
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