Media: update doc on MediaLoader

This commit is contained in:
ganfra 2023-05-16 14:50:54 +02:00
parent ac1531390e
commit 6f7d7a004a

View file

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