@ray-js/ipc-player-integration 0.0.1-beta-29 → 0.0.1-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/plugins/fullScreen/fullScreen.js +1 -0
- package/lib/plugins/fullScreen/verticalScreen.js +4 -2
- package/lib/plugins/resolution/fullResolutionControl.js +2 -7
- package/lib/plugins/resolution/resolution.js +3 -1
- package/lib/plugins/voiceIntercom/voiceIntercom.less +3 -3
- package/lib/ui/ui.js +30 -27
- package/package.json +3 -3
|
@@ -8,10 +8,12 @@ export function VerticalScreen(_ref) {
|
|
|
8
8
|
onClick = NILL,
|
|
9
9
|
className
|
|
10
10
|
} = _ref;
|
|
11
|
-
console.log(className, 'className');
|
|
12
11
|
return /*#__PURE__*/React.createElement(View, {
|
|
13
12
|
className: clsx(className),
|
|
14
|
-
onClick: onClick
|
|
13
|
+
onClick: onClick,
|
|
14
|
+
style: {
|
|
15
|
+
paddingRight: '10px'
|
|
16
|
+
}
|
|
15
17
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
16
18
|
className: clsx('icon-panel', 'icon-panel-left-arrow', 'ipc-player-plugin-vertical-screen-icon')
|
|
17
19
|
}));
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Text, View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Strings from '../../i18n';
|
|
5
5
|
import { useComponentHideState } from '../../ui/hooks';
|
|
6
|
-
import { UIEventContext } from '../../ui/context';
|
|
7
6
|
import { useStore } from '../../ctx/store';
|
|
8
|
-
import { startTimeToHideAllComponent, pauseTimeToHideAllComponent } from '../../ui/constant';
|
|
9
7
|
import './resolution.less';
|
|
10
8
|
export const FullResolutionControl = props => {
|
|
11
9
|
const {
|
|
12
10
|
setResolution,
|
|
13
11
|
setFullResolutionActive
|
|
14
12
|
} = props;
|
|
15
|
-
console.log(props, 'props========');
|
|
16
13
|
const {
|
|
17
14
|
screenType,
|
|
18
15
|
fullResolutionActive,
|
|
@@ -27,10 +24,8 @@ export const FullResolutionControl = props => {
|
|
|
27
24
|
resolution: props.resolution
|
|
28
25
|
});
|
|
29
26
|
const [shouldHide] = useComponentHideState(screenType);
|
|
30
|
-
const {
|
|
31
|
-
event
|
|
32
|
-
} = useContext(UIEventContext);
|
|
33
27
|
const changeResolution = value => {
|
|
28
|
+
console.log('________', value);
|
|
34
29
|
if (value === resolution) {
|
|
35
30
|
ty.showToast({
|
|
36
31
|
icon: 'none',
|
|
@@ -31,6 +31,9 @@ export const Resolution = props => {
|
|
|
31
31
|
return /*#__PURE__*/React.createElement(View, {
|
|
32
32
|
onClick: () => {
|
|
33
33
|
if (screenType === 'full') {
|
|
34
|
+
console.log('dsakdhjksahdhsadsahdkhskahdkshk');
|
|
35
|
+
// 更改全屏清晰度展开状态
|
|
36
|
+
setFullResolutionActive(true);
|
|
34
37
|
// 移除全屏清晰度空间
|
|
35
38
|
deleteContent('absolute', fullResolutionId);
|
|
36
39
|
// 添加全屏清晰度空间
|
|
@@ -42,7 +45,6 @@ export const Resolution = props => {
|
|
|
42
45
|
absoluteContentClassName: 'ipc-player-plugin-full-resolution-control-wrap',
|
|
43
46
|
initProps: _objectSpread({}, props)
|
|
44
47
|
});
|
|
45
|
-
setFullResolutionActive(true);
|
|
46
48
|
event.emit(pauseTimeToHideAllComponent);
|
|
47
49
|
return false;
|
|
48
50
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
.ipc-player-plugin-voice-intercom {
|
|
4
4
|
background: var(--ipc-player-plugin-voice-bg, radial-gradient(77% 77% at 34% 28%, #FF997C 0%, #FF592A 99%));
|
|
5
|
-
width:
|
|
6
|
-
height:
|
|
7
|
-
border-radius:50%;
|
|
5
|
+
width: calc(72px * var(--ipc-player-size-scale, 1));
|
|
6
|
+
height: calc(72px * var(--ipc-player-size-scale, 1));
|
|
7
|
+
border-radius: 50%;
|
|
8
8
|
display: flex;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
align-items: center;
|
package/lib/ui/ui.js
CHANGED
|
@@ -36,7 +36,7 @@ const defaultCSSVariable = {
|
|
|
36
36
|
'--fontColor': '#fff',
|
|
37
37
|
'--fontSize': '12px'
|
|
38
38
|
};
|
|
39
|
-
const HIDE_COMPONENT_TIME =
|
|
39
|
+
const HIDE_COMPONENT_TIME = 10000;
|
|
40
40
|
export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
41
41
|
const {
|
|
42
42
|
className,
|
|
@@ -172,31 +172,11 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
172
172
|
* 视频流加载状态封装
|
|
173
173
|
*/
|
|
174
174
|
|
|
175
|
-
const handPlayerTap = useCallback(data => {
|
|
176
|
-
console.log('res===on onVideoTap', data);
|
|
177
|
-
const store = getDefaultStore();
|
|
178
|
-
const _screenType = store.get(instance.screenType);
|
|
179
|
-
eventRef.current.emit(playerTap);
|
|
180
|
-
// if (_screenType === 'full') {
|
|
181
|
-
// 如果全屏清晰度展开, 则点击关闭全屏清晰度, 展示所有组件
|
|
182
|
-
if (fullResolutionActive && _screenType === 'full') {
|
|
183
|
-
setFullResolutionActive(false);
|
|
184
|
-
// 展示相应菜单启动自动隐藏定时
|
|
185
|
-
triggerEvent(showAllComponent);
|
|
186
|
-
// event.emit(startTimeToHideAllComponent);
|
|
187
|
-
return false;
|
|
188
|
-
}
|
|
189
|
-
console.log(prevTriggerEvent.current, 'prevTriggerEvent.current');
|
|
190
|
-
if (prevTriggerEvent.current === hideAllComponent) {
|
|
191
|
-
triggerEvent(showAllComponent);
|
|
192
|
-
} else {
|
|
193
|
-
triggerEvent(hideAllComponent);
|
|
194
|
-
}
|
|
195
|
-
return false;
|
|
196
|
-
}, [fullResolutionActive]);
|
|
197
175
|
const triggerEvent = type => {
|
|
198
|
-
|
|
199
|
-
|
|
176
|
+
getDefaultStore();
|
|
177
|
+
console.log('_______Dsahdjashjdhsjah');
|
|
178
|
+
// const _screenType = store.get(instance.screenType);
|
|
179
|
+
// if (prevTriggerEvent.current === type || _screenType === 'vertical') return;
|
|
200
180
|
if (prevTriggerEvent.current === type) return;
|
|
201
181
|
if (timer.current) {
|
|
202
182
|
clearTimeout(timer.current);
|
|
@@ -212,6 +192,8 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
212
192
|
prevTriggerEvent.current = type;
|
|
213
193
|
};
|
|
214
194
|
const listenStart = useCallback(() => {
|
|
195
|
+
timer.current && clearTimeout(timer.current);
|
|
196
|
+
// 重新开始计时
|
|
215
197
|
if (!timer.current) {
|
|
216
198
|
// @ts-ignore
|
|
217
199
|
timer.current = setTimeout(() => {
|
|
@@ -220,7 +202,7 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
220
202
|
}
|
|
221
203
|
}, []);
|
|
222
204
|
const listenPause = useCallback(() => {
|
|
223
|
-
clearTimeout(timer.current);
|
|
205
|
+
timer.current && clearTimeout(timer.current);
|
|
224
206
|
timer.current = null;
|
|
225
207
|
}, []);
|
|
226
208
|
useEffect(() => {
|
|
@@ -290,7 +272,28 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
290
272
|
},
|
|
291
273
|
clarity: resolution === 'HD' ? 'hd' : 'normal',
|
|
292
274
|
privateState: privateState,
|
|
293
|
-
onPlayerTap:
|
|
275
|
+
onPlayerTap: data => {
|
|
276
|
+
console.log('res===on onVideoTap', data);
|
|
277
|
+
const store = getDefaultStore();
|
|
278
|
+
const _screenType = store.get(instance.screenType);
|
|
279
|
+
const _fullResolutionActive = store.get(instance.fullResolutionActive);
|
|
280
|
+
eventRef.current.emit(playerTap);
|
|
281
|
+
// 如果全屏清晰度展开, 则点击关闭全屏清晰度, 展示所有组件
|
|
282
|
+
if (_fullResolutionActive && _screenType === 'full') {
|
|
283
|
+
setFullResolutionActive(false);
|
|
284
|
+
// 展示相应菜单启动自动隐藏定时
|
|
285
|
+
triggerEvent(showAllComponent);
|
|
286
|
+
event.emit(startTimeToHideAllComponent);
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
console.log(prevTriggerEvent.current, 'prevTriggerEvent.current');
|
|
290
|
+
if (prevTriggerEvent.current === hideAllComponent) {
|
|
291
|
+
triggerEvent(showAllComponent);
|
|
292
|
+
} else {
|
|
293
|
+
triggerEvent(hideAllComponent);
|
|
294
|
+
}
|
|
295
|
+
return false;
|
|
296
|
+
} // 对应原来的onVideoTap
|
|
294
297
|
}), /*#__PURE__*/React.createElement(TopLeftContent, {
|
|
295
298
|
ctx: instance
|
|
296
299
|
}, renderTopLeftContent), /*#__PURE__*/React.createElement(TopRightContent, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ipc-player-integration",
|
|
3
|
-
"version": "0.0.1-beta-
|
|
3
|
+
"version": "0.0.1-beta-31",
|
|
4
4
|
"description": "IPC 播放器功能集成",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ray-js/ipc-ptz-zoom": "0.0.2-beta-4",
|
|
37
37
|
"@ray-js/panel-sdk": "^1.13.1",
|
|
38
|
-
"@ray-js/ray-ipc-player": "2.0.20-beta-
|
|
39
|
-
"@ray-js/ray-ipc-utils": "1.1.0-beta-
|
|
38
|
+
"@ray-js/ray-ipc-player": "2.0.20-beta-5",
|
|
39
|
+
"@ray-js/ray-ipc-utils": "1.1.0-beta-13",
|
|
40
40
|
"@ray-js/svg": "0.2.0",
|
|
41
41
|
"clsx": "^1.2.1",
|
|
42
42
|
"jotai": "^2.10.2"
|