Skip to content

Commit

Permalink
Squash: Fix ktlint.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Jan 28, 2025
1 parent 58ec525 commit 4573e85
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,28 +215,28 @@ class ChatRoomMemberImpl(
}

val newVideoCodecs =
presence.getExtension(JitsiParticipantCodecList::class.java)?.let {
if (!it.codecs.contains("vp8")) {
if (firstPresence) {
logger.warn("Video codec list {${it.codecs}} does not contain vp8! Adding manually.")
presence.getExtension(JitsiParticipantCodecList::class.java)?.let {
if (!it.codecs.contains("vp8")) {
if (firstPresence) {
logger.warn("Video codec list {${it.codecs}} does not contain vp8! Adding manually.")
}
it.codecs + "vp8"
} else {
it.codecs
}
it.codecs + "vp8"
} else {
it.codecs
}
} ?: // Older clients sent a single codec in codecType rather than all supported ones in codecList
presence.getExtensionElement("jitsi_participant_codecType", "jabber:client")?.let {
if (it is StandardExtensionElement) {
val codec = it.text.lowercase()
if (codec == "vp8") {
listOf(codec)
} ?: // Older clients sent a single codec in codecType rather than all supported ones in codecList
presence.getExtensionElement("jitsi_participant_codecType", "jabber:client")?.let {
if (it is StandardExtensionElement) {
val codec = it.text.lowercase()
if (codec == "vp8") {
listOf(codec)
} else {
listOf(codec, "vp8")
}
} else {
listOf(codec, "vp8")
null
}
} else {
null
}
}
if (!firstPresence && newVideoCodecs != videoCodecs) {
// Allowing this to change would mess up visitor codec preference counts, ignore the change
if (role == MemberRole.VISITOR) {
Expand Down

0 comments on commit 4573e85

Please sign in to comment.