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

fix: Dailymotion qualities selector. #375

Closed
wants to merge 1 commit into from

Conversation

ByMykel
Copy link

@ByMykel ByMykel commented Sep 12, 2023

Pull request type

What is the current behavior?

The playback quality selector is not working.

The error is happening because the query is not decoded correctly in parseQueryString. Then in the file below we get a Cannot read properties of undefined besause qualities doesn't exist.

case DailymotionEvent.QualitiesAvailable:
this.dispatch(
'playbackQualities',
msg.qualities!.map((q: string) => `${q}p`),
);
break;

Input:

event=qualitiesavailable&qualities%5B0%5D=1080&qualities%5B1%5D=720&qualities%5B2%5D=480&qualities%5B3%5D=380

before

{
    "event": "qualitiesavailable",
    "qualities[0]": "1080",
    "qualities[1]": "720",
    "qualities[2]": "480",
    "qualities[3]": "380"
}

after

{
    "event": "qualitiesavailable",
    "qualities": [
        "1080",
        "720",
        "480",
        "380"
    ]
}

What is the new behavior?

Fix the playback quality selector.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Before the list of qualities is not displayed:

image

After the change:

image

@vercel
Copy link

vercel bot commented Sep 12, 2023

@ByMykel is attempting to deploy a commit to the Vidstack Team on Vercel.

A member of the Team first needs to authorize it.

@ByMykel ByMykel closed this Apr 3, 2024
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.

1 participant