Rework duration/resolution badge style

This commit is contained in:
2023-02-07 20:39:12 -05:00
parent 587c9a2c90
commit 6f759642fc
4 changed files with 25 additions and 8 deletions

View File

@@ -61,6 +61,7 @@ export interface EsHit {
isAudio: boolean
hasThumbnail: boolean
hasVidPreview: boolean
imageAspectRatio: number
/** Number of thumbnails available */
tnNum: number
}
@@ -155,6 +156,9 @@ class Sist2Api {
&& hit._source.videoc !== "raw" && hit._source.videoc !== "ppm") {
hit._props.isPlayableImage = true;
}
if ("width" in hit._source && "height" in hit._source) {
hit._props.imageAspectRatio = hit._source.width / hit._source.height;
}
break;
case "video":
if ("videoc" in hit._source) {