This message was deleted.
# helpdesk
s
This message was deleted.
b
Here is the code:
Copy code
const room = await roomState.connect(url, token, undefined);
      
      const videoTrack = await createLocalVideoTrack({
        deviceId: { exact: deviceId },
        // preset resolutions
        resolution: VideoPresets.h1080,
      });

      await room.localParticipant.publishTrack(videoTrack);
This message contains interactive elements.
Note that i need to use the
exact deviceId
so that it connects the correct device to the room. Without the
exact
keyword it doesn't add the correct device.
d
just to confirm, does the device support capturing at 1080p? this is strange that it's not honoring the specified dimensions. what happens when you acquire the track manually with
getUserMedia
? does it give you 1080p?
b
hi @dry-elephant-14928. • The device I'm testing with supports 4k (it's a 360 camera) •
getUserMedia
returns the same
640x480
dimensions
Also tested it just now with the built in Facetime camera on the mac M2. Still
640x480
. Very strange.
d
that sounds like a compatibility issue with the browser and the 360 camera? we would basically pass on the call to getUserMedia. It's worth trying different combination of getUserMedia calls, if any of them can successfully retrieve 4k, then you could do the same with livekit
b
Thanks for your help on this David. I found out that the camera resource was being used in the background (I hadn't unmounted the component correctly), which caused the camera to connect at a lower resolution.