Live Streaming

Filters

  1. stm_lms_live_stream_allowed

Description: This filter controls whether a user has permission to enable livestreaming 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:

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.

Last updated

Was this helpful?