Skip to content

Commit 0ffa445

Browse files
authored
Add files via upload
1 parent 36ec2c6 commit 0ffa445

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+8649
-1
lines changed

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
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+
![Screenshot of the pwamp app](screenshot-playlist.png)
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.

about.css

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/* Colors in this CSS are hardcoded because we want the about
2+
screen to always look the same, no matter what skin is used. */
3+
4+
#about-dialog {
5+
/* Please keep these colors in sync with skins/default.css */
6+
--back: #181c25;
7+
--text: #fefefe;
8+
--primary: #ffbb50;
9+
}
10+
11+
#about-dialog::backdrop {
12+
background-color: #0008;
13+
}
14+
15+
#about-dialog {
16+
max-width: 900px;
17+
border: 1px solid black;
18+
border-radius: .5rem;
19+
background: var(--back);
20+
color: var(--text);
21+
box-shadow: 0 0 1rem 0 #0008;
22+
overflow: hidden;
23+
padding: 0;
24+
display: grid;
25+
grid-template-columns: minmax(260px, 1fr) 2fr;
26+
grid-template-rows: min-content auto auto;
27+
}
28+
29+
#about-dialog:not([open]) {
30+
display: none;
31+
}
32+
33+
#about-dialog > * {
34+
grid-column: 1;
35+
}
36+
37+
#about-dialog .screenshot {
38+
grid-column: 2;
39+
grid-row: 1 / -1;
40+
background-image: url(./visualizer.png);
41+
background-repeat: no-repeat;
42+
background-size: cover;
43+
}
44+
45+
#about-dialog .logo {
46+
place-self: center;
47+
margin: 2rem 0 1rem 0;
48+
}
49+
50+
#about-dialog h1, #about-dialog h2 {
51+
text-align: center;
52+
margin: 1rem;
53+
font-size: 1rem;
54+
}
55+
56+
#about-dialog h2 {
57+
font-weight: normal;
58+
font-size: .8rem;
59+
margin: 2rem;
60+
}
61+
62+
#about-dialog p {
63+
font-size: .8rem;
64+
margin: 1rem 2rem;
65+
}
66+
67+
#about-dialog .actions {
68+
margin: 0 1rem 2rem 1rem;
69+
text-align: center;
70+
}
71+
72+
#about-dialog button {
73+
font-size: .8rem;
74+
background: var(--primary);
75+
color: var(--back);
76+
border-radius: .25rem;
77+
padding: .3rem;
78+
cursor: pointer;
79+
}
80+
81+
#about-dialog button[disabled] {
82+
display: none;
83+
}

0 commit comments

Comments
 (0)