# Live  Streaming

## Filters

1. **`stm_lms_live_stream_allowed`**

**Description:**\
This filter controls whether a user has permission to enable [**livestreaming**](https://docs.stylemixthemes.com/masterstudy-lms/lms-pro-addons/live-streaming) 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.
