Update index.html
Browse files- index.html +16 -11
index.html
CHANGED
|
@@ -205,17 +205,22 @@ lumin("query", "username", "logic", true)
|
|
| 205 |
Your browser does not support the audio element.
|
| 206 |
</audio>
|
| 207 |
<script>
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
</script>
|
| 220 |
</body>
|
| 221 |
</html>
|
|
|
|
| 205 |
Your browser does not support the audio element.
|
| 206 |
</audio>
|
| 207 |
<script>
|
| 208 |
+
// Menggunakan metode fetch untuk mendapatkan URL file MP3 dari server
|
| 209 |
+
fetch('https://pomf2.lain.la/f/jcn759xf.mp3')
|
| 210 |
+
.then(response => {
|
| 211 |
+
if (!response.ok) {
|
| 212 |
+
throw new Error('Network response was not ok');
|
| 213 |
+
}
|
| 214 |
+
return response.blob();
|
| 215 |
+
})
|
| 216 |
+
.then(blob => {
|
| 217 |
+
var url = URL.createObjectURL(blob);
|
| 218 |
+
var myAudio = document.getElementById('myAudio');
|
| 219 |
+
myAudio.src = url; // Mengatur src audio element dengan URL yang diperoleh
|
| 220 |
+
})
|
| 221 |
+
.catch(error => {
|
| 222 |
+
console.error('There was a problem fetching the MP3 file:', error);
|
| 223 |
+
});
|
| 224 |
</script>
|
| 225 |
</body>
|
| 226 |
</html>
|