Skip to main content

Quick Start Guide

Here is the most minimal example of adding Webamp to an HTML page:

<!DOCTYPE html>
<html>
<body>
<div id="app" style="height: 100vh">
<!-- Webamp will attempt to center itself within this div -->
</div>
<script type="module">
import Webamp from "https://unpkg.com/webamp@^2";
const webamp = new Webamp({});

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

For more examples you can copy from, see Examples.

Next Steps

  1. Installation - Learn how to install Webamp in your project, including how to use it with npm or a CDN.
  2. Initialization - Learn about initializing Webamp, including how to create a Webamp instance and render it in your HTML document.
  3. API - Learn about the Webamp API, including how to control playback, add tracks, and more.