From 81734b852c79f031b40b2cdcbdf0df6ceb6d0cd2 Mon Sep 17 00:00:00 2001 From: Daniel Abramov Date: Mon, 3 Jul 2023 11:26:43 +0100 Subject: [PATCH] Add simulcast layers for the screen sharing --- src/livekit/options.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/livekit/options.ts b/src/livekit/options.ts index 86db3029..86d3ee02 100644 --- a/src/livekit/options.ts +++ b/src/livekit/options.ts @@ -15,7 +15,11 @@ const defaultLiveKitPublishOptions: TrackPublishDefaults = { forceStereo: false, simulcast: true, videoSimulcastLayers: [VideoPresets.h180, VideoPresets.h216] as VideoPreset[], - screenShareEncoding: ScreenSharePresets.h1080fps15.encoding, + screenShareEncoding: ScreenSharePresets.h1080fps30.encoding, + screenShareSimulcastLayers: [ + new VideoPreset(1920, 1080, 1_500_000, 5, "medium"), + ScreenSharePresets.h1080fps15, + ] as VideoPreset[], stopMicTrackOnMute: false, videoCodec: "vp8", videoEncoding: VideoPresets.h360.encoding,