init
This commit is contained in:
commit
fa47df6d89
22 changed files with 1724 additions and 0 deletions
37
index.html
Normal file
37
index.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>stream-poc2</h1>
|
||||
<p>
|
||||
Imported media:
|
||||
</p>
|
||||
<ul id="media_list"></ul>
|
||||
|
||||
<script>
|
||||
async function fetchStuff() {
|
||||
const res = await fetch(`/media`);
|
||||
const data = await res.json();
|
||||
|
||||
const mediaList = document.getElementById("media_list")
|
||||
data.forEach(entry => {
|
||||
const a = document.createElement('a');
|
||||
a.href = "/player.html#" + entry.name;
|
||||
a.innerText = entry.friendly_name;
|
||||
|
||||
const li = document.createElement('li')
|
||||
li.appendChild(a)
|
||||
|
||||
mediaList.appendChild(li);
|
||||
})
|
||||
}
|
||||
|
||||
fetchStuff()
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue