-
Notifications
You must be signed in to change notification settings - Fork 2
/
basic.html
38 lines (36 loc) · 1.16 KB
/
basic.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="eAudio | Extended HTML Audio Object">
<meta name="author" content="DIDAVA Media">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>eAudio Demo | DIDAVA</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>eAudio Basic Demo <a href="https://github.com/DIDAVA/eAudio" class="small">Github</a></h1>
<p>Extended HTML Audio Object by <a href="https://www.didava.ir">DIDAVA</a>.</p>
</header>
<main>
<button id="start">Start</button>
<div id="container"></div>
</main>
</body>
<script src="../dist/eaudio.min.js"></script>
<script>
const start = document.querySelector('#start');
start.addEventListener('click', e => {
start.remove();
// eAudio Setup
const audio = new eAudio('http://45.32.3.178:8232/stream/1'); // Antena1 Live Radio Stream
audio.crossOrigin = '*';
audio.autoplay = true;
audio.controls = true;
document.querySelector('#container').appendChild(audio);
console.dir(audio);
});
</script>
</html>