-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Description
When receiving a mutil-media message, we may want to have a peek before we actually download the whole message.
e.g.
When receiving a file, we want to know its name and size to decided if we really need to download it or not.
When receiving a video, we want to just look at the thumbnail before we go through the whole video.
So introducing message.preview(), in my mind it looks like this:
async preview(): Promise<MessagePreviewObject> {}
interface MessagePreviewObject {
fileMetadata?: FileMetadata | VideoMetadata | AudioMetadata,
}
interface FileMetadata {
size?: number,
name?: string,
}
interface VideoMetadata extends FileMetadata {
duration?: number,
height?: number,
width?: number,
thumbnail?: FileBox,
thumbsize?: number,
thumbwidth?: number,
thumbheiht?: number,
}
interface AudioMetadata extends FileMetadata {
duration?: number,
}
Metadata
Metadata
Assignees
Labels
No labels