livekit / client-sdk-android

LiveKit SDK for Android
https://docs.livekit.io
Apache License 2.0
165 stars 64 forks source link

Can't change room settings for videoTrackCaptureDefaults #344

Closed billypap1 closed 7 months ago

billypap1 commented 7 months ago

Describe the bug

Hi, I have integrated LiveKit Android SDK ("io.livekit:livekit-android:1.5.3") to my Android app but I have an issue setting the room settings.

I have set the following settings:

val roomOptions = RoomOptions(
     false,false,null,null, LocalVideoTrackOptions(false,null,CameraPosition.FRONT,
         VideoCaptureParameter(160,90,30)
     ),null, videoTrackPublishDefaults = VideoTrackPublishDefaults(
         VideoEncoding(800000,30),false,VideoCodec.VP9.codecName,null,
         BackupVideoCodec(VideoCodec.VP8.codecName,VideoEncoding(800000,30),false)
     )
 )

 val connectOptions = ConnectOptions(true,null,null,false,false,ProtocolVersion.v9)

 room.connect(
     url,
     tokenRoom!!,
     connectOptions,
     roomOptions
 )

As you can see in the code, I have set Video Dimensions to h90 -> 160x90 16:9 30fps.

In the room analytics (Dashboard) I get resolution of 960x720 with 1-1.5 mbps bitrate (our limit is set to 800.000Kbps). It doesn't apply the settings that I set. I don't have any issue with other Livekit's SDKs (JS,iOS).

Is this a bug?

To Reproduce Steps to reproduce the behavior:

  1. Use LiveKit Android SDK ("io.livekit:livekit-android:1.5.3")
  2. Try to connect with the settings above.

Expected behavior The resolution should be h90 and bitrate lower than 800.000kbps. It seems like the default values don't change on set.

Device Info:

davidliu commented 7 months ago

This was marked as completed; did it resolve itself?