# allowBroadcast()

Grants broadcast permissions to the target user. The target user id is provided as the `id` property.

With the new format, you can specify which broadcast permissions to grant:

* `audio`: When true, allows the user to broadcast audio
* `video`: When true, allows the user to broadcast video

At least one of `audio` or `video` must be true when using the new format.

The target user will be able to turn on camera and/or microphone after this method is called, depending on the granted permissions.

#### Examples

**Grant both audio and video permissions (using new format)**

```javascript
sambaFrame.allowBroadcast({
  id: '9efc7798-a1a4-44bd-9d8d-532fe0feea9d',
  audio: true,
  video: true
});
```

**Grant only audio permission**

```javascript
sambaFrame.allowBroadcast({
  id: '9efc7798-a1a4-44bd-9d8d-532fe0feea9d',
  audio: true,
  video: false
});
```

**Grant only video permission**

```javascript
sambaFrame.allowBroadcast({
  id: '9efc7798-a1a4-44bd-9d8d-532fe0feea9d',
  audio: false,
  video: true
});
```

**DEPRECATED legacy format (grants both audio and video)**

```javascript
sambaFrame.allowBroadcast('9efc7798-a1a4-44bd-9d8d-532fe0feea9d');
```

**Sample use case**: \
Have a custom participants panel in your integration and want moderators to be able to grant specific broadcast permissions to particular users, so they can turn on camera and/or microphone.

This is particularly useful in webinar scenarios where particular roles do not have broadcast permissions by default, and you want to give some participants the ability to speak (audio only) while others can both speak and be seen (audio and video).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalsamba.com/reference/sdk/methods/allowbroadcast.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
