Skip to content

Commit

Permalink
Added missing method for flash toggling on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
marqroldan committed Mar 10, 2021
1 parent e36768e commit c9f3b3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ declare module "react-native-twilio-video-webrtc" {
connect: (options: iOSConnectParams | androidConnectParams) => void;
disconnect: () => void;
flipCamera: () => void;
toggleFlash: () => void;
toggleSoundSetup: (speaker: boolean) => void;
getStats: () => void;
publishLocalAudio: () => void;
Expand Down
7 changes: 7 additions & 0 deletions src/TwilioVideo.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ export default class TwilioVideo extends Component {
TWVideoModule.flipCamera()
}

/**
* Toggle Torch functionality
*/
toggleFlash () {
TWVideoModule.toggleFlash()
}

/**
* Toggle audio setup from speaker (default) and headset
*/
Expand Down

0 comments on commit c9f3b3d

Please sign in to comment.