support skynet

This commit is contained in:
2020-02-04 19:37:46 +01:00
parent aea57286d9
commit 3ebf9785da
20 changed files with 852 additions and 611 deletions

View File

@@ -1,24 +1,24 @@
function VideoViewer(viewer, file, next) {
this.viewer = viewer;
this.file = file;
this.next = next;
this.viewer = viewer
this.file = file
this.next = next
this.vidContainer = document.createElement("div");
this.vidContainer.classList = "image-container";
this.vidContainer = document.createElement("div")
this.vidContainer.classList = "image-container"
this.vidElement = document.createElement("video");
this.vidElement.autoplay = "autoplay";
this.vidElement.controls = "controls";
this.vidElement.classList = "center drop-shadow";
this.vidElement.addEventListener("ended", () => { this.next(); }, false);
this.vidElement = document.createElement("video")
this.vidElement.autoplay = "autoplay"
this.vidElement.controls = "controls"
this.vidElement.classList = "center drop-shadow"
this.vidElement.addEventListener("ended", () => { this.next() }, false)
this.videoSource = document.createElement("source");
this.videoSource.src = apiEndpoint+"/file/"+this.file.id;
this.videoSource = document.createElement("source")
this.videoSource.src = this.file.get_href
this.vidElement.appendChild(this.videoSource);
this.vidContainer.appendChild(this.vidElement);
this.vidElement.appendChild(this.videoSource)
this.vidContainer.appendChild(this.vidElement)
}
VideoViewer.prototype.render = function(parent) {
parent.appendChild(this.vidContainer);
parent.appendChild(this.vidContainer)
}