MediaService

interface MediaService

Functions

Link copied to clipboard
abstract suspend fun clearCache()

Clear the cache of all retrieved UrlPreview data.

Link copied to clipboard
abstract fun extractUrls(event: TimelineEvent): List<String>

Extract URLs from a TimelineEvent.

Link copied to clipboard
abstract suspend fun getPreviewUrl(    url: String,     timestamp: Long?,     cacheStrategy: CacheStrategy): PreviewUrlData

Get Url Preview data from the homeserver, or from cache, depending on the cache strategy.

Link copied to clipboard
abstract suspend fun getRawPreviewUrl(url: String, timestamp: Long?): JsonDict

Get Raw Url Preview data from the homeserver. There is no cache management for this request