-
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.
Improve docs and fix bug with specifying window size when not using M…
…ilkdrop
- Loading branch information
1 parent
946b57a
commit 025f9e7
Showing
10 changed files
with
219 additions
and
80 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
<script src="https://unpkg.com/[email protected]/lib/butterchurnPresets.min.js"></script> | ||
<script> | ||
const Webamp = window.Webamp; | ||
new Webamp({ | ||
const webamp = new Webamp({ | ||
initialTracks: [ | ||
{ | ||
metaData: { | ||
|
@@ -46,7 +46,8 @@ | |
playlist: { position: { x: 0, y: 232 }, size: [0, 4] }, | ||
milkdrop: { position: { x: 275, y: 0 }, size: [7, 12] }, | ||
}, | ||
}).renderWhenReady(document.getElementById("app")); | ||
}); | ||
webamp.renderWhenReady(document.getElementById("app")); | ||
</script> | ||
</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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Minimal Example Window Layout | ||
|
||
This example demonstrates configuring the initial layout of windows in Webamp. | ||
|
||
You should be able to open this local html file in your browser and see Webamp working. | ||
|
||
``` | ||
$ git clone [email protected]:captbaritone/webamp.git | ||
$ cd webamp | ||
$ open examples/minimalWindowLayout/index.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!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/[email protected]/built/webamp.bundle.min.js"></script> | ||
<script> | ||
const Webamp = window.Webamp; | ||
const webamp = new Webamp({ | ||
windowLayout: { | ||
main: { | ||
position: { top: 0, left: 0 }, | ||
shadeMode: true, | ||
closed: false, | ||
}, | ||
equalizer: { | ||
position: { top: 230, left: 0 }, | ||
shadeMode: true, | ||
closed: false, | ||
}, | ||
playlist: { | ||
position: { top: 28, left: 0 }, | ||
shadeMode: false, | ||
size: { extraHeight: 3, extraWidth: 11 }, | ||
closed: false, | ||
}, | ||
}, | ||
enableDoubleSizeMode: true, | ||
}); | ||
|
||
// Returns a promise indicating when it's done loading. | ||
webamp.renderWhenReady(document.getElementById("app")); | ||
</script> | ||
</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
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
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
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
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
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
Oops, something went wrong.