Add multiple screenshare previews instead of line indicators

Signed-off-by: Milton Moura <miltonmoura@gmail.com>
This commit is contained in:
Milton Moura
2026-07-29 00:46:54 +00:00
parent 3e5edd03a6
commit 0fafe181ce
14 changed files with 814 additions and 58 deletions

View File

@@ -25,6 +25,15 @@ const defaultLiveKitPublishOptions: TrackPublishDefaults = {
simulcast: true,
videoSimulcastLayers: [VideoPresets.h180, VideoPresets.h360] as VideoPreset[],
screenShareEncoding: ScreenSharePresets.h1080fps30.encoding,
// Screen shares are published as three layers rather than LiveKit's default
// two. The default low layer is only downscaled by 2 (960x540 at full
// framerate), which is far more than a small preview needs; adding an
// explicit 360p/3fps layer lets subscribers that only render a thumbnail
// (such as the spotlight switcher previews) pull a very cheap stream.
screenShareSimulcastLayers: [
ScreenSharePresets.h360fps3,
ScreenSharePresets.h720fps15,
] as VideoPreset[],
stopMicTrackOnMute: false,
videoCodec: "vp8",
videoEncoding: VideoPresets.h720.encoding,