@applicaster/zapp-react-dom-app 16.0.0-alpha.2480030155 → 16.0.0-alpha.2554311249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App/Loader/utils/platform.js +27 -11
- package/package.json +6 -6
|
@@ -3,13 +3,7 @@
|
|
|
3
3
|
/* eslint-disable no-console */
|
|
4
4
|
|
|
5
5
|
import { Platform } from "react-native";
|
|
6
|
-
import {
|
|
7
|
-
DEFAULT,
|
|
8
|
-
desiredKeysMap,
|
|
9
|
-
hasTizenAPIs,
|
|
10
|
-
hasWebOSAPIs,
|
|
11
|
-
PLATFORMS,
|
|
12
|
-
} from "./const";
|
|
6
|
+
import { desiredKeysMap, hasTizenAPIs, hasWebOSAPIs, PLATFORMS } from "./const";
|
|
13
7
|
|
|
14
8
|
/**
|
|
15
9
|
* @typedef {"tv" | "web" | "other"} DeviceType
|
|
@@ -234,9 +228,11 @@ export const waitForVidaaAPIs = (timeout = VIDAA_SDK_TIMEOUT_MS) => {
|
|
|
234
228
|
|
|
235
229
|
if (Date.now() - startedAt >= timeout) {
|
|
236
230
|
clearInterval(intervalId);
|
|
231
|
+
|
|
237
232
|
console.warn(
|
|
238
233
|
`waitForVidaaAPIs: VIDAA SDK did not load within ${timeout}ms`
|
|
239
234
|
);
|
|
235
|
+
|
|
240
236
|
resolve(null);
|
|
241
237
|
}
|
|
242
238
|
}, VIDAA_SDK_POLL_MS);
|
|
@@ -298,9 +294,14 @@ export const getVidaaInfo = async () => {
|
|
|
298
294
|
readVidaaValue(sdk, "getOSVersion") ||
|
|
299
295
|
readVidaaValue(sdk, "getFirmWareVersion");
|
|
300
296
|
|
|
297
|
+
// Human-readable name for the `deviceName` context key, e.g.
|
|
298
|
+
// "Hisense 50A53FSV". Falls back to whichever half is available.
|
|
299
|
+
const deviceName = [brand, modelName].filter(Boolean).join(" ");
|
|
300
|
+
|
|
301
301
|
return {
|
|
302
302
|
...(modelName ? { modelName } : {}),
|
|
303
303
|
...(brand ? { deviceMake: brand } : {}),
|
|
304
|
+
...(deviceName ? { deviceName } : {}),
|
|
304
305
|
...(osVersion ? { osVersion } : {}),
|
|
305
306
|
...(networkType ? { networkType } : {}),
|
|
306
307
|
...(countryCode ? { countryCode } : {}),
|
|
@@ -445,7 +446,12 @@ export const getWebOSInfo = () => {
|
|
|
445
446
|
if (info) {
|
|
446
447
|
resolve({
|
|
447
448
|
...info,
|
|
448
|
-
|
|
449
|
+
// `deviceName` is a persisted context key; the previous `name` was
|
|
450
|
+
// absent from desiredKeysMap, so it was computed and dropped. Format
|
|
451
|
+
// is "<make> <model>", matching Samsung/Vizio/VIDAA. The old string
|
|
452
|
+
// was `${info.modelName} - ${info.version}`, which omitted the make
|
|
453
|
+
// and embedded a version already reported as osVersion.
|
|
454
|
+
deviceName: `LG ${info.modelName}`,
|
|
449
455
|
osVersion: info.sdkVersion, // info.sdkVersion is the OS version, info.version is software version
|
|
450
456
|
});
|
|
451
457
|
} else {
|
|
@@ -472,16 +478,22 @@ export const getTizenInfo = () => {
|
|
|
472
478
|
"http://tizen.org/system/model_name"
|
|
473
479
|
);
|
|
474
480
|
|
|
475
|
-
|
|
481
|
+
// Previously `${DEFAULT.make} ${modelName}` — DEFAULT has no `make` key
|
|
482
|
+
// (it is `deviceMake`), so this interpolated the literal string
|
|
483
|
+
// "undefined". It went unnoticed because the value was named `name`,
|
|
484
|
+
// which is absent from desiredKeysMap and therefore never persisted.
|
|
485
|
+
const deviceName = `Samsung ${modelName}`;
|
|
476
486
|
|
|
477
487
|
const osVersion = tizen.systeminfo.getCapability(
|
|
478
488
|
"http://tizen.org/feature/platform.version"
|
|
479
489
|
);
|
|
480
490
|
|
|
481
|
-
|
|
491
|
+
// `deviceName` is derived from modelName, so checking it here would be
|
|
492
|
+
// redundant — it is truthy whenever modelName is.
|
|
493
|
+
if (modelName && osVersion) {
|
|
482
494
|
resolve({
|
|
483
495
|
modelName,
|
|
484
|
-
|
|
496
|
+
deviceName,
|
|
485
497
|
osVersion,
|
|
486
498
|
});
|
|
487
499
|
} else {
|
|
@@ -572,6 +584,10 @@ export const getDeviceData = async () => {
|
|
|
572
584
|
}
|
|
573
585
|
|
|
574
586
|
deviceData.deviceModel = window.VIZIO.deviceModel;
|
|
587
|
+
|
|
588
|
+
if (deviceData.deviceModel) {
|
|
589
|
+
deviceData.deviceName = `Vizio ${deviceData.deviceModel}`;
|
|
590
|
+
}
|
|
575
591
|
}
|
|
576
592
|
} else if (isVidaaPlatform()) {
|
|
577
593
|
// Waits for the VIDAA SDK, which loader.js loads asynchronously from the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-dom-app",
|
|
3
|
-
"version": "16.0.0-alpha.
|
|
3
|
+
"version": "16.0.0-alpha.2554311249",
|
|
4
4
|
"description": "Zapp App Component for Applicaster's Quick Brick React Native App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/applicaster/zapp-react-dom-app#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@applicaster/zapp-react-dom-ui-components": "16.0.0-alpha.
|
|
26
|
-
"@applicaster/zapp-react-native-bridge": "16.0.0-alpha.
|
|
27
|
-
"@applicaster/zapp-react-native-redux": "16.0.0-alpha.
|
|
28
|
-
"@applicaster/zapp-react-native-ui-components": "16.0.0-alpha.
|
|
29
|
-
"@applicaster/zapp-react-native-utils": "16.0.0-alpha.
|
|
25
|
+
"@applicaster/zapp-react-dom-ui-components": "16.0.0-alpha.2554311249",
|
|
26
|
+
"@applicaster/zapp-react-native-bridge": "16.0.0-alpha.2554311249",
|
|
27
|
+
"@applicaster/zapp-react-native-redux": "16.0.0-alpha.2554311249",
|
|
28
|
+
"@applicaster/zapp-react-native-ui-components": "16.0.0-alpha.2554311249",
|
|
29
|
+
"@applicaster/zapp-react-native-utils": "16.0.0-alpha.2554311249",
|
|
30
30
|
"abortcontroller-polyfill": "^1.7.5",
|
|
31
31
|
"typeface-montserrat": "^0.0.54",
|
|
32
32
|
"video.js": "7.14.3",
|