Browser SDK
Build voice, video and chat applications for the browser
v4
Stable
1isSelfParticipant(participant): participant is SelfParticipant
Type guard that checks if a participant is the local SelfParticipant.
Participant to test.
participant is SelfParticipant
1import { isSelfParticipant } from '@signalwire/js';23call.participants$.subscribe((participants) => {4 for (const p of participants) {5 if (isSelfParticipant(p)) {6 // p is typed as SelfParticipant here — local-only methods are available.7 p.startScreenShare?.();8 }9 }10});