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

59 feature request option to submit a list of bitrates to corrupt on target segment #68

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edvinhed
Copy link

@edvinhed edvinhed commented Jul 4, 2024

Updated the stream proxy filter to parse both individual bitrate values and arrays of bitrate values for filtering.

Modified the input type br in the filter function to accept:
number: Individual bitrate values.
number[]: Arrays of bitrate values.
"*": A wildcard to match any bitrate.
This enhancement allows more flexible filtering based on bitrate specifications.

New PR since I changed the function.

Updated the stream proxy filter to parse both individual bitrate values and arrays of bitrate values for filtering.

- Modified the input type `br` in the filter function to accept:
  - `number`: Individual bitrate values.
  - `number[]`: Arrays of bitrate values.
  - `"*"`: A wildcard to match any bitrate.

This enhancement allows more flexible filtering based on bitrate specifications.
Instead of converting it, we now just check if it's an array and then uses .includes()
@edvinhed edvinhed marked this pull request as ready for review July 4, 2024 07:34
@edvinhed edvinhed assigned edvinhed and unassigned edvinhed Jul 4, 2024
Copy link
Member

@friday friday 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 to me. Not tested.

A small advice is that when you return in each condition, you don't need else: https://eslint.org/docs/latest/rules/no-else-return

(this is not important though)

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.

Feature Request: Option to Submit a List of Bitrates to Corrupt on Target Segment
2 participants