@ray-js/ipc-player-integration 0.0.67-beta.1 → 0.0.68-beta.0
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/README.md +6 -0
- package/lib/ctx/ctx.composition.js +3 -13
- package/lib/ctx/ctx.js +35 -48
- package/lib/ctx/multiCameraCtx.d.ts +0 -2
- package/lib/ctx/multiCameraCtx.js +1 -17
- package/lib/i18n/index.d.ts +0 -12
- package/lib/i18n/strings.d.ts +0 -6
- package/lib/i18n/strings.js +0 -6
- package/lib/index.d.ts +4 -0
- package/lib/index.js +3 -1
- package/lib/interface.d.ts +3 -18
- package/lib/renderer/capabilities.d.ts +8 -0
- package/lib/renderer/capabilities.js +19 -0
- package/lib/renderer/context.d.ts +5 -0
- package/lib/renderer/context.js +6 -0
- package/lib/renderer/directionControl.d.ts +6 -0
- package/lib/renderer/directionControl.js +3 -0
- package/lib/renderer/font-manifest.json +9 -0
- package/lib/renderer/font.less +5 -0
- package/lib/renderer/glyphs.d.ts +1 -0
- package/lib/renderer/glyphs.js +256 -0
- package/lib/renderer/index.module.less +48 -0
- package/lib/renderer/overlay.d.ts +4 -0
- package/lib/renderer/overlay.js +6 -0
- package/lib/renderer/ptzZoom.d.ts +6 -0
- package/lib/renderer/ptzZoom.js +3 -0
- package/lib/renderer/text.d.ts +4 -0
- package/lib/renderer/text.js +32 -0
- package/lib/renderer/text.module.less +4 -0
- package/lib/renderer/viewport.d.ts +7 -0
- package/lib/renderer/viewport.js +24 -0
- package/lib/res/lynx-signal/index.d.ts +1 -0
- package/lib/res/lynx-signal/index.js +22 -0
- package/lib/res/lynx-signal/signalFour0.png +0 -0
- package/lib/res/lynx-signal/signalFour1.png +0 -0
- package/lib/res/lynx-signal/signalFour2.png +0 -0
- package/lib/res/lynx-signal/signalFour3.png +0 -0
- package/lib/res/lynx-signal/signalFour4.png +0 -0
- package/lib/res/lynx-signal/signalThree0.png +0 -0
- package/lib/res/lynx-signal/signalThree1.png +0 -0
- package/lib/res/lynx-signal/signalThree2.png +0 -0
- package/lib/res/lynx-signal/signalThree3.png +0 -0
- package/lib/res/player-charging.png +0 -0
- package/lib/res/player-more-arrow.png +0 -0
- package/lib/res/player-solar.png +0 -0
- package/lib/ui/bottomLeftContent.js +122 -56
- package/lib/ui/bottomRightContent.js +10 -5
- package/lib/ui/scrollHintArrow.d.ts +23 -0
- package/lib/ui/scrollHintArrow.js +83 -0
- package/lib/ui/topLeftContent.js +4 -2
- package/lib/ui/topRightContent.js +4 -2
- package/lib/ui/ui.d.ts +5 -0
- package/lib/ui/ui.js +93 -100
- package/lib/utils/navigation.d.ts +1 -2
- package/lib/utils/navigation.js +3 -13
- package/lib/widgets/battery/battery.js +7 -5
- package/lib/widgets/battery/batteryFull.js +7 -5
- package/lib/widgets/battery/statusIcon.d.ts +6 -0
- package/lib/widgets/battery/statusIcon.js +36 -0
- package/lib/widgets/battery/statusIcon.less +24 -0
- package/lib/widgets/captureToast/captureToast.d.ts +9 -0
- package/lib/widgets/captureToast/captureToast.js +73 -0
- package/lib/widgets/floodlight/floodlight.js +2 -1
- package/lib/widgets/flowLowTip/flowLowTip.js +2 -1
- package/lib/widgets/fullScreen/fullScreen.js +18 -4
- package/lib/widgets/fullScreen/fullTravelRouteControl.d.ts +1 -1
- package/lib/widgets/fullScreen/fullTravelRouteControl.js +1 -1
- package/lib/widgets/fullScreen/verticalScreen.js +2 -1
- package/lib/widgets/index.d.ts +0 -1
- package/lib/widgets/index.js +1 -2
- package/lib/widgets/moveInteractiveControl/controlButton.js +2 -1
- package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.js +16 -5
- package/lib/widgets/moveInteractiveControl/moveInteractiveControlUI.less +24 -4
- package/lib/widgets/multiCamera/index.less +0 -1
- package/lib/widgets/multiCamera/landscapeTip.js +5 -2
- package/lib/widgets/multiCamera/moveablePtzControl.js +9 -7
- package/lib/widgets/multiCamera/multiPtz.js +3 -2
- package/lib/widgets/multiCamera/ptzMoveableTip.js +5 -2
- package/lib/widgets/multiCamera/switchLayout.js +2 -1
- package/lib/widgets/multiCamera/tileMultiPtz.js +3 -2
- package/lib/widgets/multiCamera/tileSwitchLayout.js +2 -1
- package/lib/widgets/multiCamera/tileTip.js +5 -2
- package/lib/widgets/muted/muted.js +2 -1
- package/lib/widgets/muted/muted.test.js +66 -52
- package/lib/widgets/ptz/ptz.js +2 -1
- package/lib/widgets/ptz/ptzControl.js +4 -3
- package/lib/widgets/ptzControlTip/ptzControlTip.js +9 -4
- package/lib/widgets/ptzControlTip/ptzControlTip.less +6 -0
- package/lib/widgets/realTimeMagnification/realTimeMagnification.js +2 -1
- package/lib/widgets/recordVideo/recordVideo.js +32 -178
- package/lib/widgets/recordVideo/recordVideo.less +74 -17
- package/lib/widgets/recordVideo/recordVideo.test.js +169 -3
- package/lib/widgets/recordVideo/recordVideoTimer.d.ts +3 -0
- package/lib/widgets/recordVideo/recordVideoTimer.js +26 -0
- package/lib/widgets/resolution/fullResolutionControl.js +29 -19
- package/lib/widgets/resolution/resolution.js +3 -2
- package/lib/widgets/screenshot/screenshot.js +35 -125
- package/lib/widgets/screenshot/screenshot.less +40 -1
- package/lib/widgets/screenshot/screenshot.test.js +108 -113
- package/lib/widgets/signal4G/signal4G.js +4 -1
- package/lib/widgets/siren/siren.js +2 -1
- package/lib/widgets/tempHumidity/tempHumidity.js +2 -1
- package/lib/widgets/toggleVerticalFull/toggleVerticalFull.js +2 -1
- package/lib/widgets/trialBadge/index.d.ts +1 -2
- package/lib/widgets/trialBadge/index.js +17 -20
- package/lib/widgets/trialBadge/index.less +24 -0
- package/lib/widgets/trialBadge/useTrialBadge.d.ts +2 -3
- package/lib/widgets/trialBadge/useTrialBadge.js +3 -21
- package/lib/widgets/tryExperience/tryExperience.js +2 -1
- package/lib/widgets/videoBitKBP/videoBitKBP.js +2 -1
- package/lib/widgets/voiceIntercom/voiceIntercom.js +50 -24
- package/lib/widgets/voiceIntercom/voiceIntercom.less +16 -0
- package/lib/widgets/zoomTurntable/lynxDockLayout.d.ts +6 -0
- package/lib/widgets/zoomTurntable/lynxDockLayout.js +30 -0
- package/lib/widgets/zoomTurntable/turntable/index.d.ts +5 -7
- package/lib/widgets/zoomTurntable/turntable/index.js +3 -1
- package/lib/widgets/zoomTurntable/turntable/lynx.d.ts +5 -0
- package/lib/widgets/zoomTurntable/turntable/lynx.js +273 -0
- package/lib/widgets/zoomTurntable/turntable/lynx.less +9 -0
- package/lib/widgets/zoomTurntable/turntable/lynxModel.d.ts +37 -0
- package/lib/widgets/zoomTurntable/turntable/lynxModel.js +122 -0
- package/lib/widgets/zoomTurntable/turntable/lynxPaint.d.ts +3 -0
- package/lib/widgets/zoomTurntable/turntable/lynxPaint.js +36 -0
- package/lib/widgets/zoomTurntable/zoomTurntableDock.d.ts +5 -3
- package/lib/widgets/zoomTurntable/zoomTurntableDock.js +4 -4
- package/lib/widgets/zoomTurntable/zoomTurntableEntry.js +32 -19
- package/lib/widgets/zoomTurntable/zoomTurntableTip.js +24 -3
- package/package.json +15 -7
- package/lib/ctx/ctx.album.test.d.ts +0 -1
- package/lib/ctx/ctx.album.test.js +0 -197
- package/lib/ctx/multiCameraCtx.test.d.ts +0 -1
- package/lib/ctx/multiCameraCtx.test.js +0 -65
- package/lib/ui/absoluteContent.d.ts +0 -2
- package/lib/ui/absoluteContent.js +0 -3
- package/lib/utils/captureResult.d.ts +0 -12
- package/lib/utils/captureResult.js +0 -70
- package/lib/utils/captureResult.test.d.ts +0 -1
- package/lib/utils/captureResult.test.js +0 -223
- package/lib/utils/fullLinkTracking.d.ts +0 -5
- package/lib/utils/fullLinkTracking.js +0 -71
- package/lib/widgets/captureResult/captureResult.d.ts +0 -16
- package/lib/widgets/captureResult/captureResult.js +0 -85
- package/lib/widgets/captureResult/captureResult.less +0 -144
- package/lib/widgets/captureResult/captureResult.test.d.ts +0 -1
- package/lib/widgets/captureResult/captureResult.test.js +0 -84
- package/lib/widgets/captureResult/index.d.ts +0 -2
- package/lib/widgets/captureResult/index.js +0 -2
- package/lib/widgets/recordVideo/recordVideo.lifecycle.test.d.ts +0 -1
- package/lib/widgets/recordVideo/recordVideo.lifecycle.test.js +0 -106
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { View, Image } from '@ray-js/ray';
|
|
3
|
+
import { useMemoizedFn } from 'ahooks';
|
|
4
|
+
import { goToIpcPageNativeRoute } from '@ray-js/ray-ipc-utils';
|
|
5
|
+
import { useStore } from '../../ctx/store';
|
|
6
|
+
import { usePlayerOverlayHost } from '../../renderer/overlay';
|
|
7
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
8
|
+
import Strings from '../../i18n';
|
|
9
|
+
// This overlay belongs to the player, independently of the remounting toolbar.
|
|
10
|
+
const CaptureToast = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
kind,
|
|
13
|
+
imageUrl,
|
|
14
|
+
captureId,
|
|
15
|
+
screenType,
|
|
16
|
+
brandColor,
|
|
17
|
+
devId,
|
|
18
|
+
deleteContent
|
|
19
|
+
} = _ref;
|
|
20
|
+
const {
|
|
21
|
+
screenType: screen,
|
|
22
|
+
brandColor: color
|
|
23
|
+
} = useStore({
|
|
24
|
+
screenType,
|
|
25
|
+
brandColor
|
|
26
|
+
});
|
|
27
|
+
const OverlayView = usePlayerOverlayHost();
|
|
28
|
+
const isRecord = kind === 'record';
|
|
29
|
+
const id = isRecord ? 'record_video_SUCCESS_toast_id' : 'plugin-screenshot-toast';
|
|
30
|
+
const prefix = isRecord ? 'ipc-player-plugin-record-success' : 'ipc-player-plugin-screenshot';
|
|
31
|
+
const close = useMemoizedFn(() => deleteContent('absolute', id));
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const timer = setTimeout(close, 5000);
|
|
34
|
+
return () => clearTimeout(timer);
|
|
35
|
+
}, [captureId, close]);
|
|
36
|
+
const vertical = screen === 'vertical';
|
|
37
|
+
return /*#__PURE__*/React.createElement(OverlayView, {
|
|
38
|
+
className: `${prefix}-toast-wrap`,
|
|
39
|
+
style: {
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
top: vertical ? '12px' : '60px',
|
|
42
|
+
left: vertical ? '16px' : '50%',
|
|
43
|
+
right: vertical ? '16px' : 'auto',
|
|
44
|
+
display: 'flex',
|
|
45
|
+
width: vertical ? 'auto' : '400px',
|
|
46
|
+
marginLeft: vertical ? '0' : '-200px'
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
49
|
+
className: `${prefix}-toast`
|
|
50
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
51
|
+
className: `${prefix}-toast-image-box`
|
|
52
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
53
|
+
className: `${prefix}-toast-image`,
|
|
54
|
+
src: imageUrl
|
|
55
|
+
}), isRecord && /*#__PURE__*/React.createElement(View, {
|
|
56
|
+
className: "ipc-player-plugin-record-success-play-icon-box"
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
58
|
+
className: "icon-panel icon-panel-record-play ipc-player-plugin-record-success-play-icon"
|
|
59
|
+
}))), /*#__PURE__*/React.createElement(View, {
|
|
60
|
+
className: `${prefix}-toast-title`
|
|
61
|
+
}, Strings.getLang(isRecord ? 'ipc_player_record_success_tip' : 'ipc_player_screenshot_success_tip')), /*#__PURE__*/React.createElement(View, {
|
|
62
|
+
onClick: () => {
|
|
63
|
+
close();
|
|
64
|
+
goToIpcPageNativeRoute('ipc_album_panel', devId);
|
|
65
|
+
},
|
|
66
|
+
className: `${prefix}-toast-bottom`,
|
|
67
|
+
style: {
|
|
68
|
+
color,
|
|
69
|
+
borderColor: color
|
|
70
|
+
}
|
|
71
|
+
}, Strings.getLang(isRecord ? 'ipc_player_record_success_check' : 'ipc_player_shot_success_check'))));
|
|
72
|
+
};
|
|
73
|
+
export default CaptureToast;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { View
|
|
1
|
+
import { View } from '@ray-js/ray';
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
5
|
import { useDpState } from '../../hooks';
|
|
5
6
|
import { useStore } from '../../ctx/store';
|
|
6
7
|
import { UIEventContext } from '../../ui/context';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { View
|
|
1
|
+
import { View } from '@ray-js/ray';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import React, { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { getServiceUrl } from '@ray-js/ray-ipc-utils';
|
|
5
5
|
import { useMemoizedFn } from 'ahooks';
|
|
6
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
6
7
|
import Strings from '../../i18n';
|
|
7
8
|
import { useStore } from '../../ctx/store';
|
|
8
9
|
import { showFlowLowTipId } from '../../ui/constant';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import React, { useContext, useEffect } from 'react';
|
|
3
|
-
import { View, setPageOrientation,
|
|
2
|
+
import React, { useContext, useEffect, useMemo } from 'react';
|
|
3
|
+
import { View, setPageOrientation, hideMenuButton, showMenuButton, showStatusBar, hideStatusBar, setNavigationBarBack, getSystemInfoSync } from '@ray-js/ray';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { unstable_batchedUpdates as batchedUpdates } from '@ray-core/ray';
|
|
6
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
6
7
|
import { UIEventContext } from '../../ui/context';
|
|
7
8
|
import { showAllComponent, voiceIntercomId, verticalScreenId, fullTravelRouteControlId, ptzControlId, fullResolutionId, fullSmallIntercomId, pauseTimeToHideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
|
|
8
9
|
import { useStore } from '../../ctx/store';
|
|
@@ -34,6 +35,15 @@ export function FullScreen(props) {
|
|
|
34
35
|
event
|
|
35
36
|
} = useContext(UIEventContext);
|
|
36
37
|
|
|
38
|
+
// pad 设备不接管系统状态栏显隐:showStatusBar 会导致 iPad 面板布局异常;
|
|
39
|
+
// 且 pad 不支持横屏(见 ui.tsx,初始化即强制 vertical),本就不应进入全屏切换流程。
|
|
40
|
+
// 同时守住 hideStatusBar 以保持这对操作对称,避免异常路径下状态栏被隐藏后无法恢复。
|
|
41
|
+
// deviceType 在一次会话内恒定,useMemo 缓存避免每次 render 重复触发同步桥接调用
|
|
42
|
+
const isPad = useMemo(() => {
|
|
43
|
+
var _getSystemInfoSync;
|
|
44
|
+
return ((_getSystemInfoSync = getSystemInfoSync()) === null || _getSystemInfoSync === void 0 ? void 0 : _getSystemInfoSync.deviceType) === 'pad';
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
37
47
|
/**
|
|
38
48
|
* 竖屏统一操作
|
|
39
49
|
*/
|
|
@@ -44,7 +54,9 @@ export function FullScreen(props) {
|
|
|
44
54
|
const handleFull = () => {
|
|
45
55
|
hasDpCode(devId, DIRECTION_CONTROL_DP_CODE).then(hasDirectionControlDpCode => {
|
|
46
56
|
hideMenuButton();
|
|
47
|
-
|
|
57
|
+
if (!isPad) {
|
|
58
|
+
hideStatusBar();
|
|
59
|
+
}
|
|
48
60
|
setNavigationBarBack({
|
|
49
61
|
type: 'custom'
|
|
50
62
|
});
|
|
@@ -108,7 +120,9 @@ export function FullScreen(props) {
|
|
|
108
120
|
type: 'system'
|
|
109
121
|
});
|
|
110
122
|
showMenuButton();
|
|
111
|
-
|
|
123
|
+
if (!isPad) {
|
|
124
|
+
showStatusBar();
|
|
125
|
+
}
|
|
112
126
|
deleteContent('topLeft', verticalScreenId);
|
|
113
127
|
hideContent('bottomLeft', fullSmallIntercomId);
|
|
114
128
|
deleteContent('absolute', voiceIntercomId);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 全屏状态下要添加的摄像机行进路线控件
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import RectDirectionControl from '
|
|
5
|
+
import RectDirectionControl from '../../renderer/directionControl';
|
|
6
6
|
import type { ComponentConfigProps } from '../../interface';
|
|
7
7
|
type RectDirectionControlProps = React.ComponentProps<typeof RectDirectionControl>;
|
|
8
8
|
export type FullTravelRouteControlProps = ComponentConfigProps & {
|
|
@@ -6,8 +6,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
6
6
|
import React, { useEffect, useContext, useState, useRef } from 'react';
|
|
7
7
|
import { View } from '@ray-js/ray';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import RectDirectionControl from '@ray-js/direction-control';
|
|
10
9
|
import { useMemoizedFn } from 'ahooks';
|
|
10
|
+
import RectDirectionControl from '../../renderer/directionControl';
|
|
11
11
|
import { UIEventContext } from '../../ui/context';
|
|
12
12
|
import { useDpState } from '../../hooks';
|
|
13
13
|
import { useComponentHideState } from '../../ui/hooks';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
5
|
import './verticalScreen.less';
|
|
5
6
|
const NILL = () => null;
|
|
6
7
|
export function VerticalScreen(_ref) {
|
package/lib/widgets/index.d.ts
CHANGED
package/lib/widgets/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
5
|
import { useStore } from '../../ctx/store';
|
|
5
6
|
import { UIEventContext } from '../../ui/context';
|
|
6
7
|
import { hideAllComponent, widgetLabs, widgetClick } from '../../ui/constant';
|
|
@@ -2,8 +2,11 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import "core-js/modules/esnext.iterator.constructor.js";
|
|
3
3
|
import "core-js/modules/esnext.iterator.map.js";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { View, ScrollView
|
|
5
|
+
import { View, ScrollView } from '@ray-js/ray';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
+
import { usePlayerOverlayHost } from '../../renderer/overlay';
|
|
8
|
+
import { usePlayerRenderMode } from '../../renderer/context';
|
|
9
|
+
import { PlayerText } from '../../renderer/text';
|
|
7
10
|
import './moveInteractiveControlUI.less';
|
|
8
11
|
const defaultMenu = [{
|
|
9
12
|
key: '0',
|
|
@@ -62,6 +65,8 @@ const defaultCSSVariable = {
|
|
|
62
65
|
'--activeColor': '#FF592A'
|
|
63
66
|
};
|
|
64
67
|
export function MoveInterActiveControlUI(props) {
|
|
68
|
+
const OverlayView = usePlayerOverlayHost();
|
|
69
|
+
const isLynx = usePlayerRenderMode() === 'lynx';
|
|
65
70
|
const {
|
|
66
71
|
contentClsName,
|
|
67
72
|
wrapClsName,
|
|
@@ -75,18 +80,22 @@ export function MoveInterActiveControlUI(props) {
|
|
|
75
80
|
e.origin.stopPropagation();
|
|
76
81
|
onClick && onClick(item.key);
|
|
77
82
|
};
|
|
78
|
-
const WrapComponent = coverView ?
|
|
83
|
+
const WrapComponent = coverView ? OverlayView : View;
|
|
79
84
|
return /*#__PURE__*/React.createElement(WrapComponent
|
|
80
85
|
// @ts-ignore
|
|
81
86
|
, {
|
|
82
87
|
style: _objectSpread({}, CSSVariable),
|
|
83
|
-
className: clsx('ipc-player-plugin-active-control-wrap', wrapClsName
|
|
88
|
+
className: clsx('ipc-player-plugin-active-control-wrap', wrapClsName, {
|
|
89
|
+
'ipc-player-plugin-active-control-wrap-lynx': isLynx,
|
|
90
|
+
'ipc-player-plugin-active-control-wrap-webview': !isLynx
|
|
91
|
+
})
|
|
84
92
|
}, /*#__PURE__*/React.createElement(View, {
|
|
85
93
|
className: clsx('ipc-player-plugin-active-control-title')
|
|
86
94
|
}, I18n.t('homeFeatureInteractiveMenuTitle')), /*#__PURE__*/React.createElement(ScrollView, {
|
|
87
95
|
style: {
|
|
88
96
|
flex: 1
|
|
89
97
|
},
|
|
98
|
+
className: isLynx ? 'ipc-player-plugin-active-control-scroll-lynx' : undefined,
|
|
90
99
|
scrollY: true
|
|
91
100
|
}, /*#__PURE__*/React.createElement(View, {
|
|
92
101
|
className: clsx('ipc-player-plugin-active-control', contentClsName)
|
|
@@ -98,9 +107,11 @@ export function MoveInterActiveControlUI(props) {
|
|
|
98
107
|
})
|
|
99
108
|
}, /*#__PURE__*/React.createElement(View, {
|
|
100
109
|
className: clsx('ipc-player-plugin-active-control-item-icon')
|
|
101
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
110
|
+
}, !isLynx && /*#__PURE__*/React.createElement(View, {
|
|
102
111
|
className: clsx('ipc-player-plugin-active-control-item-icon-mask')
|
|
103
|
-
}), /*#__PURE__*/React.createElement(
|
|
112
|
+
}), isLynx ? /*#__PURE__*/React.createElement(PlayerText, {
|
|
113
|
+
className: clsx('icon-panel', item.iconName, 'ipc-player-plugin-interactive-icon')
|
|
114
|
+
}) : /*#__PURE__*/React.createElement(View, {
|
|
104
115
|
className: clsx('icon-panel', item.iconName, 'ipc-player-plugin-interactive-icon')
|
|
105
116
|
})), /*#__PURE__*/React.createElement(View, {
|
|
106
117
|
className: clsx('ipc-player-plugin-active-control-item-title')
|
|
@@ -43,8 +43,6 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
.ipc-player-plugin-active-control-item-icon {
|
|
46
|
-
position: relative;
|
|
47
|
-
z-index: 1;
|
|
48
46
|
width: calc(42px * var(--ipc-player-size-scale, 1));
|
|
49
47
|
height: calc(42px * var(--ipc-player-size-scale, 1));
|
|
50
48
|
border-radius: calc(42px * var(--ipc-player-size-scale, 1));
|
|
@@ -54,7 +52,6 @@
|
|
|
54
52
|
justify-content: center;
|
|
55
53
|
font-size: calc(16px * var(--ipc-player-size-scale, 1));
|
|
56
54
|
color: var(--color);
|
|
57
|
-
overflow: hidden;
|
|
58
55
|
.ipc-player-plugin-active-control-item-icon-mask {
|
|
59
56
|
position: absolute;
|
|
60
57
|
width: 100%;
|
|
@@ -64,6 +61,14 @@
|
|
|
64
61
|
opacity: 1;
|
|
65
62
|
}
|
|
66
63
|
}
|
|
64
|
+
|
|
65
|
+
.ipc-player-plugin-active-control-wrap-webview {
|
|
66
|
+
.ipc-player-plugin-active-control-item-icon {
|
|
67
|
+
position: relative;
|
|
68
|
+
z-index: 1;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
67
72
|
.ipc-player-plugin-active-control-item-title {
|
|
68
73
|
width: calc(70px * var(--ipc-player-size-scale, 1));
|
|
69
74
|
white-space: nowrap; /* 防止文本换行 */
|
|
@@ -73,4 +78,19 @@
|
|
|
73
78
|
}
|
|
74
79
|
.ipc-player-plugin-interactive-icon {
|
|
75
80
|
font-size: calc(20px * var(--ipc-player-size-scale, 1));;
|
|
76
|
-
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ipc-player-plugin-active-control-wrap-lynx {
|
|
84
|
+
min-height: 0;
|
|
85
|
+
|
|
86
|
+
.ipc-player-plugin-active-control-scroll-lynx {
|
|
87
|
+
height: 0;
|
|
88
|
+
min-height: 0;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ipc-player-plugin-active-control-item-icon {
|
|
93
|
+
// The background belongs to the scrolling card, not a separate absolute layer.
|
|
94
|
+
background: var(--iconBgColor);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { usePlayerOverlayHost } from '../../renderer/overlay';
|
|
5
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
6
|
import { useStore } from '../../ctx/store';
|
|
5
7
|
import { landscapeTipId } from '../../ui/constant';
|
|
6
8
|
import { PlayState } from '../../interface';
|
|
@@ -9,6 +11,7 @@ import { multiPrefix } from './constants';
|
|
|
9
11
|
import { Storage } from '../../utils/storage';
|
|
10
12
|
import './index.less';
|
|
11
13
|
export const LandscapeTip = props => {
|
|
14
|
+
const OverlayView = usePlayerOverlayHost();
|
|
12
15
|
const {
|
|
13
16
|
devId,
|
|
14
17
|
deleteContent
|
|
@@ -27,7 +30,7 @@ export const LandscapeTip = props => {
|
|
|
27
30
|
storage.set(landscapeTipId, true);
|
|
28
31
|
};
|
|
29
32
|
if (showTipModal && playState === PlayState.PLAYING) {
|
|
30
|
-
return /*#__PURE__*/React.createElement(
|
|
33
|
+
return /*#__PURE__*/React.createElement(OverlayView, null, /*#__PURE__*/React.createElement(View, {
|
|
31
34
|
className: clsx(`${multiPrefix}-tile-tip-content`, `${multiPrefix}-landscape-tip`)
|
|
32
35
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
33
36
|
className: clsx(`${multiPrefix}-tile-tip-text`, `${multiPrefix}-landscape-tip`)
|
|
@@ -2,12 +2,13 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import "core-js/modules/esnext.iterator.constructor.js";
|
|
4
4
|
import "core-js/modules/esnext.iterator.filter.js";
|
|
5
|
-
import {
|
|
5
|
+
import { View } from '@ray-js/ray';
|
|
6
6
|
import { getDpIdByCode, publishDps } from '@ray-js/ray-ipc-utils';
|
|
7
7
|
import _find from 'lodash/find';
|
|
8
8
|
import _get from 'lodash/get';
|
|
9
9
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
|
-
import
|
|
10
|
+
import { usePlayerOverlayHost } from '../../renderer/overlay';
|
|
11
|
+
import IpcPtzZoom from '../../renderer/ptzZoom';
|
|
11
12
|
import { useStore } from '../../ctx/store';
|
|
12
13
|
import { useMemoizedFn } from '../../hooks';
|
|
13
14
|
import { MultiCameraScreenMode } from '../../interface';
|
|
@@ -59,6 +60,7 @@ const getZoomData = devId => {
|
|
|
59
60
|
* 可移动的 PTZ 控制器,目前仅在多目使用
|
|
60
61
|
*/
|
|
61
62
|
export const MoveablePtzControlItem = props => {
|
|
63
|
+
const OverlayView = usePlayerOverlayHost();
|
|
62
64
|
const {
|
|
63
65
|
devId,
|
|
64
66
|
multiCameraCtx,
|
|
@@ -317,7 +319,7 @@ export const MoveablePtzControlItem = props => {
|
|
|
317
319
|
}, 1000);
|
|
318
320
|
}
|
|
319
321
|
});
|
|
320
|
-
return /*#__PURE__*/React.createElement(
|
|
322
|
+
return /*#__PURE__*/React.createElement(OverlayView, {
|
|
321
323
|
style: {
|
|
322
324
|
position: 'absolute',
|
|
323
325
|
zIndex: 89,
|
|
@@ -390,7 +392,7 @@ export const MoveablePtzControlItem = props => {
|
|
|
390
392
|
ptzData: selectedLenInfo.supportPTZ ? ptzData : [],
|
|
391
393
|
onTouchPtzStart: onTouchPtzStart,
|
|
392
394
|
onTouchPtzEnd: async () => {
|
|
393
|
-
screenMode
|
|
395
|
+
screenMode === MultiCameraScreenMode.landscape && event.emit(startTimeToHideAllComponent);
|
|
394
396
|
const stopConfig = dpSupportMap.ipc_multi_ptz_control ? {
|
|
395
397
|
code: 'ipc_multi_ptz_stop',
|
|
396
398
|
value: JSON.stringify({
|
|
@@ -415,7 +417,7 @@ export const MoveablePtzControlItem = props => {
|
|
|
415
417
|
},
|
|
416
418
|
onTouchZoomStart: onTouchZoomStart,
|
|
417
419
|
onTouchZoomEnd: async () => {
|
|
418
|
-
screenMode
|
|
420
|
+
screenMode === MultiCameraScreenMode.landscape && event.emit(startTimeToHideAllComponent);
|
|
419
421
|
const stopConfig = dpSupportMap.ipc_multi_zoom_control ? {
|
|
420
422
|
code: 'ipc_multi_zoom_stop',
|
|
421
423
|
value: JSON.stringify({
|
|
@@ -464,10 +466,10 @@ export const MoveablePtzControl = props => {
|
|
|
464
466
|
// 处理因为状态更新不同步导致的闪烁问题
|
|
465
467
|
const activeViewRef = useRef(0);
|
|
466
468
|
const onDragStart = () => {
|
|
467
|
-
screenMode
|
|
469
|
+
screenMode === MultiCameraScreenMode.landscape && event.emit(pauseTimeToHideAllComponent);
|
|
468
470
|
};
|
|
469
471
|
const onDragEnd = data => {
|
|
470
|
-
screenMode
|
|
472
|
+
screenMode === MultiCameraScreenMode.landscape && event.emit(startTimeToHideAllComponent);
|
|
471
473
|
activeViewRef.current = activeViewRef.current === 0 ? 1 : 0;
|
|
472
474
|
setStyle(prev => _objectSpread(_objectSpread({}, prev), {}, {
|
|
473
475
|
positionLeft: data.positionLeft,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useMemoizedFn } from 'ahooks';
|
|
6
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
6
7
|
import { useStore } from '../../ctx/store';
|
|
7
8
|
import './index.less';
|
|
8
9
|
/**
|
|
@@ -26,7 +27,7 @@ export const MultiPtz = props => {
|
|
|
26
27
|
selectedLenInfo: multiCameraCtx.selectedLenInfo
|
|
27
28
|
});
|
|
28
29
|
const onPtz = useMemoizedFn(() => {
|
|
29
|
-
multiCameraCtx.
|
|
30
|
+
multiCameraCtx.setPtzStatus(!ptzStatus);
|
|
30
31
|
});
|
|
31
32
|
if (!selectedLenInfo.supportPTZ && !selectedLenInfo.supportZoom) {
|
|
32
33
|
return null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { usePlayerOverlayHost } from '../../renderer/overlay';
|
|
5
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
6
|
import { useStore } from '../../ctx/store';
|
|
5
7
|
import { ptzMoveableTipId } from '../../ui/constant';
|
|
6
8
|
import { PlayState } from '../../interface';
|
|
@@ -9,6 +11,7 @@ import { multiPrefix } from './constants';
|
|
|
9
11
|
import { Storage } from '../../utils/storage';
|
|
10
12
|
import './index.less';
|
|
11
13
|
export const PtzMoveableTip = props => {
|
|
14
|
+
const OverlayView = usePlayerOverlayHost();
|
|
12
15
|
const {
|
|
13
16
|
devId,
|
|
14
17
|
positionLeft = 24,
|
|
@@ -44,7 +47,7 @@ export const PtzMoveableTip = props => {
|
|
|
44
47
|
storage.set(ptzMoveableTipId, true);
|
|
45
48
|
};
|
|
46
49
|
if (showTipModal && playState === PlayState.PLAYING) {
|
|
47
|
-
return /*#__PURE__*/React.createElement(
|
|
50
|
+
return /*#__PURE__*/React.createElement(OverlayView, null, /*#__PURE__*/React.createElement(View, {
|
|
48
51
|
className: clsx(`${multiPrefix}-tile-tip-content`, `${multiPrefix}-ptz-tip`),
|
|
49
52
|
style: {
|
|
50
53
|
left: positionInfo.content
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { View } from '@ray-js/ray';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
5
|
import { useStore } from '../../ctx/store';
|
|
5
6
|
import { MultiCameraLayoutStyle, MultiCameraScreenMode } from '../../interface';
|
|
6
7
|
import { multiPrefix } from './constants';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useMemoizedFn } from 'ahooks';
|
|
6
6
|
import Color from 'color';
|
|
7
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
7
8
|
import { useStore } from '../../ctx/store';
|
|
8
9
|
import { multiPrefix } from './constants';
|
|
9
10
|
import './index.less';
|
|
@@ -27,7 +28,7 @@ export const TileMultiPtz = props => {
|
|
|
27
28
|
});
|
|
28
29
|
const lighterBrandColor = new Color(brandColor).alpha(0.2).hexa();
|
|
29
30
|
const onPtz = useMemoizedFn(() => {
|
|
30
|
-
multiCameraCtx.
|
|
31
|
+
multiCameraCtx.setPtzStatus(!ptzStatus);
|
|
31
32
|
});
|
|
32
33
|
if (!selectedLenInfo.supportPTZ && !selectedLenInfo.supportZoom) {
|
|
33
34
|
return null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { View
|
|
1
|
+
import { View } from '@ray-js/ray';
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
5
|
import { MultiCameraLayoutStyle } from '../../interface';
|
|
5
6
|
import { multiPrefix } from './constants';
|
|
6
7
|
import { useStore } from '../../ctx/store';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { View
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { usePlayerOverlayHost } from '../../renderer/overlay';
|
|
5
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
6
|
import { useStore } from '../../ctx/store';
|
|
5
7
|
import { tileTipId } from '../../ui/constant';
|
|
6
8
|
import { PlayState } from '../../interface';
|
|
@@ -9,6 +11,7 @@ import { multiPrefix } from './constants';
|
|
|
9
11
|
import { Storage } from '../../utils/storage';
|
|
10
12
|
import './index.less';
|
|
11
13
|
export const TileTip = props => {
|
|
14
|
+
const OverlayView = usePlayerOverlayHost();
|
|
12
15
|
const {
|
|
13
16
|
devId,
|
|
14
17
|
deleteContent,
|
|
@@ -37,7 +40,7 @@ export const TileTip = props => {
|
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
42
|
if (playState === PlayState.PLAYING) {
|
|
40
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
+
return /*#__PURE__*/React.createElement(OverlayView, null, /*#__PURE__*/React.createElement(View, {
|
|
41
44
|
className: clsx(`${multiPrefix}-tile-tip-content`, `${multiPrefix}-${showTipModal}`)
|
|
42
45
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
43
46
|
className: clsx(`${multiPrefix}-tile-tip-text`, `${multiPrefix}-${showTipModal}`)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { View
|
|
1
|
+
import { View } from '@ray-js/ray';
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import { PlayerText as Text } from '../../renderer/text';
|
|
4
5
|
import { useStore } from '../../ctx/store';
|
|
5
6
|
import { UIEventContext } from '../../ui/context';
|
|
6
7
|
import { widgetLabs, widgetClick, pauseTimeToHideAllComponent, startTimeToHideAllComponent } from '../../ui/constant';
|