Hi Livekit Team, We’re facing an issue with `Video...
# sdk-native
a
Hi Livekit Team, We’re facing an issue with
VideoTrack.dimensions
in the
didSubscribeTrack
method. Previously, the LiveKit SDK returned the correct video dimensions, but now it returns
width=0
and
height=0
. This happens on both iOS and Android apps. This is causing our iOS app to crash in production, and our customers are being directly impacted. We first noticed this with LiveKitSDK v2.0.12, and even after updating to v2.8.1, the problem persists —
didSubscribeTrack
still provides
0x0
video dimensions. This is a production-blocking issue affecting real users, so we request your urgent attention. Could you please confirm if there have been any recent changes in the SDK related to this behavior and provide guidance on resolution? @tall-belgium-91876 @plain-wall-1315
p
which sdks are you using? the android and swift sdks?
a
We are using both the iOS Swift and Android LiveKit SDKs, and on both platforms the
didSubscribeTrack
method is returning video track dimensions as
0x0
. Previously, the SDK provided the correct video dimensions, but now it returns
width=0
and
height=0
, which is causing our iOS app to crash. The SDK versions in use are: • LiveKit iOS SDK: v2.0.12 • LiveKit Android SDK: v2.6.0
p
what are you accessing for the dimensions?
a
Below is the iOS code snippet: func room(_ room: Room, participant: RemoteParticipant, didSubscribeTrack publication: RemoteTrackPublication) { guard let track = publication.track as? VideoTrack else { return } DispatchQueue.main.async { if let dimensions = track.dimensions { self.setContentHeight(for: dimensions) } self.remoteVideoView.track = track } }
p
what about for android?
there hasn’t really been any changes around the dimensions for quite a long while, though if you’re getting the dimensions directly from the track, that’s not necessarily reliable since the actual video data may not have been received yet. you should instead just use the dimension data from the track publication
a
Here is android code snippet: suspend fun listenEvents( renderer: LiveKitVideoRenderer, roomEvent: (eventType: CallEventType, message: String?) -> Unit ) { this.roomEvent = roomEvent this.renderer = renderer room?.events?.collect { event -> when (event) { is RoomEvent.TrackSubscribed -> { Log.d(voipLiveKitTag, "on Livekit VideoTrack ") event.publication.dimensions?.let { setViewDimensions(it, renderer) } (event.track as? VideoTrack)?.let { videoTrack-> videoTrack.addRenderer(renderer) roomEvent.invoke(CallEventType.TrackSubscribed, null) } } else -> { } } } }
The code for fetching video track dimensions in the
didSubscribeTrack
method was implemented in our mobile apps about a year ago and had been working flawlessly. However, all of a sudden the apps have started receiving
0x0
video dimensions instead of the correct values. This unexpected change is breaking the flow and even causing crashes in the iOS app, so we urgently need clarity on it.
Could you please share any updates on this issue? @tall-belgium-91876 @plain-wall-1315
p
I haven’t been seeing any 0x0 dimensions on the android sdk. cc: @better-house-11852
b
Hmm I don't think we changed anything about that in the Swift SDK recently, I wonder if it's some kind of server change .