mirror of
https://github.com/captbaritone/webamp
synced 2024-11-22 16:20:49 +00:00
50 lines
1.7 KiB
HTML
Executable File
50 lines
1.7 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app" style="height: 100vh">
|
|
<!-- Webamp will attempt to center itself within this div -->
|
|
</div>
|
|
<script src="https://unpkg.com/webamp@1.4.2/built/webamp.bundle.min.js"></script>
|
|
<script>
|
|
const Webamp = window.Webamp;
|
|
const webamp = new Webamp({
|
|
// Optional. An array of objects representing skins.
|
|
// These will appear in the "Options" menu under "Skins".
|
|
// Note: These URLs must be served with the correct CORs headers.
|
|
//
|
|
// These will appear in the dropdown menu under "Skins".
|
|
availableSkins: [
|
|
{
|
|
url: "https://archive.org/cors/winampskin_Green-Dimension-V2/Green-Dimension-V2.wsz",
|
|
name: "Green Dimension V2",
|
|
},
|
|
{
|
|
url: "https://archive.org/cors/winampskin_mac_os_x_1_5-aqua/mac_os_x_1_5-aqua.wsz",
|
|
name: "Mac OSX v1.5 (Aqua)",
|
|
},
|
|
],
|
|
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,
|
|
},
|
|
],
|
|
});
|
|
|
|
// Returns a promise indicating when it's done loading.
|
|
webamp.renderWhenReady(document.getElementById("app"));
|
|
</script>
|
|
</body>
|
|
</html>
|