|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <html>
|
3 |
| - |
4 |
| -<head> |
| 3 | + <head> |
5 | 4 | <meta charset="utf-8" />
|
6 |
| -</head> |
| 5 | + </head> |
7 | 6 |
|
8 |
| -<body> |
| 7 | + <body> |
9 | 8 | <div id="app" style="height: 100vh">
|
10 |
| - <!-- Webamp will attempt to center itself within this div --> |
| 9 | + <!-- Webamp will attempt to center itself within this div --> |
11 | 10 | </div>
|
12 | 11 | <script src=" https://unpkg.com/[email protected]/built/webamp.bundle.min.js" ></script>
|
13 | 12 | <script src=" https://unpkg.com/[email protected]/lib/butterchurn.min.js" ></script>
|
14 | 13 | <script src=" https://unpkg.com/[email protected]/lib/butterchurnPresets.min.js" ></script>
|
15 | 14 | <script>
|
16 |
| - const Webamp = window.Webamp; |
17 |
| - new Webamp({ |
18 |
| - initialTracks: [{ |
19 |
| - metaData: { |
20 |
| - artist: "DJ Mike Llama", |
21 |
| - title: "Llama Whippin' Intro" |
22 |
| - }, |
23 |
| - // NOTE: Your audio file must be served from the same domain as your HTML |
24 |
| - // file, or served with permissive CORS HTTP headers: |
25 |
| - // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
26 |
| - url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", |
27 |
| - duration: 5.322286 |
28 |
| - }], |
29 |
| - __butterchurnOptions: { |
30 |
| - importButterchurn: () => Promise.resolve(window.butterchurn), |
31 |
| - getPresets: () => { |
32 |
| - const presets = window.butterchurnPresets.getPresets(); |
33 |
| - return Object.keys(presets).map((name) => { |
34 |
| - return { |
35 |
| - name, |
36 |
| - butterchurnPresetObject: presets[name] |
37 |
| - }; |
38 |
| - }); |
39 |
| - }, |
40 |
| - butterchurnOpen: true |
| 15 | + const Webamp = window.Webamp; |
| 16 | + new Webamp({ |
| 17 | + initialTracks: [ |
| 18 | + { |
| 19 | + metaData: { |
| 20 | + artist: "DJ Mike Llama", |
| 21 | + title: "Llama Whippin' Intro", |
41 | 22 | },
|
42 |
| - __initialWindowLayout: { |
43 |
| - main: { position: { x: 0, y: 0 } }, |
44 |
| - equalizer: { position: { x: 0, y: 116 } }, |
45 |
| - playlist: { position: { x: 0, y: 232 }, size: [0, 4] }, |
46 |
| - milkdrop: { position: { x: 275, y: 0 }, size: [7, 12] } |
47 |
| - } |
48 |
| - }).renderWhenReady(document.getElementById('app')); |
| 23 | + // NOTE: Your audio file must be served from the same domain as your HTML |
| 24 | + // file, or served with permissive CORS HTTP headers: |
| 25 | + // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
| 26 | + url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", |
| 27 | + duration: 5.322286, |
| 28 | + }, |
| 29 | + ], |
| 30 | + __butterchurnOptions: { |
| 31 | + importButterchurn: () => Promise.resolve(window.butterchurn), |
| 32 | + getPresets: () => { |
| 33 | + const presets = window.butterchurnPresets.getPresets(); |
| 34 | + return Object.keys(presets).map((name) => { |
| 35 | + return { |
| 36 | + name, |
| 37 | + butterchurnPresetObject: presets[name], |
| 38 | + }; |
| 39 | + }); |
| 40 | + }, |
| 41 | + butterchurnOpen: true, |
| 42 | + }, |
| 43 | + __initialWindowLayout: { |
| 44 | + main: { position: { x: 0, y: 0 } }, |
| 45 | + equalizer: { position: { x: 0, y: 116 } }, |
| 46 | + playlist: { position: { x: 0, y: 232 }, size: [0, 4] }, |
| 47 | + milkdrop: { position: { x: 275, y: 0 }, size: [7, 12] }, |
| 48 | + }, |
| 49 | + }).renderWhenReady(document.getElementById("app")); |
49 | 50 | </script>
|
50 |
| -</body> |
51 |
| - |
| 51 | + </body> |
52 | 52 | </html>
|
0 commit comments