@ray-js/ipc-player-integration 0.0.67-beta.1 → 0.0.67-beta.2
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.
|
@@ -38,11 +38,28 @@ export function FullScreen(props) {
|
|
|
38
38
|
* 竖屏统一操作
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
+
const handleVertical = () => {
|
|
42
|
+
event.emit(pauseTimeToHideAllComponent);
|
|
43
|
+
setNavigationBarBack({
|
|
44
|
+
type: 'system'
|
|
45
|
+
});
|
|
46
|
+
showMenuButton();
|
|
47
|
+
showStatusBar();
|
|
48
|
+
deleteContent('topLeft', verticalScreenId);
|
|
49
|
+
hideContent('bottomLeft', fullSmallIntercomId);
|
|
50
|
+
deleteContent('absolute', voiceIntercomId);
|
|
51
|
+
deleteContent('absolute', ptzControlId);
|
|
52
|
+
deleteContent('absolute', fullResolutionId);
|
|
53
|
+
deleteContent('absolute', fullTravelRouteControlId);
|
|
54
|
+
};
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* 全屏统一操作
|
|
43
58
|
*/
|
|
44
|
-
const handleFull =
|
|
59
|
+
const handleFull = isCurrent => {
|
|
45
60
|
hasDpCode(devId, DIRECTION_CONTROL_DP_CODE).then(hasDirectionControlDpCode => {
|
|
61
|
+
// 屏幕切换、设备切换或卸载后,旧能力查询不能重新挂载全屏控件。
|
|
62
|
+
if (!isCurrent()) return;
|
|
46
63
|
hideMenuButton();
|
|
47
64
|
hideStatusBar();
|
|
48
65
|
setNavigationBarBack({
|
|
@@ -94,33 +111,17 @@ export function FullScreen(props) {
|
|
|
94
111
|
}, null);
|
|
95
112
|
});
|
|
96
113
|
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* 针对横竖屏方法统一集中处理
|
|
100
|
-
*/
|
|
101
|
-
const handlers = {
|
|
102
|
-
full: () => {
|
|
103
|
-
handleFull();
|
|
104
|
-
},
|
|
105
|
-
vertical: () => {
|
|
106
|
-
event.emit(pauseTimeToHideAllComponent);
|
|
107
|
-
setNavigationBarBack({
|
|
108
|
-
type: 'system'
|
|
109
|
-
});
|
|
110
|
-
showMenuButton();
|
|
111
|
-
showStatusBar();
|
|
112
|
-
deleteContent('topLeft', verticalScreenId);
|
|
113
|
-
hideContent('bottomLeft', fullSmallIntercomId);
|
|
114
|
-
deleteContent('absolute', voiceIntercomId);
|
|
115
|
-
deleteContent('absolute', ptzControlId);
|
|
116
|
-
deleteContent('absolute', fullResolutionId);
|
|
117
|
-
deleteContent('absolute', fullTravelRouteControlId);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
114
|
useEffect(() => {
|
|
121
|
-
|
|
122
|
-
(
|
|
123
|
-
|
|
115
|
+
let active = true;
|
|
116
|
+
if (screenType === 'full') {
|
|
117
|
+
handleFull(() => active);
|
|
118
|
+
} else {
|
|
119
|
+
handleVertical();
|
|
120
|
+
}
|
|
121
|
+
return () => {
|
|
122
|
+
active = false;
|
|
123
|
+
};
|
|
124
|
+
}, [screenType, devId]);
|
|
124
125
|
|
|
125
126
|
// 点击事件处理函数
|
|
126
127
|
const handClick = target => {
|
|
@@ -8,5 +8,5 @@ type RectDirectionControlProps = React.ComponentProps<typeof RectDirectionContro
|
|
|
8
8
|
export type FullTravelRouteControlProps = ComponentConfigProps & {
|
|
9
9
|
directionControlProps?: Partial<RectDirectionControlProps>;
|
|
10
10
|
};
|
|
11
|
-
export declare function FullTravelRouteControl(props: FullTravelRouteControlProps): React.JSX.Element;
|
|
11
|
+
export declare function FullTravelRouteControl(props: FullTravelRouteControlProps): React.JSX.Element | null;
|
|
12
12
|
export {};
|
|
@@ -26,9 +26,11 @@ export function FullTravelRouteControl(props) {
|
|
|
26
26
|
const prevRotate = useRef('-1');
|
|
27
27
|
const pauseTimeToHideAllComponentRef = useRef(false);
|
|
28
28
|
const {
|
|
29
|
-
brandColor
|
|
29
|
+
brandColor,
|
|
30
|
+
screenType
|
|
30
31
|
} = useStore({
|
|
31
|
-
brandColor: props.brandColor
|
|
32
|
+
brandColor: props.brandColor,
|
|
33
|
+
screenType: props.screenType
|
|
32
34
|
});
|
|
33
35
|
useRef();
|
|
34
36
|
const [state, _, sendDp] = useDpState({
|
|
@@ -64,6 +66,7 @@ export function FullTravelRouteControl(props) {
|
|
|
64
66
|
});
|
|
65
67
|
prevRotate.current = value;
|
|
66
68
|
};
|
|
69
|
+
if (screenType !== 'full') return null;
|
|
67
70
|
return /*#__PURE__*/React.createElement(View, {
|
|
68
71
|
className: clsx('ipc-player-plugin-full-screen-voice', 'ipc-plugin-absolute-move-in-right', {
|
|
69
72
|
'ipc-plugin-absolute-move-in-right-hide': shouldHide || isPtzActive
|