mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-02 15:03:53 +00:00
Add a minimal example
This commit is contained in:
parent
b0f5bfbde5
commit
0bf403bb28
3 changed files with 23 additions and 4 deletions
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>
|
||||
28
examples/minimal/index.html
Executable file
28
examples/minimal/index.html
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='app'></div>
|
||||
<script src="https://unpkg.com/winamp2-js@0.0.6/built/winamp.bundle.min.js"></script>
|
||||
<script>
|
||||
const Winamp = window.winamp2js;
|
||||
new Winamp({
|
||||
initialTracks: [{
|
||||
metaData: {
|
||||
artist: "DJ Mike Llama",
|
||||
title: "Llama Whippin' Intro"
|
||||
},
|
||||
url: "https://cdn.rawgit.com/captbaritone/winamp2-js/43434d82/mp3/llama-2.91.mp3"
|
||||
}],
|
||||
initialSkin: {
|
||||
url: "https://cdn.rawgit.com/captbaritone/winamp2-js/43434d82/skins/base-2.91.wsz"
|
||||
},
|
||||
}).renderWhenReady(document.getElementById('app'));
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue