Cool background animation
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const BASEURL = "https://files.colormatic.org/"
|
||||
const BASEURL = "/"
|
||||
|
||||
var videoplayer = document.getElementById("videoplayer");
|
||||
var videotitle = document.getElementById("videotitle");
|
||||
@ -23,6 +23,7 @@ async function getJSON(url) {
|
||||
function getVideo(cname, vname) {
|
||||
getJSON(BASEURL + cname + "/videos/data/" + vname + ".json").then((data) => {
|
||||
videoURL = BASEURL + cname + "/videos/raw/" + data.video_file + "." + data.video_format;
|
||||
videoplayer.setAttribute("poster", BASEURL + cname + "/videos/thumbnail/" + data.thumbnail);
|
||||
var videosource = document.createElement("source");
|
||||
videosource.setAttribute("src", videoURL);
|
||||
videosource.setAttribute("type", "video/" + data.video_format);
|
||||
|
Reference in New Issue
Block a user