Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
add setAllParticipantsVolume method on Ios side
Browse files Browse the repository at this point in the history
  • Loading branch information
kbetl-dlb committed Sep 8, 2023
1 parent 3bc8bfa commit dee5ff7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/Services/AudioService/RNRemoteAudioServiceModuleBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions ios/Services/AudioService/RemoteAudioServiceModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit dee5ff7

Please sign in to comment.