HomeMediacenter/js/index.js
lukas-heiligenbrunner ddf6140c32 added pic upload
2020-04-01 21:53:36 +02:00

21 lines
704 B
JavaScript

Req.ready((event) => {
Req.post("php/movie.php", "action=getMovies&test=2", function (dta) {
console.log(dta);
for (const ii in dta.data) {
document.getElementsByClassName("mediawrapper").item(0).insertAdjacentHTML('beforeend', `
<div class="mediatile">${dta.data[ii].url}</div>`); // <video controls src="${dta.data[ii].url}"></video>
}
});
Req.post("php/movie.php", "action=storePic", function (dta) {
console.log(dta);
});
Req.post("php/movie.php", "action=readPic", function (dta) {
console.log(dta);
});
Req.post("php/movie.php", "action=getDbSize", function (dta) {
console.log(dta);
});
});