mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-27 00:48:06 +08:00
19a2494b9b
- Disable temporal layers - Make 30 fps screen-sharing
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import {
|
|
AudioPresets,
|
|
DefaultReconnectPolicy,
|
|
RoomOptions,
|
|
ScreenSharePresets,
|
|
TrackPublishDefaults,
|
|
VideoPreset,
|
|
VideoPresets,
|
|
} from "livekit-client";
|
|
|
|
const defaultLiveKitPublishOptions: TrackPublishDefaults = {
|
|
audioPreset: AudioPresets.music,
|
|
dtx: true,
|
|
red: true,
|
|
forceStereo: false,
|
|
simulcast: true,
|
|
videoSimulcastLayers: [VideoPresets.h180, VideoPresets.h216] as VideoPreset[],
|
|
screenShareEncoding: ScreenSharePresets.h1080fps30.encoding,
|
|
stopMicTrackOnMute: false,
|
|
videoCodec: "vp8",
|
|
videoEncoding: VideoPresets.h360.encoding,
|
|
backupCodec: { codec: "vp8", encoding: VideoPresets.h360.encoding },
|
|
} as const;
|
|
|
|
export const defaultLiveKitOptions: RoomOptions = {
|
|
// automatically manage subscribed video quality
|
|
adaptiveStream: true,
|
|
|
|
// optimize publishing bandwidth and CPU for published tracks
|
|
dynacast: true,
|
|
|
|
// capture settings
|
|
videoCaptureDefaults: {
|
|
resolution: VideoPresets.h360.resolution,
|
|
},
|
|
|
|
// publish settings
|
|
publishDefaults: defaultLiveKitPublishOptions,
|
|
|
|
// default LiveKit options that seem to be sane
|
|
stopLocalTrackOnUnpublish: true,
|
|
reconnectPolicy: new DefaultReconnectPolicy(),
|
|
disconnectOnPageLeave: true,
|
|
expWebAudioMix: false,
|
|
};
|