Skip to content

Commit 749318c

Browse files
Update the param naming convension
1 parent c34ae22 commit 749318c

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ public void setMutedCall(String uuid, boolean shouldMute) {
420420
/**
421421
* toggle audio route for speaker via connection service function
422422
* @param uuid
423-
* @param useSpeaker
423+
* @param routeSpeaker
424424
*/
425425
@ReactMethod
426-
public void toggleAudioRouteSpeaker(String uuid, boolean useSpeaker) {
426+
public void toggleAudioRouteSpeaker(String uuid, boolean routeSpeaker) {
427427
VoiceConnection conn = (VoiceConnection) VoiceConnectionService.getConnection(uuid);
428428
if (conn == null) {
429429
return;

index.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ declare module 'react-native-callkeep' {
138138
* @description setMutedCall method is available only on iOS.
139139
*/
140140
static setMutedCall(uuid: string, muted: boolean): void
141+
141142
/**
142-
* @description toggleAudioRouteSpeaker method is available only on Android.
143-
*/
144-
static toggleAudioRouteSpeaker(uuid: string, useSpeaker: boolean) {
143+
* @description toggleAudioRouteSpeaker method is available only on Android.
144+
* @param uuid
145+
* @param routeSpeaker
146+
*/
147+
static toggleAudioRouteSpeaker(uuid: string, routeSpeaker: boolean) {
145148

146149
}
147150
static setOnHold(uuid: string, held: boolean): void

index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,12 @@ class RNCallKeep {
183183

184184
sendDTMF = (uuid, key) => RNCallKeepModule.sendDTMF(uuid, key);
185185
/**
186-
* when Phone call is active, Android control the audio service via connection service.
187-
* so this function help to toggle the audio to Speaker or wired/ear-piece or vice-versa
186+
* @description when Phone call is active, Android control the audio service via connection service. so this function help to toggle the audio to Speaker or wired/ear-piece or vice-versa
188187
* @param {*} uuid
189-
* @param {*} useSpeaker
190-
* @returns toggle the Audio state to Speaker and vice-versa
188+
* @param {*} routeSpeaker
189+
* @returns Audio route state of audio service
191190
*/
192-
toggleAudioRouteSpeaker = (uuid, useSpeaker) => isIOS ? null : RNCallKeepModule.toggleAudioRouteSpeaker(uuid, useSpeaker);
191+
toggleAudioRouteSpeaker = (uuid, routeSpeaker) => isIOS ? null : RNCallKeepModule.toggleAudioRouteSpeaker(uuid, routeSpeaker);
193192

194193
checkIfBusy = () =>
195194
isIOS ? RNCallKeepModule.checkIfBusy() : Promise.reject('RNCallKeep.checkIfBusy was called from unsupported OS');

0 commit comments

Comments
 (0)