This commit is contained in:
lendry
2026-07-10 12:14:06 +03:00
parent a4b4577c55
commit a0966e7ba2
6 changed files with 112 additions and 17 deletions

View File

@@ -148,6 +148,7 @@ import {
detectChatMessageType,
fileIconLabel,
formatFileSize,
isVideoNoteMessage,
parseLocationMetadata,
parseMessageMetadata,
resolveChatContentType
@@ -2182,6 +2183,16 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
/>
);
}
if (isVideoNoteMessage(message, e2ePayload)) {
const metaDuration = e2ePayload?.durationMs ?? parseMessageMetadata(message.metadataJson).durationMs;
return (
<ChatVideoNotePlayer
src={media.blobUrl}
durationMs={typeof metaDuration === 'number' ? metaDuration : undefined}
variant={mine ? 'mine' : 'theirs'}
/>
);
}
if (message.type === 'VIDEO') {
const metaDuration = e2ePayload?.durationMs ?? parseMessageMetadata(message.metadataJson).durationMs;
return (
@@ -2193,16 +2204,6 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
/>
);
}
if (message.type === 'VIDEO_NOTE') {
const metaDuration = e2ePayload?.durationMs ?? parseMessageMetadata(message.metadataJson).durationMs;
return (
<ChatVideoNotePlayer
src={media.blobUrl}
durationMs={typeof metaDuration === 'number' ? metaDuration : undefined}
variant={mine ? 'mine' : 'theirs'}
/>
);
}
return (
<button
type="button"