Skip to main content
Version: 0.0.x

useParticipant Hook Event Callbacks

onStreamEnabled()

  • onStreamEnabled() is a callback which gets triggered whenever a participant's video, audio or screen share stream is enabled.

Example

function onStreamEnabled(stream) {
console.log(" onStreamEnabled", stream);
}

const {
displayName
...
} = useParticipant(participantId,{
onStreamEnabled,
...
});

onStreamDisabled()

  • onStreamDisabled() is a callback which gets triggered whenever a participant's video, audio or screen share stream is disabled.

Example

function onStreamDisabled(stream) {
console.log(" onStreamDisabled", stream);
}

const {
displayName
...
} = useParticipant(participantId,{
onStreamDisabled,
...
});

onVideoQualityChanged()

  • onVideoQualityChanged() is a callback which gets triggered whenever a participant's video quality changes.

  • currentQuality and prevQuality can have values HIGH | MEDIUM | LOW.

Example

function onVideoQualityChanged(data) {
const { currentQuality, prevQuality } = data;
}
const {
displayName
...
} = useParticipant(participantId,{
onVideoQualityChanged,
...
});