Send caption with media
This commit is contained in:
parent
0da504542f
commit
19c56cdbe3
19 changed files with 301 additions and 76 deletions
|
|
@ -11,6 +11,8 @@ import android.net.Uri
|
|||
import io.element.android.libraries.core.mimetype.MimeTypes
|
||||
import io.element.android.libraries.matrix.api.media.AudioInfo
|
||||
import io.element.android.libraries.matrix.api.media.FileInfo
|
||||
import io.element.android.libraries.matrix.api.media.ImageInfo
|
||||
import io.element.android.libraries.matrix.api.media.VideoInfo
|
||||
import io.element.android.libraries.mediaupload.api.MediaPreProcessor
|
||||
import io.element.android.libraries.mediaupload.api.MediaUploadInfo
|
||||
import io.element.android.tests.testutils.simulateLongTask
|
||||
|
|
@ -61,4 +63,45 @@ class FakeMediaPreProcessor : MediaPreProcessor {
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun givenImageResult() {
|
||||
givenResult(
|
||||
Result.success(
|
||||
MediaUploadInfo.Image(
|
||||
file = File("image.jpg"),
|
||||
imageInfo = ImageInfo(
|
||||
height = 100,
|
||||
width = 100,
|
||||
mimetype = MimeTypes.Jpeg,
|
||||
size = 1000,
|
||||
thumbnailInfo = null,
|
||||
thumbnailSource = null,
|
||||
blurhash = null,
|
||||
),
|
||||
thumbnailFile = null,
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun givenVideoResult() {
|
||||
givenResult(
|
||||
Result.success(
|
||||
MediaUploadInfo.Video(
|
||||
file = File("image.jpg"),
|
||||
videoInfo = VideoInfo(
|
||||
duration = 1000.seconds,
|
||||
height = 100,
|
||||
width = 100,
|
||||
mimetype = MimeTypes.Mp4,
|
||||
size = 1000,
|
||||
thumbnailInfo = null,
|
||||
thumbnailSource = null,
|
||||
blurhash = null,
|
||||
),
|
||||
thumbnailFile = null,
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue