From a7355aebadb672fed6d8573cfc69d048fc3e6f45 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 18 Apr 2022 21:40:03 -0700 Subject: [PATCH] sdk: add webrtc screen hints --- common/src/rtc-signaling.ts | 6 +++++- sdk/gen/types.input.ts | 4 ++++ sdk/types/index.d.ts | 4 ++++ sdk/types/index.ts | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/common/src/rtc-signaling.ts b/common/src/rtc-signaling.ts index 1838bf4ae..59395f81c 100644 --- a/common/src/rtc-signaling.ts +++ b/common/src/rtc-signaling.ts @@ -23,7 +23,11 @@ export class BrowserSignalingSession implements RTCSignalingSession { codecs: undefined, headerExtensions: undefined, }, - } + }, + screen: { + width: screen.width, + height: screen.height, + }, }; constructor(public peerConnectionCreated?: (pc: RTCPeerConnection) => Promise, public cleanup?: () => void) { diff --git a/sdk/gen/types.input.ts b/sdk/gen/types.input.ts index 29dfb16dd..fe5aa53b2 100644 --- a/sdk/gen/types.input.ts +++ b/sdk/gen/types.input.ts @@ -1419,6 +1419,10 @@ export interface RTCSignalingOptions { audio?: RTCRtpCapabilities; }; userAgent?: string; + screen?: { + width: number; + height: number; + }; } export interface RTCSessionControl { diff --git a/sdk/types/index.d.ts b/sdk/types/index.d.ts index d4d686e0e..f78d30993 100644 --- a/sdk/types/index.d.ts +++ b/sdk/types/index.d.ts @@ -1449,6 +1449,10 @@ export interface RTCSignalingOptions { audio?: RTCRtpCapabilities; }; userAgent?: string; + screen?: { + width: number; + height: number; + }; } export interface RTCSessionControl { getRefreshAt(): Promise; diff --git a/sdk/types/index.ts b/sdk/types/index.ts index 78c299564..049289802 100644 --- a/sdk/types/index.ts +++ b/sdk/types/index.ts @@ -2120,6 +2120,10 @@ export interface RTCSignalingOptions { audio?: RTCRtpCapabilities; }; userAgent?: string; + screen?: { + width: number; + height: number; + }; } export interface RTCSessionControl {