Skip to content

Commit

Permalink
Don't attach video blurhash to thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
ginnyTheCat committed Aug 4, 2022
1 parent 4c44ccc commit 5278014
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/state/RoomsInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function getVideoThumbnail(video, width, height, mimeType) {
h: targetHeight,
mimetype: thumbnail.type,
size: thumbnail.size,
[blurhashField]: encodeBlurhash(video),
},
});
}, mimeType);
Expand Down Expand Up @@ -317,7 +316,6 @@ class RoomsInput extends EventEmitter {

info.w = img.width;
info.h = img.height;

info[blurhashField] = encodeBlurhash(img);

content.msgtype = 'm.image';
Expand All @@ -328,8 +326,11 @@ class RoomsInput extends EventEmitter {

try {
const video = await loadVideo(file);

info.w = video.videoWidth;
info.h = video.videoHeight;
info[blurhashField] = encodeBlurhash(video);

const thumbnailData = await getVideoThumbnail(video, video.videoWidth, video.videoHeight, 'image/jpeg');
const thumbnailUploadData = await this.uploadFile(roomId, thumbnailData.thumbnail);
info.thumbnail_info = thumbnailData.info;
Expand Down

0 comments on commit 5278014

Please sign in to comment.