Skip to content

Commit e36768e

Browse files
committed
Added missing documentation for onCameraFlashToggled
1 parent aa99bd6 commit e36768e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ onParticipantDisabledAudioTrack | func | no | | Called when an audio track has
3434
onStatsReceived | func | no | | Callback that is called when stats are received (after calling getStats)
3535
onNetworkQualityLevelsChanged | func | no | | Callback that is called when network quality levels are changed (only if enableNetworkQualityReporting in connect is set to true)
3636
onDominantSpeakerDidChange | func | no | | Called when dominant speaker changes @param {{ participant, room }} dominant participant and room
37+
onCameraFlashToggled | func | no | | Called when dominant speaker changes @param {{ isFlashOn, error }} dominant participant
3738
-----
3839

3940
**src/TwilioVideo.ios.js**

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ declare module "react-native-twilio-video-webrtc" {
6868

6969
export type NetworkLevelChangeEventCb = (p: NetworkLevelChangeEventArgs) => void;
7070

71+
export type CameraToggled = (p: { isFlashOn: boolean, error?: string}) => void;
72+
7173
export type TwilioVideoProps = ViewProps & {
7274
onCameraDidStart?: () => void;
7375
onCameraDidStopRunning?: (err: any) => void;
76+
onCameraFlashToggled?: CameraToggled;
7477
onCameraWasInterrupted?: () => void;
7578
onParticipantAddedAudioTrack?: TrackEventCb;
7679
onParticipantAddedVideoTrack?: TrackEventCb;

src/TwilioVideo.ios.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ export default class TwilioVideo extends Component {
150150
* @param {{ participant, room }} dominant participant
151151
*/
152152
onDominantSpeakerDidChange: PropTypes.func,
153+
/**
154+
* Called when torch is done attempting to toggle
155+
* @param {{ error, isFlashOn }}
156+
*/
157+
onCameraFlashToggled: PropTypes.func,
153158
...View.propTypes
154159
}
155160

0 commit comments

Comments
 (0)