MediaSFU Angular
    Preparing search index...

    Class CheckPermission

    Checks the permission based on the provided settings.

    The options for checking permissions.

    The type of permission to check. Can be "audioSetting", "videoSetting", "screenshareSetting", or "chatSetting".

    The setting for audio permission. Can be "allow", "approval", or other.

    The setting for video permission. Can be "allow", "approval", or other.

    The setting for screenshare permission. Can be "allow", "approval", or other.

    The setting for chat permission. Can be "allow", "approval", or other.

    • Returns 0 if the setting is "allow", 1 if the setting is "approval", and 2 for other settings or invalid permission types.

    Will throw an error if an unexpected error occurs during the permission check.

    const options = {
    permissionType: 'videoSetting',
    audioSetting: 'allow',
    videoSetting: 'approval',
    screenshareSetting: 'deny',
    chatSetting: 'allow',
    };

    const result = await checkPermissionService.checkPermission(options);
    console.log(result);
    // Output: 1 (since videoSetting is 'approval')
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Checks the permission based on the provided settings.

      Parameters

      • options: CheckPermissionOptions

        The options for checking permissions.

        • audioSetting: string
        • videoSetting: string
        • screenshareSetting: string
        • chatSetting: string
        • permissionType: "audioSetting" | "videoSetting" | "screenshareSetting" | "chatSetting"

      Returns Promise<number>

      • Returns 0 if the setting is "allow", 1 if the setting is "approval", and 2 for other settings or invalid permission types.

      Will throw an error if an unexpected error occurs during the permission check.