@ray-js/ipc-player-integration 0.0.28 → 0.0.29-beta.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.
- package/lib/ctx/ctx.js +10 -2
- package/lib/ctx/multiCameraCtx.d.ts +73 -0
- package/lib/ctx/multiCameraCtx.js +176 -0
- package/lib/features/initPlayerWidgets/index.d.ts +5 -4
- package/lib/features/initPlayerWidgets/index.js +7 -0
- package/lib/features/initPlayerWidgets/multiCamera.d.ts +8 -0
- package/lib/features/initPlayerWidgets/multiCamera.js +78 -0
- package/lib/i18n/index.d.ts +20 -0
- package/lib/i18n/strings.d.ts +10 -0
- package/lib/i18n/strings.js +12 -2
- package/lib/iconfont/iconfont.css +197 -4
- package/lib/iconfont/iconfont.js +13 -13
- package/lib/iconfont/iconfont.json +336 -0
- package/lib/iconfont/iconfont.ttf +0 -0
- package/lib/iconfont/iconfont.woff +0 -0
- package/lib/iconfont/iconfont.woff2 +0 -0
- package/lib/interface.d.ts +90 -4
- package/lib/interface.js +56 -1
- package/lib/ui/constant.d.ts +6 -0
- package/lib/ui/constant.js +6 -0
- package/lib/ui/ui.js +187 -17
- package/lib/ui/ui.less +19 -21
- package/lib/utils/storage/index.d.ts +1 -0
- package/lib/utils/storage/index.js +8 -1
- package/lib/widgets/battery/battery.composition.d.ts +60 -4
- package/lib/widgets/fullScreen/fullScreen.js +5 -3
- package/lib/widgets/index.d.ts +2 -0
- package/lib/widgets/index.js +3 -1
- package/lib/widgets/multiCamera/constants.d.ts +1 -0
- package/lib/widgets/multiCamera/constants.js +1 -0
- package/lib/widgets/multiCamera/index.d.ts +8 -0
- package/lib/widgets/multiCamera/index.js +8 -0
- package/lib/widgets/multiCamera/index.less +214 -0
- package/lib/widgets/multiCamera/landscapeTip.d.ts +6 -0
- package/lib/widgets/multiCamera/landscapeTip.js +40 -0
- package/lib/widgets/multiCamera/moveView/index.d.ts +9 -0
- package/lib/widgets/multiCamera/moveView/index.js +22 -0
- package/lib/widgets/multiCamera/moveView/tyComponent/index.d.ts +1 -0
- package/lib/widgets/multiCamera/moveView/tyComponent/index.js +42 -0
- package/lib/widgets/multiCamera/moveView/tyComponent/index.json +3 -0
- package/lib/widgets/multiCamera/moveView/tyComponent/index.tyml +8 -0
- package/lib/widgets/multiCamera/moveView/tyComponent/index.tyss +4 -0
- package/lib/widgets/multiCamera/moveView/utils.d.ts +1 -0
- package/lib/widgets/multiCamera/moveView/utils.js +29 -0
- package/lib/widgets/multiCamera/moveablePtzControl.d.ts +22 -0
- package/lib/widgets/multiCamera/moveablePtzControl.js +302 -0
- package/lib/widgets/multiCamera/multiPtz.d.ts +11 -0
- package/lib/widgets/multiCamera/multiPtz.js +46 -0
- package/lib/widgets/multiCamera/ptzMoveableTip.d.ts +8 -0
- package/lib/widgets/multiCamera/ptzMoveableTip.js +66 -0
- package/lib/widgets/multiCamera/switchLayout.d.ts +8 -0
- package/lib/widgets/multiCamera/switchLayout.js +57 -0
- package/lib/widgets/multiCamera/tileActions.d.ts +6 -0
- package/lib/widgets/multiCamera/tileActions.js +15 -0
- package/lib/widgets/multiCamera/tileMultiPtz.d.ts +11 -0
- package/lib/widgets/multiCamera/tileMultiPtz.js +48 -0
- package/lib/widgets/multiCamera/tileSwitchLayout.d.ts +8 -0
- package/lib/widgets/multiCamera/tileSwitchLayout.js +38 -0
- package/lib/widgets/multiCamera/tileTip.d.ts +6 -0
- package/lib/widgets/multiCamera/tileTip.js +50 -0
- package/lib/widgets/ptz/ptz.less +15 -8
- package/lib/widgets/smallIntercom/index.d.ts +8 -0
- package/lib/widgets/smallIntercom/index.js +38 -0
- package/lib/widgets/smallIntercom/index.less +4 -0
- package/lib/widgets/voiceIntercom/voiceIntercom.d.ts +33 -2
- package/package.json +6 -5
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, CoverView, Text } from '@ray-js/ray';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useStore } from '../../ctx/store';
|
|
5
|
+
import { tileTipId } from '../../ui/constant';
|
|
6
|
+
import { PlayState } from '../../interface';
|
|
7
|
+
import Strings from '../../i18n';
|
|
8
|
+
import { multiPrefix } from './constants';
|
|
9
|
+
import { Storage } from '../../utils/storage';
|
|
10
|
+
import './index.less';
|
|
11
|
+
export const TileTip = props => {
|
|
12
|
+
const {
|
|
13
|
+
devId,
|
|
14
|
+
deleteContent,
|
|
15
|
+
multiCameraCtx
|
|
16
|
+
} = props;
|
|
17
|
+
const {
|
|
18
|
+
protocol
|
|
19
|
+
} = multiCameraCtx;
|
|
20
|
+
const [showTipModal, setShowTipModal] = useState('step1');
|
|
21
|
+
const {
|
|
22
|
+
playState
|
|
23
|
+
} = useStore({
|
|
24
|
+
playState: props.playState
|
|
25
|
+
});
|
|
26
|
+
// 获取缓存状态
|
|
27
|
+
const hideTipModal = () => {
|
|
28
|
+
deleteContent('absolute', tileTipId);
|
|
29
|
+
const storage = new Storage(devId);
|
|
30
|
+
storage.set(tileTipId, true);
|
|
31
|
+
};
|
|
32
|
+
const handleConfirm = () => {
|
|
33
|
+
if (showTipModal === 'step1' && protocol.total_split_num > 2) {
|
|
34
|
+
setShowTipModal('step2');
|
|
35
|
+
} else {
|
|
36
|
+
hideTipModal();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
if (playState === PlayState.PLAYING) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(CoverView, null, /*#__PURE__*/React.createElement(View, {
|
|
41
|
+
className: clsx(`${multiPrefix}-tile-tip-content`, `${multiPrefix}-${showTipModal}`)
|
|
42
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
43
|
+
className: clsx(`${multiPrefix}-tile-tip-text`, `${multiPrefix}-${showTipModal}`)
|
|
44
|
+
}, Strings.getLang(`ipc_player_tile_tip_text_${showTipModal}`)), /*#__PURE__*/React.createElement(View, {
|
|
45
|
+
className: clsx(`${multiPrefix}-tile-tip-button`, `${multiPrefix}-${showTipModal}`),
|
|
46
|
+
onClick: handleConfirm
|
|
47
|
+
}, protocol.total_split_num > 2 && showTipModal === 'step1' ? Strings.getLang('ipc_player_tip_next') : Strings.getLang('ipc_player_tip_confirm')));
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
};
|
package/lib/widgets/ptz/ptz.less
CHANGED
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
position: absolute;
|
|
18
18
|
bottom: 32px;
|
|
19
19
|
// transform: translate(0, -20%);
|
|
20
|
-
right: calc(32px * var(--ipc-player-size-scale, 1))
|
|
20
|
+
right: calc(32px * var(--ipc-player-size-scale, 1));
|
|
21
21
|
z-index: 348;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
@keyframes ipc-player-plugin-full-screen-ptz-control-move-in {
|
|
26
25
|
0% {
|
|
27
|
-
transform: translate(0,
|
|
26
|
+
transform: translate(0, 100vh); /* 从下方滑入 */
|
|
28
27
|
}
|
|
29
28
|
100% {
|
|
30
29
|
transform: translate(0, 0); /* 移动到目标位置 */
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
transform: translate(0, 0); /* 从当前位置开始 */
|
|
37
36
|
}
|
|
38
37
|
100% {
|
|
39
|
-
transform: translate(0,
|
|
38
|
+
transform: translate(0, 100vh); /* 向下滑出,隐藏 */
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
|
|
@@ -44,9 +43,10 @@
|
|
|
44
43
|
transform: translate(0, 0);
|
|
45
44
|
transition: @animation-time ease-in;
|
|
46
45
|
animation: ipc-player-plugin-full-screen-ptz-control-move-in @animation-time ease-in-out forwards;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
&.ipc-player-plugin-full-screen-ptz-control-hide {
|
|
47
|
+
animation: ipc-player-plugin-full-screen-ptz-control-move-out @animation-time ease-in-out
|
|
48
|
+
forwards;
|
|
49
|
+
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.ipc-player-plugin-full-screen-ptz-disappear {
|
|
@@ -69,4 +69,11 @@
|
|
|
69
69
|
bottom: 0;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
.ipc-player-plugin-moveable-ptz-control {
|
|
73
|
+
--ptz-bg-color: rgba(0, 0, 0, 0.4);
|
|
74
|
+
--ptz-arrow-bg-color: rgba(0, 0, 0, 0.4);
|
|
75
|
+
--app-native-btn-bg-color: transparent;
|
|
76
|
+
--ptz-border-color: rgba(255, 255, 255, 0.2);
|
|
77
|
+
--ptz-arrow-icon-color: #fff;
|
|
78
|
+
--ptz-circle-inner-bg-color: rgba(255, 255, 255, 0.65);
|
|
79
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentConfigProps } from '../../interface';
|
|
3
|
+
import './index.less';
|
|
4
|
+
type Props = ComponentConfigProps & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function SmallIntercom(props: Props): React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import { View } from '@ray-js/ray';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { useStore } from '../../ctx/store';
|
|
6
|
+
import { pauseTimeToHideAllComponent } from '../../ui/constant';
|
|
7
|
+
import { UIEventContext } from '../../ui/context';
|
|
8
|
+
import { VoiceIntercom } from '../voiceIntercom';
|
|
9
|
+
import './index.less';
|
|
10
|
+
export function SmallIntercom(props) {
|
|
11
|
+
const {
|
|
12
|
+
className
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
brandColor,
|
|
16
|
+
intercomSupported
|
|
17
|
+
} = useStore({
|
|
18
|
+
intercomMode: props.intercomMode,
|
|
19
|
+
brandColor: props.brandColor,
|
|
20
|
+
intercomSupported: props.intercomSupported
|
|
21
|
+
});
|
|
22
|
+
const {
|
|
23
|
+
event
|
|
24
|
+
} = useContext(UIEventContext);
|
|
25
|
+
if (!intercomSupported) return null;
|
|
26
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
27
|
+
className: clsx(className)
|
|
28
|
+
}, /*#__PURE__*/React.createElement(VoiceIntercom, _extends({}, props, {
|
|
29
|
+
talkingColor: brandColor,
|
|
30
|
+
mode: "verticalSmall",
|
|
31
|
+
onTouchStart: () => {
|
|
32
|
+
event.emit(pauseTimeToHideAllComponent);
|
|
33
|
+
},
|
|
34
|
+
onTouchEnd: () => {
|
|
35
|
+
// event.emit(startTimeToHideAllComponent);
|
|
36
|
+
}
|
|
37
|
+
})));
|
|
38
|
+
}
|
|
@@ -26,7 +26,8 @@ export declare const VoiceIntercom: React.ForwardRefExoticComponent<{
|
|
|
26
26
|
bottomLeftContent: import("../../interface").RetAtom<import("../../interface").ComponentConfig<any & Record<string, any>>[]>;
|
|
27
27
|
bottomRightContent: import("../../interface").RetAtom<import("../../interface").ComponentConfig<any & Record<string, any>>[]>;
|
|
28
28
|
absoluteContent: import("../../interface").RetAtom<import("../../interface").ComponentConfig<any & Record<string, any>>[]>;
|
|
29
|
-
|
|
29
|
+
ptzControlTipDisabled: import("../../interface").RetAtom<boolean>;
|
|
30
|
+
setPtzControlTipDisabled: (value: boolean) => void;
|
|
30
31
|
setBrandColor: (color: string) => void;
|
|
31
32
|
setVerticalMic: (value: boolean) => void;
|
|
32
33
|
setScreenType: (type: import("../../interface").ScreenType) => void;
|
|
@@ -41,13 +42,43 @@ export declare const VoiceIntercom: React.ForwardRefExoticComponent<{
|
|
|
41
42
|
setPlayState: (value: PlayState) => void;
|
|
42
43
|
addContent: <T>(type: import("../../interface").ContentPlaceType, config: import("../../interface").ComponentConfig<T> | import("../../interface").ComponentConfig<T>[], position?: number | undefined) => void;
|
|
43
44
|
deleteContent: (type: import("../../interface").ContentPlaceType, id: string) => void;
|
|
44
|
-
getContent: () =>
|
|
45
|
+
getContent: () => {
|
|
46
|
+
topLeft: import("../../interface").ComponentConfig<any & Record<string, any>>[];
|
|
47
|
+
topRight: import("../../interface").ComponentConfig<any & Record<string, any>>[];
|
|
48
|
+
bottomLeft: import("../../interface").ComponentConfig<any & Record<string, any>>[];
|
|
49
|
+
bottomRight: import("../../interface").ComponentConfig<any & Record<string, any>>[];
|
|
50
|
+
absolute: import("../../interface").ComponentConfig<any & Record<string, any>>[];
|
|
51
|
+
};
|
|
45
52
|
updateContent: (type: import("../../interface").ContentPlaceType, data: import("../../interface").ComponentConfig<any & Record<string, any>>[]) => void;
|
|
46
53
|
hasContent: (type: import("../../interface").ContentPlaceType, id: string) => boolean;
|
|
47
54
|
hideContent: (type: import("../../interface").ContentPlaceType, id: string) => void;
|
|
48
55
|
showContent: (type: import("../../interface").ContentPlaceType, id: string) => void;
|
|
49
56
|
toast: import("../../ports.output").Toast;
|
|
50
57
|
event: import("../../interface").EventInstance;
|
|
58
|
+
multiCameraCtx: {
|
|
59
|
+
isSupport: boolean;
|
|
60
|
+
protocol: import("../../interface").VideoSplitProtocol;
|
|
61
|
+
layoutStyle: import("../../interface").RetAtom<import("../../interface").MultiCameraLayoutStyle>;
|
|
62
|
+
screenMode: import("../../interface").RetAtom<import("../../interface").MultiCameraScreenMode>;
|
|
63
|
+
nextLayoutStyle: import("../../interface").RetAtom<import("../../interface").MultiCameraLayoutStyle>;
|
|
64
|
+
selectedLenInfo: import("../../interface").RetAtom<import("../../interface").MultiCameraLenInfo>;
|
|
65
|
+
ptzStatus: import("../../interface").RetAtom<boolean>;
|
|
66
|
+
extendProps: {
|
|
67
|
+
type: number | undefined;
|
|
68
|
+
onSelectVideoIndex: (this: any, event: any) => void;
|
|
69
|
+
onLayoutStatusChanged: (this: any, event: any) => void;
|
|
70
|
+
onLocalizerViewLocated: (this: any, event: any) => Promise<void>;
|
|
71
|
+
};
|
|
72
|
+
setLayoutStyle: (style: import("../../interface").MultiCameraLayoutStyle) => void;
|
|
73
|
+
setScreenMode: (mode: import("../../interface").MultiCameraScreenMode) => void;
|
|
74
|
+
setPtzStatus: (value: boolean | ((prevValue: boolean) => boolean)) => void;
|
|
75
|
+
showLenNames: (value: boolean) => void;
|
|
76
|
+
/**
|
|
77
|
+
* 处理对讲中动画
|
|
78
|
+
*/
|
|
79
|
+
setNextLayoutStyle: (value: import("../../interface").MultiCameraLayoutStyle | ((prevValue: import("../../interface").MultiCameraLayoutStyle) => import("../../interface").MultiCameraLayoutStyle)) => void;
|
|
80
|
+
getNextLayoutStyle: () => Promise<import("../../interface").MultiCameraLayoutStyle>;
|
|
81
|
+
};
|
|
51
82
|
} & {
|
|
52
83
|
style?: React.CSSProperties | undefined;
|
|
53
84
|
intercomClassName?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ipc-player-integration",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29-beta.1",
|
|
4
4
|
"description": "IPC 融合播放器",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -35,20 +35,21 @@
|
|
|
35
35
|
"ahooks": "^3.1.6"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ray-js/ipc-ptz-zoom": "^0.0.2",
|
|
39
|
-
"@ray-js/panel-sdk": "^1.13.1",
|
|
40
38
|
"@ray-js/direction-control": "^0.0.8",
|
|
39
|
+
"@ray-js/ipc-ptz-zoom": "0.0.3-beta-1",
|
|
40
|
+
"@ray-js/panel-sdk": "^1.13.1",
|
|
41
41
|
"@ray-js/ray-ipc-player": "^2.0.31",
|
|
42
42
|
"@ray-js/ray-ipc-utils": "^1.1.10",
|
|
43
43
|
"@ray-js/svg": "0.2.0",
|
|
44
44
|
"clsx": "^1.2.1",
|
|
45
|
+
"color": "^5.0.2",
|
|
45
46
|
"jotai": "^2.10.2"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@commitlint/cli": "^7.2.1",
|
|
49
50
|
"@commitlint/config-conventional": "^9.0.1",
|
|
50
|
-
"@ray-js/cli": "^1.7.
|
|
51
|
-
"@ray-js/ray": "^1.7.
|
|
51
|
+
"@ray-js/cli": "^1.7.53",
|
|
52
|
+
"@ray-js/ray": "^1.7.53",
|
|
52
53
|
"@testing-library/react-hooks": "^8.0.1",
|
|
53
54
|
"@types/jest": "^29.5.14",
|
|
54
55
|
"ahooks": "^3.8.4",
|