From f7f739001ea48b3d0f38e58c2ce51289e5a88477 Mon Sep 17 00:00:00 2001 From: davidliu Date: Mon, 23 Feb 2026 22:32:13 +0900 Subject: [PATCH] Fix not detecting server supported video codecs correctly --- .changeset/three-actors-travel.md | 5 +++++ .../io/livekit/android/room/participant/LocalParticipant.kt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/three-actors-travel.md diff --git a/.changeset/three-actors-travel.md b/.changeset/three-actors-travel.md new file mode 100644 index 000000000..758622e50 --- /dev/null +++ b/.changeset/three-actors-travel.md @@ -0,0 +1,5 @@ +--- +"client-sdk-android": patch +--- + +Fix not detecting server supported video codecs correctly diff --git a/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt b/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt index 687e5ea4d..a03cdaa8b 100644 --- a/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt +++ b/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 LiveKit, Inc. + * Copyright 2023-2026 LiveKit, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -514,7 +514,7 @@ internal constructor( synchronized(enabledPublishVideoCodecs) { if (enabledPublishVideoCodecs.isNotEmpty()) { - if (enabledPublishVideoCodecs.none { allowedCodec -> allowedCodec.mime.mimeTypeToVideoCodec() == options.videoCodec }) { + if (enabledPublishVideoCodecs.none { allowedCodec -> allowedCodec.mime.mimeTypeToVideoCodec().equals(options.videoCodec, ignoreCase = true) }) { val oldCodec = options.videoCodec val newCodec = enabledPublishVideoCodecs .firstOrNull { it.mime.mimeTypeToVideoCodec() != null }