@ray-js/ipc-player-integration 0.0.35-beta.3 → 0.0.35-beta.4
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/lib/utils/ttt.d.ts
CHANGED
|
@@ -34,6 +34,6 @@ export type GetAIFrameFeatureResult = {
|
|
|
34
34
|
thingFileUri: string;
|
|
35
35
|
};
|
|
36
36
|
export declare function getAIFrameFeature(devId: string): Promise<GetAIFrameFeatureResult>;
|
|
37
|
-
export declare function setAIFrameFeature(
|
|
37
|
+
export declare function setAIFrameFeature(params: SetAIFrameFeatureParams): Promise<any>;
|
|
38
38
|
export declare function getDeviceInfoRay(devId: string): Promise<unknown>;
|
|
39
39
|
export declare function getCurrentHomeInfoRay(): Promise<unknown>;
|
package/lib/utils/ttt.js
CHANGED
|
@@ -12,9 +12,8 @@ export function getSmartImageQualityState(devId) {
|
|
|
12
12
|
// }
|
|
13
13
|
return new Promise((resolve, reject) => {
|
|
14
14
|
ty.ipc.getSmartImageQualityState({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
15
|
+
devId,
|
|
16
|
+
scene: 'inPreview',
|
|
18
17
|
success: data => {
|
|
19
18
|
console.log('res===getSmartImageQualityState data', data);
|
|
20
19
|
resolve(data);
|
|
@@ -29,9 +28,7 @@ export function getSmartImageQualityState(devId) {
|
|
|
29
28
|
export function getAIFrameFeature(devId) {
|
|
30
29
|
return new Promise((resolve, reject) => {
|
|
31
30
|
ty.ipc.getAIFrameFeature({
|
|
32
|
-
|
|
33
|
-
devId
|
|
34
|
-
},
|
|
31
|
+
devId,
|
|
35
32
|
success: data => {
|
|
36
33
|
console.log('res===getAIFrameFeature data', data);
|
|
37
34
|
resolve(data);
|
|
@@ -43,12 +40,9 @@ export function getAIFrameFeature(devId) {
|
|
|
43
40
|
});
|
|
44
41
|
});
|
|
45
42
|
}
|
|
46
|
-
export function setAIFrameFeature(
|
|
43
|
+
export function setAIFrameFeature(params) {
|
|
47
44
|
return new Promise((resolve, reject) => {
|
|
48
|
-
ty.ipc.setAIFrameFeature({
|
|
49
|
-
params: _objectSpread({
|
|
50
|
-
devId
|
|
51
|
-
}, params),
|
|
45
|
+
ty.ipc.setAIFrameFeature(_objectSpread(_objectSpread({}, params), {}, {
|
|
52
46
|
success: data => {
|
|
53
47
|
console.log('res===setAIFrameFeature data', data);
|
|
54
48
|
resolve(data);
|
|
@@ -57,12 +51,13 @@ export function setAIFrameFeature(devId, params) {
|
|
|
57
51
|
console.warn('res===setAIFrameFeature fail', e);
|
|
58
52
|
reject(e);
|
|
59
53
|
}
|
|
60
|
-
});
|
|
54
|
+
}));
|
|
61
55
|
});
|
|
62
56
|
}
|
|
63
57
|
export function getDeviceInfoRay(devId) {
|
|
64
58
|
return new Promise((resolve, reject) => {
|
|
65
|
-
|
|
59
|
+
var _ty$device;
|
|
60
|
+
(_ty$device = ty.device) === null || _ty$device === void 0 || _ty$device.getDeviceInfo({
|
|
66
61
|
deviceId: devId,
|
|
67
62
|
success: res => {
|
|
68
63
|
resolve(res);
|
|
@@ -75,7 +70,8 @@ export function getDeviceInfoRay(devId) {
|
|
|
75
70
|
}
|
|
76
71
|
export function getCurrentHomeInfoRay() {
|
|
77
72
|
return new Promise((resolve, reject) => {
|
|
78
|
-
|
|
73
|
+
var _ty$home;
|
|
74
|
+
(_ty$home = ty.home) === null || _ty$home === void 0 || _ty$home.getCurrentHomeInfo({
|
|
79
75
|
success: res => {
|
|
80
76
|
resolve(res);
|
|
81
77
|
},
|
|
@@ -27,7 +27,8 @@ export const useTrialBadge = (event, devId, trialRemainingSec) => {
|
|
|
27
27
|
try {
|
|
28
28
|
const getAI = await getAIFrameFeature(devId);
|
|
29
29
|
console.log('res===handleCountdownEnd', getAI);
|
|
30
|
-
setAIFrameFeature(
|
|
30
|
+
setAIFrameFeature({
|
|
31
|
+
devId,
|
|
31
32
|
enabled: false,
|
|
32
33
|
aiFrameFeature: getAI.aiFrameFeature
|
|
33
34
|
});
|