Skip to main content

DeviceInfo

Get information of current device.

TypeNameInterface Description
Static FunctionsgetCameraFacingType(): number

Function: Gets the camera facing type of the device.

Returns The camera facing type identifier.

Static FunctionsgetDeviceCameraResolution(): Vector2f

Function: Get the resolution of the device camera input texture.

Static FunctionsgetOS(): OS

Function: Gets the operating system of the current device.

Returns The operating system type of the device.

Use Case

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use DeviceInfo here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies