Skip to content

Commit 0d14fa8

Browse files
committed
Migrate documents
1 parent 76a42fb commit 0d14fa8

21 files changed

Lines changed: 313 additions & 34 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow builds a CMake project and deploys the specified
22
# 'build/client/' directory to GitHub Pages.
3-
# Written by Gemini 2.5 Pro
3+
# Generated by Gemini 2.5 Pro
44
name: Deploy Client to GitHub Pages
55

66
on:

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
SonyHeadphonesClient
22
===
33

4-
Building (Regular CMake)
5-
---
4+
A spiritual successor to [Plutoberth's original SonyHeadphonesClient](https://github.com/Plutoberth/SonyHeadphonesClient) - now with standardized support for newer devices and more platforms.
5+
6+
## Compatiblity
7+
8+
The following platforms (applies to `libmdr`, `client`) are *natively* supported with first-party effort.
9+
10+
| Platform | Support Status | Maintainers |
11+
| ---------------- | -------------- | -------------------- |
12+
| Windows | Full Support | @mos9527, @Amrsatrio |
13+
| Linux | Full Support | @mos9527 |
14+
| Web (Emscripten) | Full Support | @mos9527 |
15+
16+
For device support, refer to `docs/device-support` to check. If the feature support status for your own device is missing/incorrect/untested here, feel free to submit an [Issue](https://github.com/mos9527/SonyHeadphonesClient/issues/new) so we can work on it!
17+
18+
## Notes on Web Platform
19+
20+
The client app is available as a Progressive Web App with exact UI/Feature parity seen in other platforms.
21+
22+
**Live version is available** at: https://mos9527.com/SonyHeadphonesClient/
23+
24+
A [Web Serial](https://caniuse.com/wf-serial) supporting browser is required - with a minor exception of Chrome on Android where [Web serial over Bluetooth on Android](https://cr-status.appspot.com/feature/5139978918821888) is supported as of Android build 138. You can expect the app to work on all reasonably new Desktop Chrome browsers, and the latest Android Chrome builds.
25+
26+
As always, status reports are welcome - please do submit an Issue if your browser supports the Web version of the client app.
27+
28+
## For Developers
29+
30+
We have extensive documentations available in the source files. Moreover, refer to the respective README files in each source folder to understand what they do!
31+
32+
### Building (Regular CMake)
633
This is no different from your regular CMake projects.
734
Dependencies are managed by CMake's `FetchContent` and are always statically linked, so no worries - Expect things to *just work*.
835

@@ -13,8 +40,7 @@ cmake ..
1340
cmake --build . --target SonyHeadphonesClient
1441
```
1542

16-
Building (emscripten)
17-
---
43+
### Building (emscripten)
1844
- Install the SDK with `emsdk` and verify your installation - https://emscripten.org/docs/getting_started/downloads.html
1945
- Run `emcmake cmake ...` in place of configuration.
2046
- Or, set up CMake Toolchain variables manually with e.g.
@@ -25,10 +51,9 @@ mkdir build
2551
cd build
2652
emcmake cmake ..
2753
cmake --build . --target SonyHeadphonesClient
28-
```
54+
```
2955
- Run the generated page with `emrun client/index.html` - or host it with any static HTTP server.
3056

31-
IntelliJ CLion/Rider (emscripten)
32-
---
57+
### IntelliJ CLion/Rider (emscripten)
3358
Set up CMake Toolchain variables with a new CMake Profile (in CMake options) - you can
3459
then build from there and serve the static content within `<build directory>/client/` with any static HTTP server.

client/Platform/Emscripten/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ file(
33
STATIC_FILES
44
"${CMAKE_CURRENT_LIST_DIR}/*.html"
55
"${CMAKE_CURRENT_LIST_DIR}/*.css"
6+
"${CMAKE_CURRENT_LIST_DIR}/*.json"
67
"${CMAKE_CURRENT_LIST_DIR}/*.js"
8+
"${CMAKE_CURRENT_LIST_DIR}/*.png"
79
)
810

911
add_library(Client_PlatformEmscripten)
5.11 KB
Loading
14.9 KB
Loading

client/Platform/Emscripten/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1" />
6-
<meta name="description" content="Cross-platform Sony® Sound Connect (formerly Headphones Connect™) FOSS Client App">
6+
<meta name="description" content="Cross-platform Sony Sound Connect (formerly Headphones Connect) implementation">
77
<meta name="author" content="mos9527">
88
<meta name="keywords" content="Sony, Headphones, Sound Connect, Headphones Connect, SonyHeadphonesClient">
99
<meta property="og:title" content="SonyHeadphonesClient - Web Client">
10-
<meta property="og:description" content="Cross-platform Sony® Sound Connect (formerly Headphones Connect™) FOSS Client App">
10+
<meta property="og:description" content="Cross-platform Sony Sound Connect (formerly Headphones Connect) implementation">
1111
<meta property="og:type" content="website">
12-
12+
<link rel="manifest" href="manifest.json" />
1313
<title>SonyHeadphonesClient - Web Client</title>
1414
<style>
1515
body {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "SonyHeadphonesClient - Web Client",
3+
"short_name": "SonyClient",
4+
"description": "Cross-platform Sony Sound Connect (formerly Headphones Connect) implementation",
5+
"start_url": "/",
6+
"display": "standalone",
7+
"background_color": "#000000",
8+
"theme_color": "#000000",
9+
"icons": [
10+
{
11+
"src": "icon-192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "icon-512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
]
21+
}

client/Platform/Emscripten/sw.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// # Generated by Gemini 2.5 Pro
2+
const CACHE_NAME = 'SonyHeadphonesClient-assets';
3+
4+
// --- IMPORTANT ---
5+
// You MUST list all your static files here.
6+
// I've added the obvious ones, especially your WASM file.
7+
const FILES_TO_CACHE = [
8+
'/',
9+
'index.html',
10+
'SonyHeadphonesClient.js',
11+
'SonyHeadphonesClient.wasm', // This is the one you mentioned.
12+
'icon-192.png', // The icon from the manifest
13+
'icon-512.png' // The other icon from the manifest
14+
];
15+
16+
// On install, cache all the files
17+
self.addEventListener('install', (evt) => {
18+
evt.waitUntil(
19+
caches.open(CACHE_NAME).then((cache) => {
20+
console.log('[ServiceWorker] Pre-caching assets');
21+
// addAll() fetches and caches all at once.
22+
// If one fails, the whole install fails.
23+
return cache.addAll(FILES_TO_CACHE);
24+
})
25+
);
26+
self.skipWaiting();
27+
});
28+
29+
// On activate, clean up old caches
30+
self.addEventListener('activate', (evt) => {
31+
evt.waitUntil(
32+
caches.keys().then((keyList) => {
33+
return Promise.all(keyList.map((key) => {
34+
if (key !== CACHE_NAME) {
35+
console.log('[ServiceWorker] Removing old cache', key);
36+
return caches.delete(key);
37+
}
38+
}));
39+
})
40+
);
41+
self.clients.claim();
42+
});
43+
44+
// On fetch, serve from cache first (Cache-First strategy)
45+
self.addEventListener('fetch', (evt) => {
46+
evt.respondWith(
47+
caches.match(evt.request).then((response) => {
48+
// If we have it in cache, serve it.
49+
// Otherwise, fetch it from the network.
50+
return response || fetch(evt.request);
51+
})
52+
);
53+
});

client/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Client
2+
===
3+
Reference client interface implementation for every platform `libmdr` supports.
4+
5+
## Credits
6+
The following third-party libraries are used in the implementation.
7+
8+
- https://github.com/fmtlib/fmt
9+
10+
- https://github.com/ocornut/imgui
11+
- https://github.com/libsdl-org/SDL
12+
13+
The custom font `PlexSansIcon` is created with the following source fonts.
14+
15+
- https://github.com/IBM/plex
16+
17+
- https://github.com/FortAwesome/Font-Awesome
18+
19+
...with the help of FontForge.
20+
21+
- https://fontforge.org/

contrib/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
contrib
2+
===
3+
4+
The sole `CMakeLists.txt` contains declaration of all third-party libraries used in this project.
5+
6+
Respective Credits are given in the other source directories - take a look!

0 commit comments

Comments
 (0)