|
|
|
@ -18,13 +18,13 @@ package io.element.android.libraries.matrix.api.media
@@ -18,13 +18,13 @@ package io.element.android.libraries.matrix.api.media
|
|
|
|
|
|
|
|
|
|
interface MatrixMediaLoader { |
|
|
|
|
/** |
|
|
|
|
* @param url to fetch the content for. |
|
|
|
|
* @param source to fetch the content for. |
|
|
|
|
* @return a [Result] of ByteArray. It contains the binary data for the media. |
|
|
|
|
*/ |
|
|
|
|
suspend fun loadMediaContent(source: MediaSource): Result<ByteArray> |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param url to fetch the data for. |
|
|
|
|
* @param source to fetch the data for. |
|
|
|
|
* @param width: the desired width for rescaling the media as thumbnail |
|
|
|
|
* @param height: the desired height for rescaling the media as thumbnail |
|
|
|
|
* @return a [Result] of ByteArray. It contains the binary data for the media. |
|
|
|
@ -32,7 +32,7 @@ interface MatrixMediaLoader {
@@ -32,7 +32,7 @@ interface MatrixMediaLoader {
|
|
|
|
|
suspend fun loadMediaThumbnail(source: MediaSource, width: Long, height: Long): Result<ByteArray> |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param url to fetch the data for. |
|
|
|
|
* @param source to fetch the data for. |
|
|
|
|
* @param mimeType: optional mime type |
|
|
|
|
* @return a [Result] of [MediaFile] |
|
|
|
|
*/ |
|
|
|
|