@applicaster/zapp-react-dom-app 12.0.0-alpha.4201443043 → 12.0.0-alpha.4220424021
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/InteractionManager/index.tsx +571 -485
- package/App/Loader/utils/const.js +3 -0
- package/App/Loader/utils/platform.js +48 -0
- package/index.js +5 -6
- package/main.css +2 -2
- package/package.json +9 -9
|
@@ -42,6 +42,36 @@ export const isSamsungPlatform = () => {
|
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Checks if we are on the Vizio platform by using the userAgent string
|
|
47
|
+
*
|
|
48
|
+
* Use this method when you need to identify the platform on runtime
|
|
49
|
+
* before the VIZIO Companion Library has loaded
|
|
50
|
+
*/
|
|
51
|
+
export const isVizioPlatform = () => {
|
|
52
|
+
const userAgent = getUserAgent();
|
|
53
|
+
|
|
54
|
+
const isVizioAgent =
|
|
55
|
+
userAgent.includes(PLATFORMS.vizio) ||
|
|
56
|
+
userAgent.includes(PLATFORMS.smartcast) ||
|
|
57
|
+
userAgent.includes(PLATFORMS.conjure);
|
|
58
|
+
|
|
59
|
+
return isVizioAgent;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Checks if we are on the Vizio platform by checking for the global VIZIO object
|
|
64
|
+
* and the VIZIO Companion Library. This method does not use the userAgent string,
|
|
65
|
+
* because it mainly checks whether we have access to apis, which may not be available yet
|
|
66
|
+
*/
|
|
67
|
+
export const hasVizioAPIs = () => {
|
|
68
|
+
const hasAPIs =
|
|
69
|
+
typeof window.VIZIO !== "undefined" &&
|
|
70
|
+
window?.applicaster?.vizioLibraryDidLoad;
|
|
71
|
+
|
|
72
|
+
return hasAPIs;
|
|
73
|
+
};
|
|
74
|
+
|
|
45
75
|
/**
|
|
46
76
|
* platformSelect can't be used, because Platform.OS is overriden
|
|
47
77
|
* by overloadReactNativePlatform and don't support 'web' value
|
|
@@ -253,6 +283,24 @@ export const getDeviceData = async () => {
|
|
|
253
283
|
...tizenConnectionInfo,
|
|
254
284
|
device_type: getDeviceType(),
|
|
255
285
|
};
|
|
286
|
+
} else if (isVizioPlatform()) {
|
|
287
|
+
deviceData = {
|
|
288
|
+
...deviceData,
|
|
289
|
+
platform: "vizio",
|
|
290
|
+
deviceMake: "Vizio",
|
|
291
|
+
deviceType: "tv",
|
|
292
|
+
userAgent: getUserAgent(),
|
|
293
|
+
deviceWidth: window.innerWidth,
|
|
294
|
+
deviceHeight: window.innerHeight,
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
if (hasVizioAPIs()) {
|
|
298
|
+
window.VIZIO.getFirmwareVersion(function (firmwareVersion) {
|
|
299
|
+
deviceData.osVersion = firmwareVersion;
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
deviceData.deviceModel = window.VIZIO.deviceModel;
|
|
303
|
+
}
|
|
256
304
|
}
|
|
257
305
|
|
|
258
306
|
return deviceData;
|
package/index.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
/// <reference types="@applicaster/applicaster-types" />
|
|
2
2
|
import * as R from "ramda";
|
|
3
|
-
import {
|
|
3
|
+
import { useHistory, useLocation } from "react-router-dom";
|
|
4
4
|
|
|
5
5
|
import { createQuickBrickApp } from "@applicaster/quick-brick-core";
|
|
6
6
|
import * as QuickBrickManager from "@applicaster/zapp-react-native-bridge/QuickBrick";
|
|
7
7
|
import * as Contexts from "@applicaster/zapp-react-native-ui-components/Contexts";
|
|
8
8
|
import { OfflineHandler } from "@applicaster/zapp-react-native-ui-components/Components/OfflineHandler";
|
|
9
9
|
import { getXray } from "@applicaster/zapp-react-native-utils/logger";
|
|
10
|
-
|
|
11
|
-
const { withXray } = getXray();
|
|
12
|
-
|
|
13
10
|
import { ZappDomRouter } from "./App/Router";
|
|
14
11
|
import { Layout } from "./App/Layout";
|
|
15
12
|
import { SplashLoader } from "./App/Loader/SplashLoader";
|
|
16
13
|
import { appLoader } from "./App/Loader";
|
|
17
14
|
|
|
18
|
-
import {
|
|
15
|
+
import { InteractionManager } from "./App/InteractionManager";
|
|
19
16
|
import "./main.css";
|
|
20
17
|
|
|
18
|
+
const { withXray } = getXray();
|
|
19
|
+
|
|
21
20
|
const contextProviders = R.map(R.prop("withProvider"), R.values(Contexts));
|
|
22
21
|
|
|
23
22
|
// Add DOM specific providers
|
|
@@ -33,7 +32,7 @@ export const ZappApp = createQuickBrickApp({
|
|
|
33
32
|
QuickBrickManager,
|
|
34
33
|
Layout,
|
|
35
34
|
OfflineHandler,
|
|
36
|
-
InteractionManager
|
|
35
|
+
InteractionManager,
|
|
37
36
|
appLoader,
|
|
38
37
|
SplashLoader,
|
|
39
38
|
ContextProviders: contextProviders,
|
package/main.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-dom-app",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.4220424021",
|
|
4
4
|
"description": "Zapp App Component for Applicaster's Quick Brick React Native App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/applicaster/zapp-react-dom-app#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@applicaster/zapp-react-dom-ui-components": "12.0.0-alpha.
|
|
26
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.
|
|
27
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.
|
|
28
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.
|
|
29
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.
|
|
25
|
+
"@applicaster/zapp-react-dom-ui-components": "12.0.0-alpha.4220424021",
|
|
26
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.4220424021",
|
|
27
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.4220424021",
|
|
28
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4220424021",
|
|
29
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.4220424021",
|
|
30
30
|
"abortcontroller-polyfill": "^1.7.5",
|
|
31
31
|
"history": "^4.7.2",
|
|
32
32
|
"react-router-dom": "^5.1.2",
|
|
33
33
|
"typeface-montserrat": "^0.0.54",
|
|
34
|
-
"video.js": "
|
|
35
|
-
"videojs-contrib-eme": "^
|
|
36
|
-
"videojs-contrib-quality-levels": "
|
|
34
|
+
"video.js": "8.21.0",
|
|
35
|
+
"videojs-contrib-eme": "^5.5.1",
|
|
36
|
+
"videojs-contrib-quality-levels": "^4.1.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"core-js": "3.29.1",
|