wrong SimulcastLayers order for livekit plugin?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 398
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 2
Description
reference: https://docs.livekit.io/client-sdk-js/interfaces/trackpublishdefaults.html
the description in livekit-client API document says it should be ordered from low quality to high quality, but the code in livekit plugin is the opposite.
code is here: server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/components/ActiveRoom.tsx:50
const roomOptions = useMemo((): RoomOptions => {
return {
videoCaptureDefaults: {
deviceId: userChoices.videoDeviceId ?? undefined,
resolution: hq === true ? VideoPresets.h2160 : VideoPresets.h720,
},
publishDefaults: {
videoSimulcastLayers:
hq === true
? [VideoPresets.h1080, VideoPresets.h720] // here
: [VideoPresets.h720, VideoPresets.h540, VideoPresets.h216], // here
screenShareSimulcastLayers:
hq === true
? [ScreenSharePresets.h1080fps15, ScreenSharePresets.h720fps5] // here
: [ScreenSharePresets.h720fps5, ScreenSharePresets.h360fps3], // here
},
audioCaptureDefaults: {
deviceId: userChoices.audioDeviceId ?? undefined,
},
adaptiveStream: { pixelDensity: 'screen' },
dynacast: true,
};
}, [userChoices, hq]);
also the hq variable seems always to be false
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/components/ActiveRoom.tsx:50 and compare the simulcast layer arrays with the linked LiveKit TrackPublishDefaults documentation. Trace where the hq variable is set and used to determine why it appears false. Done means the layer ordering matches the documented expectation and the hq behavior is understood and corrected if needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100