forked from Balajims88/balajims88.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaytest.html
45 lines (31 loc) · 896 Bytes
/
playtest.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
39
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<style>
body {
background-color: white;
}
</style>
<body>
<audio id="myAudio">
<!--<source src="https://comcast.app.hulu.com/build_files/comcast/1/11bffef6a07d.85cdc58a07b5/resources/sounds/sound-salutation.wav" type="audio/wav">-->
<source src="https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_700KB.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<p>Click the buttons to play or pause the audio.</p>
<button onclick="playAudio()" type="button">Play Audio</button>
<button onclick="pauseAudio()" type="button">Pause Audio</button>
<button onclick="loadAudio()" type="button">Load Audio</button>
<script>
var x = document.getElementById("myAudio");
function playAudio() {
x.play();
}
function pauseAudio() {
x.pause();
}
function loadAudio() {
x.load();
}
</script>
</body>
</html>