Constructors
constructor
- new MediaProxy(opts, matrixClient): MediaProxy
Parameters
opts: Opts
matrixClient: MatrixClient
Accessors
router
- get router(): Router
Returns Router
Methods
close
- close(): Promise<void>
Returns Promise<void>
generateMediaUrl
- generateMediaUrl(mxc): Promise<URL>
Returns Promise<URL>
getMediaToken
- getMediaToken(metadata): Promise<string>
Returns Promise<string>
onMediaRequest
- onMediaRequest(req, res): Promise<void>
Parameters
req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
res: Response<any, Record<string, any>>
Returns Promise<void>
start
- start(port, hostname?, backlog?): Promise<void>
Parameters
port: number
hostname: string = "0.0.0.0"
backlog: number = 10
Returns Promise<void>
verifyMediaToken
- verifyMediaToken(token): Promise<MediaMetadata>
Returns Promise<MediaMetadata>
A media proxy class intended for bridges which share media to the public internet.