Hiyve Components - v1.0.0
    Preparing search index...

    Interface Participant

    Data structure representing a remote participant in the video grid.

    This interface defines the data needed to render a remote participant's video tile. Streams are typically obtained from Hiyve client events.

    // Building participant list from Hiyve events
    const [participants, setParticipants] = useState<Map<string, Participant>>(new Map());

    client.addEventListener(ClientEvents.MEDIA_TRACK_ADDED, (event) => {
    const { userId, track, kind } = event.detail;
    setParticipants(prev => {
    const updated = new Map(prev);
    const p = updated.get(userId) || {
    userId,
    videoStream: null,
    audioStream: null,
    };
    if (kind === 'video') {
    p.videoStream = new MediaStream([track]);
    } else {
    p.audioStream = new MediaStream([track]);
    }
    updated.set(userId, p);
    return updated;
    });
    });
    interface Participant {
        audioOnly?: boolean;
        audioStream: MediaStream | null;
        isMuted?: MuteStatus;
        isRaisedHand?: boolean;
        moodData?: MoodData;
        userId: string;
        userName?: string;
        videoStream: MediaStream | null;
    }
    Index

    Properties

    audioOnly?: boolean

    Whether the participant is audio-only (has no camera). When true, an avatar is displayed instead of video.

    false
    
    audioStream: MediaStream | null

    Audio MediaStream for the participant. Set to null when audio is disabled or not yet received.

    isMuted?: MuteStatus

    Current mute status for the participant. Used to display mute indicators on the tile.

    isRaisedHand?: boolean

    Whether the participant has their hand raised. Displays a hand-raised indicator on the tile.

    false
    
    moodData?: MoodData

    Current mood data from mood analysis. When set and showMood is true, displays a mood indicator on the tile.

    userId: string

    Unique identifier for the participant. This should match the userId from Hiyve events.

    userName?: string

    Display name for the participant. Falls back to userId if not provided.

    videoStream: MediaStream | null

    Video MediaStream for the participant. Set to null when video is disabled or not yet received.