Skip to content

getVttCss/getFullyQualifiedUrl wrongly joins URL #31

@minus7

Description

@minus7

This code in getVttCss does not join both parts according to normal URL joining behavior:
With this.options.src = "https://invidious.example.org/api/v1/storyboards/W58r7oycUrA?height=90" and vttImageDef = "/sb/i/W58r7oycUrA/storyboard3_L2/M0.jpg?sqp=...#xywh=0,0,158,90" the expected joined result is https://invidious.example.org/sb/i/W58r7oycUrA/storyboard3_L2/M0.jpg?sqp=...#xywh=0,0,158,90 but the actual result is https://invidious.example.org/api/v1/storyboards/sb/i/W58r7oycUrA/storyboard3_L2/M0.jpg?sqp=...#xywh=0,0,158,90.

I'm not sure if that's intentional, but it seems broken to me. It also causes Invidious to fail displaying thumbnails when it isn't configured to return full URLs

In case this isn't intentional, couldn't just using new URL(url, base) replace getFullyQualifiedUrl?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions