···292292 , chunk
293293 [ C.text_sm, C.leading_snug, C.mb_8, C.mt_1, C.opacity_50 ]
294294 [ text "You can find the instructions over "
295295- , UI.Kit.link { label = "here", url = "about#" ++ id }
295295+ , UI.Kit.link { label = "here", url = "about/cors#" ++ id }
296296 ]
297297 ]
298298
-266
src/Static/About/About.md
···11-> A music player that connects to your cloud & distributed storage
22-33-[Return to the application](../)
44-55-66-77-## What makes it different?
88-99-Diffuse is a decentralized music player consisting out of two main parts. One part is the music and the other is your data <small>(eg. playlists)</small>, both of which are in locations of your choice. Meaning that there's no central server for Diffuse, all of the processing happens on your device and all the data is in your control. You can use the [web version](https://diffuse.sh), the [native version](https://github.com/icidasset/diffuse/releases) or host it yourself by downloading the pre-built packages from [Github](https://github.com/icidasset/diffuse).
1010-1111-1212-### Music layer
1313-1414-This layer connects to the services on which your music is stored, no data is written to these services. You can combine all of the following:
1515-1616-- [Amazon S3](https://aws.amazon.com/s3/)
1717-- [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/)
1818-- [Azure File Storage](https://azure.microsoft.com/en-us/services/storage/files/)
1919-- [Dropbox](https://dropbox.com/)
2020-- [Google Drive](https://drive.google.com/)
2121-- [IPFS](https://ipfs.io/) <small>(supports DNSLink & IPNS)</small>
2222-- [WebDAV](https://en.wikipedia.org/wiki/WebDAV)
2323-2424-2525-### User layer
2626-2727-This layer will use a single service on which to store your data. Your data being your settings, favourites, playlists, etc. You can choose between these services:
2828-2929-- [Dropbox](https://www.dropbox.com/)
3030-- [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) <small>(Browser)</small>
3131-- [IPFS](https://ipfs.io/) <small>(using MFS)</small>
3232-- [RemoteStorage](https://remotestorage.io/)
3333-3434-3535-3636-<div id="How" />
3737-3838-## How does it work?
3939-4040-Diffuse locates all the music files on the given services, extracts the metadata and then stores it via the previously-explained user layer.
4141-4242-4343-### Supported File Formats
4444-4545-- MP3
4646-- MP4/M4A
4747-- FLAC
4848-- OGG
4949-- WAV
5050-- WEBM
5151-5252-<small><em>Note, support may vary depending on your <a href="https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#Index_of_media_container_formats_file_types">browser</a>.</em></small>
5353-5454-5555-<div id="CORS" />
5656-5757-### CORS
5858-5959-There's only one thing you need to do yourself so that the service you chose will work with the application, and that's setting up [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross-Origin Resource Sharing). Here are the instructions you'll need for each service:
6060-6161-<div id="CORS__S3" />
6262-6363-#### Amazon S3
6464-6565-You can find the CORS configuration editor under the "Permissions" tab, on the S3 AWS Console.
6666-6767-```xml
6868-<?xml version="1.0" encoding="UTF-8"?>
6969-<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
7070-<CORSRule>
7171- <AllowedOrigin>*</AllowedOrigin>
7272- <AllowedMethod>GET</AllowedMethod>
7373- <AllowedMethod>HEAD</AllowedMethod>
7474- <MaxAgeSeconds>31536000</MaxAgeSeconds>
7575- <ExposeHeader>Content-Length</ExposeHeader>
7676- <ExposeHeader>Content-Type</ExposeHeader>
7777- <AllowedHeader>Range</AllowedHeader>
7878-</CORSRule>
7979-</CORSConfiguration>
8080-```
8181-8282-<div id="CORS__BTFS" />
8383-8484-#### BTFS
8585-8686-Add the domain of the app, with the protocol, to the __list of allowed origins__.
8787-8888-```shell
8989-btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["https://diffuse.sh", "http://diffuse.sh.ipns.localhost:8080", "http://127.0.0.1:44999"]'
9090-```
9191-9292-You can also make this change in the Web UI, you'll find it under "Settings → BTFS Config".
9393-9494-```javascript
9595-{
9696- "API": {
9797- "HTTPHeaders": {
9898- "Access-Control-Allow-Origin": [
9999- "https://diffuse.sh", // 🎵 Default
100100- "http://diffuse.sh.ipns.localhost:8080", // IPNS
101101- "http://127.0.0.1:44999" // Electron app
102102- ]
103103- }
104104- }
105105-}
106106-```
107107-108108-<div id="CORS__Dropbox" />
109109-110110-#### Dropbox
111111-112112-_Not necessary._
113113-114114-<div id="CORS__Google-Drive" />
115115-116116-#### Google Drive
117117-118118-_Not necessary._
119119-120120-<div id="CORS__IPFS" />
121121-122122-#### IPFS
123123-124124-Add the domain of the app, with the protocol, to the __list of allowed origins__.
125125-126126-```shell
127127-ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["https://diffuse.sh", "http://diffuse.sh.ipns.localhost:8080", "http://127.0.0.1:44999"]'
128128-```
129129-130130-You can also make this change in the Web UI, you'll find it under "Settings → IPFS Config".
131131-132132-```javascript
133133-{
134134- "API": {
135135- "HTTPHeaders": {
136136- "Access-Control-Allow-Origin": [
137137- "https://diffuse.sh", // 🎵 Default
138138- "http://diffuse.sh.ipns.localhost:8080", // IPNS through IPFS Companion
139139- "http://127.0.0.1:44999" // Electron app
140140- ]
141141- }
142142- }
143143-}
144144-```
145145-146146-<div id="CORS__Azure" />
147147-148148-#### Microsoft Azure Storage
149149-150150-You can find the CORS configuration under the "Settings -> CORS".
151151-Then fill in the following in the input boxes (left to right):
152152-153153-```
154154-ALLOWED ORIGINS *
155155-ALLOWED METHODS GET, HEAD
156156-ALLOWED HEADERS Range
157157-EXPOSED HEADERS Content-Length, Content-Range
158158-MAX AGE 0
159159-```
160160-161161-<div id="CORS__WebDAV" />
162162-163163-#### WebDAV
164164-165165-__Depends on your WebDAV server.__
166166-Example setup for Henrique Dias's [WebDAV server](https://github.com/hacdias/webdav):
167167-168168-```yaml
169169-cors:
170170- enabled: true
171171- credentials: true
172172-173173- allowed_headers:
174174- - Authorization
175175- - Content-Type
176176- - Depth
177177- - Range
178178- allowed_methods:
179179- - GET
180180- - HEAD
181181- - PROPFIND
182182- allowed_hosts:
183183- - https://diffuse.sh
184184- - http://127.0.0.1:44999
185185- exposed_headers:
186186- - Content-Length
187187- - Content-Type
188188-```
189189-190190-191191-192192-<div id="UI" />
193193-194194-## UI
195195-196196-There are a few "hidden" features:
197197-198198-- **Tracks have a context menu** which can be opened by either right clicking,
199199- or holding it (ie. a long tap). Use the ALT key whilst right clicking
200200- on a track to show the alternative track-context menu with more specialized options.
201201-- **You can reorder items** in the queue or a playlist with drag-and-drop.
202202- Select the item you want to move by tapping on it, then tap and hold to move it around.
203203-- You can select multiple tracks using the SHIFT key and then add that selection
204204- to the queue or a playlist using the context menu.
205205-- Click on the now-playing bit to scroll to that track.
206206-- Double tap on a EQ setting to reset it to its default value.
207207-208208-### Playlists
209209-210210-To add something to a playlist, and create that playlist if it doesn't exist yet, you open the context menu of a track. To move tracks around in a playlist, first select the track, then drag it.
211211-212212-### Search
213213-214214-```shell
215215-# Show me every track where the title, artist or album contains the term 'Parkway' and the term 'Drive'. Terms are separated by spaces (eg. "Killing with a smile" has four terms).
216216-Parkway Drive
217217-218218-# Show me every track of which the artist's name contains 'park'.
219219-artist:park*
220220-221221-# Show me every track from Parkway Drive's "Deep Blue" album.
222222-artist:Parkway Drive album:Deep Blue
223223-224224-# Show me every track from Parkway Drive but not their "Atlas" album.
225225-artist:Parkway Drive - album:Atlas
226226-```
227227-228228-### Keyboard
229229-230230-The app should be usable with only the keyboard, there are various keyboard shortcuts:
231231-232232-```
233233-L - Select playlist using autocompletion
234234-N - Scroll to currently-playing track
235235-P - Play / Pause
236236-R - Toggle Repeat
237237-S - Toggle Shuffle
238238-239239-{ / } - Previous / Next
240240-< / > - Seek forwards / Seek backwards
241241-242242-Alternatively you can use the media-control keys,
243243-if your browser supports it.
244244-245245-ESC - Close overlay, close context-menu, deselect album cover, etc.
246246-247247-1 - Tracks
248248-2 - Playlists
249249-3 - Queue
250250-4 - EQ
251251-252252-8 - Sources
253253-9 - Settings
254254-```
255255-256256-257257-258258-<div id="QA" />
259259-260260-## Q&A
261261-262262-### I used version one, where's my data?
263263-264264-There's a small link, or button if you will, on the "Settings -> Import / Export"
265265-page that will allow you to import data from version 1 of the app. Note that this
266266-will need to reflect the authentication/storage method you chose in version 1.
+141
src/Static/About/CORS.md
···11+> A music player that connects to your cloud & distributed storage
22+33+[Return to the application](../../)
44+[About](../)
55+66+77+88+<div id="CORS" />
99+1010+### CORS
1111+1212+There's only one thing you need to do yourself so that the service you chose will work with the application, and that's setting up [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross-Origin Resource Sharing). Here are the instructions you'll need for each service:
1313+1414+<div id="CORS__S3" />
1515+1616+#### Amazon S3
1717+1818+You can find the CORS configuration editor under the "Permissions" tab, on the S3 AWS Console.
1919+2020+```xml
2121+<?xml version="1.0" encoding="UTF-8"?>
2222+<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
2323+<CORSRule>
2424+ <AllowedOrigin>*</AllowedOrigin>
2525+ <AllowedMethod>GET</AllowedMethod>
2626+ <AllowedMethod>HEAD</AllowedMethod>
2727+ <MaxAgeSeconds>31536000</MaxAgeSeconds>
2828+ <ExposeHeader>Content-Length</ExposeHeader>
2929+ <ExposeHeader>Content-Type</ExposeHeader>
3030+ <AllowedHeader>Range</AllowedHeader>
3131+</CORSRule>
3232+</CORSConfiguration>
3333+```
3434+3535+<div id="CORS__BTFS" />
3636+3737+#### BTFS
3838+3939+Add the domain of the app, with the protocol, to the __list of allowed origins__.
4040+4141+```shell
4242+btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["https://diffuse.sh", "http://diffuse.sh.ipns.localhost:8080", "http://127.0.0.1:44999"]'
4343+```
4444+4545+You can also make this change in the Web UI, you'll find it under "Settings → BTFS Config".
4646+4747+```javascript
4848+{
4949+ "API": {
5050+ "HTTPHeaders": {
5151+ "Access-Control-Allow-Origin": [
5252+ "https://diffuse.sh", // 🎵 Default
5353+ "http://diffuse.sh.ipns.localhost:8080", // IPNS
5454+ "http://127.0.0.1:44999" // Electron app
5555+ ]
5656+ }
5757+ }
5858+}
5959+```
6060+6161+<div id="CORS__Dropbox" />
6262+6363+#### Dropbox
6464+6565+_Not necessary._
6666+6767+<div id="CORS__Google-Drive" />
6868+6969+#### Google Drive
7070+7171+_Not necessary._
7272+7373+<div id="CORS__IPFS" />
7474+7575+#### IPFS
7676+7777+Add the domain of the app, with the protocol, to the __list of allowed origins__.
7878+7979+```shell
8080+ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["https://diffuse.sh", "http://diffuse.sh.ipns.localhost:8080", "http://127.0.0.1:44999"]'
8181+```
8282+8383+You can also make this change in the Web UI, you'll find it under "Settings → IPFS Config".
8484+8585+```javascript
8686+{
8787+ "API": {
8888+ "HTTPHeaders": {
8989+ "Access-Control-Allow-Origin": [
9090+ "https://diffuse.sh", // 🎵 Default
9191+ "http://diffuse.sh.ipns.localhost:8080", // IPNS through IPFS Companion
9292+ "http://127.0.0.1:44999" // Electron app
9393+ ]
9494+ }
9595+ }
9696+}
9797+```
9898+9999+<div id="CORS__Azure" />
100100+101101+#### Microsoft Azure Storage
102102+103103+You can find the CORS configuration under the "Settings -> CORS".
104104+Then fill in the following in the input boxes (left to right):
105105+106106+```
107107+ALLOWED ORIGINS *
108108+ALLOWED METHODS GET, HEAD
109109+ALLOWED HEADERS Range
110110+EXPOSED HEADERS Content-Length, Content-Range
111111+MAX AGE 0
112112+```
113113+114114+<div id="CORS__WebDAV" />
115115+116116+#### WebDAV
117117+118118+__Depends on your WebDAV server.__
119119+Example setup for Henrique Dias's [WebDAV server](https://github.com/hacdias/webdav):
120120+121121+```yaml
122122+cors:
123123+ enabled: true
124124+ credentials: true
125125+126126+ allowed_headers:
127127+ - Authorization
128128+ - Content-Type
129129+ - Depth
130130+ - Range
131131+ allowed_methods:
132132+ - GET
133133+ - HEAD
134134+ - PROPFIND
135135+ allowed_hosts:
136136+ - https://diffuse.sh
137137+ - http://127.0.0.1:44999
138138+ exposed_headers:
139139+ - Content-Length
140140+ - Content-Type
141141+```
+131
src/Static/About/Index.md
···11+> A music player that connects to your cloud & distributed storage
22+33+[Return to the application](../)
44+[CORS instructions](cors/)
55+66+77+88+## What makes it different?
99+1010+Diffuse is a decentralized music player consisting out of two main parts. One part is the music and the other is your data <small>(eg. playlists)</small>, both of which are in locations of your choice. Meaning that there's no central server for Diffuse, all of the processing happens on your device and all the data is in your control. You can use the [web version](https://diffuse.sh), the [native version](https://github.com/icidasset/diffuse/releases) or host it yourself by downloading the pre-built packages from [Github](https://github.com/icidasset/diffuse).
1111+1212+1313+### Music layer
1414+1515+This layer connects to the services on which your music is stored, no data is written to these services. You can combine all of the following:
1616+1717+- [Amazon S3](https://aws.amazon.com/s3/)
1818+- [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/)
1919+- [Azure File Storage](https://azure.microsoft.com/en-us/services/storage/files/)
2020+- [Dropbox](https://dropbox.com/)
2121+- [Google Drive](https://drive.google.com/)
2222+- [IPFS](https://ipfs.io/) <small>(supports DNSLink & IPNS)</small>
2323+- [WebDAV](https://en.wikipedia.org/wiki/WebDAV)
2424+2525+2626+### User layer
2727+2828+This layer will use a single service on which to store your data. Your data being your settings, favourites, playlists, etc. You can choose between these services:
2929+3030+- [Dropbox](https://www.dropbox.com/)
3131+- [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) <small>(Browser)</small>
3232+- [IPFS](https://ipfs.io/) <small>(using MFS)</small>
3333+- [RemoteStorage](https://remotestorage.io/)
3434+3535+3636+3737+<div id="How" />
3838+3939+## How does it work?
4040+4141+Diffuse locates all the music files on the given services, extracts the metadata and then stores it via the previously-explained user layer.
4242+4343+4444+### Supported File Formats
4545+4646+- MP3
4747+- MP4/M4A
4848+- FLAC
4949+- OGG
5050+- WAV
5151+- WEBM
5252+5353+<small><em>Note, support may vary depending on your <a href="https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#Index_of_media_container_formats_file_types">browser</a>.</em></small>
5454+5555+5656+5757+<div id="UI" />
5858+5959+## UI
6060+6161+There are a few "hidden" features:
6262+6363+- **Tracks have a context menu** which can be opened by either right clicking,
6464+ or holding it (ie. a long tap). Use the ALT key whilst right clicking
6565+ on a track to show the alternative track-context menu with more specialized options.
6666+- **You can reorder items** in the queue or a playlist with drag-and-drop.
6767+ Select the item you want to move by tapping on it, then tap and hold to move it around.
6868+- You can select multiple tracks using the SHIFT key and then add that selection
6969+ to the queue or a playlist using the context menu.
7070+- Click on the now-playing bit to scroll to that track.
7171+- Double tap on a EQ setting to reset it to its default value.
7272+7373+### Playlists
7474+7575+To add something to a playlist, and create that playlist if it doesn't exist yet, you open the context menu of a track. To move tracks around in a playlist, first select the track, then drag it.
7676+7777+### Search
7878+7979+```shell
8080+# Show me every track where the title, artist or album contains the term 'Parkway' and the term 'Drive'. Terms are separated by spaces (eg. "Killing with a smile" has four terms).
8181+Parkway Drive
8282+8383+# Show me every track of which the artist's name contains 'park'.
8484+artist:park*
8585+8686+# Show me every track from Parkway Drive's "Deep Blue" album.
8787+artist:Parkway Drive album:Deep Blue
8888+8989+# Show me every track from Parkway Drive but not their "Atlas" album.
9090+artist:Parkway Drive - album:Atlas
9191+```
9292+9393+### Keyboard
9494+9595+The app should be usable with only the keyboard, there are various keyboard shortcuts:
9696+9797+```
9898+L - Select playlist using autocompletion
9999+N - Scroll to currently-playing track
100100+P - Play / Pause
101101+R - Toggle Repeat
102102+S - Toggle Shuffle
103103+104104+{ / } - Previous / Next
105105+< / > - Seek forwards / Seek backwards
106106+107107+Alternatively you can use the media-control keys,
108108+if your browser supports it.
109109+110110+ESC - Close overlay, close context-menu, deselect album cover, etc.
111111+112112+1 - Tracks
113113+2 - Playlists
114114+3 - Queue
115115+4 - EQ
116116+117117+8 - Sources
118118+9 - Settings
119119+```
120120+121121+122122+123123+<div id="QA" />
124124+125125+## Q&A
126126+127127+### I used version one, where's my data?
128128+129129+There's a small link, or button if you will, on the "Settings → Import / Export"
130130+page that will allow you to import data from version 1 of the app. Note that this
131131+will need to reflect the authentication/storage method you chose in version 1.