decord/source/modules/device/DeviceState.tsx
2026-09-02 09:53:35 +00:00

37 lines
1.3 KiB
TypeScript

// Module ID: 7504
// Function ID: 7505
// Name: DeviceState
// Dependencies: [7505, 2, 7506]
// Exports: logDeviceState
// Module 7504 (DeviceState)
import set from "set" /* 2 */;
import _getDeviceState from "_getDeviceState" /* 7505 */;
import ThermalState from "ThermalState" /* 7506 */;
const result = set.fileFinishedImporting("modules/device/DeviceState.tsx");
export const DeviceState = ThermalState.DeviceState;
export const ThermalState = ThermalState.ThermalState;
export const getDeviceState = _getDeviceState.getDeviceState;
export const logDeviceState = function logDeviceState(thermalState) {
if (null !== thermalState) {
const logger2 = _getDeviceState.logger;
logger2.info("Device State Information:");
const logger3 = _getDeviceState.logger;
const _HermesInternal = HermesInternal;
logger3.info("- Thermal State: " + thermalState.thermalState);
const logger4 = _getDeviceState.logger;
const _HermesInternal2 = HermesInternal;
logger4.info("- Battery Level: " + 100 * thermalState.batteryLevel + "%");
const logger5 = _getDeviceState.logger;
let str6 = "Disabled";
if (thermalState.isLowPowerMode) {
str6 = "Enabled";
}
logger5.info(`- Low Power Mode: ${str6}`);
} else {
const logger = _getDeviceState.logger;
logger.info("Device state not available");
}
};