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:
parent
4c1de61ff4
commit
cd29f8d681
7 changed files with 131 additions and 7 deletions
|
|
@ -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;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue