Skip to content

Commit

Permalink
api: playback: png thumbnails (#2275)
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelecerati authored Jul 29, 2024
1 parent 4dfa11f commit 6001737
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/api/src/controllers/playback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ function newPlaybackInfo(
}
}
if (thumbUrl) {
const thumbExtension = thumbUrl.split(".").pop().toLowerCase();
const isPng = thumbExtension === "png";
playbackInfo.meta.source.push({
hrn: "Thumbnail (JPEG)",
type: "image/jpeg",
hrn: isPng ? "Thumbnail (PNG)" : "Thumbnail (JPEG)",
type: isPng ? "image/png" : "image/jpeg",
url: thumbUrl,
});
}
Expand Down
2 changes: 2 additions & 0 deletions packages/api/src/schema/api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2578,6 +2578,7 @@ components:
- WebRTC (H264)
- FLV (H264)
- Thumbnail (JPEG)
- Thumbnail (PNG)
- Thumbnails
type:
type: string
Expand All @@ -2588,6 +2589,7 @@ components:
- html5/video/h264
- video/x-flv
- image/jpeg
- image/png
- text/vtt
url:
type: string
Expand Down

0 comments on commit 6001737

Please sign in to comment.