Support send/receive of videos

Naive approach, just downloading the whole chunk every time! Need to figure out caching and streaming for long-play stuff.
This commit is contained in:
N-Pex 2021-03-17 12:13:53 +01:00
parent 4c1de61ff4
commit cd29f8d681
7 changed files with 131 additions and 7 deletions

View file

@ -3,13 +3,17 @@ import util from "../../plugins/utils";
export default {
data() {
return {
src: null
src: null,
downloadProgress: null
}
},
mounted() {
console.log("Mounted with event:", JSON.stringify(this.event.getContent()))
util
.getAttachment(this.$matrix.matrixClient, this.event)
.getAttachment(this.$matrix.matrixClient, this.event, (progress) => {
this.downloadProgress = progress;
console.log("Progress: " + progress);
})
.then((url) => {
this.src = url;
})