MediaSFU Shared
    Preparing search index...

    Function setParticipantPlayback

    • Stop or resume playing one participant's media for you only.

      This is a local, per-viewer control — "don't play this person to me right now". It pauses the mediasoup consumer, so the server stops sending that track to you: it saves bandwidth as well as silencing them, and it is invisible to everyone else. It is NOT moderation — the participant keeps publishing and other people keep receiving. Use setParticipantMedia from the moderation module to actually stop someone's media for the room.

      Note this is deliberately not resumePauseStreams, which the SDK drives from the active-speaker layout (dispActiveNames) and will happily undo a manual choice on its next pass. This targets the consumer directly.

      Parameters

      Returns Promise<{ ok: boolean; error: string; affected: number }>

      // Stop hearing and seeing Paul locally
      await setParticipantPlayback({ parameters, name: 'Paul', paused: true });
      // Just their audio
      await setParticipantPlayback({ parameters, name: 'Paul', kind: 'audio', paused: true });