# Live  Streaming

## Filters

1. **`stm_lms_live_stream_allowed`**

**Description:**\
This filter controls whether a user has permission to enable [**livestreaming**](/masterstudy-lms/lms-pro-addons/live-streaming.md) for a course. You can use it to define custom rules, such as restricting livestreaming access to specific users or roles.

**Parameters:**

* `$bool` (boolean) — Default permission status (true or false).

**Example usage:**

```php
add_filter( 'stm_lms_live_stream_allowed', 'stm_lms_live_stream_allowed_function' );
	function stm_lms_live_stream_allowed_function($bool){
		$user_id = get_current_user_id();
		if($user_id == 1){
			$bool == true;
		}

		return $bool;
	}
```

**Explanation:**\
In this example, livestreaming is enabled only for the user with **ID 1**. For all other users, the default permission (`$bool`) will apply.


---

# 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.stylemixthemes.com/masterstudy-lms/developers-guide/masterstudy-lms-hooks/live-streaming.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.
