@ray-js/ipc-player-integration 0.0.35-beta.3 → 0.0.35-beta.31

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.js CHANGED
@@ -1,87 +1,145 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  export function getSmartImageQualityState(devId) {
3
- // const mockData: SmartImageQualityResult = {
4
- // isPurchase: false,
5
- // buttonState: 1,
6
- // trialRemainingSec: 200,
7
- // canOpenSettings: false,
8
- // };
9
- // if (typeof ty?.ipc?.getSmartImageQualityState !== 'function') {
10
- // console.log('res===getSmartImageQualityState not exist, use mockData', mockData);
11
- // return Promise.resolve(mockData);
12
- // }
13
- return new Promise((resolve, reject) => {
14
- ty.ipc.getSmartImageQualityState({
15
- params: {
16
- devId
17
- },
18
- success: data => {
19
- console.log('res===getSmartImageQualityState data', data);
20
- resolve(data);
21
- },
22
- fail: e => {
23
- console.warn('res===getSmartImageQualityState fail', e);
24
- reject(e);
25
- }
26
- });
3
+ return new Promise(resolve => {
4
+ var _ty$ipc;
5
+ const isSupport = typeof ((_ty$ipc = ty.ipc) === null || _ty$ipc === void 0 ? void 0 : _ty$ipc.getSmartImageQualityState) === 'function';
6
+ if (!isSupport) {
7
+ resolve(null);
8
+ return;
9
+ }
10
+ try {
11
+ var _ty;
12
+ (_ty = ty) === null || _ty === void 0 || (_ty = _ty.ipc) === null || _ty === void 0 || _ty.getSmartImageQualityState({
13
+ devId,
14
+ scene: 'inPreview',
15
+ success: data => {
16
+ resolve(data);
17
+ },
18
+ fail: () => {
19
+ resolve(null);
20
+ }
21
+ });
22
+ } catch (e) {
23
+ resolve(null);
24
+ }
27
25
  });
28
26
  }
29
27
  export function getAIFrameFeature(devId) {
30
- return new Promise((resolve, reject) => {
31
- ty.ipc.getAIFrameFeature({
32
- params: {
33
- devId
34
- },
35
- success: data => {
36
- console.log('res===getAIFrameFeature data', data);
37
- resolve(data);
38
- },
39
- fail: e => {
40
- console.warn('res===getAIFrameFeature fail', e);
41
- reject(e);
42
- }
43
- });
28
+ return new Promise(resolve => {
29
+ var _ty$ipc2;
30
+ const isSupport = typeof ((_ty$ipc2 = ty.ipc) === null || _ty$ipc2 === void 0 ? void 0 : _ty$ipc2.getAIFrameFeature) === 'function';
31
+ if (!isSupport) {
32
+ resolve(null);
33
+ return;
34
+ }
35
+ try {
36
+ ty.ipc.getAIFrameFeature({
37
+ devId,
38
+ success: data => {
39
+ console.log('res===getAIFrameFeature data', data);
40
+ resolve(data);
41
+ },
42
+ fail: e => {
43
+ console.warn('res===getAIFrameFeature fail', e);
44
+ resolve(null);
45
+ }
46
+ });
47
+ } catch (e) {
48
+ resolve(null);
49
+ }
44
50
  });
45
51
  }
46
- export function setAIFrameFeature(devId, params) {
47
- return new Promise((resolve, reject) => {
48
- ty.ipc.setAIFrameFeature({
49
- params: _objectSpread({
50
- devId
51
- }, params),
52
- success: data => {
53
- console.log('res===setAIFrameFeature data', data);
54
- resolve(data);
55
- },
56
- fail: e => {
57
- console.warn('res===setAIFrameFeature fail', e);
58
- reject(e);
59
- }
60
- });
52
+ export function setAIFrameFeature(params) {
53
+ return new Promise(resolve => {
54
+ var _ty$ipc3;
55
+ const isSupport = typeof ((_ty$ipc3 = ty.ipc) === null || _ty$ipc3 === void 0 ? void 0 : _ty$ipc3.setAIFrameFeature) === 'function';
56
+ if (!isSupport) {
57
+ resolve(null);
58
+ return;
59
+ }
60
+ try {
61
+ ty.ipc.setAIFrameFeature(_objectSpread(_objectSpread({}, params), {}, {
62
+ success: data => {
63
+ console.log('res===setAIFrameFeature data', data);
64
+ resolve(data);
65
+ },
66
+ fail: e => {
67
+ console.warn('res===setAIFrameFeature fail', e);
68
+ resolve(null);
69
+ }
70
+ }));
71
+ } catch (e) {
72
+ resolve(null);
73
+ }
61
74
  });
62
75
  }
63
- export function getDeviceInfoRay(devId) {
64
- return new Promise((resolve, reject) => {
65
- ty.device.getDeviceInfo({
66
- deviceId: devId,
67
- success: res => {
68
- resolve(res);
69
- },
70
- fail: error => {
71
- reject(error);
72
- }
73
- });
76
+ export function setTrailFinish(devId) {
77
+ return new Promise(resolve => {
78
+ var _ty$ipc4;
79
+ const isSupport = typeof ((_ty$ipc4 = ty.ipc) === null || _ty$ipc4 === void 0 ? void 0 : _ty$ipc4.setTrailFinish) === 'function';
80
+ if (!isSupport) {
81
+ resolve(null);
82
+ return;
83
+ }
84
+ try {
85
+ var _ty2;
86
+ (_ty2 = ty) === null || _ty2 === void 0 || (_ty2 = _ty2.ipc) === null || _ty2 === void 0 || _ty2.setTrailFinish({
87
+ devId,
88
+ success: res => {
89
+ resolve(res);
90
+ },
91
+ fail: () => {
92
+ resolve(null);
93
+ }
94
+ });
95
+ } catch (e) {
96
+ resolve(null);
97
+ }
74
98
  });
75
99
  }
76
- export function getCurrentHomeInfoRay() {
77
- return new Promise((resolve, reject) => {
78
- ty.home.getCurrentHomeInfo({
79
- success: res => {
80
- resolve(res);
81
- },
82
- fail: error => {
83
- reject(error);
84
- }
85
- });
100
+ export function isLowPhone() {
101
+ return new Promise(resolve => {
102
+ var _ty$ipc5;
103
+ const isSupport = typeof ((_ty$ipc5 = ty.ipc) === null || _ty$ipc5 === void 0 ? void 0 : _ty$ipc5.isLowPhone) === 'function';
104
+ if (!isSupport) {
105
+ resolve(false);
106
+ return;
107
+ }
108
+ try {
109
+ ty.ipc.isLowPhone({
110
+ success: res => {
111
+ var _res$isLow;
112
+ resolve((_res$isLow = res === null || res === void 0 ? void 0 : res.isLow) !== null && _res$isLow !== void 0 ? _res$isLow : false);
113
+ },
114
+ fail: () => {
115
+ resolve(false);
116
+ }
117
+ });
118
+ } catch (e) {
119
+ resolve(false);
120
+ }
121
+ });
122
+ }
123
+ export function getNgRawData() {
124
+ return new Promise(resolve => {
125
+ var _ty3;
126
+ const isSupport = typeof ((_ty3 = ty) === null || _ty3 === void 0 ? void 0 : _ty3.getNgRawData) === 'function';
127
+ if (!isSupport) {
128
+ resolve(false);
129
+ return;
130
+ }
131
+ try {
132
+ ty.getNgRawData({
133
+ rawKey: 'is_smart_image_quality',
134
+ success: res => {
135
+ resolve((res === null || res === void 0 ? void 0 : res.rawData) === 'true');
136
+ },
137
+ fail: () => {
138
+ resolve(false);
139
+ }
140
+ });
141
+ } catch (e) {
142
+ resolve(false);
143
+ }
86
144
  });
87
145
  }
@@ -6,12 +6,10 @@ type Props = {
6
6
  brandColor?: string;
7
7
  /** 试看倒计时初始秒数,来源于 smartImageQualityState.trialRemainingSec */
8
8
  trialRemainingSec?: number;
9
- /** 刷新令牌,变化时重置倒计时状态 */
10
- refreshToken?: number;
11
9
  /** 点击「开通」按钮回调 */
12
10
  onSubscribe?: () => void;
13
11
  /** 倒计时归零时触发,本组件保证整个生命周期内只回调一次 */
14
12
  onCountdownEnd?: () => void;
15
13
  };
16
- export declare const TrialBadge: ({ className, brandColor, trialRemainingSec, refreshToken, onSubscribe, onCountdownEnd, }: Props) => React.JSX.Element;
14
+ export declare const TrialBadge: ({ className, brandColor, trialRemainingSec, onSubscribe, onCountdownEnd, }: Props) => React.JSX.Element;
17
15
  export { useTrialBadge } from './useTrialBadge';
@@ -18,21 +18,24 @@ export const TrialBadge = _ref => {
18
18
  className,
19
19
  brandColor = FALLBACK_BRAND_COLOR,
20
20
  trialRemainingSec = 0,
21
- refreshToken,
22
21
  onSubscribe,
23
22
  onCountdownEnd
24
23
  } = _ref;
25
24
  const [remainingSec, setRemainingSec] = useState(Math.max(0, Math.floor(trialRemainingSec)));
26
- /** 防止 onCountdownEnd 被重复触发;同时持有最新回调,避免依赖变化导致 effect 重跑 */
27
25
  const endedRef = useRef(false);
28
26
  const onCountdownEndRef = useRef(onCountdownEnd);
29
27
  onCountdownEndRef.current = onCountdownEnd;
28
+ const startTimeRef = useRef(Date.now());
29
+ const initialSecRef = useRef(Math.max(0, Math.floor(trialRemainingSec)));
30
30
  useEffect(() => {
31
+ const sec = Math.max(0, Math.floor(trialRemainingSec));
31
32
  endedRef.current = false;
32
- setRemainingSec(Math.max(0, Math.floor(trialRemainingSec)));
33
- }, [trialRemainingSec, refreshToken]);
33
+ initialSecRef.current = sec;
34
+ startTimeRef.current = Date.now();
35
+ setRemainingSec(sec);
36
+ }, [trialRemainingSec]);
34
37
  useEffect(() => {
35
- if (remainingSec <= 0) {
38
+ if (trialRemainingSec <= 0) {
36
39
  if (!endedRef.current) {
37
40
  var _onCountdownEndRef$cu;
38
41
  endedRef.current = true;
@@ -41,22 +44,20 @@ export const TrialBadge = _ref => {
41
44
  return undefined;
42
45
  }
43
46
  const timer = setInterval(() => {
44
- setRemainingSec(prev => {
45
- const next = prev - 1;
46
- if (next <= 0) {
47
- clearInterval(timer);
48
- if (!endedRef.current) {
49
- var _onCountdownEndRef$cu2;
50
- endedRef.current = true;
51
- (_onCountdownEndRef$cu2 = onCountdownEndRef.current) === null || _onCountdownEndRef$cu2 === void 0 || _onCountdownEndRef$cu2.call(onCountdownEndRef);
52
- }
53
- return 0;
47
+ const elapsed = Math.floor((Date.now() - startTimeRef.current) / 1000);
48
+ const next = Math.max(0, initialSecRef.current - elapsed);
49
+ setRemainingSec(next);
50
+ if (next <= 0) {
51
+ clearInterval(timer);
52
+ if (!endedRef.current) {
53
+ var _onCountdownEndRef$cu2;
54
+ endedRef.current = true;
55
+ (_onCountdownEndRef$cu2 = onCountdownEndRef.current) === null || _onCountdownEndRef$cu2 === void 0 || _onCountdownEndRef$cu2.call(onCountdownEndRef);
54
56
  }
55
- return next;
56
- });
57
+ }
57
58
  }, 1000);
58
59
  return () => clearInterval(timer);
59
- }, [trialRemainingSec, refreshToken]);
60
+ }, [trialRemainingSec]);
60
61
  const countdownText = formatCountdown(remainingSec);
61
62
  return /*#__PURE__*/React.createElement(View, {
62
63
  className: clsx('ipc-player-trial-badge', className)
@@ -75,10 +76,7 @@ export const TrialBadge = _ref => {
75
76
  style: {
76
77
  backgroundColor: brandColor
77
78
  },
78
- onClick: e => {
79
- if (e && typeof e.stopPropagation === 'function') {
80
- e.stopPropagation();
81
- }
79
+ onClick: () => {
82
80
  onSubscribe === null || onSubscribe === void 0 || onSubscribe();
83
81
  }
84
82
  }, /*#__PURE__*/React.createElement(Text, {
@@ -1,13 +1,23 @@
1
+ @keyframes ipc-player-trial-badge-slide-in {
2
+ from {
3
+ transform: translateX(-100%);
4
+ }
5
+ to {
6
+ transform: translateX(0);
7
+ }
8
+ }
9
+
1
10
  .ipc-player-trial-badge {
2
11
  display: inline-flex;
3
12
  align-items: center;
4
- height: 28px;
5
- padding: 0 4px 0 8px;
6
- border-radius: 6px;
13
+ height: 32px;
14
+ padding: 0 6px 0 8px;
15
+ border-radius: 8px;
7
16
  background: rgba(0, 0, 0, 0.65);
8
17
  flex-shrink: 0;
9
18
  vertical-align: middle;
10
19
  white-space: nowrap;
20
+ animation: ipc-player-trial-badge-slide-in 0.3s linear;
11
21
  }
12
22
 
13
23
  .ipc-player-trial-badge-icon {
@@ -43,9 +53,10 @@
43
53
  display: inline-flex;
44
54
  align-items: center;
45
55
  justify-content: center;
46
- height: 22px;
47
- padding: 0 10px;
48
- border-radius: 11px;
56
+ min-width: 44px;
57
+ min-height: 28px;
58
+ padding: 0 12px;
59
+ border-radius: 14px;
49
60
  flex-shrink: 0;
50
61
  }
51
62
 
@@ -1,22 +1,23 @@
1
- import { useCallback, useEffect, useState } from 'react';
2
- import { getAIFrameFeature, getCurrentHomeInfoRay, getDeviceInfoRay, setAIFrameFeature } from '../../utils/ttt';
3
- import { gotoSecurityCloudService } from '../../utils';
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { setTrailFinish } from '../../utils/ttt';
3
+ import { gotoSecurityCloudService2 } from '../../utils';
4
+ import { trialCountdownEnd } from '../../ui/constant';
4
5
  import Strings from '../../i18n';
5
6
  export const useTrialBadge = (event, devId, trialRemainingSec) => {
6
7
  const [showTrialBadge, setShowTrialBadge] = useState(false);
8
+ const prevTrialSecRef = useRef(trialRemainingSec);
7
9
  useEffect(() => {
8
10
  if (trialRemainingSec > 0 && trialRemainingSec < 300) {
9
- setShowTrialBadge(true);
11
+ if (trialRemainingSec !== prevTrialSecRef.current) {
12
+ setShowTrialBadge(true);
13
+ }
10
14
  }
15
+ prevTrialSecRef.current = trialRemainingSec;
11
16
  }, [trialRemainingSec]);
12
17
  const handleTrialSubscribe = useCallback(async () => {
13
18
  try {
14
- const homeInfo = await getCurrentHomeInfoRay();
15
- const deviceInfo = await getDeviceInfoRay(devId);
16
- console.log('res===', deviceInfo, homeInfo);
17
- gotoSecurityCloudService(homeInfo.homeId, deviceInfo.uuid);
19
+ await gotoSecurityCloudService2(devId);
18
20
  } catch (error) {
19
- console.log('res===handleTrialSubscribe error', error);
20
21
  ty.showToast({
21
22
  title: Strings.getLang('ipc_player_fetch_error'),
22
23
  icon: 'none'
@@ -25,13 +26,21 @@ export const useTrialBadge = (event, devId, trialRemainingSec) => {
25
26
  }, [devId]);
26
27
  const handleCountdownEnd = useCallback(async () => {
27
28
  try {
28
- const getAI = await getAIFrameFeature(devId);
29
- console.log('res===handleCountdownEnd', getAI);
30
- setAIFrameFeature(devId, {
31
- enabled: false,
32
- aiFrameFeature: getAI.aiFrameFeature
33
- });
34
29
  setShowTrialBadge(false);
30
+ // const getAI = await getAIFrameFeature(devId);
31
+ // const scope = { ...getAI.aiFrameFeature?.scope, inPreview: false };
32
+ // await setAIFrameFeature({
33
+ // devId,
34
+ // scene: 'inPreview', // 实时预览场景
35
+ // enabled: getAI.enabled,
36
+ // aiFrameFeature: {
37
+ // scope,
38
+ // feature: getAI.aiFrameFeature?.feature,
39
+ // exportEnabled: getAI.aiFrameFeature?.exportEnabled,
40
+ // },
41
+ // });
42
+ await setTrailFinish(devId);
43
+ event.emit(trialCountdownEnd);
35
44
  } catch (error) {
36
45
  ty.showToast({
37
46
  title: Strings.getLang('ipc_player_fetch_error'),
@@ -3,8 +3,13 @@ import { ComponentConfigProps } from '../../interface';
3
3
  import './tryExperience.less';
4
4
  type Props = ComponentConfigProps & {
5
5
  className?: string;
6
- hideTryExperienceMenu?: boolean;
6
+ hideSmartImageQualityState?: boolean;
7
7
  buttonState?: number;
8
+ trialRemainingSec?: number;
9
+ isPurchase?: boolean;
10
+ canOpenSettings?: boolean;
11
+ gRawData?: boolean;
12
+ isLowPhone?: boolean;
8
13
  };
9
14
  export declare const TryExperience: (props: Props) => React.JSX.Element | null;
10
15
  export {};
@@ -1,8 +1,11 @@
1
- import { View, Image, getSystemInfoSync } from '@ray-js/ray';
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import { View, Image, getSystemInfoSync, showToast } from '@ray-js/ray';
2
3
  import clsx from 'clsx';
3
- import React from 'react';
4
+ import React, { useState, useEffect, useCallback, useRef } from 'react';
4
5
  import { useStore } from '../../ctx/store';
5
- import { gotoAIDrawMiniProgram } from '../../utils';
6
+ import Strings from '../../i18n';
7
+ import { getAIFrameFeature, gotoAIDrawMiniProgram, setAIFrameFeature } from '../../utils';
8
+ import { refreshSmartImageQualityEvent } from '../../ui/constant';
6
9
  import tryZh from '../../res/try/try_zh.png';
7
10
  import tryEn from '../../res/try/try_en.png';
8
11
  import tryOpen from '../../res/try/try_open.png';
@@ -33,36 +36,129 @@ const pickIconByStatus = buttonState => {
33
36
  case TryExperienceStatus.Close:
34
37
  return tryClose;
35
38
  case TryExperienceStatus.Default:
36
- default:
37
39
  return getDefaultLangIcon();
40
+ default:
41
+ return '';
38
42
  }
39
43
  };
40
44
  export const TryExperience = props => {
41
45
  const {
42
46
  className,
43
- hideTryExperienceMenu,
44
- buttonState = 0
47
+ hideSmartImageQualityState,
48
+ buttonState,
49
+ trialRemainingSec,
50
+ isPurchase,
51
+ canOpenSettings,
52
+ gRawData,
53
+ isLowPhone,
54
+ devId
45
55
  } = props;
46
56
  const {
47
- brandColor
57
+ brandColor,
58
+ recording
48
59
  } = useStore({
49
- brandColor: props.brandColor
60
+ brandColor: props.brandColor,
61
+ recording: props.recording
50
62
  });
51
- const iconUrl = pickIconByStatus(buttonState);
52
- if (hideTryExperienceMenu) {
63
+ const [imgSrc, setImgSrc] = useState();
64
+ const lockRef = useRef(false);
65
+ useEffect(() => {
66
+ updateImgSrc();
67
+ }, [buttonState]);
68
+ const updateImgSrc = useCallback(() => {
69
+ if (isLowPhone) {
70
+ setImgSrc(tryClose);
71
+ return;
72
+ }
73
+ if (buttonState === 0 || buttonState) {
74
+ const iconUrl = pickIconByStatus(buttonState);
75
+ setImgSrc(iconUrl);
76
+ } else {
77
+ setImgSrc(undefined);
78
+ }
79
+ }, [buttonState]);
80
+ const onTryExperience = useCallback(async () => {
81
+ console.log('res===onTryExperience', lockRef.current, isLowPhone);
82
+ if (lockRef.current) return;
83
+ if (isLowPhone) {
84
+ showToast({
85
+ title: Strings.getLang('ipc_player_low_phone_not_support'),
86
+ icon: 'none'
87
+ });
88
+ return;
89
+ }
90
+ if (recording) {
91
+ showToast({
92
+ title: Strings.getLang('ipc_player_recording_now_tip'),
93
+ icon: 'none'
94
+ });
95
+ return;
96
+ }
97
+ lockRef.current = true;
98
+ try {
99
+ if (buttonState === TryExperienceStatus.Open) {
100
+ var _getAI$aiFrameFeature, _getAI$aiFrameFeature2, _getAI$aiFrameFeature3, _props$event;
101
+ const getAI = await getAIFrameFeature(devId);
102
+ if (!getAI) return;
103
+ // 由开变关的时候,只关inPreview
104
+ const scope = _objectSpread(_objectSpread({}, (_getAI$aiFrameFeature = getAI.aiFrameFeature) === null || _getAI$aiFrameFeature === void 0 ? void 0 : _getAI$aiFrameFeature.scope), {}, {
105
+ inPreview: false
106
+ });
107
+ await setAIFrameFeature({
108
+ devId,
109
+ scene: 'inPreview',
110
+ // 实时预览场景
111
+ enabled: getAI.enabled,
112
+ aiFrameFeature: {
113
+ scope,
114
+ feature: (_getAI$aiFrameFeature2 = getAI.aiFrameFeature) === null || _getAI$aiFrameFeature2 === void 0 ? void 0 : _getAI$aiFrameFeature2.feature,
115
+ exportEnabled: (_getAI$aiFrameFeature3 = getAI.aiFrameFeature) === null || _getAI$aiFrameFeature3 === void 0 ? void 0 : _getAI$aiFrameFeature3.exportEnabled
116
+ }
117
+ });
118
+ (_props$event = props.event) === null || _props$event === void 0 || _props$event.emit(refreshSmartImageQualityEvent);
119
+ } else if (buttonState === TryExperienceStatus.Close && isPurchase || buttonState === TryExperienceStatus.Close && trialRemainingSec < 300 && trialRemainingSec > 0) {
120
+ var _getAI$aiFrameFeature4, _getAI$aiFrameFeature5, _getAI$aiFrameFeature6, _props$event2;
121
+ const getAI = await getAIFrameFeature(devId);
122
+ if (!getAI) return;
123
+ const scope = _objectSpread(_objectSpread({}, (_getAI$aiFrameFeature4 = getAI.aiFrameFeature) === null || _getAI$aiFrameFeature4 === void 0 ? void 0 : _getAI$aiFrameFeature4.scope), {}, {
124
+ inPreview: true
125
+ });
126
+ // 由关变开的时候,enabled和inPreview两个都开
127
+ await setAIFrameFeature({
128
+ devId,
129
+ scene: 'inPreview',
130
+ // 实时预览场景
131
+ enabled: true,
132
+ aiFrameFeature: {
133
+ scope,
134
+ feature: (_getAI$aiFrameFeature5 = getAI.aiFrameFeature) === null || _getAI$aiFrameFeature5 === void 0 ? void 0 : _getAI$aiFrameFeature5.feature,
135
+ exportEnabled: (_getAI$aiFrameFeature6 = getAI.aiFrameFeature) === null || _getAI$aiFrameFeature6 === void 0 ? void 0 : _getAI$aiFrameFeature6.exportEnabled
136
+ }
137
+ });
138
+ (_props$event2 = props.event) === null || _props$event2 === void 0 || _props$event2.emit(refreshSmartImageQualityEvent);
139
+ } else {
140
+ gotoAIDrawMiniProgram(devId, brandColor);
141
+ }
142
+ } catch (error) {
143
+ //
144
+ } finally {
145
+ lockRef.current = false;
146
+ }
147
+ }, [buttonState, recording, isPurchase, trialRemainingSec]);
148
+ if (hideSmartImageQualityState) {
149
+ return null;
150
+ }
151
+ if (!imgSrc || !canOpenSettings || !gRawData) {
53
152
  return null;
54
153
  }
55
154
  return /*#__PURE__*/React.createElement(View, {
56
155
  className: clsx(className),
57
- onClick: () => {
58
- console.log('res===onTryExperience', props.devId, brandColor);
59
- gotoAIDrawMiniProgram(props.devId, brandColor);
60
- }
156
+ onClick: onTryExperience
61
157
  }, /*#__PURE__*/React.createElement(View, {
62
158
  className: "try-experience-box"
63
159
  }, /*#__PURE__*/React.createElement(Image, {
64
160
  className: "try-experience-icon",
65
- src: iconUrl,
161
+ src: imgSrc,
66
162
  mode: "heightFix"
67
163
  })));
68
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.35-beta.3",
3
+ "version": "0.0.35-beta.31",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@ray-js/direction-control": "^0.0.8",
39
39
  "@ray-js/ipc-ptz-zoom": "^0.0.3",
40
- "@ray-js/ray-ipc-player": "2.1.1-beta.3",
40
+ "@ray-js/ray-ipc-player": "^2.1.2",
41
41
  "@ray-js/ray-ipc-utils": "^1.1.15",
42
42
  "@ray-js/svg": "0.2.0",
43
43
  "clsx": "^1.2.1",
@@ -64,7 +64,7 @@
64
64
  "husky": {
65
65
  "hooks": {
66
66
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --config commitlint.config.js",
67
- "pre-commit": "lint-staged"
67
+ "pre-commit": "node ./scripts/check-protected-files.js && lint-staged"
68
68
  }
69
69
  },
70
70
  "lint-staged": {