You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`GET`|`/api/simulators/{udid}/input`| Input WebSocket for fallback transport |
173
-
|`GET`|`/api/simulators/{udid}/control`| Alias for input control WebSocket |
174
-
|`POST`|`/api/simulators/{udid}/refresh`| Request a fresh frame or keyframe |
175
-
176
-
For normal clients, copy the browser behavior instead of hand-coding a raw decoder. The UI supports WebRTC first and H.264 WebSocket fallback. Android emulator IDs use the same endpoints; their H.264 frames are produced from the emulator `-share-vid` display surface, not screenshot polling.
|`GET`|`/api/simulators/{udid}/input`| Input WebSocket fallback for controls |
172
+
|`GET`|`/api/simulators/{udid}/control`| Alias for input control WebSocket |
173
+
|`POST`|`/api/simulators/{udid}/refresh`| Request a fresh frame or keyframe |
174
+
175
+
For normal clients, copy the browser behavior instead of hand-coding a raw decoder. The UI uses the WebRTC offer endpoint for live video. Android emulator IDs use the same WebRTC endpoint; their H.264 frames are produced from the emulator `-share-vid` display surface, not screenshot polling.
Copy file name to clipboardExpand all lines: docs/guide/architecture.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ This is why a long-lived service feels faster than repeatedly calling lower-leve
26
26
27
27
## Video flow
28
28
29
-
The browser opens a live stream for the selected device. SimDeck sends fresh frames, drops stale ones when a client falls behind, and lets the browser request refreshes. iOS frames come from the native display bridge and are encoded on the Mac; Android frames come from the emulator `-share-vid` shared display surface and are encoded on the Mac. The UI can use WebRTC or H.264-over-WebSocket fallback depending on browser support and network behavior.
29
+
The browser opens a live WebRTC stream for the selected device. SimDeck sends fresh frames, drops stale ones when a client falls behind, and lets the browser request refreshes. iOS frames come from the native display bridge and are encoded on the Mac; Android frames come from the emulator `-share-vid` shared display surface and are encoded on the Mac.
If `frames_dropped_server` keeps climbing, the client or network cannot keep up. Move closer to the host, reduce quality, or switch to software encoding.
139
139
140
-
For Android emulator streams, SimDeck uses the emulator `-share-vid` shared display surface. If Android video never starts, confirm `adb devices` shows the emulator as `device`, that it has fully booted, and that externally launched emulators were started with `-share-vid`. SimDeck-owned Android boots add the flag automatically.
140
+
For Android emulator streams, SimDeck uses the emulator `-share-vid` shared display surface. If Android video never starts, confirm `adb devices` shows the emulator as `device`, that it has fully booted, and that externally launched emulators were started with `-share-vid`. SimDeck-owned Android boots add the flag automatically and default to `--android-gpu host`; try `simdeck service restart --android-gpu auto` or `--android-gpu swiftshader_indirect` only when host rendering is unstable.
141
141
142
142
### Browser cannot establish WebRTC
143
143
144
-
Force the H.264 WebSocket fallback while testing:
144
+
Use `?stream=webrtc` while testing to make transport selection explicit:
145
145
146
146
```text
147
-
http://127.0.0.1:4310?stream=h264
147
+
http://127.0.0.1:4310?stream=webrtc
148
148
```
149
149
150
150
For routed remote sessions, configure TURN as described in [Video and streaming](/guide/video#remote-browsers).
Copy file name to clipboardExpand all lines: docs/guide/video.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,19 @@
1
1
# Video and streaming
2
2
3
-
SimDeck streams live device video to the browser. Local sessions default to high quality. Remote or constrained sessions can trade detail for lower CPU and latency.
3
+
SimDeck streams live device video to the browser. Local sessions default to full-resolution 60 fps. Remote or constrained sessions can trade detail for lower CPU and latency.
4
4
5
5
iOS simulator H.264 uses VideoToolbox for hardware encoding and x264 for software encoding.
6
6
Android emulator H.264 uses the emulator `-share-vid` display surface. SimDeck reads BGRA frames from the `videmulator<console-port>` shared memory region and encodes them on the Mac, so normal Android live video stays on the native shared display path.
7
7
8
8
## When encoding runs
9
9
10
10
SimDeck starts encoding when a browser stream needs H.264 frames. For iOS, the
11
-
server requests an initial keyframe to answer the WebRTC or H.264 WebSocket
12
-
viewer, then keeps a shared refresh pump active while frame subscribers exist.
11
+
server requests an initial keyframe to answer the WebRTC viewer, then keeps a
12
+
shared refresh pump active while frame subscribers exist.
13
13
For Android, SimDeck starts emulators with `-share-vid`, maps the shared display
14
14
region, and feeds changed BGRA frames into the native host H.264 encoder.
15
+
SimDeck-owned Android boots also default to `-gpu host`, matching the native
16
+
emulator app's accelerated renderer while staying in headless shared-video mode.
15
17
16
18
The browser reports whether the page and stream canvas are foreground. When all
17
19
known viewers are hidden or the last frame subscriber disconnects, the native
0 commit comments