mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 10:15:31 +00:00
Add a minimal example
This commit is contained in:
parent
b0f5bfbde5
commit
0bf403bb28
3 changed files with 23 additions and 4 deletions
|
|
@ -1,6 +1,12 @@
|
|||
# Usage
|
||||
|
||||
Here's how to use Winamp-js in your own project:
|
||||
Here's how to use Winamp-js in your own project.
|
||||
|
||||
## Examples
|
||||
|
||||
If you would like to look as some examples check out the [examples directory](../examples/) were you will find:
|
||||
|
||||
* [Minimal](../examples/minimal/) - An example that just uses a `<script>` tag that points to a CDN. No install required.
|
||||
|
||||
## Install
|
||||
|
||||
|
|
|
|||
13
examples/minimal/README.md
Normal file
13
examples/minimal/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Minimal Example
|
||||
|
||||
This example fetches the Winamp2-js bundle from a free CDN, and fetches the audio file and skin from a free CDN as well.
|
||||
|
||||
You should be able to open this local html file in your browser and see Winamp2-js working.
|
||||
|
||||
```
|
||||
$ git clone git@github.com:captbaritone/winamp2-js.git
|
||||
$ cd winamp2-js
|
||||
$ open examples/minimal/index.html
|
||||
```
|
||||
|
||||
Or just navigate to <https://cdn.rawgit.com/captbaritone/winamp2-js/master/examles/minimal/index.html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<body>
|
||||
<div id='app'></div>
|
||||
<script src="./built/winamp.bundle.min.js"></script>
|
||||
<script src="https://unpkg.com/winamp2-js@0.0.6/built/winamp.bundle.min.js"></script>
|
||||
<script>
|
||||
const Winamp = window.winamp2js;
|
||||
new Winamp({
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
artist: "DJ Mike Llama",
|
||||
title: "Llama Whippin' Intro"
|
||||
},
|
||||
url: "./mp3/llama-2.91.mp3"
|
||||
url: "https://cdn.rawgit.com/captbaritone/winamp2-js/43434d82/mp3/llama-2.91.mp3"
|
||||
}],
|
||||
initialSkin: {
|
||||
url: "./skins/base-2.91.wsz"
|
||||
url: "https://cdn.rawgit.com/captbaritone/winamp2-js/43434d82/skins/base-2.91.wsz"
|
||||
},
|
||||
}).renderWhenReady(document.getElementById('app'));
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue