MediaSFU Shared
    Preparing search index...

    Function setRoomMediaPolicy

    • Set what participants are allowed to do — the room-wide policy behind the SDK's settings modal.

      This is the rule, not a one-off action: setParticipantMedia (moderation) turns one person's camera off now, whereas video: 'approval' here means everyone must ask before turning one on. getMediaPermissions() reads the same four values back.

      Host only. Any value left undefined keeps its current setting.

      Parameters

      Returns Promise<HeadlessActionResult>

      await setRoomMediaPolicy({ parameters, audio: 'approval', screenshare: 'disallow' });