mobile compat

This commit is contained in:
Manav Rathi
2025-05-14 15:43:32 +05:30
parent 6062c20251
commit bb352f3266
2 changed files with 5 additions and 3 deletions

View File

@@ -1078,7 +1078,7 @@ const extractImageOrVideoMetadata = async (
};
if (duration) {
metadata.duration = ensureNumber(duration);
metadata.duration = ensureInteger(Math.ceil(duration));
}
const location = parsedMetadataJSON?.location ?? parsedMetadata?.location;

View File

@@ -141,9 +141,11 @@ export interface Metadata {
*/
videoHash?: string;
/**
* The duration (in seconds) of the video.
* The duration (in integral seconds) of the video.
*
* Only present for videos (`fileType == FileType.video`).
* Only present for videos (`fileType == FileType.video`). For compatibility
* with other clients, this must be a integer number of seconds, without any
* sub-second fraction.
*/
duration?: number;
hasStaticThumbnail?: boolean;