From Bright Pattern Documentation
Jump to: navigation, search
This page contains changes which are not marked for translation.
• 5.19

onScreenRecordingStateChange

This callback is triggered when the screen recording state changes (e.g., the screen recording starts or ends, or when the microphone for recording is muted or unmuted).

Request

Syntax

on('ON_SCREEN_RECORDING_STATE_CHANGE', handler: OnScreenRecordingStateChange): void


type OnScreenRecordingStateChange = (screenRecordingState: ScreenRecordingState) => void


type ScreenRecordingState = {

  allowed: boolean

  active: boolean

  muted: boolean

}

Parameters

Parameter Parameter Values Data Type Optional/Required Description
screenRecordingState
allowed Boolean Required If set to true, screen recording can be used with the current user; if set to false, screen recording cannot be used with the current user.
active Boolean Required If set to true, screen recording is active now; if set to false, screen recording is not active now.
muted Boolean Required If set to true, screen recording is muted; if set to false, screen recording is not muted.

Example Request

function screenRecordingChangeCallback(newState: ScreenRecordingState) {

console.log("Screen recording is active?", newState.active ? "yes" : "no");

}

adApi.on("ON_SCREEN_RECORDING_STATE_CHANGE", screenRecordingChangeCallback);

Return Value

(None)


< Previous | Next >