Skip to content

Commit 9ed57a5

Browse files
committed
bump selkies for input passing support and SDL2 gamepad interposer support
1 parent ce9fef8 commit 9ed57a5

5 files changed

Lines changed: 35 additions & 31 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN \
1616
https://github.com/selkies-project/selkies.git \
1717
/src && \
1818
cd /src && \
19-
git checkout -f db030a319f6e60994ec1be23217506ddab56ac5f
19+
git checkout -f d70c9155e0df97ac1e6ac7a4cce04e4b04840286
2020

2121
RUN \
2222
echo "**** build shared core library ****" && \
@@ -190,7 +190,7 @@ RUN \
190190
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
191191
curl -o \
192192
/tmp/selkies.tar.gz -L \
193-
"https://github.com/selkies-project/selkies/archive/db030a319f6e60994ec1be23217506ddab56ac5f.tar.gz" && \
193+
"https://github.com/selkies-project/selkies/archive/d70c9155e0df97ac1e6ac7a4cce04e4b04840286.tar.gz" && \
194194
cd /tmp && \
195195
tar xf selkies.tar.gz && \
196196
cd selkies-* && \

Dockerfile.aarch64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN \
1616
https://github.com/selkies-project/selkies.git \
1717
/src && \
1818
cd /src && \
19-
git checkout -f db030a319f6e60994ec1be23217506ddab56ac5f
19+
git checkout -f d70c9155e0df97ac1e6ac7a4cce04e4b04840286
2020

2121
RUN \
2222
echo "**** build shared core library ****" && \
@@ -188,7 +188,7 @@ RUN \
188188
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
189189
curl -o \
190190
/tmp/selkies.tar.gz -L \
191-
"https://github.com/selkies-project/selkies/archive/db030a319f6e60994ec1be23217506ddab56ac5f.tar.gz" && \
191+
"https://github.com/selkies-project/selkies/archive/d70c9155e0df97ac1e6ac7a4cce04e4b04840286.tar.gz" && \
192192
cd /tmp && \
193193
tar xf selkies.tar.gz && \
194194
cd selkies-* && \

Jenkinsfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ pipeline {
838838
-e WEB_PATH=\"${CI_WEBPATH}\" \
839839
-e NODE_NAME=\"${NODE_NAME}\" \
840840
-e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \
841+
-e COMMIT_SHA=\"${COMMIT_SHA}\" \
842+
-e BUILD_NUMBER=\"${BUILD_NUMBER}\" \
841843
-t ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} \
842844
python3 test_build.py'''
843845
}

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -223,26 +223,27 @@ When secure mode is enabled (`SELKIES_MASTER_TOKEN` is set), the server runs a c
223223
224224
**Permissions Object Fields:**
225225
* `"role"`: (String, required) Can be one of the following:
226-
* `"controller"`: Full access. Can send keyboard, mouse, and all other input events.
227-
* `"viewer"`: Restricted access. Primarily for viewing the stream. Can be granted specific input rights via the `slot` property.
228-
* `"slot"`: (Integer or `null`, required) Assigns an input slot, for gamepads.
229-
* `null`: No specific input slot. A viewer with a `null` slot has no input capabilities.
230-
* `1`: Grants the `viewer` control over the **Player 1** gamepad *only*.
231-
* `2`: Grants the `viewer` control over the **Player 2** gamepad *only*.
232-
* `3`: Grants the `viewer` control over the **Player 3** gamepad *only*.
233-
* `4`: Grants the `viewer` control over the **Player 4** gamepad *only*.
234-
235-
**Behavior:** When a valid request is received, the server replaces its entire set of active tokens with the new set provided in the payload. It then runs a reconciliation process: any connected client whose token is now invalid or has changed permissions will be disconnected and users input capabilities will be modified live.
226+
* `"controller"`: Full access. Can send keyboard, mouse, and all other input events (unless overridden by `mk_control`).
227+
* `"viewer"`: Restricted access. Primarily for viewing the stream. Can be granted specific input rights via the `slot` or `mk_control` properties.
228+
* `"slot"`: (Integer or `null`, required) Assigns an input slot, primarily for gamepads.
229+
* `null`: No specific input slot.
230+
* `1` - `4`: Grants the user control over the specific virtual gamepad slot (Player 1 through Player 4).
231+
* `"mk_control"`: (Boolean, optional) Exclusive override for Mouse & Keyboard input.
232+
* If `true` on **any** active token in the set, only that specific client processes mouse and keyboard events.
233+
* If `false` or omitted on **all** active tokens, mouse and keyboard access defaults to clients with the `"controller"` role.
234+
235+
**Behavior:** When a valid request is received, the server replaces its entire set of active tokens with the new set provided in the payload. It then runs a reconciliation process:
236+
1. Clients with tokens not present in the new set are disconnected.
237+
2. Clients with tokens that remain valid but have changed permissions (`role`, `slot`, or `mk_control`) receive an immediate state update without disconnection.
236238
237239
**Example `curl` Command:**
238240
```bash
239241
curl -X POST http://localhost:8083/tokens \
240242
-H "Authorization: Bearer my-secret-master-token" \
241243
-H "Content-Type: application/json" \
242244
-d '{
243-
"user-token-1": {"role": "controller", "slot": null},
244-
"user-token-2": {"role": "viewer", "slot": 1},
245-
"user-token-3": {"role": "viewer", "slot": null}
245+
"token-1": {"role": "controller", "slot": null, "mk_control": false},
246+
"token-2": {"role": "viewer", "slot": 1, "mk_control": true}
246247
}'
247248
```
248249

readme-vars.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -227,29 +227,30 @@ full_custom_readme: |
227227
228228
**Permissions Object Fields:**
229229
* `"role"`: (String, required) Can be one of the following:
230-
* `"controller"`: Full access. Can send keyboard, mouse, and all other input events.
231-
* `"viewer"`: Restricted access. Primarily for viewing the stream. Can be granted specific input rights via the `slot` property.
232-
* `"slot"`: (Integer or `null`, required) Assigns an input slot, for gamepads.
233-
* `null`: No specific input slot. A viewer with a `null` slot has no input capabilities.
234-
* `1`: Grants the `viewer` control over the **Player 1** gamepad *only*.
235-
* `2`: Grants the `viewer` control over the **Player 2** gamepad *only*.
236-
* `3`: Grants the `viewer` control over the **Player 3** gamepad *only*.
237-
* `4`: Grants the `viewer` control over the **Player 4** gamepad *only*.
238-
239-
**Behavior:** When a valid request is received, the server replaces its entire set of active tokens with the new set provided in the payload. It then runs a reconciliation process: any connected client whose token is now invalid or has changed permissions will be disconnected and users input capabilities will be modified live.
230+
* `"controller"`: Full access. Can send keyboard, mouse, and all other input events (unless overridden by `mk_control`).
231+
* `"viewer"`: Restricted access. Primarily for viewing the stream. Can be granted specific input rights via the `slot` or `mk_control` properties.
232+
* `"slot"`: (Integer or `null`, required) Assigns an input slot, primarily for gamepads.
233+
* `null`: No specific input slot.
234+
* `1` - `4`: Grants the user control over the specific virtual gamepad slot (Player 1 through Player 4).
235+
* `"mk_control"`: (Boolean, optional) Exclusive override for Mouse & Keyboard input.
236+
* If `true` on **any** active token in the set, only that specific client processes mouse and keyboard events.
237+
* If `false` or omitted on **all** active tokens, mouse and keyboard access defaults to clients with the `"controller"` role.
238+
239+
**Behavior:** When a valid request is received, the server replaces its entire set of active tokens with the new set provided in the payload. It then runs a reconciliation process:
240+
1. Clients with tokens not present in the new set are disconnected.
241+
2. Clients with tokens that remain valid but have changed permissions (`role`, `slot`, or `mk_control`) receive an immediate state update without disconnection.
240242
241243
**Example `curl` Command:**
242244
```bash
243245
curl -X POST http://localhost:8083/tokens \
244246
-H "Authorization: Bearer my-secret-master-token" \
245247
-H "Content-Type: application/json" \
246248
-d '{
247-
"user-token-1": {"role": "controller", "slot": null},
248-
"user-token-2": {"role": "viewer", "slot": 1},
249-
"user-token-3": {"role": "viewer", "slot": null}
249+
"token-1": {"role": "controller", "slot": null, "mk_control": false},
250+
"token-2": {"role": "viewer", "slot": 1, "mk_control": true}
250251
}'
251252
```
252-
253+
253254
Clients in this mode must connect with a valid token (`?token=...`) to establish a WebSocket connection.
254255
255256
### DRI3 GPU Acceleration

0 commit comments

Comments
 (0)