videojs-vtt-thumbnails icon indicating copy to clipboard operation
videojs-vtt-thumbnails copied to clipboard

getVttCss/getFullyQualifiedUrl wrongly joins URL

Open minus7 opened this issue 3 years ago • 0 comments

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?

minus7 avatar Nov 06 '21 23:11 minus7