-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72b1a9f
commit 723afc8
Showing
4 changed files
with
78 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
<div id="app" style="height: 100vh"> | ||
<!-- Webamp will attempt to center itself within this div --> | ||
<!-- Webamp will attempt to center itself within this div --> | ||
</div> | ||
<script src="https://unpkg.com/[email protected]/built/webamp.bundle.min.js"></script> | ||
<script> | ||
const Webamp = window.Webamp; | ||
const webamp = new Webamp({ | ||
initialTracks: [ | ||
{ | ||
metaData: { | ||
artist: "DJ Mike Llama", | ||
title: "Llama Whippin' Intro" | ||
}, | ||
// NOTE: Your audio file must be served from the same domain as your HTML | ||
// file, or served with permissive CORS HTTP headers: | ||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286 | ||
}, | ||
{ | ||
metaData: { | ||
artist: "Some Artist", | ||
title: "Title of Second Track" | ||
}, | ||
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286 | ||
} | ||
], | ||
}); | ||
const Webamp = window.Webamp; | ||
const webamp = new Webamp({ | ||
initialTracks: [ | ||
{ | ||
metaData: { | ||
artist: "DJ Mike Llama", | ||
title: "Llama Whippin' Intro", | ||
}, | ||
// NOTE: Your audio file must be served from the same domain as your HTML | ||
// file, or served with permissive CORS HTTP headers: | ||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286, | ||
}, | ||
{ | ||
metaData: { | ||
artist: "Some Artist", | ||
title: "Title of Second Track", | ||
}, | ||
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286, | ||
}, | ||
], | ||
}); | ||
|
||
// Returns a promise indicating when it's done loading. | ||
webamp.renderWhenReady(document.getElementById('app')); | ||
// Returns a promise indicating when it's done loading. | ||
webamp.renderWhenReady(document.getElementById("app")); | ||
</script> | ||
</body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
<div id="app" style="height: 100vh"> | ||
<!-- Webamp will attempt to center itself within this div --> | ||
<!-- Webamp will attempt to center itself within this div --> | ||
</div> | ||
<script src="https://unpkg.com/[email protected]/built/webamp.bundle.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/lib/butterchurn.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/lib/butterchurnPresets.min.js"></script> | ||
<script> | ||
const Webamp = window.Webamp; | ||
new Webamp({ | ||
initialTracks: [{ | ||
metaData: { | ||
artist: "DJ Mike Llama", | ||
title: "Llama Whippin' Intro" | ||
}, | ||
// NOTE: Your audio file must be served from the same domain as your HTML | ||
// file, or served with permissive CORS HTTP headers: | ||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286 | ||
}], | ||
__butterchurnOptions: { | ||
importButterchurn: () => Promise.resolve(window.butterchurn), | ||
getPresets: () => { | ||
const presets = window.butterchurnPresets.getPresets(); | ||
return Object.keys(presets).map((name) => { | ||
return { | ||
name, | ||
butterchurnPresetObject: presets[name] | ||
}; | ||
}); | ||
}, | ||
butterchurnOpen: true | ||
const Webamp = window.Webamp; | ||
new Webamp({ | ||
initialTracks: [ | ||
{ | ||
metaData: { | ||
artist: "DJ Mike Llama", | ||
title: "Llama Whippin' Intro", | ||
}, | ||
__initialWindowLayout: { | ||
main: { position: { x: 0, y: 0 } }, | ||
equalizer: { position: { x: 0, y: 116 } }, | ||
playlist: { position: { x: 0, y: 232 }, size: [0, 4] }, | ||
milkdrop: { position: { x: 275, y: 0 }, size: [7, 12] } | ||
} | ||
}).renderWhenReady(document.getElementById('app')); | ||
// NOTE: Your audio file must be served from the same domain as your HTML | ||
// file, or served with permissive CORS HTTP headers: | ||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286, | ||
}, | ||
], | ||
__butterchurnOptions: { | ||
importButterchurn: () => Promise.resolve(window.butterchurn), | ||
getPresets: () => { | ||
const presets = window.butterchurnPresets.getPresets(); | ||
return Object.keys(presets).map((name) => { | ||
return { | ||
name, | ||
butterchurnPresetObject: presets[name], | ||
}; | ||
}); | ||
}, | ||
butterchurnOpen: true, | ||
}, | ||
__initialWindowLayout: { | ||
main: { position: { x: 0, y: 0 } }, | ||
equalizer: { position: { x: 0, y: 116 } }, | ||
playlist: { position: { x: 0, y: 232 }, size: [0, 4] }, | ||
milkdrop: { position: { x: 275, y: 0 }, size: [7, 12] }, | ||
}, | ||
}).renderWhenReady(document.getElementById("app")); | ||
</script> | ||
</body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
<div id="app" style="height: 100vh"></div> | ||
<script src="./bundle.js"></script> | ||
</body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
<div id="app" style="height: 100vh"></div> | ||
<script src="./bundle.js"></script> | ||
</body> | ||
|
||
</body> | ||
</html> |