Skip to content

Commit

Permalink
Merge pull request react-native-webrtc#9 from wazo-pbx/fix_dtmf
Browse files Browse the repository at this point in the history
Fix DTMF retrieval
  • Loading branch information
manuquentin authored Jan 29, 2019
2 parents 06b5c47 + 2a59bbb commit 73d0ff4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ const answerCall = handler =>
eventEmitter.addListener(RNCallKeepPerformAnswerCallAction, (data) => handler(isIOS ? data : {}));

const endCall = handler =>
eventEmitter.addListener(RNCallKeepPerformEndCallAction, (data) => { handler(isIOS ? data : {}); });
eventEmitter.addListener(RNCallKeepPerformEndCallAction, (data) => handler(isIOS ? data : {}));

const didActivateAudioSession = handler =>
eventEmitter.addListener(RNCallKeepDidActivateAudioSession, () => { handler(); });
eventEmitter.addListener(RNCallKeepDidActivateAudioSession, handler);

const didDisplayIncomingCall = handler =>
eventEmitter.addListener(RNCallKeepDidDisplayIncomingCall, (data) => { handler(isIOS ? data.error : null); });
eventEmitter.addListener(RNCallKeepDidDisplayIncomingCall, (data) => handler(isIOS ? data.error : null));

const didPerformSetMutedCallAction = handler =>
eventEmitter.addListener(RNCallKeepDidPerformSetMutedCallAction, (data) => { handler(data.muted); });
eventEmitter.addListener(RNCallKeepDidPerformSetMutedCallAction, (data) => handler(data.muted));

const didPerformDTMFAction = handler => {
// @TODO: handle DTMF on iOS
if (isIOS) {
return;
}

eventEmitter.addListener(RNCallKeepDidPerformDTMFAction, (data) => { handler(data.number); });
eventEmitter.addListener(RNCallKeepDidPerformDTMFAction, handler);
};

export const listeners = {
Expand Down

0 comments on commit 73d0ff4

Please sign in to comment.