Skip to content

Commit ece078a

Browse files
authored
Input mixer mute mode (#666)
Adds new mic mute mode: inputMixer, which simply sets inputMixer's outputVolume to 0.0 . This mute's the mic without reconfiguring input / audio session etc. Mic indicator will remain on. Patch: webrtc-sdk/webrtc@21ee7f0
1 parent e4d21bc commit ece078a

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

.nanpa/new-mic-mute-mode.kdl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patch type="added" "New mic mute mode"

LiveKitClient.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Pod::Spec.new do |spec|
1414

1515
spec.source_files = "Sources/**/*"
1616

17-
spec.dependency("LiveKitWebRTC", "= 125.6422.28")
17+
spec.dependency("LiveKitWebRTC", "= 125.6422.29")
1818
spec.dependency("SwiftProtobuf")
1919
spec.dependency("Logging", "= 1.5.4")
2020
spec.dependency("DequeModule", "= 1.1.4")

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
],
1919
dependencies: [
2020
// LK-Prefixed Dynamic WebRTC XCFramework
21-
.package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "125.6422.28"),
21+
.package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "125.6422.29"),
2222
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.26.0"),
2323
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
2424
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),

[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
],
2121
dependencies: [
2222
// LK-Prefixed Dynamic WebRTC XCFramework
23-
.package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "125.6422.28"),
23+
.package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "125.6422.29"),
2424
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.29.0"),
2525
.package(url: "https://github.com/apple/swift-log.git", from: "1.6.2"), // 1.6.x requires Swift >=5.8
2626
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),

[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
],
2121
dependencies: [
2222
// LK-Prefixed Dynamic WebRTC XCFramework
23-
.package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "125.6422.28"),
23+
.package(url: "https://github.com/livekit/webrtc-xcframework.git", exact: "125.6422.29"),
2424
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.29.0"),
2525
.package(url: "https://github.com/apple/swift-log.git", from: "1.6.2"), // 1.6.x requires Swift >=5.8
2626
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),

Sources/LiveKit/Audio/Manager/AudioManager+MuteMode.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public enum MicrophoneMuteMode {
2929
/// Restarts the internal `AVAudioEngine` without mic input when muted.
3030
/// This is slower, and muted speaker detection does not work. No sound effect is played.
3131
case restart
32+
/// Simply mutes the output of the input mixer.
33+
/// The mic indicator remains on, and the internal `AVAudioEngine` continues running without reconfiguration.
34+
case inputMixer
3235
case unknown
3336
}
3437

@@ -73,6 +76,7 @@ extension RTCAudioEngineMuteMode {
7376
switch self {
7477
case .voiceProcessing: return .voiceProcessing
7578
case .restartEngine: return .restart
79+
case .inputMixer: return .inputMixer
7680
case .unknown: return .unknown
7781
@unknown default: return .unknown
7882
}
@@ -85,6 +89,7 @@ extension MicrophoneMuteMode {
8589
case .unknown: return .unknown
8690
case .voiceProcessing: return .voiceProcessing
8791
case .restart: return .restartEngine
92+
case .inputMixer: return .inputMixer
8893
}
8994
}
9095
}

0 commit comments

Comments
 (0)