MediaService

interface MediaService

Inheritors

Functions

Link copied to clipboard
abstract suspend fun getEncryptedMedia(encryptedFile: EncryptedFile, progress: MutableStateFlow<FileTransferProgress?>? = null, saveToCache: Boolean = true): Result<ByteArrayFlow>
Link copied to clipboard
abstract suspend fun getMedia(uri: String, progress: MutableStateFlow<FileTransferProgress?>? = null, saveToCache: Boolean = true): Result<ByteArrayFlow>
Link copied to clipboard
abstract suspend fun getThumbnail(mxcUri: String, width: Long, height: Long, method: ThumbnailResizingMethod = CROP, progress: MutableStateFlow<FileTransferProgress?>? = null, saveToCache: Boolean = true): Result<ByteArrayFlow>
Link copied to clipboard
abstract suspend fun prepareUploadEncryptedMedia(content: ByteArrayFlow): EncryptedFile
Link copied to clipboard
abstract suspend fun prepareUploadEncryptedThumbnail(content: ByteArrayFlow, contentType: ContentType?): Pair<EncryptedFile, ThumbnailInfo>?
Link copied to clipboard
abstract suspend fun prepareUploadMedia(content: ByteArrayFlow, contentType: ContentType?): String
Link copied to clipboard
abstract suspend fun prepareUploadThumbnail(content: ByteArrayFlow, contentType: ContentType?): Pair<String, ThumbnailInfo>?
Link copied to clipboard
abstract suspend fun uploadMedia(cacheUri: String, progress: MutableStateFlow<FileTransferProgress?>? = null, keepMediaInCache: Boolean = true): Result<String>