Class MediaCache
Downloads media and thumbnails once and serves them from the account's media directory afterwards.
Assembly: Uniform.Matrix.Client.dll
public sealed class MediaCache
Constructors
|
Edit this page
View Source
Declaration
public MediaCache(ClientStore store, AccountPaths paths, TimeProvider time)
Parameters
Methods
|
Edit this page
View Source
GetAsync(MatrixClient, MessageContent, CancellationToken)
Return the attachment of content, decrypting File of encrypted rooms.
Declaration
public Task<StoredMedia> GetAsync(MatrixClient client, MessageContent content, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
Return the full file of uri, downloading it when not cached or the file is gone.
Declaration
public Task<StoredMedia> GetAsync(MatrixClient client, MxcUri uri, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
Return the absolute path of media.
Declaration
public string GetFullPath(StoredMedia media)
Parameters
Returns
|
Edit this page
View Source
Return a thumbnail of uri of about width×height pixels, downloading it when not cached.
Declaration
public Task<StoredMedia> GetThumbnailAsync(MatrixClient client, MxcUri uri, int width, int height, CancellationToken cancellationToken = default)
Parameters
Returns