diff --git a/ios/Services/AudioService/RNRemoteAudioServiceModuleBridge.m b/ios/Services/AudioService/RNRemoteAudioServiceModuleBridge.m index 63833a7f..19bade56 100644 --- a/ios/Services/AudioService/RNRemoteAudioServiceModuleBridge.m +++ b/ios/Services/AudioService/RNRemoteAudioServiceModuleBridge.m @@ -16,4 +16,8 @@ @interface RCT_EXTERN_REMAP_MODULE(CommsAPIRemoteAudioModule, RNRemoteAudioServi resolver:(RCTPromiseResolveBlock _Nonnull)resolve rejecter:(RCTPromiseRejectBlock _Nonnull)reject); +RCT_EXTERN_METHOD(setAllParticipantsVolume:(NSNumber * _Nonnull)volume + resolver:(RCTPromiseResolveBlock _Nonnull)resolve + rejecter:(RCTPromiseRejectBlock _Nonnull)reject); + @end diff --git a/ios/Services/AudioService/RemoteAudioServiceModule.swift b/ios/Services/AudioService/RemoteAudioServiceModule.swift index 23282ff3..286afee6 100644 --- a/ios/Services/AudioService/RemoteAudioServiceModule.swift +++ b/ios/Services/AudioService/RemoteAudioServiceModule.swift @@ -76,4 +76,19 @@ public class RemoteAudioServiceModule: NSObject { let result = VoxeetSDK.shared.audio.remote.setVolume(participant: participantObject, volume: volume) resolve(result) } + + /// Sets the volume for all participants in non-Dolby Voice conferences to a preferred value between 0 and 1. + /// - Parameters: + /// - volume: The preferred volume level between 0 (no audio) and 1 (full volume). + /// - resolve: returns on success + /// - reject: returns error on failure + @objc(setAllParticipantsVolume:resolver:rejecter:) + public func setAllParticipantVolume( + volume: Float, + resolve: @escaping RCTPromiseResolveBlock, + reject: @escaping RCTPromiseRejectBlock + ) { + let result = VoxeetSDK.shared.audio.remote.setOutputVolume(volume) + resolve(result) + } }