Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong SimulcastLayers order for livekit plugin? #248

Open
kingins opened this issue Aug 11, 2024 · 3 comments
Open

wrong SimulcastLayers order for livekit plugin? #248

kingins opened this issue Aug 11, 2024 · 3 comments

Comments

@kingins
Copy link

kingins commented Aug 11, 2024

5d1a5a1faec7ef16c4f32637320b134a

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

@moonrailgun
Copy link
Contributor

idk because i just reference with official demo.

https://github.com/livekit-examples/meet/blob/84c6151e4bf6472f22fa0e7376857bbf6dcfaea1/pages/rooms/%5Bname%5D.tsx#L133

did you found somthing different in real use?

@kingins
Copy link
Author

kingins commented Aug 11, 2024

idk because i just reference with official demo.

https://github.com/livekit-examples/meet/blob/84c6151e4bf6472f22fa0e7376857bbf6dcfaea1/pages/rooms/%5Bname%5D.tsx#L133

did you found somthing different in real use?

it's likely that these params didn't take effect because I changed these codes here hoping to start a 60fps screen sharing and found it doesn't work. It seems that the config is overwritten here in the livekit client:
image

The frame rate sharing is always15fps. I also found the debug info in the console that shows the default 15fps becomes a constraint:
image

BTW, I found that I can't see the members in a livekit room before joining when using self-compiled docker image without any changes (v1.11.6 release tag). But this is ok yesterday when I was using the image pulled from the docker registry.

@moonrailgun
Copy link
Contributor

feel free to send a PR to help us improve code.

BTW, I found that I can't see the members in a livekit room before joining when using self-compiled docker image without any changes (v1.11.6 release tag). But this is ok yesterday when I was using the image pulled from the docker registry.

i dont think its has different between official docker image and source code because its auto build by github action. its maybe others reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants