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

    Function useLayout

    • Access layout state and controls.

      Provides the currently dominant speaker and an action to manually set the dominant (pinned) participant.

      Returns { dominantSpeaker: string | null; setDominant: (userId: string | null) => void }

      Object containing dominantSpeaker (user ID or null) and setDominant action

      • dominantSpeaker: string | null
      • setDominant: (userId: string | null) => void
      import { useLayout, useParticipants } from '@hiyve/rn-react';

      function LayoutControls() {
      const { dominantSpeaker, setDominant } = useLayout();
      const { participants } = useParticipants();

      return (
      <View>
      {dominantSpeaker && <Text>Dominant: {dominantSpeaker}</Text>}
      {participants.map((p) => (
      <Button key={p.odvisitors} title={`Pin ${p.displayName}`} onPress={() => setDominant(p.odvisitors)} />
      ))}
      </View>
      );
      }