Skip to content

Commit

Permalink
Remove HLS thumbnail workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajetan Dvoracek committed Mar 11, 2022
1 parent 8bb046f commit 493e09b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions Resources/Private/JavaScript/VideoPlayer/ThumbnailPreview.js
Expand Up @@ -383,16 +383,6 @@ export default class ThumbnailPreview {
* @param {SeekPosition} seekPosition
*/
renderImageAndShow(uri, thumb, tilesetImage, seekPosition) {
// When width/height are in the interval [0,1], we treat them as relative
// to the tileset size. See `CustomHlsParser`.
if ((0 <= thumb.width && thumb.width <= 1) && (0 <= thumb.height && thumb.height <= 1)) {
thumb.positionX *= tilesetImage.width;
thumb.width *= tilesetImage.width;

thumb.positionY *= tilesetImage.height;
thumb.height *= tilesetImage.height;
}

this.ensureDisplaySize(thumb.width, thumb.height);

this.renderImage(uri, thumb, tilesetImage);
Expand Down
12 changes: 0 additions & 12 deletions Resources/Private/JavaScript/VideoPlayer/VariantGroups.js
Expand Up @@ -67,18 +67,6 @@ export default class VariantGroups {
for (const variant of this.manifest.variants) {
this.addVariant(variant);
}

for (const imageStream of this.manifest.imageStreams) {
// The HLS parser apparently does not report dimensions of thumbnails,
// so `getThumbnails()` will not return correct size and position of a
// thumbnail within the tileset. By setting width = 1 and height = 1,
// we will at least receive the relative size and position, which in
// `ThumbnailPreview::renderImageAndShow()` we scale to the absolute
// values.
// TODO: Dispense of this
imageStream.width = 1;
imageStream.height = 1;
}
}

/**
Expand Down

0 comments on commit 493e09b

Please sign in to comment.