Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

React Component Reference

TwilioVideo

From ../src/TwilioVideo.js

onCameraDidStart

onCameraDidStart: Function

Called when the camera has started

onCameraDidStopRunning

onCameraDidStopRunning: Function

Called when the camera has stopped running with an error

@param {{error}} The error message description

onCameraWasInterrupted

onCameraWasInterrupted: Function

Called when the camera has been interrupted

onParticipantAddedAudioTrack

onParticipantAddedAudioTrack: Function

Called when a new audio track has been added

@param {{participant, track}}

onParticipantAddedVideoTrack

onParticipantAddedVideoTrack: Function

Called when a new video track has been added

@param {{participant, track, enabled}}

onParticipantDisabledVideoTrack

onParticipantDisabledVideoTrack: Function

Called when a video track has been disabled.

@param {{participant, track}}

onParticipantDisabledAudioTrack

onParticipantDisabledAudioTrack: Function

Called when an audio track has been disabled.

@param {{participant, track}}

onParticipantEnabledVideoTrack

onParticipantEnabledVideoTrack: Function

Called when a video track has been enabled.

@param {{participant, track}}

onParticipantEnabledAudioTrack

onParticipantEnabledVideoTrack: Function

Called when an audio track has been enabled.

@param {{participant, track}}

onParticipantRemovedAudioTrack

onParticipantRemovedAudioTrack: Function

Called when a audio track has been removed

@param {{participant, track}}

onParticipantRemovedVideoTrack

onParticipantRemovedVideoTrack: Function

Called when a video track has been removed

@param {{participant, track}}

onRoomDidConnect

onRoomDidConnect: Function

Called when the room has connected

@param {{roomName, participants}}

onRoomDidDisconnect

onRoomDidDisconnect: Function

Called when the room has disconnected

@param {{roomName, error}}

onRoomDidFailToConnect

onRoomDidFailToConnect: Function

Called when connection with room failed

@param {{roomName, error}}

onRoomParticipantDidConnect

onRoomParticipantDidConnect: Function

Called when a new participant has connected

@param {{roomName, participant}}

onRoomParticipantDidDisconnect

onRoomParticipantDidDisconnect: Function

Called when a participant has disconnected

@param {{roomName, participant}}

setLocalVideoEnabled

setLocalVideoEnabled: Function

Called when a local video is disable / enabled, how to use it below

_onDisableCameraButtonPress = () => {
  this.refs.twilioVideo
    .setLocalVideoEnabled(!this.state.cameraDisabled)
    .then(cameraDisabled => {
      this.setState({ cameraDisabled });
    });
};

setLocalAudioEnabled

setLocalAudioEnabled: Function

Called when a local audio is disable / enabled, how to use it below

_onMuteButtonPress = () => {
  this.refs.twilioVideo
    .setLocalAudioEnabled(!this.state.isAudioEnabled)
    .then(isAudioEnabled => {
      this.setState({ isAudioEnabled });
    });
};



TwilioVideoLocalView

From ../src/TwilioVideoLocalView.js

enabled

// Required
enabled: Boolean

Indicate if video feed is enabled.



TwilioVideoParticipantView

From ../src/TwilioVideoParticipantView.js

trackIdentifier

trackIdentifier: {
    participantSid: String
    videoTrackSid: String
}