Skip to content

Commit

Permalink
Make it a little more clear that renderWhenReady does not return th…
Browse files Browse the repository at this point in the history
…e Webamp instance.
  • Loading branch information
captbaritone committed Nov 27, 2020
1 parent 5a93682 commit fb7f702
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/minimal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script src="https://unpkg.com/[email protected]/built/webamp.bundle.min.js"></script>
<script>
const Webamp = window.Webamp;
new Webamp({
const webamp = new Webamp({
initialTracks: [{
metaData: {
artist: "DJ Mike Llama",
Expand All @@ -21,7 +21,10 @@
url: "https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3",
duration: 5.322286
}],
}).renderWhenReady(document.getElementById('app'));
})

// Returns a promise indicating when it's done loading.
webamp.renderWhenReady(document.getElementById('app'));
</script>
</body>

Expand Down

0 comments on commit fb7f702

Please sign in to comment.