|
1 |
| -# guifi |
| 1 | +# PWAmp app demo |
| 2 | + |
| 3 | +➡️ **[Open the demo](https://microsoftedge.github.io/Demos/pwamp/)** ⬅️ |
| 4 | + |
| 5 | +PWAmp (pronounced P-W-Amp) is a web audio player demo application. It is an installable web app (PWA) specifically made to demonstrate desktop-integration features. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## User guide |
| 10 | + |
| 11 | +* Open the app: https://microsoftedge.github.io/Demos/pwamp/ |
| 12 | +* To add new songs: |
| 13 | + * Either drag and drop audio files from your explorer onto the playlist area. |
| 14 | + * Or click the `+` button in the bottom toolbar. |
| 15 | +* Artist, title, and album information are parsed from the song files (if available). |
| 16 | +* To edit song information, click on the artist, title, or album fields and edit the text. |
| 17 | +* To add custom artworks for albums, drag and drop image files onto songs. |
| 18 | +* Use the top toolbar to play, pause, and go to the next or previous songs. |
| 19 | +* The bottom toolbar contains the following extra features: |
| 20 | + * Apply a custom skin: select a .css or .pwampskin file to replace the look and feel of the app with your own. |
| 21 | + * Record an audio clip: click once to start recording, click once more to stop recording. |
| 22 | + * Show visualizer: click to toggle the visualizer mode. |
| 23 | + * More tools: options to download all songs or delete all songs. |
| 24 | +* If you install the PWA locally on desktop, the following features become available: |
| 25 | + * Audio files are handled natively. Just double-click an audio file to add it to your PWAmp library. |
| 26 | + * *.pwampskin files are also handled natively, Double-click one such file to change the look and feel of the app. |
| 27 | + * The custom `web+amp` protocol is handled natively. Share links of remote songs with other people by using `web+amp:remote-song:<url-to-song>` links. You can also share skins with other people by using `web+amp:skin:<url-to-skin>`. |
| 28 | + [Example song link](web+amp:remote-song:ia803003.us.archive.org/17/items/78_by-the-light-of-the-silvery-moon_fats-waller-and-his-rhythm-fats-waller-the-dee_gbia0153541a/BY%20THE%20LIGHT%20OF%20THE%20SILVERY%20-%20%22Fats%22%20Waller%20and%20his%20Rhythm.mp3) |
| 29 | + * The title bar becomes toggleable. Click the chevron icon in the toolbar to hide it. |
| 30 | + * The app becomes a share target for audio files. If you share audio files from another app (or from the explorer), PWAmp is displayed as a target app for these files. |
| 31 | + |
| 32 | +## Making a new skin |
| 33 | + |
| 34 | +A skin is a CSS file that gets applied to the app, replacing the default CSS. |
| 35 | + |
| 36 | +The best way to make a new skin is to open DevTools and look at the HTML structure of the page. Most elements should have handy classes and IDs that will make them easy to style. |
| 37 | + |
| 38 | +Skins are expected to have a `:root {}` rule with at least one variable called `--back` set to the color of the background. This will be used at runtime, in JavaScript, by the app to apply the color to the visualizer and the title bar area. |
| 39 | + |
| 40 | +## What does the name mean? |
| 41 | + |
| 42 | +[Winamp](https://en.wikipedia.org/wiki/Winamp) was a very successful media player application for Microsoft Windows. PWAmp's name was inspired by it, we just replaced the `win` part with `PW` which are the 2 first letters of PWA (which stands for [Progressive Web App](https://learn.microsoft.com/microsoft-edge/progressive-web-apps-chromium/)). The name Webamp might have made more sense but was [already used](https://webamp.org/). |
| 43 | + |
| 44 | +You can think of this app as the "Progressive Web Amp". |
| 45 | + |
| 46 | +## Song credits |
| 47 | + |
| 48 | +The first time you open the app, a few songs are pre-loaded. These are remote URL songs, so they will only play when you are online. |
| 49 | + |
| 50 | +Credits for those songs: |
| 51 | + |
| 52 | +* "Reunion", and "Over The Stargates" by David Rousset, used with the author's approval. More information and songs on [soundcloud](https://soundcloud.com/david-rousset). |
| 53 | +* "Opening" and "Aloe-Almond Butter And Space Pesto" by Noi2er, from the [Internet Archive](https://archive.org/details/DWK382). |
| 54 | + |
| 55 | +## TODO |
| 56 | + |
| 57 | +* Make sure the app is accessible in high-contrast mode. |
| 58 | +* Make it possible to download remote songs locally (fetch -> readablestream -> store chunks in IDB. And then fetch handler in SW to serve these chunks back from IDB when offline). |
| 59 | +* Improve song adding performance again: only get duration later, after song has been added. |
| 60 | +* Add the ability to drag/drop songs in the playlist to re-order them. |
| 61 | +* Ability to export as another file format. |
| 62 | +* Use viewport segments to display on dual screen devices. |
| 63 | +* Add repeat and shuffle buttons. |
0 commit comments