html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Valentine's Day Code I</title>
<style>
body {
background: #000 url('https://dl.dropbox.com/scl/fi/2becduqibkn3vd9nqaqin/7f1126e6-22b3-4714-a7aa-d6b5a5736f7a.jpeg?rlkey=wlqan2hu2ej6silpfvq7j9erg&st=3abokvy1&dl=1')
no-repeat center center / cover;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
overflow: hidden;
}
canvas {
position: absolute;
top: 0;
left: 0;
}
#infoButton {
position: absolute;
top: 10px;
left: 10px;
background: rgba(255, 255, 255, 0.2);
Enter to Rename, Shift+Enter to Preview
css
css
1
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var url = 'https://dl.dropbox.com/scl/fi/n9cuvp9bh5lx9gdtp81fs/shorts-bringmeback-milesaway-remix-remixedit-shortslyrics-englishlyrics-remixlyrics-128-ytshorts.savetube.me.mp3?rlkey=92lwo1pl93gplhskbuxptibj5&st=qex8uonn&dl=1';
window.AudioContext = window.AudioContext||window.webkitAudioContext; //fix up prefixing
var context = new AudioContext(); //context
var source = context.createBufferSource(); //source node
source.connect(context.destination); //connect source to speakers so we can hear it
var request = new XMLHttpRequest();
request.open('GET', url, true);
request.responseType = 'arraybuffer'; //the response is an array of bits
request.onload = function() {
context.decodeAudioData(request.response, function(response) {
source.buffer = response;
source.start(0); //play audio immediately
source.loop = true;
}, function () { console.error('The request failed.'); } );
}
request.send();
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run