Skip to content

Commit c9f3b3d

Browse files
committed
Added missing method for flash toggling on iOS
1 parent e36768e commit c9f3b3d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ declare module "react-native-twilio-video-webrtc" {
128128
connect: (options: iOSConnectParams | androidConnectParams) => void;
129129
disconnect: () => void;
130130
flipCamera: () => void;
131+
toggleFlash: () => void;
131132
toggleSoundSetup: (speaker: boolean) => void;
132133
getStats: () => void;
133134
publishLocalAudio: () => void;

src/TwilioVideo.ios.js

+7
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ export default class TwilioVideo extends Component {
213213
TWVideoModule.flipCamera()
214214
}
215215

216+
/**
217+
* Toggle Torch functionality
218+
*/
219+
toggleFlash () {
220+
TWVideoModule.toggleFlash()
221+
}
222+
216223
/**
217224
* Toggle audio setup from speaker (default) and headset
218225
*/

0 commit comments

Comments
 (0)