@swrve/smarttv-sdk
Version:
Swrve marketing engagement platform SDK for SmartTV OTT devices
45 lines (42 loc) • 1.5 kB
text/typescript
import {
SWRVE_APP_STORE,
SWRVE_COUNTRY_CODE,
SWRVE_DEVICE_DPI,
SWRVE_DEVICE_HEIGHT,
SWRVE_DEVICE_ID,
SWRVE_DEVICE_REGION,
SWRVE_DEVICE_WIDTH,
SWRVE_INSTALL_DATE,
SWRVE_LANGUAGE,
SWRVE_OS,
SWRVE_OS_VERSION,
SWRVE_SDK_VERSION,
SWRVE_TIMEZONE_NAME,
sdkVersion,
SWRVE_DEVICE_NAME,
SWRVE_DEVICE_TYPE,
} from "./SwrveConstants";
import {ProfileManager} from "../Profile/ProfileManager";
import {IPlatform} from "./platforms/IPlatform";
import IDictionary from "./IDictionary";
export function queryDeviceProperties(platform: IPlatform, profileManager: ProfileManager, installDate: string):
IDictionary<string | number> {
const deviceProperties: IDictionary<string | number> = {
[]: platform.deviceID,
[]: platform.os,
[]: platform.osVersion,
[]: sdkVersion,
[]: platform.language,
[]: platform.countryCode,
[]: platform.region,
[]: platform.timezone,
[]: platform.screenDPI,
[]: platform.screenHeight,
[]: platform.screenWidth,
[]: `${platform.name().variation} ${platform.model}`,
[]: platform.appStore,
[]: installDate,
[]: "tv",
};
return deviceProperties;
}