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

getVttCss/getFullyQualifiedUrl wrongly joins URL #31

Open
minus7 opened this issue Nov 6, 2021 · 0 comments
Open

getVttCss/getFullyQualifiedUrl wrongly joins URL #31

minus7 opened this issue Nov 6, 2021 · 0 comments

Comments

@minus7
Copy link

minus7 commented Nov 6, 2021

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?

syeopite added a commit to syeopite/invidious that referenced this issue Aug 8, 2023
An upstream problem with videojs-vtt-thumbnails means that URLs gets
joined incorrectly on any instance where `domain`, `external_port` and
`https_only` aren't set.

This commit adds some logic with the 404 handler to mitigate this
problem. This is however only a workaround.

See:
iv-org#3117
chrisboustead/videojs-vtt-thumbnails#31
syeopite added a commit to syeopite/invidious that referenced this issue Sep 19, 2023
An upstream problem with videojs-vtt-thumbnails means that URLs gets
joined incorrectly on any instance where `domain`, `external_port` and
`https_only` aren't set.

This commit adds some logic with the 404 handler to mitigate this
problem. This is however only a workaround.

See:
iv-org#3117
chrisboustead/videojs-vtt-thumbnails#31
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

No branches or pull requests

1 participant