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

feat: add retainCodecs and retainCandidates functions #18

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

brycetham
Copy link
Collaborator

@brycetham brycetham commented Aug 10, 2023

This PR adds the retainCodecs and retainCandidates functions to munge.ts, as part of SPARK-411372. These functions can accept either a parsed Sdp object or an AvMediaDescription object.

I have also updated removeCodec to also accept either an Sdp or an AvMediaDescription.

Copy link
Collaborator

@bbaldino bbaldino left a comment

Choose a reason for hiding this comment

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

looks good, one thought on naming but not a huge deal

src/munge.ts Outdated
* @param sdpOrAv - The {@link Sdp} or {@link AvMediaDescription} from which to filter codecs.
* @param allowedCodecNames - The names of the codecs that should remain in the SDP.
*/
export function filterCodecs(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering if we can name this something better...I feel like there's ambiguity around if the passed list are the ones being kept or the ones being removed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

retainCodecs maybe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I can also rename filterCandidates to retainCandidates.

@brycetham brycetham changed the title feat: add filterCodecs and filterCandidates functions feat: add retainCodecs and retainCandidates functions Aug 10, 2023
@brycetham brycetham merged commit 8bbb081 into main Aug 10, 2023
1 check passed
@brycetham brycetham deleted the btham/filter_helpers branch August 10, 2023 19:28
bbaldino pushed a commit that referenced this pull request Aug 10, 2023
# [1.5.0](v1.4.1...v1.5.0) (2023-08-10)

### Features

* add retainCodecs and retainCandidates functions ([#18](#18)) ([8bbb081](8bbb081))
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