Skip to main content
Version: v3+

setPageBrightTime

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Set the current page screen lighting time, this setting will follow the page destruction to do reset.

Type

function setPageBrightTime(option: Option): Result

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
brightTimenumberN10000Screen lighting time (milliseconds), range [1000 - 2147483000]2.0

Result

TypeDescription
numberIf 0 is returned, success is indicated

Example

import { setPageBrightTime } from '@zos/display'

const result = setPageBrightTime({
brightTime: 60000,
})

if (result === 0) {
console.log('setPageBrightTime success')
}