Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(device): stream iOS devices that serve WebRTC only #21841

Mergedjuliusmarmingemerged 6 commits intodevice/host-owns-device-ops fromrefs/pull/21841/headmerged by juliusmarminge View on GitHub

Showing 7 changed files with 27 additions and 1 deletion (loading 4).

x
0 of 7 viewed, 7 left
4 additions and 0 deletionsapps/mobile/src/features/devices/device-stream.browser.tsModified
View file
@@ -140,6 +140,10 @@
canvas.style.display = "none";
image.style.display = "block";
+ onCanvasVideo: () => {
+ image.style.display = "none";
+ canvas.style.display = "";
+ },
onUnauthorized: unauthorized,
onInputConnected: (connected) => {
inputConnected = connected;
15 additions and 0 deletionsapps/server/src/device/DeviceHubProxy.test.tsModified
View file
@@ -152,6 +152,21 @@
expect(headers[0]).not.toHaveProperty("x-forwarded-proto");
});
​
+ it("lets a viewer negotiate a WebRTC stream with read scope", async () => {
+ const { handler, requests, headers } = fixture([AuthOrchestrationReadScope]);
+ const offer = await handler(
+ new Request("http://t3.test/api/device-hub/vendor/serve-sim/helper/udid-1/webrtc/offer", {
+ method: "POST",
+ headers: { "content-type": "application/json" },
+ body: '{"type":"offer"}',
+ }),
+ );
+ expect(offer.status).toBe(200);
+ await offer.text();