Changeset View
Changeset View
Standalone View
Standalone View
lib/types/media-types.js
Show All 13 Lines | export type Image = { | ||||
+id: string, | +id: string, | ||||
+uri: string, | +uri: string, | ||||
+type: 'photo', | +type: 'photo', | ||||
+dimensions: Dimensions, | +dimensions: Dimensions, | ||||
// stored on native only during creation in case retry needed after state lost | // stored on native only during creation in case retry needed after state lost | ||||
+localMediaSelection?: NativeMediaSelection, | +localMediaSelection?: NativeMediaSelection, | ||||
}; | }; | ||||
export type EncryptedImage = { | |||||
+id: string, | |||||
// a media URI for keyserver uploads / blob holder for Blob service uploads | |||||
+holder: string, | |||||
+encryptionKey: string, | |||||
+type: 'encrypted_photo', | |||||
+dimensions: Dimensions, | |||||
}; | |||||
export type Video = { | export type Video = { | ||||
+id: string, | +id: string, | ||||
+uri: string, | +uri: string, | ||||
+type: 'video', | +type: 'video', | ||||
+dimensions: Dimensions, | +dimensions: Dimensions, | ||||
+loop?: boolean, | +loop?: boolean, | ||||
+thumbnailID: string, | +thumbnailID: string, | ||||
+thumbnailURI: string, | +thumbnailURI: string, | ||||
// stored on native only during creation in case retry needed after state lost | // stored on native only during creation in case retry needed after state lost | ||||
+localMediaSelection?: NativeMediaSelection, | +localMediaSelection?: NativeMediaSelection, | ||||
}; | }; | ||||
export type Media = Image | Video; | export type EncryptedVideo = { | ||||
+id: string, | |||||
// a media URI for keyserver uploads / blob holder for Blob service uploads | |||||
+holder: string, | |||||
+encryptionKey: string, | |||||
+type: 'encrypted_video', | |||||
+dimensions: Dimensions, | |||||
+loop?: boolean, | |||||
+thumbnailID: string, | |||||
+thumbnailHolder: string, | |||||
+thumbnailEncryptionKey: string, | |||||
}; | |||||
export type Media = Image | Video | EncryptedImage | EncryptedVideo; | |||||
export type AvatarMediaInfo = { | export type AvatarMediaInfo = { | ||||
+type: 'photo', | +type: 'photo', | ||||
+uri: string, | +uri: string, | ||||
}; | }; | ||||
export type ClientDBMediaInfo = { | export type ClientDBMediaInfo = { | ||||
+id: string, | +id: string, | ||||
Show All 12 Lines | |||||
export type MediaInfo = | export type MediaInfo = | ||||
| { | | { | ||||
...Image, | ...Image, | ||||
+index: number, | +index: number, | ||||
} | } | ||||
| { | | { | ||||
...Video, | ...Video, | ||||
+index: number, | +index: number, | ||||
} | |||||
| { | |||||
...EncryptedImage, | |||||
+index: number, | |||||
} | |||||
| { | |||||
...EncryptedVideo, | |||||
+index: number, | |||||
}; | }; | ||||
export type UploadMultimediaResult = { | export type UploadMultimediaResult = { | ||||
+id: string, | +id: string, | ||||
+uri: string, | +uri: string, | ||||
+dimensions: Dimensions, | +dimensions: Dimensions, | ||||
+mediaType: MediaType, | +mediaType: MediaType, | ||||
+loop: boolean, | +loop: boolean, | ||||
▲ Show 20 Lines • Show All 460 Lines • Show Last 20 Lines |