@ray-js/ipc-player-integration 0.0.1-beta-79 → 0.0.1

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.
@@ -69,6 +69,7 @@ export const PtzControl = props => {
69
69
  getStorage({
70
70
  key: `${devId}_ptzControlTip}`,
71
71
  success: res => {
72
+ console.log(res, 'ptzControlTip');
72
73
  if (!res.data) {
73
74
  setShowPtzControlTip(true);
74
75
  }
@@ -91,6 +92,38 @@ export const PtzControl = props => {
91
92
  }
92
93
  };
93
94
  }, []);
95
+ const onTouchPtzStart = useMemoizedFn(async data => {
96
+ event.emit(pauseTimeToHideAllComponent);
97
+ // event.emit('ptzControlTipShow', true);
98
+ const {
99
+ type
100
+ } = data;
101
+ const dpData = await getDpIdByCode(devId, 'ptz_control');
102
+ if (dpData.code === 0) {
103
+ const ptzControlId = dpData.data;
104
+ const sndDpValue = _get(_find(ptzData.current, {
105
+ type
106
+ }), 'dpValue', null);
107
+ publishDps(devId, {
108
+ [ptzControlId]: sndDpValue
109
+ });
110
+ ptzTimeId.current = setInterval(() => {
111
+ publishDps(devId, {
112
+ [ptzControlId]: sndDpValue
113
+ });
114
+ }, 1000);
115
+ }
116
+ if (showPtzControlTip) {
117
+ addContent('absolute', {
118
+ id: ptzControlTipId,
119
+ content: props => {
120
+ return /*#__PURE__*/React.createElement(PtzControlTip, props);
121
+ },
122
+ absoluteContentClassName: 'ipc-player-plugin-ptz-control-tip-wrap',
123
+ initProps: _objectSpread({}, props)
124
+ });
125
+ }
126
+ });
94
127
  return /*#__PURE__*/React.createElement(CoverView, {
95
128
  className: clsx('ipc-player-plugin-full-screen-ptz-control', {
96
129
  'ipc-player-plugin-full-screen-ptz-control-hide': !isPtzActive || shouldHide,
@@ -100,38 +133,7 @@ export const PtzControl = props => {
100
133
  ptzSize: "172px",
101
134
  zoomData: [],
102
135
  ptzData: ptzData.current,
103
- onTouchPtzStart: async data => {
104
- event.emit(pauseTimeToHideAllComponent);
105
- // event.emit('ptzControlTipShow', true);
106
- const {
107
- type
108
- } = data;
109
- const dpData = await getDpIdByCode(devId, 'ptz_control');
110
- if (dpData.code === 0) {
111
- const ptzControlId = dpData.data;
112
- const sndDpValue = _get(_find(ptzData.current, {
113
- type
114
- }), 'dpValue', null);
115
- publishDps(devId, {
116
- [ptzControlId]: sndDpValue
117
- });
118
- ptzTimeId.current = setInterval(() => {
119
- publishDps(devId, {
120
- [ptzControlId]: sndDpValue
121
- });
122
- }, 1000);
123
- }
124
- if (showPtzControlTip) {
125
- addContent('absolute', {
126
- id: ptzControlTipId,
127
- content: props => {
128
- return /*#__PURE__*/React.createElement(PtzControlTip, props);
129
- },
130
- absoluteContentClassName: 'ipc-player-plugin-ptz-control-tip-wrap',
131
- initProps: _objectSpread({}, props)
132
- });
133
- }
134
- },
136
+ onTouchPtzStart: onTouchPtzStart,
135
137
  onTouchPtzEnd: async () => {
136
138
  const ptzStopData = await getDpIdByCode(devId, 'ptz_stop');
137
139
  if (ptzStopData.code === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.1-beta-79",
3
+ "version": "0.0.1",
4
4
  "description": "IPC 播放器功能集成",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -32,14 +32,14 @@
32
32
  "test": "yarn jest"
33
33
  },
34
34
  "peerDependencies": {
35
- "@ray-js/direction-control": "0.0.7-beta-8",
35
+ "@ray-js/direction-control": "0.0.7",
36
36
  "ahooks": "^3.1.6"
37
37
  },
38
38
  "dependencies": {
39
- "@ray-js/ipc-ptz-zoom": "0.0.2-beta-7",
39
+ "@ray-js/ipc-ptz-zoom": "0.0.2",
40
40
  "@ray-js/panel-sdk": "^1.13.1",
41
- "@ray-js/ray-ipc-player": "2.0.20-beta-17",
42
- "@ray-js/ray-ipc-utils": "1.1.0-beta-17",
41
+ "@ray-js/ray-ipc-player": "2.0.20",
42
+ "@ray-js/ray-ipc-utils": "1.1.0",
43
43
  "@ray-js/svg": "0.2.0",
44
44
  "clsx": "^1.2.1",
45
45
  "jotai": "^2.10.2"
@@ -48,7 +48,7 @@
48
48
  "@commitlint/cli": "^7.2.1",
49
49
  "@commitlint/config-conventional": "^9.0.1",
50
50
  "@ray-js/cli": "^1.4.9",
51
- "@ray-js/direction-control": "0.0.7-beta-8",
51
+ "@ray-js/direction-control": "0.0.7",
52
52
  "@ray-js/ray": "^1.4.9",
53
53
  "@testing-library/react-hooks": "^8.0.1",
54
54
  "@types/jest": "^29.5.14",